From d135b9d53d7374631cbfea12d160c8bd71f5880c Mon Sep 17 00:00:00 2001 From: Philip Chmalts Date: Thu, 1 Oct 2026 11:06:02 -0700 Subject: [PATCH 1/3] feat: Add media.get, cameras.live_views and can_stream_live_video Bump @seamapi/types to 1.1092.0 and @seamapi/blueprint to ^1.12.0 and regenerate. The Media model shares its name with the Media API class, so return types that would be shadowed inside Seam.Api are now fully qualified. Co-Authored-By: Claude Opus 5.5 --- codegen/lib/build-model.ts | 15 +- package-lock.json | 26 +- package.json | 4 +- src/Seam/Api/AccessCodes.cs | 3625 +- src/Seam/Api/AccessGrants.cs | 2896 +- src/Seam/Api/AccessGroupsAcs.cs | 1614 +- src/Seam/Api/AccessMethods.cs | 2035 +- src/Seam/Api/ActionAttempts.cs | 571 +- src/Seam/Api/ClientSessions.cs | 1953 +- src/Seam/Api/ConnectWebviews.cs | 1699 +- src/Seam/Api/ConnectedAccounts.cs | 1304 +- src/Seam/Api/CredentialsAcs.cs | 2538 +- src/Seam/Api/Customers.cs | 9686 +++-- src/Seam/Api/DailyProgramsThermostats.cs | 952 +- src/Seam/Api/Devices.cs | 7915 ++--- src/Seam/Api/EncodersAcs.cs | 1611 +- src/Seam/Api/EntrancesAcs.cs | 1470 +- src/Seam/Api/Events.cs | 2053 +- src/Seam/Api/InstantKeys.cs | 669 +- src/Seam/Api/LiveViewsCameras.cs | 395 + src/Seam/Api/Locks.cs | 1867 +- src/Seam/Api/Media.cs | 170 + src/Seam/Api/NoiseSensors.cs | 478 +- src/Seam/Api/NoiseThresholdsNoiseSensors.cs | 1315 +- src/Seam/Api/Phones.cs | 687 +- src/Seam/Api/SchedulesThermostats.cs | 1344 +- src/Seam/Api/SimulateAccessCodes.cs | 323 +- src/Seam/Api/SimulateConnectedAccounts.cs | 167 +- src/Seam/Api/SimulateDevices.cs | 1022 +- src/Seam/Api/SimulateEncodersAcs.cs | 1003 +- src/Seam/Api/SimulateLocks.cs | 536 +- src/Seam/Api/SimulateNoiseSensors.cs | 167 +- src/Seam/Api/SimulatePhones.cs | 661 +- src/Seam/Api/SimulateThermostats.cs | 571 +- src/Seam/Api/Spaces.cs | 3176 +- src/Seam/Api/SystemsAcs.cs | 1407 +- src/Seam/Api/Thermostats.cs | 5242 ++- src/Seam/Api/UnmanagedAccessCodes.cs | 1314 +- src/Seam/Api/UnmanagedAccessGrants.cs | 847 +- src/Seam/Api/UnmanagedAccessMethods.cs | 575 +- src/Seam/Api/UnmanagedDevices.cs | 1691 +- src/Seam/Api/UnmanagedUserIdentities.cs | 796 +- src/Seam/Api/UserIdentities.cs | 3653 +- src/Seam/Api/UsersAcs.cs | 3077 +- src/Seam/Api/Webhooks.cs | 1040 +- src/Seam/Api/Workspaces.cs | 1713 +- src/Seam/Model/AccessCode.cs | 7052 ++-- src/Seam/Model/AccessGrant.cs | 2717 +- src/Seam/Model/AccessMethod.cs | 2297 +- src/Seam/Model/AcsAccessGroup.cs | 2736 +- src/Seam/Model/AcsCredential.cs | 2113 +- src/Seam/Model/AcsEncoder.cs | 329 +- src/Seam/Model/AcsEntrance.cs | 2893 +- src/Seam/Model/AcsSystem.cs | 2445 +- src/Seam/Model/AcsUser.cs | 4308 ++- src/Seam/Model/ActionAttempt.cs | 12721 ++++--- src/Seam/Model/Batch.cs | 528 +- src/Seam/Model/CameraLiveViewAnswer.cs | 51 + src/Seam/Model/CameraLiveViewSession.cs | 72 + src/Seam/Model/ClientSession.cs | 264 +- src/Seam/Model/ConnectWebview.cs | 509 +- src/Seam/Model/ConnectedAccount.cs | 2683 +- src/Seam/Model/CustomerPortal.cs | 131 +- src/Seam/Model/Device.cs | 19274 +++++----- src/Seam/Model/DeviceProvider.cs | 860 +- src/Seam/Model/Event.cs | 33590 ++++++++---------- src/Seam/Model/InstantKey.cs | 315 +- src/Seam/Model/Media.cs | 175 + src/Seam/Model/NoiseThreshold.cs | 153 +- src/Seam/Model/Phone.cs | 819 +- src/Seam/Model/Space.cs | 440 +- src/Seam/Model/ThermostatDailyProgram.cs | 251 +- src/Seam/Model/ThermostatSchedule.cs | 341 +- src/Seam/Model/UnmanagedAccessCode.cs | 5631 ++- src/Seam/Model/UnmanagedAccessGrant.cs | 2671 +- src/Seam/Model/UnmanagedAccessMethod.cs | 2283 +- src/Seam/Model/UnmanagedDevice.cs | 6768 ++-- src/Seam/Model/UnmanagedUserIdentity.cs | 893 +- src/Seam/Model/UserIdentity.cs | 905 +- src/Seam/Model/Webhook.cs | 110 +- src/Seam/Model/Workspace.cs | 392 +- 81 files changed, 92606 insertions(+), 104987 deletions(-) create mode 100644 src/Seam/Api/LiveViewsCameras.cs create mode 100644 src/Seam/Api/Media.cs create mode 100644 src/Seam/Model/CameraLiveViewAnswer.cs create mode 100644 src/Seam/Model/CameraLiveViewSession.cs create mode 100644 src/Seam/Model/Media.cs diff --git a/codegen/lib/build-model.ts b/codegen/lib/build-model.ts index d28d9fba..e98c841d 100644 --- a/codegen/lib/build-model.ts +++ b/codegen/lib/build-model.ts @@ -646,17 +646,24 @@ const resolveModel = ( // The C# type for an endpoint's return value, and the resource property name it // is unwrapped from in the response body. +// A model named like the API class that returns it (e.g. Media from the Media +// API) is shadowed by that class inside Seam.Api, so it is fully qualified. const responseReturn = ( response: Endpoint['response'], modelTypes: Set, + apiClassName: string, ): { returnType: string; returnProp: string } | undefined => { if (response.responseType === 'void') return undefined const returnProp = pascalCase(response.responseKey) - const model = resolveModel( + const resolvedModel = resolveModel( response.resourceType, response.responseKey, modelTypes, ) + const model = + resolvedModel === apiClassName + ? `Seam.Model.${resolvedModel}` + : resolvedModel const returnType = response.responseType === 'resource_list' ? `List<${model}>` : model return { returnType, returnProp } @@ -690,7 +697,11 @@ export const buildApiFile = ( : {}), } - const returned = responseReturn(endpoint.response, modelTypes) + const returned = responseReturn( + endpoint.response, + modelTypes, + pascalCase(className), + ) const isVoid = returned == null if (isVoid) { diff --git a/package-lock.json b/package-lock.json index 415097bb..4df5e161 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "1.5.0", "license": "MIT", "devDependencies": { - "@seamapi/blueprint": "^1.9.1", + "@seamapi/blueprint": "^1.12.0", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1047.0", + "@seamapi/types": "1.1092.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.0.0" @@ -790,14 +790,14 @@ "license": "MIT" }, "node_modules/@seamapi/blueprint": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@seamapi/blueprint/-/blueprint-1.9.1.tgz", - "integrity": "sha512-A9H3dZE9f+ZEEnOAlMl5jSlL5F/RIKkjOF8NDFbnuahAiu/trDz/RzHOGhbQd6sd0RErIyx3eG1p4HCOJDKDCA==", + "version": "1.12.0", + "resolved": "https://npm.pkg.github.com/download/@seamapi/blueprint/1.12.0/e72f21582831d9be77804b63aafcc9cf48b7e2cc", + "integrity": "sha512-cH6mpLIUm2q2YxuxEW4G6ODYZJFZihJcUtGyVWjwfdfrmGCyAJRl+S7XCyGz5LuNhdBRux5iShHxtsc/b0Y80g==", "dev": true, "license": "MIT", "dependencies": { "change-case": "^5.4.4", - "zod": "^3.23.8" + "zod": "^4.0.0" }, "engines": { "node": ">=22.12.0", @@ -838,9 +838,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.1047.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1047.0.tgz", - "integrity": "sha512-S3A3FcQ4fWJ1IsxVjHaE14k7WlQt0iKJsb3oPF/YVUZHJAmHnFg6riAF6LghlMig7prLf6C2uxaTDairw5dCJQ==", + "version": "1.1092.0", + "resolved": "https://npm.pkg.github.com/download/@seamapi/types/1.1092.0/35cfbdb6dbfb0023a1ea6c6353ff90d51cc858e8", + "integrity": "sha512-99Wi8sSk4RZ2g9/iRJiONtIp9Hc/c2Xe5SeIIacbwxKbqkpmiTi8tQO0+M2qGXVzYuoO3xM/lBkEy4kUAhe/Ew==", "dev": true, "license": "MIT", "engines": { @@ -848,7 +848,7 @@ "npm": ">=10.0.0" }, "peerDependencies": { - "zod": "^3.24.0" + "zod": "^3.25.0 || ^4.0.0" } }, "node_modules/@sec-ant/readable-stream": { @@ -6022,9 +6022,9 @@ } }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.6.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz", + "integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==", "dev": true, "license": "MIT", "funding": { diff --git a/package.json b/package.json index 097ea578..f9b53507 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ }, "packageManager": "npm@11.19.0", "devDependencies": { - "@seamapi/blueprint": "^1.9.1", + "@seamapi/blueprint": "^1.12.0", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.1047.0", + "@seamapi/types": "1.1092.0", "change-case": "^5.4.4", "execa": "^10.0.1", "prettier": "^3.0.0" diff --git a/src/Seam/Api/AccessCodes.cs b/src/Seam/Api/AccessCodes.cs index a302e833..71e46f8c 100644 --- a/src/Seam/Api/AccessCodes.cs +++ b/src/Seam/Api/AccessCodes.cs @@ -9,2070 +9,1573 @@ namespace Seam.Api { - public class AccessCodes - { - private ISeamClient _seam; - - public AccessCodes(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create an Access Code. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - string? code = default, - string? commonCodeKey = default, - string deviceId = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - bool? isOfflineAccessCode = default, - bool? isOneTimeUse = default, - CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, - string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, - string? startsAt = default, - bool? useBackupAccessCodePool = default, - bool? useOfflineAccessCode = default - ) - { - AllowExternalModification = allowExternalModification; - AttemptForOfflineDevice = attemptForOfflineDevice; - Code = code; - CommonCodeKey = commonCodeKey; - DeviceId = deviceId; - EndsAt = endsAt; - IsExternalModificationAllowed = isExternalModificationAllowed; - IsOfflineAccessCode = isOfflineAccessCode; - IsOneTimeUse = isOneTimeUse; - MaxTimeRounding = maxTimeRounding; - Name = name; - PreferNativeScheduling = preferNativeScheduling; - PreferredCodeLength = preferredCodeLength; - StartsAt = startsAt; - UseBackupAccessCodePool = useBackupAccessCodePool; - UseOfflineAccessCode = useOfflineAccessCode; - } - - /// - /// Maximum rounding adjustment. To create a daily-bound [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum MaxTimeRoundingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "1hour")] - _1hour = 1, - - [EnumMember(Value = "1day")] - _1day = 2, - - [EnumMember(Value = "1h")] - _1h = 3, - - [EnumMember(Value = "1d")] - _1d = 4, - } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. - /// - [DataMember( - Name = "allow_external_modification", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AllowExternalModification { get; set; } - - [DataMember( - Name = "attempt_for_offline_device", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AttemptForOfflineDevice { get; set; } - - /// - /// Code to be used for access. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Key to identify access codes that should have the same code. Any two access codes with the same `common_code_key` are guaranteed to have the same `code`. See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). - /// - [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] - public string? CommonCodeKey { get; set; } - - /// - /// ID of the device for which you want to create the new access code. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. - /// - [DataMember( - Name = "is_external_modification_allowed", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsExternalModificationAllowed { get; set; } - - /// - /// Indicates whether the access code is an [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes). - /// - [DataMember( - Name = "is_offline_access_code", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsOfflineAccessCode { get; set; } - - /// - /// Indicates whether the [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) is a single-use access code. - /// - [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOneTimeUse { get; set; } - - /// - /// Maximum rounding adjustment. To create a daily-bound [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. - /// - [DataMember(Name = "max_time_rounding", IsRequired = false, EmitDefaultValue = false)] - public CreateRequest.MaxTimeRoundingEnum? MaxTimeRounding { get; set; } - - /// - /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. - /// - /// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. - /// - /// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. - /// - /// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Indicates whether [native scheduling](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. - /// - [DataMember( - Name = "prefer_native_scheduling", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? PreferNativeScheduling { get; set; } - - /// - /// Preferred code length. Only applicable if you do not specify a `code`. If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length. - /// - [DataMember( - Name = "preferred_code_length", - IsRequired = false, - EmitDefaultValue = false - )] - public float? PreferredCodeLength { get; set; } - - /// - /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Indicates whether to use a [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://docs.seam.co/api/access_codes/pull_backup_access_code). - /// - [DataMember( - Name = "use_backup_access_code_pool", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? UseBackupAccessCodePool { get; set; } - - [Obsolete("Use `is_offline_access_code` instead.")] - [DataMember( - Name = "use_offline_access_code", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? UseOfflineAccessCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(AccessCode accessCode = default) - { - AccessCode = accessCode; - } - - /// - /// OK - /// - [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] - public AccessCode AccessCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [access code](https://docs.seam.co/low-level-apis/access-codes). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. - /// - public AccessCode Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/access_codes/create", requestOptions) - .EnsureData("/access_codes/create") - .AccessCode; - } - - /// - /// Creates a new [access code](https://docs.seam.co/low-level-apis/access-codes). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. - /// - public AccessCode Create( - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - string? code = default, - string? commonCodeKey = default, - string deviceId = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - bool? isOfflineAccessCode = default, - bool? isOneTimeUse = default, - CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, - string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, - string? startsAt = default, - bool? useBackupAccessCodePool = default, - bool? useOfflineAccessCode = default - ) - { - return Create( - new CreateRequest( - allowExternalModification: allowExternalModification, - attemptForOfflineDevice: attemptForOfflineDevice, - code: code, - commonCodeKey: commonCodeKey, - deviceId: deviceId, - endsAt: endsAt, - isExternalModificationAllowed: isExternalModificationAllowed, - isOfflineAccessCode: isOfflineAccessCode, - isOneTimeUse: isOneTimeUse, - maxTimeRounding: maxTimeRounding, - name: name, - preferNativeScheduling: preferNativeScheduling, - preferredCodeLength: preferredCodeLength, - startsAt: startsAt, - useBackupAccessCodePool: useBackupAccessCodePool, - useOfflineAccessCode: useOfflineAccessCode - ) - ); - } - - /// - /// Creates a new [access code](https://docs.seam.co/low-level-apis/access-codes). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/access_codes/create", requestOptions)) - .EnsureData("/access_codes/create") - .AccessCode; - } - - /// - /// Creates a new [access code](https://docs.seam.co/low-level-apis/access-codes). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. - /// - public async Task CreateAsync( - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - string? code = default, - string? commonCodeKey = default, - string deviceId = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - bool? isOfflineAccessCode = default, - bool? isOneTimeUse = default, - CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, - string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, - string? startsAt = default, - bool? useBackupAccessCodePool = default, - bool? useOfflineAccessCode = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - allowExternalModification: allowExternalModification, - attemptForOfflineDevice: attemptForOfflineDevice, - code: code, - commonCodeKey: commonCodeKey, - deviceId: deviceId, - endsAt: endsAt, - isExternalModificationAllowed: isExternalModificationAllowed, - isOfflineAccessCode: isOfflineAccessCode, - isOneTimeUse: isOneTimeUse, - maxTimeRounding: maxTimeRounding, - name: name, - preferNativeScheduling: preferNativeScheduling, - preferredCodeLength: preferredCodeLength, - startsAt: startsAt, - useBackupAccessCodePool: useBackupAccessCodePool, - useOfflineAccessCode: useOfflineAccessCode - ) - ) - ); - } - - /// - /// Request parameters for Create Multiple Linked Access Codes. - /// - [DataContract(Name = "createMultipleRequest_request")] - public class CreateMultipleRequest - { - [JsonConstructorAttribute] - protected CreateMultipleRequest() { } - - public CreateMultipleRequest( - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = - default, - string? code = default, - List deviceIds = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, - string? startsAt = default, - bool? useBackupAccessCodePool = default - ) - { - AllowExternalModification = allowExternalModification; - AttemptForOfflineDevice = attemptForOfflineDevice; - BehaviorWhenCodeCannotBeShared = behaviorWhenCodeCannotBeShared; - Code = code; - DeviceIds = deviceIds; - EndsAt = endsAt; - IsExternalModificationAllowed = isExternalModificationAllowed; - Name = name; - PreferNativeScheduling = preferNativeScheduling; - PreferredCodeLength = preferredCodeLength; - StartsAt = startsAt; - UseBackupAccessCodePool = useBackupAccessCodePool; - } - - /// - /// Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum BehaviorWhenCodeCannotBeSharedEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "throw")] - Throw = 1, - - [EnumMember(Value = "create_random_code")] - CreateRandomCode = 2, - } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. - /// - [DataMember( - Name = "allow_external_modification", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AllowExternalModification { get; set; } - - [DataMember( - Name = "attempt_for_offline_device", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AttemptForOfflineDevice { get; set; } - - /// - /// Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. - /// - [DataMember( - Name = "behavior_when_code_cannot_be_shared", - IsRequired = false, - EmitDefaultValue = false - )] - public CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? BehaviorWhenCodeCannotBeShared { get; set; } - - /// - /// Code to be used for access. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// IDs of the devices for which you want to create the new access codes. - /// - [DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - /// - /// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. - /// - [DataMember( - Name = "is_external_modification_allowed", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsExternalModificationAllowed { get; set; } - - /// - /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. - /// - /// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. - /// - /// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. - /// - /// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Indicates whether [native scheduling](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. - /// - [DataMember( - Name = "prefer_native_scheduling", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? PreferNativeScheduling { get; set; } - - /// - /// Preferred code length. If the affected devices do not support the preferred code length, Seam reverts to using the shortest supported code length. - /// - [DataMember( - Name = "preferred_code_length", - IsRequired = false, - EmitDefaultValue = false - )] - public float? PreferredCodeLength { get; set; } - - /// - /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Indicates whether to use a [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://docs.seam.co/api/access_codes/pull_backup_access_code). - /// - [DataMember( - Name = "use_backup_access_code_pool", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? UseBackupAccessCodePool { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createMultipleResponse_response")] - public class CreateMultipleResponse - { - [JsonConstructorAttribute] - protected CreateMultipleResponse() { } - - public CreateMultipleResponse(List accessCodes = default) - { - AccessCodes = accessCodes; - } - - /// - /// OK - /// - [DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodes { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates new [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. - /// - /// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. - /// - /// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. - /// - /// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. - /// - /// See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). - /// - /// For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. - /// - public List CreateMultiple(CreateMultipleRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Put("/access_codes/create_multiple", requestOptions) - .EnsureData("/access_codes/create_multiple") - .AccessCodes; - } - - /// - /// Creates new [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. - /// - /// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. - /// - /// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. - /// - /// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. - /// - /// See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). - /// - /// For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. - /// - public List CreateMultiple( - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = - default, - string? code = default, - List deviceIds = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, - string? startsAt = default, - bool? useBackupAccessCodePool = default - ) - { - return CreateMultiple( - new CreateMultipleRequest( - allowExternalModification: allowExternalModification, - attemptForOfflineDevice: attemptForOfflineDevice, - behaviorWhenCodeCannotBeShared: behaviorWhenCodeCannotBeShared, - code: code, - deviceIds: deviceIds, - endsAt: endsAt, - isExternalModificationAllowed: isExternalModificationAllowed, - name: name, - preferNativeScheduling: preferNativeScheduling, - preferredCodeLength: preferredCodeLength, - startsAt: startsAt, - useBackupAccessCodePool: useBackupAccessCodePool - ) - ); - } - - /// - /// Creates new [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. - /// - /// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. - /// - /// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. - /// - /// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. - /// - /// See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). - /// - /// For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. - /// - public async Task> CreateMultipleAsync(CreateMultipleRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PutAsync( - "/access_codes/create_multiple", - requestOptions - ) - ) - .EnsureData("/access_codes/create_multiple") - .AccessCodes; - } - - /// - /// Creates new [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. - /// - /// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. - /// - /// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. - /// - /// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. - /// - /// See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). - /// - /// For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. - /// - public async Task> CreateMultipleAsync( - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = - default, - string? code = default, - List deviceIds = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - string? name = default, - bool? preferNativeScheduling = default, - float? preferredCodeLength = default, - string? startsAt = default, - bool? useBackupAccessCodePool = default - ) - { - return ( - await CreateMultipleAsync( - new CreateMultipleRequest( - allowExternalModification: allowExternalModification, - attemptForOfflineDevice: attemptForOfflineDevice, - behaviorWhenCodeCannotBeShared: behaviorWhenCodeCannotBeShared, - code: code, - deviceIds: deviceIds, - endsAt: endsAt, - isExternalModificationAllowed: isExternalModificationAllowed, - name: name, - preferNativeScheduling: preferNativeScheduling, - preferredCodeLength: preferredCodeLength, - startsAt: startsAt, - useBackupAccessCodePool: useBackupAccessCodePool - ) - ) - ); - } - - /// - /// Request parameters for Delete an Access Code. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string accessCodeId = default, string? deviceId = default) - { - AccessCodeId = accessCodeId; - DeviceId = deviceId; - } - - /// - /// ID of the access code that you want to delete. - /// - [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// ID of the device for which you want to delete the access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/access_codes/delete", requestOptions); - } - - /// - /// Deletes an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - public void Delete(string accessCodeId = default, string? deviceId = default) - { - Delete(new DeleteRequest(accessCodeId: accessCodeId, deviceId: deviceId)); - } - - /// - /// Deletes an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/access_codes/delete", requestOptions); - } - - /// - /// Deletes an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - public async Task DeleteAsync(string accessCodeId = default, string? deviceId = default) - { - await DeleteAsync(new DeleteRequest(accessCodeId: accessCodeId, deviceId: deviceId)); - } - - /// - /// Request parameters for Generate a Code. - /// - [DataContract(Name = "generateCodeRequest_request")] - public class GenerateCodeRequest - { - [JsonConstructorAttribute] - protected GenerateCodeRequest() { } - - public GenerateCodeRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the device for which you want to generate a code. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "generateCodeResponse_response")] - public class GenerateCodeResponse - { - [JsonConstructorAttribute] - protected GenerateCodeResponse() { } - - public GenerateCodeResponse(AccessCode generatedCode = default) - { - GeneratedCode = generatedCode; - } - - /// - /// OK - /// - [DataMember(Name = "generated_code", IsRequired = false, EmitDefaultValue = false)] - public AccessCode GeneratedCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Generates a code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes), given a device ID. - /// - public AccessCode GenerateCode(GenerateCodeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_codes/generate_code", requestOptions) - .EnsureData("/access_codes/generate_code") - .GeneratedCode; - } - - /// - /// Generates a code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes), given a device ID. - /// - public AccessCode GenerateCode(string deviceId = default) - { - return GenerateCode(new GenerateCodeRequest(deviceId: deviceId)); - } - - /// - /// Generates a code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes), given a device ID. - /// - public async Task GenerateCodeAsync(GenerateCodeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/access_codes/generate_code", - requestOptions - ) - ) - .EnsureData("/access_codes/generate_code") - .GeneratedCode; - } - - /// - /// Generates a code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes), given a device ID. - /// - public async Task GenerateCodeAsync(string deviceId = default) - { - return (await GenerateCodeAsync(new GenerateCodeRequest(deviceId: deviceId))); - } - - /// - /// Request parameters for Get an Access Code. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest( - string? accessCodeId = default, - string? code = default, - string? deviceId = default - ) - { - AccessCodeId = accessCodeId; - Code = code; - DeviceId = deviceId; - } - - /// - /// ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessCodeId { get; set; } - - /// - /// Code of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// ID of the device containing the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AccessCode accessCode = default) - { - AccessCode = accessCode; - } - - /// - /// OK - /// - [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] - public AccessCode AccessCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// You must specify either `access_code_id` or both `device_id` and `code`. - /// - public AccessCode Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_codes/get", requestOptions) - .EnsureData("/access_codes/get") - .AccessCode; - } - - /// - /// Returns a specified [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// You must specify either `access_code_id` or both `device_id` and `code`. - /// - public AccessCode Get( - string? accessCodeId = default, - string? code = default, - string? deviceId = default - ) - { - return Get(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId)); - } - - /// - /// Returns a specified [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// You must specify either `access_code_id` or both `device_id` and `code`. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/access_codes/get", requestOptions)) - .EnsureData("/access_codes/get") - .AccessCode; - } - - /// - /// Returns a specified [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// You must specify either `access_code_id` or both `device_id` and `code`. - /// - public async Task GetAsync( - string? accessCodeId = default, - string? code = default, - string? deviceId = default - ) - { - return ( - await GetAsync( - new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId) - ) - ); - } - - /// - /// Request parameters for List Access Codes. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - List? accessCodeIds = default, - string? accessGrantId = default, - string? accessGrantKey = default, - string? accessMethodId = default, - string? customerKey = default, - string? deviceId = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - AccessCodeIds = accessCodeIds; - AccessGrantId = accessGrantId; - AccessGrantKey = accessGrantKey; - AccessMethodId = accessMethodId; - CustomerKey = customerKey; - DeviceId = deviceId; - Limit = limit; - PageCursor = pageCursor; - Search = search; - UserIdentifierKey = userIdentifierKey; - } - - /// - /// IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - [DataMember(Name = "access_code_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AccessCodeIds { get; set; } - - /// - /// ID of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantId { get; set; } - - /// - /// Key of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// ID of the access method for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessMethodId { get; set; } - - /// - /// Customer key for which you want to list access codes. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// ID of the device for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Numerical limit on the number of access codes to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// Your user ID for the user by which to filter access codes. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List accessCodes = default) - { - AccessCodes = accessCodes; - } - - /// - /// OK - /// - [DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodes { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_codes/list", requestOptions) - .EnsureData("/access_codes/list") - .AccessCodes; - } - - /// - /// Returns a list of all [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - public List List( - List? accessCodeIds = default, - string? accessGrantId = default, - string? accessGrantKey = default, - string? accessMethodId = default, - string? customerKey = default, - string? deviceId = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - return List( - new ListRequest( - accessCodeIds: accessCodeIds, - accessGrantId: accessGrantId, - accessGrantKey: accessGrantKey, - accessMethodId: accessMethodId, - customerKey: customerKey, - deviceId: deviceId, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentifierKey: userIdentifierKey - ) - ); - } - - /// - /// Returns a list of all [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/access_codes/list", requestOptions)) - .EnsureData("/access_codes/list") - .AccessCodes; - } - - /// - /// Returns a list of all [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. - /// - public async Task> ListAsync( - List? accessCodeIds = default, - string? accessGrantId = default, - string? accessGrantKey = default, - string? accessMethodId = default, - string? customerKey = default, - string? deviceId = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - return ( - await ListAsync( - new ListRequest( - accessCodeIds: accessCodeIds, - accessGrantId: accessGrantId, - accessGrantKey: accessGrantKey, - accessMethodId: accessMethodId, - customerKey: customerKey, - deviceId: deviceId, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentifierKey: userIdentifierKey - ) - ) - ); - } - - /// - /// Request parameters for Pull a Backup Access Code. - /// - [DataContract(Name = "pullBackupAccessCodeRequest_request")] - public class PullBackupAccessCodeRequest - { - [JsonConstructorAttribute] - protected PullBackupAccessCodeRequest() { } - - public PullBackupAccessCodeRequest(string accessCodeId = default) - { - AccessCodeId = accessCodeId; - } - - /// - /// ID of the access code for which you want to pull a backup access code. - /// - [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pullBackupAccessCodeResponse_response")] - public class PullBackupAccessCodeResponse - { - [JsonConstructorAttribute] - protected PullBackupAccessCodeResponse() { } - - public PullBackupAccessCodeResponse(AccessCode accessCode = default) - { - AccessCode = accessCode; - } - - /// - /// OK - /// - [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] - public AccessCode AccessCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Retrieves a backup access code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes). - /// - /// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. - /// - /// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. - /// - /// You can only pull backup access codes for time-bound access codes. - /// - /// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. - /// - public AccessCode PullBackupAccessCode(PullBackupAccessCodeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/access_codes/pull_backup_access_code", - requestOptions - ) - .EnsureData("/access_codes/pull_backup_access_code") - .AccessCode; - } - - /// - /// Retrieves a backup access code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes). - /// - /// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. - /// - /// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. - /// - /// You can only pull backup access codes for time-bound access codes. - /// - /// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. - /// - public AccessCode PullBackupAccessCode(string accessCodeId = default) - { - return PullBackupAccessCode( - new PullBackupAccessCodeRequest(accessCodeId: accessCodeId) - ); - } - - /// - /// Retrieves a backup access code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes). - /// - /// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. - /// - /// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. - /// - /// You can only pull backup access codes for time-bound access codes. - /// - /// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. - /// - public async Task PullBackupAccessCodeAsync(PullBackupAccessCodeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/access_codes/pull_backup_access_code", - requestOptions - ) - ) - .EnsureData("/access_codes/pull_backup_access_code") - .AccessCode; - } - - /// - /// Retrieves a backup access code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes). - /// - /// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. - /// - /// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. - /// - /// You can only pull backup access codes for time-bound access codes. - /// - /// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. - /// - public async Task PullBackupAccessCodeAsync(string accessCodeId = default) - { - return ( - await PullBackupAccessCodeAsync( - new PullBackupAccessCodeRequest(accessCodeId: accessCodeId) - ) - ); - } - - /// - /// Request parameters for Report Device Access Code Constraints. - /// - [DataContract(Name = "reportDeviceConstraintsRequest_request")] - public class ReportDeviceConstraintsRequest - { - [JsonConstructorAttribute] - protected ReportDeviceConstraintsRequest() { } - - public ReportDeviceConstraintsRequest( - string deviceId = default, - int? maxCodeLength = default, - int? minCodeLength = default, - List? supportedCodeLengths = default - ) - { - DeviceId = deviceId; - MaxCodeLength = maxCodeLength; - MinCodeLength = minCodeLength; - SupportedCodeLengths = supportedCodeLengths; - } - - /// - /// ID of the device for which you want to report constraints. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Maximum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. - /// - [DataMember(Name = "max_code_length", IsRequired = false, EmitDefaultValue = false)] - public int? MaxCodeLength { get; set; } - - /// - /// Minimum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. - /// - [DataMember(Name = "min_code_length", IsRequired = false, EmitDefaultValue = false)] - public int? MinCodeLength { get; set; } - - /// - /// Array of supported code lengths as integers between 4 and 20, inclusive. You can specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. - /// - [DataMember( - Name = "supported_code_lengths", - IsRequired = false, - EmitDefaultValue = false - )] - public List? SupportedCodeLengths { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. - /// - /// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. - /// - public void ReportDeviceConstraints(ReportDeviceConstraintsRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/access_codes/report_device_constraints", requestOptions); - } - - /// - /// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. - /// - /// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. - /// - public void ReportDeviceConstraints( - string deviceId = default, - int? maxCodeLength = default, - int? minCodeLength = default, - List? supportedCodeLengths = default - ) - { - ReportDeviceConstraints( - new ReportDeviceConstraintsRequest( - deviceId: deviceId, - maxCodeLength: maxCodeLength, - minCodeLength: minCodeLength, - supportedCodeLengths: supportedCodeLengths - ) - ); - } - - /// - /// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. - /// - /// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. - /// - public async Task ReportDeviceConstraintsAsync(ReportDeviceConstraintsRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/access_codes/report_device_constraints", - requestOptions - ); - } - - /// - /// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. - /// - /// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. - /// - public async Task ReportDeviceConstraintsAsync( - string deviceId = default, - int? maxCodeLength = default, - int? minCodeLength = default, - List? supportedCodeLengths = default - ) - { - await ReportDeviceConstraintsAsync( - new ReportDeviceConstraintsRequest( - deviceId: deviceId, - maxCodeLength: maxCodeLength, - minCodeLength: minCodeLength, - supportedCodeLengths: supportedCodeLengths - ) - ); - } - - /// - /// Request parameters for Update an Access Code. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - string? code = default, - string? deviceId = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - bool? isManaged = default, - string? name = default, - string? startsAt = default, - UpdateRequest.TypeEnum? type = default - ) - { - AccessCodeId = accessCodeId; - AllowExternalModification = allowExternalModification; - AttemptForOfflineDevice = attemptForOfflineDevice; - Code = code; - DeviceId = deviceId; - EndsAt = endsAt; - IsExternalModificationAllowed = isExternalModificationAllowed; - IsManaged = isManaged; - Name = name; - StartsAt = startsAt; - Type = type; - } - - /// - /// Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "ongoing")] - Ongoing = 1, - - [EnumMember(Value = "time_bound")] - TimeBound = 2, - } - - /// - /// ID of the access code that you want to update. - /// - [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. - /// - [DataMember( - Name = "allow_external_modification", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AllowExternalModification { get; set; } - - [DataMember( - Name = "attempt_for_offline_device", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AttemptForOfflineDevice { get; set; } - - /// - /// Code to be used for access. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// ID of the device containing the access code that you want to update. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. - /// - [DataMember( - Name = "is_external_modification_allowed", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsExternalModificationAllowed { get; set; } - - /// - /// Indicates whether the access code is managed through Seam. Note that to convert an unmanaged access code into a managed access code, use `/access_codes/unmanaged/convert_to_managed`. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsManaged { get; set; } - - /// - /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. - /// - /// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. - /// - /// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. - /// - /// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public UpdateRequest.TypeEnum? Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified active or upcoming [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// See also [Modifying Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/access_codes/update", requestOptions); - } - - /// - /// Updates a specified active or upcoming [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// See also [Modifying Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes). - /// - public void Update( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - string? code = default, - string? deviceId = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - bool? isManaged = default, - string? name = default, - string? startsAt = default, - UpdateRequest.TypeEnum? type = default - ) - { - Update( - new UpdateRequest( - accessCodeId: accessCodeId, - allowExternalModification: allowExternalModification, - attemptForOfflineDevice: attemptForOfflineDevice, - code: code, - deviceId: deviceId, - endsAt: endsAt, - isExternalModificationAllowed: isExternalModificationAllowed, - isManaged: isManaged, - name: name, - startsAt: startsAt, - type: type - ) - ); - } - - /// - /// Updates a specified active or upcoming [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// See also [Modifying Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/access_codes/update", requestOptions); - } - - /// - /// Updates a specified active or upcoming [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// See also [Modifying Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes). - /// - public async Task UpdateAsync( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? attemptForOfflineDevice = default, - string? code = default, - string? deviceId = default, - string? endsAt = default, - bool? isExternalModificationAllowed = default, - bool? isManaged = default, - string? name = default, - string? startsAt = default, - UpdateRequest.TypeEnum? type = default - ) - { - await UpdateAsync( - new UpdateRequest( - accessCodeId: accessCodeId, - allowExternalModification: allowExternalModification, - attemptForOfflineDevice: attemptForOfflineDevice, - code: code, - deviceId: deviceId, - endsAt: endsAt, - isExternalModificationAllowed: isExternalModificationAllowed, - isManaged: isManaged, - name: name, - startsAt: startsAt, - type: type - ) - ); - } - - /// - /// Request parameters for Update Multiple Linked Access Codes. - /// - [DataContract(Name = "updateMultipleRequest_request")] - public class UpdateMultipleRequest - { - [JsonConstructorAttribute] - protected UpdateMultipleRequest() { } - - public UpdateMultipleRequest( - string commonCodeKey = default, - string? endsAt = default, - string? name = default, - string? startsAt = default - ) - { - CommonCodeKey = commonCodeKey; - EndsAt = endsAt; - Name = name; - StartsAt = startsAt; - } - - /// - /// Key that links the group of access codes, assigned on creation by `/access_codes/create_multiple`. - /// - [DataMember(Name = "common_code_key", IsRequired = true, EmitDefaultValue = false)] - public string CommonCodeKey { get; set; } - - /// - /// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. - /// - /// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. - /// - /// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. - /// - /// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. - /// - /// Specify the `common_code_key` to identify the set of access codes that you want to update. - /// - /// See also [Update Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). - /// - public void UpdateMultiple(UpdateMultipleRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/access_codes/update_multiple", requestOptions); - } - - /// - /// Updates [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. - /// - /// Specify the `common_code_key` to identify the set of access codes that you want to update. - /// - /// See also [Update Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). - /// - public void UpdateMultiple( - string commonCodeKey = default, - string? endsAt = default, - string? name = default, - string? startsAt = default - ) - { - UpdateMultiple( - new UpdateMultipleRequest( - commonCodeKey: commonCodeKey, - endsAt: endsAt, - name: name, - startsAt: startsAt - ) - ); - } - - /// - /// Updates [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. - /// - /// Specify the `common_code_key` to identify the set of access codes that you want to update. - /// - /// See also [Update Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). - /// - public async Task UpdateMultipleAsync(UpdateMultipleRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/access_codes/update_multiple", requestOptions); - } - - /// - /// Updates [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. - /// - /// Specify the `common_code_key` to identify the set of access codes that you want to update. - /// - /// See also [Update Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). - /// - public async Task UpdateMultipleAsync( - string commonCodeKey = default, - string? endsAt = default, - string? name = default, - string? startsAt = default - ) - { - await UpdateMultipleAsync( - new UpdateMultipleRequest( - commonCodeKey: commonCodeKey, - endsAt: endsAt, - name: name, - startsAt: startsAt - ) - ); - } - } +public class AccessCodes +{ +private ISeamClient _seam; + +public AccessCodes(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create an Access Code. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? commonCodeKey = default, string deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isOfflineAccessCode = default, bool? isOneTimeUse = default, CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default, bool? useOfflineAccessCode = default) +{ +AllowExternalModification = allowExternalModification; +AttemptForOfflineDevice = attemptForOfflineDevice; +Code = code; +CommonCodeKey = commonCodeKey; +DeviceId = deviceId; +EndsAt = endsAt; +IsExternalModificationAllowed = isExternalModificationAllowed; +IsOfflineAccessCode = isOfflineAccessCode; +IsOneTimeUse = isOneTimeUse; +MaxTimeRounding = maxTimeRounding; +Name = name; +PreferNativeScheduling = preferNativeScheduling; +PreferredCodeLength = preferredCodeLength; +StartsAt = startsAt; +UseBackupAccessCodePool = useBackupAccessCodePool; +UseOfflineAccessCode = useOfflineAccessCode; +} + +/// +/// Maximum rounding adjustment. To create a daily-bound [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum MaxTimeRoundingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "1hour")] +_1hour = 1, + +[EnumMember(Value = "1day")] +_1day = 2, + +[EnumMember(Value = "1h")] +_1h = 3, + +[EnumMember(Value = "1d")] +_1d = 4, +} + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. +/// +[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] +public bool? AllowExternalModification { get; set; } + +[DataMember(Name = "attempt_for_offline_device", IsRequired = false, EmitDefaultValue = false)] +public bool? AttemptForOfflineDevice { get; set; } + +/// +/// Code to be used for access. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Key to identify access codes that should have the same code. Any two access codes with the same `common_code_key` are guaranteed to have the same `code`. See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). +/// +[DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] +public string? CommonCodeKey { get; set; } + +/// +/// ID of the device for which you want to create the new access code. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. +/// +[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsExternalModificationAllowed { get; set; } + +/// +/// Indicates whether the access code is an [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes). +/// +[DataMember(Name = "is_offline_access_code", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOfflineAccessCode { get; set; } + +/// +/// Indicates whether the [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) is a single-use access code. +/// +[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOneTimeUse { get; set; } + +/// +/// Maximum rounding adjustment. To create a daily-bound [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. +/// +[DataMember(Name = "max_time_rounding", IsRequired = false, EmitDefaultValue = false)] +public CreateRequest.MaxTimeRoundingEnum? MaxTimeRounding { get; set; } + +/// +/// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. +/// +/// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. +/// +/// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. +/// +/// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Indicates whether [native scheduling](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. +/// +[DataMember(Name = "prefer_native_scheduling", IsRequired = false, EmitDefaultValue = false)] +public bool? PreferNativeScheduling { get; set; } + +/// +/// Preferred code length. Only applicable if you do not specify a `code`. If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length. +/// +[DataMember(Name = "preferred_code_length", IsRequired = false, EmitDefaultValue = false)] +public float? PreferredCodeLength { get; set; } + +/// +/// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Indicates whether to use a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://www.seam.co/docs/api/access_codes/pull_backup_access_code). +/// +[DataMember(Name = "use_backup_access_code_pool", IsRequired = false, EmitDefaultValue = false)] +public bool? UseBackupAccessCodePool { get; set; } + +[Obsolete("Use `is_offline_access_code` instead.")] +[DataMember(Name = "use_offline_access_code", IsRequired = false, EmitDefaultValue = false)] +public bool? UseOfflineAccessCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(AccessCode accessCode = default) +{ +AccessCode = accessCode; +} + +/// +/// OK +/// +[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] +public AccessCode AccessCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. +/// +public AccessCode Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/access_codes/create", requestOptions).EnsureData("/access_codes/create").AccessCode; +} + +/// +/// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. +/// +public AccessCode Create(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? commonCodeKey = default, string deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isOfflineAccessCode = default, bool? isOneTimeUse = default, CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default, bool? useOfflineAccessCode = default) +{ +return Create(new CreateRequest(allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, code: code, commonCodeKey: commonCodeKey, deviceId: deviceId, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isOfflineAccessCode: isOfflineAccessCode, isOneTimeUse: isOneTimeUse, maxTimeRounding: maxTimeRounding, name: name, preferNativeScheduling: preferNativeScheduling, preferredCodeLength: preferredCodeLength, startsAt: startsAt, useBackupAccessCodePool: useBackupAccessCodePool, useOfflineAccessCode: useOfflineAccessCode)); +} + +/// +/// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/access_codes/create", requestOptions)).EnsureData("/access_codes/create").AccessCode; +} + +/// +/// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. +/// +public async Task CreateAsync(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? commonCodeKey = default, string deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isOfflineAccessCode = default, bool? isOneTimeUse = default, CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default, bool? useOfflineAccessCode = default) +{ +return (await CreateAsync(new CreateRequest(allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, code: code, commonCodeKey: commonCodeKey, deviceId: deviceId, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isOfflineAccessCode: isOfflineAccessCode, isOneTimeUse: isOneTimeUse, maxTimeRounding: maxTimeRounding, name: name, preferNativeScheduling: preferNativeScheduling, preferredCodeLength: preferredCodeLength, startsAt: startsAt, useBackupAccessCodePool: useBackupAccessCodePool, useOfflineAccessCode: useOfflineAccessCode))); +} + +/// +/// Request parameters for Create Multiple Linked Access Codes. +/// +[DataContract(Name = "createMultipleRequest_request")] +public class CreateMultipleRequest +{ +[JsonConstructorAttribute] +protected CreateMultipleRequest() { } + +public CreateMultipleRequest(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = default, string? code = default, List deviceIds = default, string? endsAt = default, bool? isExternalModificationAllowed = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default) +{ +AllowExternalModification = allowExternalModification; +AttemptForOfflineDevice = attemptForOfflineDevice; +BehaviorWhenCodeCannotBeShared = behaviorWhenCodeCannotBeShared; +Code = code; +DeviceIds = deviceIds; +EndsAt = endsAt; +IsExternalModificationAllowed = isExternalModificationAllowed; +Name = name; +PreferNativeScheduling = preferNativeScheduling; +PreferredCodeLength = preferredCodeLength; +StartsAt = startsAt; +UseBackupAccessCodePool = useBackupAccessCodePool; +} + +/// +/// Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum BehaviorWhenCodeCannotBeSharedEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "throw")] +Throw = 1, + +[EnumMember(Value = "create_random_code")] +CreateRandomCode = 2, +} + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. +/// +[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] +public bool? AllowExternalModification { get; set; } + +[DataMember(Name = "attempt_for_offline_device", IsRequired = false, EmitDefaultValue = false)] +public bool? AttemptForOfflineDevice { get; set; } + +/// +/// Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. +/// +[DataMember(Name = "behavior_when_code_cannot_be_shared", IsRequired = false, EmitDefaultValue = false)] +public CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? BehaviorWhenCodeCannotBeShared { get; set; } + +/// +/// Code to be used for access. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// IDs of the devices for which you want to create the new access codes. +/// +[DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +/// +/// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. +/// +[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsExternalModificationAllowed { get; set; } + +/// +/// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. +/// +/// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. +/// +/// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. +/// +/// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Indicates whether [native scheduling](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. +/// +[DataMember(Name = "prefer_native_scheduling", IsRequired = false, EmitDefaultValue = false)] +public bool? PreferNativeScheduling { get; set; } + +/// +/// Preferred code length. If the affected devices do not support the preferred code length, Seam reverts to using the shortest supported code length. +/// +[DataMember(Name = "preferred_code_length", IsRequired = false, EmitDefaultValue = false)] +public float? PreferredCodeLength { get; set; } + +/// +/// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Indicates whether to use a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://www.seam.co/docs/api/access_codes/pull_backup_access_code). +/// +[DataMember(Name = "use_backup_access_code_pool", IsRequired = false, EmitDefaultValue = false)] +public bool? UseBackupAccessCodePool { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createMultipleResponse_response")] +public class CreateMultipleResponse +{ +[JsonConstructorAttribute] +protected CreateMultipleResponse() { } + +public CreateMultipleResponse(List accessCodes = default) +{ +AccessCodes = accessCodes; +} + +/// +/// OK +/// +[DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodes { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. +/// +/// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. +/// +/// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. +/// +/// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. +/// +/// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). +/// +/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. +/// +public List CreateMultiple(CreateMultipleRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Put("/access_codes/create_multiple", requestOptions).EnsureData("/access_codes/create_multiple").AccessCodes; +} + +/// +/// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. +/// +/// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. +/// +/// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. +/// +/// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. +/// +/// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). +/// +/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. +/// +public List CreateMultiple(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = default, string? code = default, List deviceIds = default, string? endsAt = default, bool? isExternalModificationAllowed = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default) +{ +return CreateMultiple(new CreateMultipleRequest(allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, behaviorWhenCodeCannotBeShared: behaviorWhenCodeCannotBeShared, code: code, deviceIds: deviceIds, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, name: name, preferNativeScheduling: preferNativeScheduling, preferredCodeLength: preferredCodeLength, startsAt: startsAt, useBackupAccessCodePool: useBackupAccessCodePool)); +} + +/// +/// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. +/// +/// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. +/// +/// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. +/// +/// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. +/// +/// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). +/// +/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. +/// +public async Task> CreateMultipleAsync(CreateMultipleRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PutAsync("/access_codes/create_multiple", requestOptions)).EnsureData("/access_codes/create_multiple").AccessCodes; +} + +/// +/// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. +/// +/// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. +/// +/// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. +/// +/// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. +/// +/// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). +/// +/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. +/// +public async Task> CreateMultipleAsync(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = default, string? code = default, List deviceIds = default, string? endsAt = default, bool? isExternalModificationAllowed = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default) +{ +return (await CreateMultipleAsync(new CreateMultipleRequest(allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, behaviorWhenCodeCannotBeShared: behaviorWhenCodeCannotBeShared, code: code, deviceIds: deviceIds, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, name: name, preferNativeScheduling: preferNativeScheduling, preferredCodeLength: preferredCodeLength, startsAt: startsAt, useBackupAccessCodePool: useBackupAccessCodePool))); +} + +/// +/// Request parameters for Delete an Access Code. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string accessCodeId = default, string? deviceId = default) +{ +AccessCodeId = accessCodeId; +DeviceId = deviceId; +} + +/// +/// ID of the access code that you want to delete. +/// +[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// ID of the device for which you want to delete the access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/access_codes/delete", requestOptions); +} + +/// +/// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +public void Delete(string accessCodeId = default, string? deviceId = default) +{ +Delete(new DeleteRequest(accessCodeId: accessCodeId, deviceId: deviceId)); +} + +/// +/// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/access_codes/delete", requestOptions); +} + +/// +/// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +public async Task DeleteAsync(string accessCodeId = default, string? deviceId = default) +{ +await DeleteAsync(new DeleteRequest(accessCodeId: accessCodeId, deviceId: deviceId)); +} + +/// +/// Request parameters for Generate a Code. +/// +[DataContract(Name = "generateCodeRequest_request")] +public class GenerateCodeRequest +{ +[JsonConstructorAttribute] +protected GenerateCodeRequest() { } + +public GenerateCodeRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the device for which you want to generate a code. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "generateCodeResponse_response")] +public class GenerateCodeResponse +{ +[JsonConstructorAttribute] +protected GenerateCodeResponse() { } + +public GenerateCodeResponse(AccessCode generatedCode = default) +{ +GeneratedCode = generatedCode; +} + +/// +/// OK +/// +[DataMember(Name = "generated_code", IsRequired = false, EmitDefaultValue = false)] +public AccessCode GeneratedCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. +/// +public AccessCode GenerateCode(GenerateCodeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_codes/generate_code", requestOptions).EnsureData("/access_codes/generate_code").GeneratedCode; +} + +/// +/// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. +/// +public AccessCode GenerateCode(string deviceId = default) +{ +return GenerateCode(new GenerateCodeRequest(deviceId: deviceId)); +} + +/// +/// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. +/// +public async Task GenerateCodeAsync(GenerateCodeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_codes/generate_code", requestOptions)).EnsureData("/access_codes/generate_code").GeneratedCode; +} + +/// +/// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. +/// +public async Task GenerateCodeAsync(string deviceId = default) +{ +return (await GenerateCodeAsync(new GenerateCodeRequest(deviceId: deviceId))); +} + +/// +/// Request parameters for Get an Access Code. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? accessCodeId = default, string? code = default, string? deviceId = default) +{ +AccessCodeId = accessCodeId; +Code = code; +DeviceId = deviceId; +} + +/// +/// ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessCodeId { get; set; } + +/// +/// Code of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// ID of the device containing the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AccessCode accessCode = default) +{ +AccessCode = accessCode; +} + +/// +/// OK +/// +[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] +public AccessCode AccessCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// You must specify either `access_code_id` or both `device_id` and `code`. +/// +public AccessCode Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_codes/get", requestOptions).EnsureData("/access_codes/get").AccessCode; +} + +/// +/// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// You must specify either `access_code_id` or both `device_id` and `code`. +/// +public AccessCode Get(string? accessCodeId = default, string? code = default, string? deviceId = default) +{ +return Get(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId)); +} + +/// +/// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// You must specify either `access_code_id` or both `device_id` and `code`. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_codes/get", requestOptions)).EnsureData("/access_codes/get").AccessCode; +} + +/// +/// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// You must specify either `access_code_id` or both `device_id` and `code`. +/// +public async Task GetAsync(string? accessCodeId = default, string? code = default, string? deviceId = default) +{ +return (await GetAsync(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId))); +} + +/// +/// Request parameters for List Access Codes. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(List? accessCodeIds = default, string? accessGrantId = default, string? accessGrantKey = default, string? accessMethodId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +AccessCodeIds = accessCodeIds; +AccessGrantId = accessGrantId; +AccessGrantKey = accessGrantKey; +AccessMethodId = accessMethodId; +CustomerKey = customerKey; +DeviceId = deviceId; +Limit = limit; +PageCursor = pageCursor; +Search = search; +UserIdentifierKey = userIdentifierKey; +} + +/// +/// IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +[DataMember(Name = "access_code_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AccessCodeIds { get; set; } + +/// +/// ID of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantId { get; set; } + +/// +/// Key of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// ID of the access method for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessMethodId { get; set; } + +/// +/// Customer key for which you want to list access codes. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// ID of the device for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Numerical limit on the number of access codes to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// Your user ID for the user by which to filter access codes. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List accessCodes = default) +{ +AccessCodes = accessCodes; +} + +/// +/// OK +/// +[DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodes { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_codes/list", requestOptions).EnsureData("/access_codes/list").AccessCodes; +} + +/// +/// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +public List List(List? accessCodeIds = default, string? accessGrantId = default, string? accessGrantKey = default, string? accessMethodId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +return List(new ListRequest(accessCodeIds: accessCodeIds, accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, accessMethodId: accessMethodId, customerKey: customerKey, deviceId: deviceId, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey)); +} + +/// +/// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_codes/list", requestOptions)).EnsureData("/access_codes/list").AccessCodes; +} + +/// +/// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. +/// +public async Task> ListAsync(List? accessCodeIds = default, string? accessGrantId = default, string? accessGrantKey = default, string? accessMethodId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +return (await ListAsync(new ListRequest(accessCodeIds: accessCodeIds, accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, accessMethodId: accessMethodId, customerKey: customerKey, deviceId: deviceId, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey))); +} + +/// +/// Request parameters for Pull a Backup Access Code. +/// +[DataContract(Name = "pullBackupAccessCodeRequest_request")] +public class PullBackupAccessCodeRequest +{ +[JsonConstructorAttribute] +protected PullBackupAccessCodeRequest() { } + +public PullBackupAccessCodeRequest(string accessCodeId = default) +{ +AccessCodeId = accessCodeId; +} + +/// +/// ID of the access code for which you want to pull a backup access code. +/// +[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pullBackupAccessCodeResponse_response")] +public class PullBackupAccessCodeResponse +{ +[JsonConstructorAttribute] +protected PullBackupAccessCodeResponse() { } + +public PullBackupAccessCodeResponse(AccessCode accessCode = default) +{ +AccessCode = accessCode; +} + +/// +/// OK +/// +[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] +public AccessCode AccessCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). +/// +/// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. +/// +/// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. +/// +/// You can only pull backup access codes for time-bound access codes. +/// +/// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. +/// +public AccessCode PullBackupAccessCode(PullBackupAccessCodeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/access_codes/pull_backup_access_code", requestOptions).EnsureData("/access_codes/pull_backup_access_code").AccessCode; +} + +/// +/// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). +/// +/// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. +/// +/// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. +/// +/// You can only pull backup access codes for time-bound access codes. +/// +/// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. +/// +public AccessCode PullBackupAccessCode(string accessCodeId = default) +{ +return PullBackupAccessCode(new PullBackupAccessCodeRequest(accessCodeId: accessCodeId)); +} + +/// +/// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). +/// +/// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. +/// +/// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. +/// +/// You can only pull backup access codes for time-bound access codes. +/// +/// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. +/// +public async Task PullBackupAccessCodeAsync(PullBackupAccessCodeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/access_codes/pull_backup_access_code", requestOptions)).EnsureData("/access_codes/pull_backup_access_code").AccessCode; +} + +/// +/// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). +/// +/// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. +/// +/// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. +/// +/// You can only pull backup access codes for time-bound access codes. +/// +/// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. +/// +public async Task PullBackupAccessCodeAsync(string accessCodeId = default) +{ +return (await PullBackupAccessCodeAsync(new PullBackupAccessCodeRequest(accessCodeId: accessCodeId))); +} + +/// +/// Request parameters for Report Device Access Code Constraints. +/// +[DataContract(Name = "reportDeviceConstraintsRequest_request")] +public class ReportDeviceConstraintsRequest +{ +[JsonConstructorAttribute] +protected ReportDeviceConstraintsRequest() { } + +public ReportDeviceConstraintsRequest(string deviceId = default, int? maxCodeLength = default, int? minCodeLength = default, List? supportedCodeLengths = default) +{ +DeviceId = deviceId; +MaxCodeLength = maxCodeLength; +MinCodeLength = minCodeLength; +SupportedCodeLengths = supportedCodeLengths; +} + +/// +/// ID of the device for which you want to report constraints. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Maximum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. +/// +[DataMember(Name = "max_code_length", IsRequired = false, EmitDefaultValue = false)] +public int? MaxCodeLength { get; set; } + +/// +/// Minimum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. +/// +[DataMember(Name = "min_code_length", IsRequired = false, EmitDefaultValue = false)] +public int? MinCodeLength { get; set; } + +/// +/// Array of supported code lengths as integers between 4 and 20, inclusive. You can specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. +/// +[DataMember(Name = "supported_code_lengths", IsRequired = false, EmitDefaultValue = false)] +public List? SupportedCodeLengths { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. +/// +/// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. +/// +public void ReportDeviceConstraints(ReportDeviceConstraintsRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/access_codes/report_device_constraints", requestOptions); +} + +/// +/// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. +/// +/// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. +/// +public void ReportDeviceConstraints(string deviceId = default, int? maxCodeLength = default, int? minCodeLength = default, List? supportedCodeLengths = default) +{ +ReportDeviceConstraints(new ReportDeviceConstraintsRequest(deviceId: deviceId, maxCodeLength: maxCodeLength, minCodeLength: minCodeLength, supportedCodeLengths: supportedCodeLengths)); +} + +/// +/// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. +/// +/// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. +/// +public async Task ReportDeviceConstraintsAsync(ReportDeviceConstraintsRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/access_codes/report_device_constraints", requestOptions); +} + +/// +/// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. +/// +/// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. +/// +public async Task ReportDeviceConstraintsAsync(string deviceId = default, int? maxCodeLength = default, int? minCodeLength = default, List? supportedCodeLengths = default) +{ +await ReportDeviceConstraintsAsync(new ReportDeviceConstraintsRequest(deviceId: deviceId, maxCodeLength: maxCodeLength, minCodeLength: minCodeLength, supportedCodeLengths: supportedCodeLengths)); +} + +/// +/// Request parameters for Update an Access Code. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string accessCodeId = default, bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, string? name = default, string? startsAt = default, UpdateRequest.TypeEnum? type = default) +{ +AccessCodeId = accessCodeId; +AllowExternalModification = allowExternalModification; +AttemptForOfflineDevice = attemptForOfflineDevice; +Code = code; +DeviceId = deviceId; +EndsAt = endsAt; +IsExternalModificationAllowed = isExternalModificationAllowed; +IsManaged = isManaged; +Name = name; +StartsAt = startsAt; +Type = type; +} + +/// +/// Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "ongoing")] +Ongoing = 1, + +[EnumMember(Value = "time_bound")] +TimeBound = 2, +} + +/// +/// ID of the access code that you want to update. +/// +[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. +/// +[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] +public bool? AllowExternalModification { get; set; } + +[DataMember(Name = "attempt_for_offline_device", IsRequired = false, EmitDefaultValue = false)] +public bool? AttemptForOfflineDevice { get; set; } + +/// +/// Code to be used for access. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// ID of the device containing the access code that you want to update. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. +/// +[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsExternalModificationAllowed { get; set; } + +/// +/// Indicates whether the access code is managed through Seam. Note that to convert an unmanaged access code into a managed access code, use `/access_codes/unmanaged/convert_to_managed`. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsManaged { get; set; } + +/// +/// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. +/// +/// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. +/// +/// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. +/// +/// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public UpdateRequest.TypeEnum? Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/access_codes/update", requestOptions); +} + +/// +/// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). +/// +public void Update(string accessCodeId = default, bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, string? name = default, string? startsAt = default, UpdateRequest.TypeEnum? type = default) +{ +Update(new UpdateRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, code: code, deviceId: deviceId, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged, name: name, startsAt: startsAt, type: type)); +} + +/// +/// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/access_codes/update", requestOptions); +} + +/// +/// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). +/// +public async Task UpdateAsync(string accessCodeId = default, bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, string? name = default, string? startsAt = default, UpdateRequest.TypeEnum? type = default) +{ +await UpdateAsync(new UpdateRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, code: code, deviceId: deviceId, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged, name: name, startsAt: startsAt, type: type)); +} + +/// +/// Request parameters for Update Multiple Linked Access Codes. +/// +[DataContract(Name = "updateMultipleRequest_request")] +public class UpdateMultipleRequest +{ +[JsonConstructorAttribute] +protected UpdateMultipleRequest() { } + +public UpdateMultipleRequest(string commonCodeKey = default, string? endsAt = default, string? name = default, string? startsAt = default) +{ +CommonCodeKey = commonCodeKey; +EndsAt = endsAt; +Name = name; +StartsAt = startsAt; +} + +/// +/// Key that links the group of access codes, assigned on creation by `/access_codes/create_multiple`. +/// +[DataMember(Name = "common_code_key", IsRequired = true, EmitDefaultValue = false)] +public string CommonCodeKey { get; set; } + +/// +/// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. +/// +/// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. +/// +/// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. +/// +/// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. +/// +/// Specify the `common_code_key` to identify the set of access codes that you want to update. +/// +/// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). +/// +public void UpdateMultiple(UpdateMultipleRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/access_codes/update_multiple", requestOptions); +} + +/// +/// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. +/// +/// Specify the `common_code_key` to identify the set of access codes that you want to update. +/// +/// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). +/// +public void UpdateMultiple(string commonCodeKey = default, string? endsAt = default, string? name = default, string? startsAt = default) +{ +UpdateMultiple(new UpdateMultipleRequest(commonCodeKey: commonCodeKey, endsAt: endsAt, name: name, startsAt: startsAt)); +} + +/// +/// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. +/// +/// Specify the `common_code_key` to identify the set of access codes that you want to update. +/// +/// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). +/// +public async Task UpdateMultipleAsync(UpdateMultipleRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/access_codes/update_multiple", requestOptions); +} + +/// +/// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. +/// +/// Specify the `common_code_key` to identify the set of access codes that you want to update. +/// +/// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). +/// +public async Task UpdateMultipleAsync(string commonCodeKey = default, string? endsAt = default, string? name = default, string? startsAt = default) +{ +await UpdateMultipleAsync(new UpdateMultipleRequest(commonCodeKey: commonCodeKey, endsAt: endsAt, name: name, startsAt: startsAt)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.AccessCodes AccessCodes => new(this); - } +public partial class SeamClient +{ +public Api.AccessCodes AccessCodes => new(this); +} - public partial interface ISeamClient - { - public Api.AccessCodes AccessCodes { get; } - } +public partial interface ISeamClient +{ +public Api.AccessCodes AccessCodes { get; } +} } diff --git a/src/Seam/Api/AccessGrants.cs b/src/Seam/Api/AccessGrants.cs index b2ea2959..bdca55d8 100644 --- a/src/Seam/Api/AccessGrants.cs +++ b/src/Seam/Api/AccessGrants.cs @@ -9,1621 +9,1293 @@ namespace Seam.Api { - public class AccessGrants - { - private ISeamClient _seam; - - public AccessGrants(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create an Access Grant. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - string? accessGrantKey = default, - List? acsEntranceIds = default, - string? customizationProfileId = default, - List? deviceIds = default, - string? endsAt = default, - CreateRequestLocation? location = default, - List? locationIds = default, - string? name = default, - List requestedAccessMethods = default, - string? reservationKey = default, - List? spaceIds = default, - List? spaceKeys = default, - string? startsAt = default, - CreateRequestUserIdentity? userIdentity = default, - string? userIdentityId = default - ) - { - AccessGrantKey = accessGrantKey; - AcsEntranceIds = acsEntranceIds; - CustomizationProfileId = customizationProfileId; - DeviceIds = deviceIds; - EndsAt = endsAt; - Location = location; - LocationIds = locationIds; - Name = name; - RequestedAccessMethods = requestedAccessMethods; - ReservationKey = reservationKey; - SpaceIds = spaceIds; - SpaceKeys = spaceKeys; - StartsAt = startsAt; - UserIdentity = userIdentity; - UserIdentityId = userIdentityId; - } - - /// - /// Unique key for the access grant within the workspace. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// Set of IDs of the [entrances](https://docs.seam.co/api/acs/systems/list) to which access is being granted. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEntranceIds { get; set; } - - /// - /// ID of the customization profile to apply to the Access Grant and its access methods. - /// - [DataMember( - Name = "customization_profile_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomizationProfileId { get; set; } - - /// - /// Set of IDs of the [devices](https://docs.seam.co/api/devices/list) to which access is being granted. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - - /// - /// Date and time at which the validity of the new grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - [Obsolete("Create a space first, then reference it using `space_ids`.")] - [DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestLocation? Location { get; set; } - - [Obsolete("Use `space_ids`.")] - [DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] - public List? LocationIds { get; set; } - - /// - /// Name for the access grant. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - [DataMember( - Name = "requested_access_methods", - IsRequired = true, - EmitDefaultValue = false - )] - public List RequestedAccessMethods { get; set; } - - /// - /// Reservation key for the access grant. - /// - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - /// - /// Set of IDs of existing spaces to which access is being granted. - /// - [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceIds { get; set; } - - /// - /// Set of keys of existing spaces to which access is being granted. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Date and time at which the validity of the new grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// When used, creates a new user identity with the given details, and grants them access. - /// - [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestUserIdentity? UserIdentity { get; set; } - - /// - /// ID of user identity for whom access is being granted. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestLocation_model")] - public class CreateRequestLocation - { - [JsonConstructorAttribute] - protected CreateRequestLocation() { } - - public CreateRequestLocation( - List? acsEntranceIds = default, - List? deviceIds = default, - string? name = default - ) - { - AcsEntranceIds = acsEntranceIds; - DeviceIds = deviceIds; - Name = name; - } - - [Obsolete("Use `acs_entrance_ids` at the top level.")] - [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEntranceIds { get; set; } - - [Obsolete("Use `device_ids` at the top level.")] - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - - /// - /// Name of the location. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestRequestedAccessMethods_model")] - public class CreateRequestRequestedAccessMethods - { - [JsonConstructorAttribute] - protected CreateRequestRequestedAccessMethods() { } - - public CreateRequestRequestedAccessMethods( - string? code = default, - int? instantKeyMaxUseCount = default, - CreateRequestRequestedAccessMethods.ModeEnum? mode = default - ) - { - Code = code; - InstantKeyMaxUseCount = instantKeyMaxUseCount; - Mode = mode; - } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. - /// - [DataMember( - Name = "instant_key_max_use_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int? InstantKeyMaxUseCount { get; set; } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestRequestedAccessMethods.ModeEnum? Mode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestUserIdentity_model")] - public class CreateRequestUserIdentity - { - [JsonConstructorAttribute] - protected CreateRequestUserIdentity() { } - - public CreateRequestUserIdentity( - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default, - string? userIdentityKey = default - ) - { - EmailAddress = emailAddress; - FullName = fullName; - PhoneNumber = phoneNumber; - UserIdentityKey = userIdentityKey; - } - - /// - /// Unique email address for the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Full name of the user associated with the user identity. - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Unique key for the user identity. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(AccessGrant accessGrant = default) - { - AccessGrant = accessGrant; - } - - /// - /// OK - /// - [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] - public AccessGrant AccessGrant { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [Access Grant](https://docs.seam.co/use-cases/granting-access/access-grants). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. - /// - public AccessGrant Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/access_grants/create", requestOptions) - .EnsureData("/access_grants/create") - .AccessGrant; - } - - /// - /// Creates a new [Access Grant](https://docs.seam.co/use-cases/granting-access/access-grants). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. - /// - public AccessGrant Create( - string? accessGrantKey = default, - List? acsEntranceIds = default, - string? customizationProfileId = default, - List? deviceIds = default, - string? endsAt = default, - CreateRequestLocation? location = default, - List? locationIds = default, - string? name = default, - List requestedAccessMethods = default, - string? reservationKey = default, - List? spaceIds = default, - List? spaceKeys = default, - string? startsAt = default, - CreateRequestUserIdentity? userIdentity = default, - string? userIdentityId = default - ) - { - return Create( - new CreateRequest( - accessGrantKey: accessGrantKey, - acsEntranceIds: acsEntranceIds, - customizationProfileId: customizationProfileId, - deviceIds: deviceIds, - endsAt: endsAt, - location: location, - locationIds: locationIds, - name: name, - requestedAccessMethods: requestedAccessMethods, - reservationKey: reservationKey, - spaceIds: spaceIds, - spaceKeys: spaceKeys, - startsAt: startsAt, - userIdentity: userIdentity, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Creates a new [Access Grant](https://docs.seam.co/use-cases/granting-access/access-grants). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/access_grants/create", requestOptions)) - .EnsureData("/access_grants/create") - .AccessGrant; - } - - /// - /// Creates a new [Access Grant](https://docs.seam.co/use-cases/granting-access/access-grants). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. - /// - public async Task CreateAsync( - string? accessGrantKey = default, - List? acsEntranceIds = default, - string? customizationProfileId = default, - List? deviceIds = default, - string? endsAt = default, - CreateRequestLocation? location = default, - List? locationIds = default, - string? name = default, - List requestedAccessMethods = default, - string? reservationKey = default, - List? spaceIds = default, - List? spaceKeys = default, - string? startsAt = default, - CreateRequestUserIdentity? userIdentity = default, - string? userIdentityId = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - accessGrantKey: accessGrantKey, - acsEntranceIds: acsEntranceIds, - customizationProfileId: customizationProfileId, - deviceIds: deviceIds, - endsAt: endsAt, - location: location, - locationIds: locationIds, - name: name, - requestedAccessMethods: requestedAccessMethods, - reservationKey: reservationKey, - spaceIds: spaceIds, - spaceKeys: spaceKeys, - startsAt: startsAt, - userIdentity: userIdentity, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for Delete an Access Grant. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string accessGrantId = default) - { - AccessGrantId = accessGrantId; - } - - /// - /// ID of Access Grant to delete. - /// - [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Delete an Access Grant. - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/access_grants/delete", requestOptions); - } - - /// - /// Delete an Access Grant. - /// - public void Delete(string accessGrantId = default) - { - Delete(new DeleteRequest(accessGrantId: accessGrantId)); - } - - /// - /// Delete an Access Grant. - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/access_grants/delete", requestOptions); - } - - /// - /// Delete an Access Grant. - /// - public async Task DeleteAsync(string accessGrantId = default) - { - await DeleteAsync(new DeleteRequest(accessGrantId: accessGrantId)); - } - - /// - /// Request parameters for Get an Access Grant. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string? accessGrantId = default, string? accessGrantKey = default) - { - AccessGrantId = accessGrantId; - AccessGrantKey = accessGrantKey; - } - - /// - /// ID of Access Grant to get. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantId { get; set; } - - /// - /// Unique key of Access Grant to get. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AccessGrant accessGrant = default) - { - AccessGrant = accessGrant; - } - - /// - /// OK - /// - [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] - public AccessGrant AccessGrant { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Get an Access Grant. - /// - public AccessGrant Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_grants/get", requestOptions) - .EnsureData("/access_grants/get") - .AccessGrant; - } - - /// - /// Get an Access Grant. - /// - public AccessGrant Get(string? accessGrantId = default, string? accessGrantKey = default) - { - return Get( - new GetRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey) - ); - } - - /// - /// Get an Access Grant. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/access_grants/get", requestOptions)) - .EnsureData("/access_grants/get") - .AccessGrant; - } - - /// - /// Get an Access Grant. - /// - public async Task GetAsync( - string? accessGrantId = default, - string? accessGrantKey = default - ) - { - return ( - await GetAsync( - new GetRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey) - ) - ); - } - - /// - /// Request parameters for Get related Access Grant resources. - /// - [DataContract(Name = "getRelatedRequest_request")] - public class GetRelatedRequest - { - [JsonConstructorAttribute] - protected GetRelatedRequest() { } - - public GetRelatedRequest( - List? accessGrantIds = default, - List? accessGrantKeys = default, - List? exclude = default, - List? include = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - Exclude = exclude; - Include = include; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExcludeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "spaces")] - Spaces = 1, - - [EnumMember(Value = "devices")] - Devices = 2, - - [EnumMember(Value = "acs_entrances")] - AcsEntrances = 3, - - [EnumMember(Value = "connected_accounts")] - ConnectedAccounts = 4, - - [EnumMember(Value = "acs_systems")] - AcsSystems = 5, - - [EnumMember(Value = "user_identities")] - UserIdentities = 6, - - [EnumMember(Value = "acs_access_groups")] - AcsAccessGroups = 7, - - [EnumMember(Value = "access_methods")] - AccessMethods = 8, - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum IncludeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "spaces")] - Spaces = 1, - - [EnumMember(Value = "devices")] - Devices = 2, - - [EnumMember(Value = "acs_entrances")] - AcsEntrances = 3, - - [EnumMember(Value = "connected_accounts")] - ConnectedAccounts = 4, - - [EnumMember(Value = "acs_systems")] - AcsSystems = 5, - - [EnumMember(Value = "user_identities")] - UserIdentities = 6, - - [EnumMember(Value = "acs_access_groups")] - AcsAccessGroups = 7, - - [EnumMember(Value = "access_methods")] - AccessMethods = 8, - } - - /// - /// IDs of the access grants that you want to get along with their related resources. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantIds { get; set; } - - /// - /// Keys of the access grants that you want to get along with their related resources. - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] - public List? Exclude { get; set; } - - [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] - public List? Include { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getRelatedResponse_response")] - public class GetRelatedResponse - { - [JsonConstructorAttribute] - protected GetRelatedResponse() { } - - public GetRelatedResponse(Batch batch = default) - { - Batch = batch; - } - - /// - /// OK - /// - [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] - public Batch Batch { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets all related resources for one or more Access Grants. - /// - public Batch GetRelated(GetRelatedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_grants/get_related", requestOptions) - .EnsureData("/access_grants/get_related") - .Batch; - } - - /// - /// Gets all related resources for one or more Access Grants. - /// - public Batch GetRelated( - List? accessGrantIds = default, - List? accessGrantKeys = default, - List? exclude = default, - List? include = default - ) - { - return GetRelated( - new GetRelatedRequest( - accessGrantIds: accessGrantIds, - accessGrantKeys: accessGrantKeys, - exclude: exclude, - include: include - ) - ); - } - - /// - /// Gets all related resources for one or more Access Grants. - /// - public async Task GetRelatedAsync(GetRelatedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/access_grants/get_related", - requestOptions - ) - ) - .EnsureData("/access_grants/get_related") - .Batch; - } - - /// - /// Gets all related resources for one or more Access Grants. - /// - public async Task GetRelatedAsync( - List? accessGrantIds = default, - List? accessGrantKeys = default, - List? exclude = default, - List? include = default - ) - { - return ( - await GetRelatedAsync( - new GetRelatedRequest( - accessGrantIds: accessGrantIds, - accessGrantKeys: accessGrantKeys, - exclude: exclude, - include: include - ) - ) - ); - } - - /// - /// Request parameters for List Access Grants. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? accessCodeId = default, - List? accessGrantIds = default, - string? accessGrantKey = default, - string? acsEntranceId = default, - string? acsSystemId = default, - string? customerKey = default, - string? deviceId = default, - float? limit = default, - string? locationId = default, - string? pageCursor = default, - string? reservationKey = default, - string? spaceId = default, - string? userIdentityId = default - ) - { - AccessCodeId = accessCodeId; - AccessGrantIds = accessGrantIds; - AccessGrantKey = accessGrantKey; - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - CustomerKey = customerKey; - DeviceId = deviceId; - Limit = limit; - LocationId = locationId; - PageCursor = pageCursor; - ReservationKey = reservationKey; - SpaceId = spaceId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access code by which you want to filter the list of Access Grants. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessCodeId { get; set; } - - /// - /// IDs of the access grants to retrieve. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantIds { get; set; } - - /// - /// Filter Access Grants by access_grant_key. Use null to filter for Access Grants without an access_grant_key. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// ID of the entrance by which you want to filter the list of Access Grants. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - /// - /// ID of the access system by which you want to filter the list of Access Grants. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// Customer key for which you want to list access grants. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// ID of the device by which you want to filter the list of Access Grants. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Numerical limit on the number of access grants to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - [Obsolete("Use `space_id`.")] - [DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] - public string? LocationId { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// Filter Access Grants by reservation_key. - /// - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - /// - /// ID of the space by which you want to filter the list of Access Grants. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - /// - /// ID of user identity by which you want to filter the list of Access Grants. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List accessGrants = default) - { - AccessGrants = accessGrants; - } - - /// - /// OK - /// - [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrants { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets an Access Grant. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_grants/list", requestOptions) - .EnsureData("/access_grants/list") - .AccessGrants; - } - - /// - /// Gets an Access Grant. - /// - public List List( - string? accessCodeId = default, - List? accessGrantIds = default, - string? accessGrantKey = default, - string? acsEntranceId = default, - string? acsSystemId = default, - string? customerKey = default, - string? deviceId = default, - float? limit = default, - string? locationId = default, - string? pageCursor = default, - string? reservationKey = default, - string? spaceId = default, - string? userIdentityId = default - ) - { - return List( - new ListRequest( - accessCodeId: accessCodeId, - accessGrantIds: accessGrantIds, - accessGrantKey: accessGrantKey, - acsEntranceId: acsEntranceId, - acsSystemId: acsSystemId, - customerKey: customerKey, - deviceId: deviceId, - limit: limit, - locationId: locationId, - pageCursor: pageCursor, - reservationKey: reservationKey, - spaceId: spaceId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Gets an Access Grant. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/access_grants/list", requestOptions)) - .EnsureData("/access_grants/list") - .AccessGrants; - } - - /// - /// Gets an Access Grant. - /// - public async Task> ListAsync( - string? accessCodeId = default, - List? accessGrantIds = default, - string? accessGrantKey = default, - string? acsEntranceId = default, - string? acsSystemId = default, - string? customerKey = default, - string? deviceId = default, - float? limit = default, - string? locationId = default, - string? pageCursor = default, - string? reservationKey = default, - string? spaceId = default, - string? userIdentityId = default - ) - { - return ( - await ListAsync( - new ListRequest( - accessCodeId: accessCodeId, - accessGrantIds: accessGrantIds, - accessGrantKey: accessGrantKey, - acsEntranceId: acsEntranceId, - acsSystemId: acsSystemId, - customerKey: customerKey, - deviceId: deviceId, - limit: limit, - locationId: locationId, - pageCursor: pageCursor, - reservationKey: reservationKey, - spaceId: spaceId, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for Add Requested Access Methods to Access Grant. - /// - [DataContract(Name = "requestAccessMethodsRequest_request")] - public class RequestAccessMethodsRequest - { - [JsonConstructorAttribute] - protected RequestAccessMethodsRequest() { } - - public RequestAccessMethodsRequest( - string accessGrantId = default, - List requestedAccessMethods = - default - ) - { - AccessGrantId = accessGrantId; - RequestedAccessMethods = requestedAccessMethods; - } - - /// - /// ID of the Access Grant to add access methods to. - /// - [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// Array of requested access methods to add to the access grant. - /// - [DataMember( - Name = "requested_access_methods", - IsRequired = true, - EmitDefaultValue = false - )] - public List RequestedAccessMethods { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "requestAccessMethodsRequestRequestedAccessMethods_model")] - public class RequestAccessMethodsRequestRequestedAccessMethods - { - [JsonConstructorAttribute] - protected RequestAccessMethodsRequestRequestedAccessMethods() { } - - public RequestAccessMethodsRequestRequestedAccessMethods( - string? code = default, - int? instantKeyMaxUseCount = default, - RequestAccessMethodsRequestRequestedAccessMethods.ModeEnum? mode = default - ) - { - Code = code; - InstantKeyMaxUseCount = instantKeyMaxUseCount; - Mode = mode; - } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. - /// - [DataMember( - Name = "instant_key_max_use_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int? InstantKeyMaxUseCount { get; set; } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] - public RequestAccessMethodsRequestRequestedAccessMethods.ModeEnum? Mode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "requestAccessMethodsResponse_response")] - public class RequestAccessMethodsResponse - { - [JsonConstructorAttribute] - protected RequestAccessMethodsResponse() { } - - public RequestAccessMethodsResponse(AccessGrant accessGrant = default) - { - AccessGrant = accessGrant; - } - - /// - /// OK - /// - [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] - public AccessGrant AccessGrant { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Adds additional requested access methods to an existing Access Grant. - /// - public AccessGrant RequestAccessMethods(RequestAccessMethodsRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/access_grants/request_access_methods", - requestOptions - ) - .EnsureData("/access_grants/request_access_methods") - .AccessGrant; - } - - /// - /// Adds additional requested access methods to an existing Access Grant. - /// - public AccessGrant RequestAccessMethods( - string accessGrantId = default, - List requestedAccessMethods = default - ) - { - return RequestAccessMethods( - new RequestAccessMethodsRequest( - accessGrantId: accessGrantId, - requestedAccessMethods: requestedAccessMethods - ) - ); - } - - /// - /// Adds additional requested access methods to an existing Access Grant. - /// - public async Task RequestAccessMethodsAsync( - RequestAccessMethodsRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/access_grants/request_access_methods", - requestOptions - ) - ) - .EnsureData("/access_grants/request_access_methods") - .AccessGrant; - } - - /// - /// Adds additional requested access methods to an existing Access Grant. - /// - public async Task RequestAccessMethodsAsync( - string accessGrantId = default, - List requestedAccessMethods = default - ) - { - return ( - await RequestAccessMethodsAsync( - new RequestAccessMethodsRequest( - accessGrantId: accessGrantId, - requestedAccessMethods: requestedAccessMethods - ) - ) - ); - } - - /// - /// Request parameters for Update an Access Grant. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string? accessGrantId = default, - string? accessGrantKey = default, - string? endsAt = default, - string? name = default, - string? startsAt = default - ) - { - AccessGrantId = accessGrantId; - AccessGrantKey = accessGrantKey; - EndsAt = endsAt; - Name = name; - StartsAt = startsAt; - } - - /// - /// ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantId { get; set; } - - /// - /// Key of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// Date and time at which the validity of the grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Display name for the access grant. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Date and time at which the validity of the grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates an existing Access Grant's time window. - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/access_grants/update", requestOptions); - } - - /// - /// Updates an existing Access Grant's time window. - /// - public void Update( - string? accessGrantId = default, - string? accessGrantKey = default, - string? endsAt = default, - string? name = default, - string? startsAt = default - ) - { - Update( - new UpdateRequest( - accessGrantId: accessGrantId, - accessGrantKey: accessGrantKey, - endsAt: endsAt, - name: name, - startsAt: startsAt - ) - ); - } - - /// - /// Updates an existing Access Grant's time window. - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/access_grants/update", requestOptions); - } - - /// - /// Updates an existing Access Grant's time window. - /// - public async Task UpdateAsync( - string? accessGrantId = default, - string? accessGrantKey = default, - string? endsAt = default, - string? name = default, - string? startsAt = default - ) - { - await UpdateAsync( - new UpdateRequest( - accessGrantId: accessGrantId, - accessGrantKey: accessGrantKey, - endsAt: endsAt, - name: name, - startsAt: startsAt - ) - ); - } - } +public class AccessGrants +{ +private ISeamClient _seam; + +public AccessGrants(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create an Access Grant. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(string? accessGrantKey = default, List? acsEntranceIds = default, string? customizationProfileId = default, List? deviceIds = default, string? endsAt = default, CreateRequestLocation? location = default, List? locationIds = default, string? name = default, List requestedAccessMethods = default, string? reservationKey = default, List? spaceIds = default, List? spaceKeys = default, string? startsAt = default, CreateRequestUserIdentity? userIdentity = default, string? userIdentityId = default) +{ +AccessGrantKey = accessGrantKey; +AcsEntranceIds = acsEntranceIds; +CustomizationProfileId = customizationProfileId; +DeviceIds = deviceIds; +EndsAt = endsAt; +Location = location; +LocationIds = locationIds; +Name = name; +RequestedAccessMethods = requestedAccessMethods; +ReservationKey = reservationKey; +SpaceIds = spaceIds; +SpaceKeys = spaceKeys; +StartsAt = startsAt; +UserIdentity = userIdentity; +UserIdentityId = userIdentityId; +} + +/// +/// Unique key for the access grant within the workspace. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// Set of IDs of the [entrances](https://www.seam.co/docs/api/acs/systems/list) to which access is being granted. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsEntranceIds { get; set; } + +/// +/// ID of the customization profile to apply to the Access Grant and its access methods. +/// +[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomizationProfileId { get; set; } + +/// +/// Set of IDs of the [devices](https://www.seam.co/docs/api/devices/list) to which access is being granted. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceIds { get; set; } + +/// +/// Date and time at which the validity of the new grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +[Obsolete("Create a space first, then reference it using `space_ids`.")] +[DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestLocation? Location { get; set; } + +[Obsolete("Use `space_ids`.")] +[DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] +public List? LocationIds { get; set; } + +/// +/// Name for the access grant. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +[DataMember(Name = "requested_access_methods", IsRequired = true, EmitDefaultValue = false)] +public List RequestedAccessMethods { get; set; } + +/// +/// Reservation key for the access grant. +/// +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +/// +/// Set of IDs of existing spaces to which access is being granted. +/// +[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceIds { get; set; } + +/// +/// Set of keys of existing spaces to which access is being granted. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Date and time at which the validity of the new grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// When used, creates a new user identity with the given details, and grants them access. +/// +[DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestUserIdentity? UserIdentity { get; set; } + +/// +/// ID of user identity for whom access is being granted. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestLocation_model")] +public class CreateRequestLocation +{ +[JsonConstructorAttribute] +protected CreateRequestLocation() { } + +public CreateRequestLocation(List? acsEntranceIds = default, List? deviceIds = default, string? name = default) +{ +AcsEntranceIds = acsEntranceIds; +DeviceIds = deviceIds; +Name = name; +} + +[Obsolete("Use `acs_entrance_ids` at the top level.")] +[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsEntranceIds { get; set; } + +[Obsolete("Use `device_ids` at the top level.")] +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceIds { get; set; } + +/// +/// Name of the location. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestRequestedAccessMethods_model")] +public class CreateRequestRequestedAccessMethods +{ +[JsonConstructorAttribute] +protected CreateRequestRequestedAccessMethods() { } + +public CreateRequestRequestedAccessMethods(string? code = default, int? instantKeyMaxUseCount = default, CreateRequestRequestedAccessMethods.ModeEnum? mode = default) +{ +Code = code; +InstantKeyMaxUseCount = instantKeyMaxUseCount; +Mode = mode; +} + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Specific PIN code to use for this access method. Only applicable when mode is 'code'. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. +/// +[DataMember(Name = "instant_key_max_use_count", IsRequired = false, EmitDefaultValue = false)] +public int? InstantKeyMaxUseCount { get; set; } + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestRequestedAccessMethods.ModeEnum? Mode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestUserIdentity_model")] +public class CreateRequestUserIdentity +{ +[JsonConstructorAttribute] +protected CreateRequestUserIdentity() { } + +public CreateRequestUserIdentity(string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string? userIdentityKey = default) +{ +EmailAddress = emailAddress; +FullName = fullName; +PhoneNumber = phoneNumber; +UserIdentityKey = userIdentityKey; +} + +/// +/// Unique email address for the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Full name of the user associated with the user identity. +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Unique key for the user identity. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(AccessGrant accessGrant = default) +{ +AccessGrant = accessGrant; +} + +/// +/// OK +/// +[DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] +public AccessGrant AccessGrant { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. +/// +public AccessGrant Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/access_grants/create", requestOptions).EnsureData("/access_grants/create").AccessGrant; +} + +/// +/// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. +/// +public AccessGrant Create(string? accessGrantKey = default, List? acsEntranceIds = default, string? customizationProfileId = default, List? deviceIds = default, string? endsAt = default, CreateRequestLocation? location = default, List? locationIds = default, string? name = default, List requestedAccessMethods = default, string? reservationKey = default, List? spaceIds = default, List? spaceKeys = default, string? startsAt = default, CreateRequestUserIdentity? userIdentity = default, string? userIdentityId = default) +{ +return Create(new CreateRequest(accessGrantKey: accessGrantKey, acsEntranceIds: acsEntranceIds, customizationProfileId: customizationProfileId, deviceIds: deviceIds, endsAt: endsAt, location: location, locationIds: locationIds, name: name, requestedAccessMethods: requestedAccessMethods, reservationKey: reservationKey, spaceIds: spaceIds, spaceKeys: spaceKeys, startsAt: startsAt, userIdentity: userIdentity, userIdentityId: userIdentityId)); +} + +/// +/// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/access_grants/create", requestOptions)).EnsureData("/access_grants/create").AccessGrant; +} + +/// +/// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. +/// +public async Task CreateAsync(string? accessGrantKey = default, List? acsEntranceIds = default, string? customizationProfileId = default, List? deviceIds = default, string? endsAt = default, CreateRequestLocation? location = default, List? locationIds = default, string? name = default, List requestedAccessMethods = default, string? reservationKey = default, List? spaceIds = default, List? spaceKeys = default, string? startsAt = default, CreateRequestUserIdentity? userIdentity = default, string? userIdentityId = default) +{ +return (await CreateAsync(new CreateRequest(accessGrantKey: accessGrantKey, acsEntranceIds: acsEntranceIds, customizationProfileId: customizationProfileId, deviceIds: deviceIds, endsAt: endsAt, location: location, locationIds: locationIds, name: name, requestedAccessMethods: requestedAccessMethods, reservationKey: reservationKey, spaceIds: spaceIds, spaceKeys: spaceKeys, startsAt: startsAt, userIdentity: userIdentity, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for Delete an Access Grant. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string accessGrantId = default) +{ +AccessGrantId = accessGrantId; +} + +/// +/// ID of Access Grant to delete. +/// +[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Delete an Access Grant. +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/access_grants/delete", requestOptions); +} + +/// +/// Delete an Access Grant. +/// +public void Delete(string accessGrantId = default) +{ +Delete(new DeleteRequest(accessGrantId: accessGrantId)); +} + +/// +/// Delete an Access Grant. +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/access_grants/delete", requestOptions); +} + +/// +/// Delete an Access Grant. +/// +public async Task DeleteAsync(string accessGrantId = default) +{ +await DeleteAsync(new DeleteRequest(accessGrantId: accessGrantId)); +} + +/// +/// Request parameters for Get an Access Grant. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? accessGrantId = default, string? accessGrantKey = default) +{ +AccessGrantId = accessGrantId; +AccessGrantKey = accessGrantKey; +} + +/// +/// ID of Access Grant to get. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantId { get; set; } + +/// +/// Unique key of Access Grant to get. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AccessGrant accessGrant = default) +{ +AccessGrant = accessGrant; +} + +/// +/// OK +/// +[DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] +public AccessGrant AccessGrant { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Get an Access Grant. +/// +public AccessGrant Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_grants/get", requestOptions).EnsureData("/access_grants/get").AccessGrant; +} + +/// +/// Get an Access Grant. +/// +public AccessGrant Get(string? accessGrantId = default, string? accessGrantKey = default) +{ +return Get(new GetRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey)); +} + +/// +/// Get an Access Grant. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_grants/get", requestOptions)).EnsureData("/access_grants/get").AccessGrant; +} + +/// +/// Get an Access Grant. +/// +public async Task GetAsync(string? accessGrantId = default, string? accessGrantKey = default) +{ +return (await GetAsync(new GetRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey))); +} + +/// +/// Request parameters for Get related Access Grant resources. +/// +[DataContract(Name = "getRelatedRequest_request")] +public class GetRelatedRequest +{ +[JsonConstructorAttribute] +protected GetRelatedRequest() { } + +public GetRelatedRequest(List? accessGrantIds = default, List? accessGrantKeys = default, List? exclude = default, List? include = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +Exclude = exclude; +Include = include; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExcludeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "spaces")] +Spaces = 1, + +[EnumMember(Value = "devices")] +Devices = 2, + +[EnumMember(Value = "acs_entrances")] +AcsEntrances = 3, + +[EnumMember(Value = "connected_accounts")] +ConnectedAccounts = 4, + +[EnumMember(Value = "acs_systems")] +AcsSystems = 5, + +[EnumMember(Value = "user_identities")] +UserIdentities = 6, + +[EnumMember(Value = "acs_access_groups")] +AcsAccessGroups = 7, + +[EnumMember(Value = "access_methods")] +AccessMethods = 8, +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum IncludeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "spaces")] +Spaces = 1, + +[EnumMember(Value = "devices")] +Devices = 2, + +[EnumMember(Value = "acs_entrances")] +AcsEntrances = 3, + +[EnumMember(Value = "connected_accounts")] +ConnectedAccounts = 4, + +[EnumMember(Value = "acs_systems")] +AcsSystems = 5, + +[EnumMember(Value = "user_identities")] +UserIdentities = 6, + +[EnumMember(Value = "acs_access_groups")] +AcsAccessGroups = 7, + +[EnumMember(Value = "access_methods")] +AccessMethods = 8, +} + +/// +/// IDs of the access grants that you want to get along with their related resources. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantIds { get; set; } + +/// +/// Keys of the access grants that you want to get along with their related resources. +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] +public List? Exclude { get; set; } + +[DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] +public List? Include { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getRelatedResponse_response")] +public class GetRelatedResponse +{ +[JsonConstructorAttribute] +protected GetRelatedResponse() { } + +public GetRelatedResponse(Batch batch = default) +{ +Batch = batch; +} + +/// +/// OK +/// +[DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] +public Batch Batch { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets all related resources for one or more Access Grants. +/// +public Batch GetRelated(GetRelatedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_grants/get_related", requestOptions).EnsureData("/access_grants/get_related").Batch; +} + +/// +/// Gets all related resources for one or more Access Grants. +/// +public Batch GetRelated(List? accessGrantIds = default, List? accessGrantKeys = default, List? exclude = default, List? include = default) +{ +return GetRelated(new GetRelatedRequest(accessGrantIds: accessGrantIds, accessGrantKeys: accessGrantKeys, exclude: exclude, include: include)); +} + +/// +/// Gets all related resources for one or more Access Grants. +/// +public async Task GetRelatedAsync(GetRelatedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_grants/get_related", requestOptions)).EnsureData("/access_grants/get_related").Batch; +} + +/// +/// Gets all related resources for one or more Access Grants. +/// +public async Task GetRelatedAsync(List? accessGrantIds = default, List? accessGrantKeys = default, List? exclude = default, List? include = default) +{ +return (await GetRelatedAsync(new GetRelatedRequest(accessGrantIds: accessGrantIds, accessGrantKeys: accessGrantKeys, exclude: exclude, include: include))); +} + +/// +/// Request parameters for List Access Grants. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? accessCodeId = default, List? accessGrantIds = default, string? accessGrantKey = default, string? acsEntranceId = default, string? acsSystemId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? locationId = default, string? pageCursor = default, string? reservationKey = default, string? search = default, string? spaceId = default, string? userIdentityId = default) +{ +AccessCodeId = accessCodeId; +AccessGrantIds = accessGrantIds; +AccessGrantKey = accessGrantKey; +AcsEntranceId = acsEntranceId; +AcsSystemId = acsSystemId; +CustomerKey = customerKey; +DeviceId = deviceId; +Limit = limit; +LocationId = locationId; +PageCursor = pageCursor; +ReservationKey = reservationKey; +Search = search; +SpaceId = spaceId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access code by which you want to filter the list of Access Grants. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessCodeId { get; set; } + +/// +/// IDs of the access grants to retrieve. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantIds { get; set; } + +/// +/// Filter Access Grants by access_grant_key. Use null to filter for Access Grants without an access_grant_key. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// ID of the entrance by which you want to filter the list of Access Grants. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsEntranceId { get; set; } + +/// +/// ID of the access system by which you want to filter the list of Access Grants. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// Customer key for which you want to list access grants. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// ID of the device by which you want to filter the list of Access Grants. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Numerical limit on the number of access grants to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +[Obsolete("Use `space_id`.")] +[DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] +public string? LocationId { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// Filter Access Grants by reservation_key. +/// +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +/// +/// String for which to search. Filters returned Access Grants to include all records that satisfy a partial match using `name`, `access_grant_key`, `reservation_key`, `access_grant_id`, `user_identity_id`, `user_identity_full_name`, `user_identity_email_address` or `user_identity_phone_number`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// ID of the space by which you want to filter the list of Access Grants. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +/// +/// ID of user identity by which you want to filter the list of Access Grants. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List accessGrants = default) +{ +AccessGrants = accessGrants; +} + +/// +/// OK +/// +[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrants { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets an Access Grant. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_grants/list", requestOptions).EnsureData("/access_grants/list").AccessGrants; +} + +/// +/// Gets an Access Grant. +/// +public List List(string? accessCodeId = default, List? accessGrantIds = default, string? accessGrantKey = default, string? acsEntranceId = default, string? acsSystemId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? locationId = default, string? pageCursor = default, string? reservationKey = default, string? search = default, string? spaceId = default, string? userIdentityId = default) +{ +return List(new ListRequest(accessCodeId: accessCodeId, accessGrantIds: accessGrantIds, accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, customerKey: customerKey, deviceId: deviceId, limit: limit, locationId: locationId, pageCursor: pageCursor, reservationKey: reservationKey, search: search, spaceId: spaceId, userIdentityId: userIdentityId)); +} + +/// +/// Gets an Access Grant. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_grants/list", requestOptions)).EnsureData("/access_grants/list").AccessGrants; +} + +/// +/// Gets an Access Grant. +/// +public async Task> ListAsync(string? accessCodeId = default, List? accessGrantIds = default, string? accessGrantKey = default, string? acsEntranceId = default, string? acsSystemId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? locationId = default, string? pageCursor = default, string? reservationKey = default, string? search = default, string? spaceId = default, string? userIdentityId = default) +{ +return (await ListAsync(new ListRequest(accessCodeId: accessCodeId, accessGrantIds: accessGrantIds, accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, customerKey: customerKey, deviceId: deviceId, limit: limit, locationId: locationId, pageCursor: pageCursor, reservationKey: reservationKey, search: search, spaceId: spaceId, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for Add Requested Access Methods to Access Grant. +/// +[DataContract(Name = "requestAccessMethodsRequest_request")] +public class RequestAccessMethodsRequest +{ +[JsonConstructorAttribute] +protected RequestAccessMethodsRequest() { } + +public RequestAccessMethodsRequest(string accessGrantId = default, List requestedAccessMethods = default) +{ +AccessGrantId = accessGrantId; +RequestedAccessMethods = requestedAccessMethods; +} + +/// +/// ID of the Access Grant to add access methods to. +/// +[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// Array of requested access methods to add to the access grant. +/// +[DataMember(Name = "requested_access_methods", IsRequired = true, EmitDefaultValue = false)] +public List RequestedAccessMethods { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "requestAccessMethodsRequestRequestedAccessMethods_model")] +public class RequestAccessMethodsRequestRequestedAccessMethods +{ +[JsonConstructorAttribute] +protected RequestAccessMethodsRequestRequestedAccessMethods() { } + +public RequestAccessMethodsRequestRequestedAccessMethods(string? code = default, int? instantKeyMaxUseCount = default, RequestAccessMethodsRequestRequestedAccessMethods.ModeEnum? mode = default) +{ +Code = code; +InstantKeyMaxUseCount = instantKeyMaxUseCount; +Mode = mode; +} + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Specific PIN code to use for this access method. Only applicable when mode is 'code'. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. +/// +[DataMember(Name = "instant_key_max_use_count", IsRequired = false, EmitDefaultValue = false)] +public int? InstantKeyMaxUseCount { get; set; } + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] +public RequestAccessMethodsRequestRequestedAccessMethods.ModeEnum? Mode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "requestAccessMethodsResponse_response")] +public class RequestAccessMethodsResponse +{ +[JsonConstructorAttribute] +protected RequestAccessMethodsResponse() { } + +public RequestAccessMethodsResponse(AccessGrant accessGrant = default) +{ +AccessGrant = accessGrant; +} + +/// +/// OK +/// +[DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] +public AccessGrant AccessGrant { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Adds additional requested access methods to an existing Access Grant. +/// +public AccessGrant RequestAccessMethods(RequestAccessMethodsRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/access_grants/request_access_methods", requestOptions).EnsureData("/access_grants/request_access_methods").AccessGrant; +} + +/// +/// Adds additional requested access methods to an existing Access Grant. +/// +public AccessGrant RequestAccessMethods(string accessGrantId = default, List requestedAccessMethods = default) +{ +return RequestAccessMethods(new RequestAccessMethodsRequest(accessGrantId: accessGrantId, requestedAccessMethods: requestedAccessMethods)); +} + +/// +/// Adds additional requested access methods to an existing Access Grant. +/// +public async Task RequestAccessMethodsAsync(RequestAccessMethodsRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/access_grants/request_access_methods", requestOptions)).EnsureData("/access_grants/request_access_methods").AccessGrant; +} + +/// +/// Adds additional requested access methods to an existing Access Grant. +/// +public async Task RequestAccessMethodsAsync(string accessGrantId = default, List requestedAccessMethods = default) +{ +return (await RequestAccessMethodsAsync(new RequestAccessMethodsRequest(accessGrantId: accessGrantId, requestedAccessMethods: requestedAccessMethods))); +} + +/// +/// Request parameters for Update an Access Grant. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string? accessGrantId = default, string? accessGrantKey = default, string? endsAt = default, string? name = default, string? startsAt = default) +{ +AccessGrantId = accessGrantId; +AccessGrantKey = accessGrantKey; +EndsAt = endsAt; +Name = name; +StartsAt = startsAt; +} + +/// +/// ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantId { get; set; } + +/// +/// Key of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// Date and time at which the validity of the grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Display name for the access grant. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Date and time at which the validity of the grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates an existing Access Grant's time window. +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/access_grants/update", requestOptions); +} + +/// +/// Updates an existing Access Grant's time window. +/// +public void Update(string? accessGrantId = default, string? accessGrantKey = default, string? endsAt = default, string? name = default, string? startsAt = default) +{ +Update(new UpdateRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, endsAt: endsAt, name: name, startsAt: startsAt)); +} + +/// +/// Updates an existing Access Grant's time window. +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/access_grants/update", requestOptions); +} + +/// +/// Updates an existing Access Grant's time window. +/// +public async Task UpdateAsync(string? accessGrantId = default, string? accessGrantKey = default, string? endsAt = default, string? name = default, string? startsAt = default) +{ +await UpdateAsync(new UpdateRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, endsAt: endsAt, name: name, startsAt: startsAt)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.AccessGrants AccessGrants => new(this); - } +public partial class SeamClient +{ +public Api.AccessGrants AccessGrants => new(this); +} - public partial interface ISeamClient - { - public Api.AccessGrants AccessGrants { get; } - } +public partial interface ISeamClient +{ +public Api.AccessGrants AccessGrants { get; } +} } diff --git a/src/Seam/Api/AccessGroupsAcs.cs b/src/Seam/Api/AccessGroupsAcs.cs index 3b08fff4..545fe6ad 100644 --- a/src/Seam/Api/AccessGroupsAcs.cs +++ b/src/Seam/Api/AccessGroupsAcs.cs @@ -9,877 +9,755 @@ namespace Seam.Api { - public class AccessGroupsAcs - { - private ISeamClient _seam; - - public AccessGroupsAcs(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Add an ACS User to an Access Group. - /// - [DataContract(Name = "addUserRequest_request")] - public class AddUserRequest - { - [JsonConstructorAttribute] - protected AddUserRequest() { } - - public AddUserRequest( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsAccessGroupId = acsAccessGroupId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access group to which you want to add an access system user. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - /// - /// ID of the access system user that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the desired user identity that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void AddUser(AddUserRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Put("/acs/access_groups/add_user", requestOptions); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void AddUser( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AddUser( - new AddUserRequest( - acsAccessGroupId: acsAccessGroupId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task AddUserAsync(AddUserRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PutAsync("/acs/access_groups/add_user", requestOptions); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task AddUserAsync( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await AddUserAsync( - new AddUserRequest( - acsAccessGroupId: acsAccessGroupId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for Delete an Access Group. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string acsAccessGroupId = default) - { - AcsAccessGroupId = acsAccessGroupId; - } - - /// - /// ID of the access group that you want to delete. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/acs/access_groups/delete", requestOptions); - } - - /// - /// Deletes a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void Delete(string acsAccessGroupId = default) - { - Delete(new DeleteRequest(acsAccessGroupId: acsAccessGroupId)); - } - - /// - /// Deletes a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/acs/access_groups/delete", requestOptions); - } - - /// - /// Deletes a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task DeleteAsync(string acsAccessGroupId = default) - { - await DeleteAsync(new DeleteRequest(acsAccessGroupId: acsAccessGroupId)); - } - - /// - /// Request parameters for Get an Access Group. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string acsAccessGroupId = default) - { - AcsAccessGroupId = acsAccessGroupId; - } - - /// - /// ID of the access group that you want to get. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AcsAccessGroup acsAccessGroup = default) - { - AcsAccessGroup = acsAccessGroup; - } - - /// - /// OK - /// - [DataMember(Name = "acs_access_group", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroup AcsAccessGroup { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public AcsAccessGroup Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/access_groups/get", requestOptions) - .EnsureData("/acs/access_groups/get") - .AcsAccessGroup; - } - - /// - /// Returns a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public AcsAccessGroup Get(string acsAccessGroupId = default) - { - return Get(new GetRequest(acsAccessGroupId: acsAccessGroupId)); - } - - /// - /// Returns a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/access_groups/get", requestOptions)) - .EnsureData("/acs/access_groups/get") - .AcsAccessGroup; - } - - /// - /// Returns a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task GetAsync(string acsAccessGroupId = default) - { - return (await GetAsync(new GetRequest(acsAccessGroupId: acsAccessGroupId))); - } - - /// - /// Request parameters for List Access Groups. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? acsSystemId = default, - string? acsUserId = default, - string? search = default, - string? userIdentityId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - Search = search; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system for which you want to retrieve all access groups. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user for which you want to retrieve all access groups. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// String for which to search. Filters returned access groups to include all records that satisfy a partial match using `name` or `acs_access_group_id`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// ID of the user identity for which you want to retrieve all access groups. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List acsAccessGroups = default) - { - AcsAccessGroups = acsAccessGroups; - } - - /// - /// OK - /// - [DataMember(Name = "acs_access_groups", IsRequired = false, EmitDefaultValue = false)] - public List AcsAccessGroups { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [access groups](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/access_groups/list", requestOptions) - .EnsureData("/acs/access_groups/list") - .AcsAccessGroups; - } - - /// - /// Returns a list of all [access groups](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public List List( - string? acsSystemId = default, - string? acsUserId = default, - string? search = default, - string? userIdentityId = default - ) - { - return List( - new ListRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - search: search, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Returns a list of all [access groups](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/access_groups/list", requestOptions)) - .EnsureData("/acs/access_groups/list") - .AcsAccessGroups; - } - - /// - /// Returns a list of all [access groups](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task> ListAsync( - string? acsSystemId = default, - string? acsUserId = default, - string? search = default, - string? userIdentityId = default - ) - { - return ( - await ListAsync( - new ListRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - search: search, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for List Entrances Accessible to an Access Group. - /// - [DataContract(Name = "listAccessibleEntrancesRequest_request")] - public class ListAccessibleEntrancesRequest - { - [JsonConstructorAttribute] - protected ListAccessibleEntrancesRequest() { } - - public ListAccessibleEntrancesRequest(string acsAccessGroupId = default) - { - AcsAccessGroupId = acsAccessGroupId; - } - - /// - /// ID of the access group for which you want to retrieve all accessible entrances. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listAccessibleEntrancesResponse_response")] - public class ListAccessibleEntrancesResponse - { - [JsonConstructorAttribute] - protected ListAccessibleEntrancesResponse() { } - - public ListAccessibleEntrancesResponse(List acsEntrances = default) - { - AcsEntrances = acsEntrances; - } - - /// - /// OK - /// - [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] - public List AcsEntrances { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all accessible entrances for a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get( - "/acs/access_groups/list_accessible_entrances", - requestOptions - ) - .EnsureData("/acs/access_groups/list_accessible_entrances") - .AcsEntrances; - } - - /// - /// Returns a list of all accessible entrances for a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public List ListAccessibleEntrances(string acsAccessGroupId = default) - { - return ListAccessibleEntrances( - new ListAccessibleEntrancesRequest(acsAccessGroupId: acsAccessGroupId) - ); - } - - /// - /// Returns a list of all accessible entrances for a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task> ListAccessibleEntrancesAsync( - ListAccessibleEntrancesRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/acs/access_groups/list_accessible_entrances", - requestOptions - ) - ) - .EnsureData("/acs/access_groups/list_accessible_entrances") - .AcsEntrances; - } - - /// - /// Returns a list of all accessible entrances for a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task> ListAccessibleEntrancesAsync( - string acsAccessGroupId = default - ) - { - return ( - await ListAccessibleEntrancesAsync( - new ListAccessibleEntrancesRequest(acsAccessGroupId: acsAccessGroupId) - ) - ); - } - - /// - /// Request parameters for List ACS Users in an Access Group. - /// - [DataContract(Name = "listUsersRequest_request")] - public class ListUsersRequest - { - [JsonConstructorAttribute] - protected ListUsersRequest() { } - - public ListUsersRequest(string acsAccessGroupId = default) - { - AcsAccessGroupId = acsAccessGroupId; - } - - /// - /// ID of the access group for which you want to retrieve all access system users. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listUsersResponse_response")] - public class ListUsersResponse - { - [JsonConstructorAttribute] - protected ListUsersResponse() { } - - public ListUsersResponse(List acsUsers = default) - { - AcsUsers = acsUsers; - } - - /// - /// OK - /// - [DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] - public List AcsUsers { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public List ListUsers(ListUsersRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/access_groups/list_users", requestOptions) - .EnsureData("/acs/access_groups/list_users") - .AcsUsers; - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public List ListUsers(string acsAccessGroupId = default) - { - return ListUsers(new ListUsersRequest(acsAccessGroupId: acsAccessGroupId)); - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task> ListUsersAsync(ListUsersRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/acs/access_groups/list_users", - requestOptions - ) - ) - .EnsureData("/acs/access_groups/list_users") - .AcsUsers; - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task> ListUsersAsync(string acsAccessGroupId = default) - { - return (await ListUsersAsync(new ListUsersRequest(acsAccessGroupId: acsAccessGroupId))); - } - - /// - /// Request parameters for Remove an ACS User from an Access Group. - /// - [DataContract(Name = "removeUserRequest_request")] - public class RemoveUserRequest - { - [JsonConstructorAttribute] - protected RemoveUserRequest() { } - - public RemoveUserRequest( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsAccessGroupId = acsAccessGroupId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access group from which you want to remove an access system user. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - /// - /// ID of the access system user that you want to remove from an access group. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity associated with the user that you want to remove from an access group. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void RemoveUser(RemoveUserRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/acs/access_groups/remove_user", requestOptions); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void RemoveUser( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - RemoveUser( - new RemoveUserRequest( - acsAccessGroupId: acsAccessGroupId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task RemoveUserAsync(RemoveUserRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/acs/access_groups/remove_user", requestOptions); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task RemoveUserAsync( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await RemoveUserAsync( - new RemoveUserRequest( - acsAccessGroupId: acsAccessGroupId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - } +public class AccessGroupsAcs +{ +private ISeamClient _seam; + +public AccessGroupsAcs(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Add an ACS User to an Access Group. +/// +[DataContract(Name = "addUserRequest_request")] +public class AddUserRequest +{ +[JsonConstructorAttribute] +protected AddUserRequest() { } + +public AddUserRequest(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access group to which you want to add an access system user. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +/// +/// ID of the access system user that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the desired user identity that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void AddUser(AddUserRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Put("/acs/access_groups/add_user", requestOptions); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void AddUser(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AddUser(new AddUserRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task AddUserAsync(AddUserRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PutAsync("/acs/access_groups/add_user", requestOptions); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task AddUserAsync(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await AddUserAsync(new AddUserRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Delete an Access Group. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string acsAccessGroupId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +} + +/// +/// ID of the access group that you want to delete. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/acs/access_groups/delete", requestOptions); +} + +/// +/// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void Delete(string acsAccessGroupId = default) +{ +Delete(new DeleteRequest(acsAccessGroupId: acsAccessGroupId)); +} + +/// +/// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/acs/access_groups/delete", requestOptions); +} + +/// +/// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task DeleteAsync(string acsAccessGroupId = default) +{ +await DeleteAsync(new DeleteRequest(acsAccessGroupId: acsAccessGroupId)); +} + +/// +/// Request parameters for Get an Access Group. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string acsAccessGroupId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +} + +/// +/// ID of the access group that you want to get. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AcsAccessGroup acsAccessGroup = default) +{ +AcsAccessGroup = acsAccessGroup; +} + +/// +/// OK +/// +[DataMember(Name = "acs_access_group", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroup AcsAccessGroup { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public AcsAccessGroup Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/access_groups/get", requestOptions).EnsureData("/acs/access_groups/get").AcsAccessGroup; +} + +/// +/// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public AcsAccessGroup Get(string acsAccessGroupId = default) +{ +return Get(new GetRequest(acsAccessGroupId: acsAccessGroupId)); +} + +/// +/// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/access_groups/get", requestOptions)).EnsureData("/acs/access_groups/get").AcsAccessGroup; +} + +/// +/// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task GetAsync(string acsAccessGroupId = default) +{ +return (await GetAsync(new GetRequest(acsAccessGroupId: acsAccessGroupId))); +} + +/// +/// Request parameters for List Access Groups. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? acsSystemId = default, string? acsUserId = default, string? search = default, string? userIdentityId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +Search = search; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system for which you want to retrieve all access groups. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user for which you want to retrieve all access groups. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// String for which to search. Filters returned access groups to include all records that satisfy a partial match using `name` or `acs_access_group_id`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// ID of the user identity for which you want to retrieve all access groups. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List acsAccessGroups = default) +{ +AcsAccessGroups = acsAccessGroups; +} + +/// +/// OK +/// +[DataMember(Name = "acs_access_groups", IsRequired = false, EmitDefaultValue = false)] +public List AcsAccessGroups { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/access_groups/list", requestOptions).EnsureData("/acs/access_groups/list").AcsAccessGroups; +} + +/// +/// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public List List(string? acsSystemId = default, string? acsUserId = default, string? search = default, string? userIdentityId = default) +{ +return List(new ListRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, search: search, userIdentityId: userIdentityId)); +} + +/// +/// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/access_groups/list", requestOptions)).EnsureData("/acs/access_groups/list").AcsAccessGroups; +} + +/// +/// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task> ListAsync(string? acsSystemId = default, string? acsUserId = default, string? search = default, string? userIdentityId = default) +{ +return (await ListAsync(new ListRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, search: search, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for List Entrances Accessible to an Access Group. +/// +[DataContract(Name = "listAccessibleEntrancesRequest_request")] +public class ListAccessibleEntrancesRequest +{ +[JsonConstructorAttribute] +protected ListAccessibleEntrancesRequest() { } + +public ListAccessibleEntrancesRequest(string acsAccessGroupId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +} + +/// +/// ID of the access group for which you want to retrieve all accessible entrances. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listAccessibleEntrancesResponse_response")] +public class ListAccessibleEntrancesResponse +{ +[JsonConstructorAttribute] +protected ListAccessibleEntrancesResponse() { } + +public ListAccessibleEntrancesResponse(List acsEntrances = default) +{ +AcsEntrances = acsEntrances; +} + +/// +/// OK +/// +[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public List AcsEntrances { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/access_groups/list_accessible_entrances", requestOptions).EnsureData("/acs/access_groups/list_accessible_entrances").AcsEntrances; +} + +/// +/// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public List ListAccessibleEntrances(string acsAccessGroupId = default) +{ +return ListAccessibleEntrances(new ListAccessibleEntrancesRequest(acsAccessGroupId: acsAccessGroupId)); +} + +/// +/// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task> ListAccessibleEntrancesAsync(ListAccessibleEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/access_groups/list_accessible_entrances", requestOptions)).EnsureData("/acs/access_groups/list_accessible_entrances").AcsEntrances; +} + +/// +/// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task> ListAccessibleEntrancesAsync(string acsAccessGroupId = default) +{ +return (await ListAccessibleEntrancesAsync(new ListAccessibleEntrancesRequest(acsAccessGroupId: acsAccessGroupId))); +} + +/// +/// Request parameters for List ACS Users in an Access Group. +/// +[DataContract(Name = "listUsersRequest_request")] +public class ListUsersRequest +{ +[JsonConstructorAttribute] +protected ListUsersRequest() { } + +public ListUsersRequest(string acsAccessGroupId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +} + +/// +/// ID of the access group for which you want to retrieve all access system users. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listUsersResponse_response")] +public class ListUsersResponse +{ +[JsonConstructorAttribute] +protected ListUsersResponse() { } + +public ListUsersResponse(List acsUsers = default) +{ +AcsUsers = acsUsers; +} + +/// +/// OK +/// +[DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] +public List AcsUsers { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public List ListUsers(ListUsersRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/access_groups/list_users", requestOptions).EnsureData("/acs/access_groups/list_users").AcsUsers; +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public List ListUsers(string acsAccessGroupId = default) +{ +return ListUsers(new ListUsersRequest(acsAccessGroupId: acsAccessGroupId)); +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task> ListUsersAsync(ListUsersRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/access_groups/list_users", requestOptions)).EnsureData("/acs/access_groups/list_users").AcsUsers; +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task> ListUsersAsync(string acsAccessGroupId = default) +{ +return (await ListUsersAsync(new ListUsersRequest(acsAccessGroupId: acsAccessGroupId))); +} + +/// +/// Request parameters for Remove an ACS User from an Access Group. +/// +[DataContract(Name = "removeUserRequest_request")] +public class RemoveUserRequest +{ +[JsonConstructorAttribute] +protected RemoveUserRequest() { } + +public RemoveUserRequest(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access group from which you want to remove an access system user. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +/// +/// ID of the access system user that you want to remove from an access group. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity associated with the user that you want to remove from an access group. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void RemoveUser(RemoveUserRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/acs/access_groups/remove_user", requestOptions); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void RemoveUser(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +RemoveUser(new RemoveUserRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task RemoveUserAsync(RemoveUserRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/acs/access_groups/remove_user", requestOptions); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task RemoveUserAsync(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await RemoveUserAsync(new RemoveUserRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.AccessGroupsAcs AccessGroupsAcs => new(this); - } +public partial class SeamClient +{ +public Api.AccessGroupsAcs AccessGroupsAcs => new(this); +} - public partial interface ISeamClient - { - public Api.AccessGroupsAcs AccessGroupsAcs { get; } - } +public partial interface ISeamClient +{ +public Api.AccessGroupsAcs AccessGroupsAcs { get; } +} } diff --git a/src/Seam/Api/AccessMethods.cs b/src/Seam/Api/AccessMethods.cs index a7e4383d..3e287f13 100644 --- a/src/Seam/Api/AccessMethods.cs +++ b/src/Seam/Api/AccessMethods.cs @@ -9,1119 +9,934 @@ namespace Seam.Api { - public class AccessMethods - { - private ISeamClient _seam; - - public AccessMethods(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Assign a Card Credential to an Access Method. - /// - [DataContract(Name = "assignCardRequest_request")] - public class AssignCardRequest - { - [JsonConstructorAttribute] - protected AssignCardRequest() { } - - public AssignCardRequest(string accessMethodId = default, string cardNumber = default) - { - AccessMethodId = accessMethodId; - CardNumber = cardNumber; - } - - /// - /// ID of the `access_method` to assign the credential to. - /// - [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Card number of the credential to assign. - /// - [DataMember(Name = "card_number", IsRequired = true, EmitDefaultValue = false)] - public string CardNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "assignCardResponse_response")] - public class AssignCardResponse - { - [JsonConstructorAttribute] - protected AssignCardResponse() { } - - public AssignCardResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. - /// - public ActionAttempt AssignCard(AssignCardRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/access_methods/assign_card", requestOptions) - .EnsureData("/access_methods/assign_card") - .ActionAttempt; - } - - /// - /// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. - /// - public ActionAttempt AssignCard( - string accessMethodId = default, - string cardNumber = default - ) - { - return AssignCard( - new AssignCardRequest(accessMethodId: accessMethodId, cardNumber: cardNumber) - ); - } - - /// - /// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. - /// - public async Task AssignCardAsync(AssignCardRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/access_methods/assign_card", - requestOptions - ) - ) - .EnsureData("/access_methods/assign_card") - .ActionAttempt; - } - - /// - /// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. - /// - public async Task AssignCardAsync( - string accessMethodId = default, - string cardNumber = default - ) - { - return ( - await AssignCardAsync( - new AssignCardRequest(accessMethodId: accessMethodId, cardNumber: cardNumber) - ) - ); - } - - /// - /// Request parameters for Delete an Access Method. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest( - string? accessGrantId = default, - string? accessMethodId = default, - string? reservationKey = default - ) - { - AccessGrantId = accessGrantId; - AccessMethodId = accessMethodId; - ReservationKey = reservationKey; - } - - /// - /// ID of access grant whose access methods should be deleted. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantId { get; set; } - - /// - /// ID of access method to delete. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessMethodId { get; set; } - - /// - /// Reservation key of the access grant whose access methods should be deleted. - /// - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes an access method. - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/access_methods/delete", requestOptions); - } - - /// - /// Deletes an access method. - /// - public void Delete( - string? accessGrantId = default, - string? accessMethodId = default, - string? reservationKey = default - ) - { - Delete( - new DeleteRequest( - accessGrantId: accessGrantId, - accessMethodId: accessMethodId, - reservationKey: reservationKey - ) - ); - } - - /// - /// Deletes an access method. - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/access_methods/delete", requestOptions); - } - - /// - /// Deletes an access method. - /// - public async Task DeleteAsync( - string? accessGrantId = default, - string? accessMethodId = default, - string? reservationKey = default - ) - { - await DeleteAsync( - new DeleteRequest( - accessGrantId: accessGrantId, - accessMethodId: accessMethodId, - reservationKey: reservationKey - ) - ); - } - - /// - /// Request parameters for Encode an Access Method. - /// - [DataContract(Name = "encodeRequest_request")] - public class EncodeRequest - { - [JsonConstructorAttribute] - protected EncodeRequest() { } - - public EncodeRequest(string accessMethodId = default, string acsEncoderId = default) - { - AccessMethodId = accessMethodId; - AcsEncoderId = acsEncoderId; - } - - /// - /// ID of the `access_method` to encode onto a card. - /// - [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// ID of the `acs_encoder` to use to encode the `access_method`. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "encodeResponse_response")] - public class EncodeResponse - { - [JsonConstructorAttribute] - protected EncodeResponse() { } - - public EncodeResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public ActionAttempt Encode(EncodeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/access_methods/encode", requestOptions) - .EnsureData("/access_methods/encode") - .ActionAttempt; - } - - /// - /// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public ActionAttempt Encode(string accessMethodId = default, string acsEncoderId = default) - { - return Encode( - new EncodeRequest(accessMethodId: accessMethodId, acsEncoderId: acsEncoderId) - ); - } - - /// - /// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public async Task EncodeAsync(EncodeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/access_methods/encode", requestOptions)) - .EnsureData("/access_methods/encode") - .ActionAttempt; - } - - /// - /// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public async Task EncodeAsync( - string accessMethodId = default, - string acsEncoderId = default - ) - { - return ( - await EncodeAsync( - new EncodeRequest(accessMethodId: accessMethodId, acsEncoderId: acsEncoderId) - ) - ); - } - - /// - /// Request parameters for Get an Access Method. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string accessMethodId = default) - { - AccessMethodId = accessMethodId; - } - - /// - /// ID of access method to get. - /// - [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AccessMethod accessMethod = default) - { - AccessMethod = accessMethod; - } - - /// - /// OK - /// - [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] - public AccessMethod AccessMethod { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets an access method. - /// - public AccessMethod Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_methods/get", requestOptions) - .EnsureData("/access_methods/get") - .AccessMethod; - } - - /// - /// Gets an access method. - /// - public AccessMethod Get(string accessMethodId = default) - { - return Get(new GetRequest(accessMethodId: accessMethodId)); - } - - /// - /// Gets an access method. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/access_methods/get", requestOptions)) - .EnsureData("/access_methods/get") - .AccessMethod; - } - - /// - /// Gets an access method. - /// - public async Task GetAsync(string accessMethodId = default) - { - return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); - } - - /// - /// Request parameters for Get related Access Method resources. - /// - [DataContract(Name = "getRelatedRequest_request")] - public class GetRelatedRequest - { - [JsonConstructorAttribute] - protected GetRelatedRequest() { } - - public GetRelatedRequest( - List accessMethodIds = default, - List? exclude = default, - List? include = default - ) - { - AccessMethodIds = accessMethodIds; - Exclude = exclude; - Include = include; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExcludeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "spaces")] - Spaces = 1, - - [EnumMember(Value = "devices")] - Devices = 2, - - [EnumMember(Value = "acs_entrances")] - AcsEntrances = 3, - - [EnumMember(Value = "access_grants")] - AccessGrants = 4, - - [EnumMember(Value = "access_methods")] - AccessMethods = 5, - - [EnumMember(Value = "instant_keys")] - InstantKeys = 6, - - [EnumMember(Value = "client_sessions")] - ClientSessions = 7, - - [EnumMember(Value = "acs_credentials")] - AcsCredentials = 8, - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum IncludeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "spaces")] - Spaces = 1, - - [EnumMember(Value = "devices")] - Devices = 2, - - [EnumMember(Value = "acs_entrances")] - AcsEntrances = 3, - - [EnumMember(Value = "access_grants")] - AccessGrants = 4, - - [EnumMember(Value = "access_methods")] - AccessMethods = 5, - - [EnumMember(Value = "instant_keys")] - InstantKeys = 6, - - [EnumMember(Value = "client_sessions")] - ClientSessions = 7, - - [EnumMember(Value = "acs_credentials")] - AcsCredentials = 8, - } - - /// - /// IDs of the access methods that you want to get along with their related resources. - /// - [DataMember(Name = "access_method_ids", IsRequired = true, EmitDefaultValue = false)] - public List AccessMethodIds { get; set; } - - [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] - public List? Exclude { get; set; } - - [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] - public List? Include { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getRelatedResponse_response")] - public class GetRelatedResponse - { - [JsonConstructorAttribute] - protected GetRelatedResponse() { } - - public GetRelatedResponse(Batch batch = default) - { - Batch = batch; - } - - /// - /// OK - /// - [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] - public Batch Batch { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets all related resources for one or more Access Methods. - /// - public Batch GetRelated(GetRelatedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_methods/get_related", requestOptions) - .EnsureData("/access_methods/get_related") - .Batch; - } - - /// - /// Gets all related resources for one or more Access Methods. - /// - public Batch GetRelated( - List accessMethodIds = default, - List? exclude = default, - List? include = default - ) - { - return GetRelated( - new GetRelatedRequest( - accessMethodIds: accessMethodIds, - exclude: exclude, - include: include - ) - ); - } - - /// - /// Gets all related resources for one or more Access Methods. - /// - public async Task GetRelatedAsync(GetRelatedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/access_methods/get_related", - requestOptions - ) - ) - .EnsureData("/access_methods/get_related") - .Batch; - } - - /// - /// Gets all related resources for one or more Access Methods. - /// - public async Task GetRelatedAsync( - List accessMethodIds = default, - List? exclude = default, - List? include = default - ) - { - return ( - await GetRelatedAsync( - new GetRelatedRequest( - accessMethodIds: accessMethodIds, - exclude: exclude, - include: include - ) - ) - ); - } - - /// - /// Request parameters for List Access Methods. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? accessCodeId = default, - string? accessGrantId = default, - string? accessGrantKey = default, - string? acsEntranceId = default, - string? deviceId = default, - int? limit = default, - string? pageCursor = default, - string? spaceId = default - ) - { - AccessCodeId = accessCodeId; - AccessGrantId = accessGrantId; - AccessGrantKey = accessGrantKey; - AcsEntranceId = acsEntranceId; - DeviceId = deviceId; - Limit = limit; - PageCursor = pageCursor; - SpaceId = spaceId; - } - - /// - /// ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessCodeId { get; set; } - - /// - /// ID of Access Grant to list access methods for. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantId { get; set; } - - /// - /// Key of Access Grant to list access methods for. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// ID of the entrance for which you want to retrieve all access methods that grant access to it. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - /// - /// ID of the device by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public int? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// ID of the space by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List accessMethods = default) - { - AccessMethods = accessMethods; - } - - /// - /// OK - /// - [DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethods { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Lists all access methods, usually filtered by Access Grant. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_methods/list", requestOptions) - .EnsureData("/access_methods/list") - .AccessMethods; - } - - /// - /// Lists all access methods, usually filtered by Access Grant. - /// - public List List( - string? accessCodeId = default, - string? accessGrantId = default, - string? accessGrantKey = default, - string? acsEntranceId = default, - string? deviceId = default, - int? limit = default, - string? pageCursor = default, - string? spaceId = default - ) - { - return List( - new ListRequest( - accessCodeId: accessCodeId, - accessGrantId: accessGrantId, - accessGrantKey: accessGrantKey, - acsEntranceId: acsEntranceId, - deviceId: deviceId, - limit: limit, - pageCursor: pageCursor, - spaceId: spaceId - ) - ); - } - - /// - /// Lists all access methods, usually filtered by Access Grant. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/access_methods/list", requestOptions)) - .EnsureData("/access_methods/list") - .AccessMethods; - } - - /// - /// Lists all access methods, usually filtered by Access Grant. - /// - public async Task> ListAsync( - string? accessCodeId = default, - string? accessGrantId = default, - string? accessGrantKey = default, - string? acsEntranceId = default, - string? deviceId = default, - int? limit = default, - string? pageCursor = default, - string? spaceId = default - ) - { - return ( - await ListAsync( - new ListRequest( - accessCodeId: accessCodeId, - accessGrantId: accessGrantId, - accessGrantKey: accessGrantKey, - acsEntranceId: acsEntranceId, - deviceId: deviceId, - limit: limit, - pageCursor: pageCursor, - spaceId: spaceId - ) - ) - ); - } - - /// - /// Request parameters for Unlock a Door with an Access Method. - /// - [DataContract(Name = "unlockDoorRequest_request")] - public class UnlockDoorRequest - { - [JsonConstructorAttribute] - protected UnlockDoorRequest() { } - - public UnlockDoorRequest( - string accessMethodId = default, - string acsEntranceId = default - ) - { - AccessMethodId = accessMethodId; - AcsEntranceId = acsEntranceId; - } - - /// - /// ID of the cloud_key `access_method` to use for the unlock operation. - /// - [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// ID of the entrance to unlock. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "unlockDoorResponse_response")] - public class UnlockDoorResponse - { - [JsonConstructorAttribute] - protected UnlockDoorResponse() { } - - public UnlockDoorResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. - /// - public ActionAttempt UnlockDoor(UnlockDoorRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/access_methods/unlock_door", requestOptions) - .EnsureData("/access_methods/unlock_door") - .ActionAttempt; - } - - /// - /// Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. - /// - public ActionAttempt UnlockDoor( - string accessMethodId = default, - string acsEntranceId = default - ) - { - return UnlockDoor( - new UnlockDoorRequest(accessMethodId: accessMethodId, acsEntranceId: acsEntranceId) - ); - } - - /// - /// Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. - /// - public async Task UnlockDoorAsync(UnlockDoorRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/access_methods/unlock_door", - requestOptions - ) - ) - .EnsureData("/access_methods/unlock_door") - .ActionAttempt; - } - - /// - /// Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. - /// - public async Task UnlockDoorAsync( - string accessMethodId = default, - string acsEntranceId = default - ) - { - return ( - await UnlockDoorAsync( - new UnlockDoorRequest( - accessMethodId: accessMethodId, - acsEntranceId: acsEntranceId - ) - ) - ); - } - } +public class AccessMethods +{ +private ISeamClient _seam; + +public AccessMethods(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Assign a Card Credential to an Access Method. +/// +[DataContract(Name = "assignCardRequest_request")] +public class AssignCardRequest +{ +[JsonConstructorAttribute] +protected AssignCardRequest() { } + +public AssignCardRequest(string accessMethodId = default, string cardNumber = default) +{ +AccessMethodId = accessMethodId; +CardNumber = cardNumber; +} + +/// +/// ID of the `access_method` to assign the credential to. +/// +[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Card number of the credential to assign. +/// +[DataMember(Name = "card_number", IsRequired = true, EmitDefaultValue = false)] +public string CardNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "assignCardResponse_response")] +public class AssignCardResponse +{ +[JsonConstructorAttribute] +protected AssignCardResponse() { } + +public AssignCardResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. +/// +public ActionAttempt AssignCard(AssignCardRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/access_methods/assign_card", requestOptions).EnsureData("/access_methods/assign_card").ActionAttempt; +} + +/// +/// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. +/// +public ActionAttempt AssignCard(string accessMethodId = default, string cardNumber = default) +{ +return AssignCard(new AssignCardRequest(accessMethodId: accessMethodId, cardNumber: cardNumber)); +} + +/// +/// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. +/// +public async Task AssignCardAsync(AssignCardRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/access_methods/assign_card", requestOptions)).EnsureData("/access_methods/assign_card").ActionAttempt; +} + +/// +/// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. +/// +public async Task AssignCardAsync(string accessMethodId = default, string cardNumber = default) +{ +return (await AssignCardAsync(new AssignCardRequest(accessMethodId: accessMethodId, cardNumber: cardNumber))); +} + +/// +/// Request parameters for Delete an Access Method. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string? accessGrantId = default, string? accessMethodId = default, string? reservationKey = default) +{ +AccessGrantId = accessGrantId; +AccessMethodId = accessMethodId; +ReservationKey = reservationKey; +} + +/// +/// ID of access grant whose access methods should be deleted. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantId { get; set; } + +/// +/// ID of access method to delete. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessMethodId { get; set; } + +/// +/// Reservation key of the access grant whose access methods should be deleted. +/// +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes an access method. +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/access_methods/delete", requestOptions); +} + +/// +/// Deletes an access method. +/// +public void Delete(string? accessGrantId = default, string? accessMethodId = default, string? reservationKey = default) +{ +Delete(new DeleteRequest(accessGrantId: accessGrantId, accessMethodId: accessMethodId, reservationKey: reservationKey)); +} + +/// +/// Deletes an access method. +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/access_methods/delete", requestOptions); +} + +/// +/// Deletes an access method. +/// +public async Task DeleteAsync(string? accessGrantId = default, string? accessMethodId = default, string? reservationKey = default) +{ +await DeleteAsync(new DeleteRequest(accessGrantId: accessGrantId, accessMethodId: accessMethodId, reservationKey: reservationKey)); +} + +/// +/// Request parameters for Encode an Access Method. +/// +[DataContract(Name = "encodeRequest_request")] +public class EncodeRequest +{ +[JsonConstructorAttribute] +protected EncodeRequest() { } + +public EncodeRequest(string accessMethodId = default, string acsEncoderId = default) +{ +AccessMethodId = accessMethodId; +AcsEncoderId = acsEncoderId; +} + +/// +/// ID of the `access_method` to encode onto a card. +/// +[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// ID of the `acs_encoder` to use to encode the `access_method`. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "encodeResponse_response")] +public class EncodeResponse +{ +[JsonConstructorAttribute] +protected EncodeResponse() { } + +public EncodeResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public ActionAttempt Encode(EncodeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/access_methods/encode", requestOptions).EnsureData("/access_methods/encode").ActionAttempt; +} + +/// +/// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public ActionAttempt Encode(string accessMethodId = default, string acsEncoderId = default) +{ +return Encode(new EncodeRequest(accessMethodId: accessMethodId, acsEncoderId: acsEncoderId)); +} + +/// +/// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public async Task EncodeAsync(EncodeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/access_methods/encode", requestOptions)).EnsureData("/access_methods/encode").ActionAttempt; +} + +/// +/// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public async Task EncodeAsync(string accessMethodId = default, string acsEncoderId = default) +{ +return (await EncodeAsync(new EncodeRequest(accessMethodId: accessMethodId, acsEncoderId: acsEncoderId))); +} + +/// +/// Request parameters for Get an Access Method. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string accessMethodId = default) +{ +AccessMethodId = accessMethodId; +} + +/// +/// ID of access method to get. +/// +[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AccessMethod accessMethod = default) +{ +AccessMethod = accessMethod; +} + +/// +/// OK +/// +[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] +public AccessMethod AccessMethod { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets an access method. +/// +public AccessMethod Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_methods/get", requestOptions).EnsureData("/access_methods/get").AccessMethod; +} + +/// +/// Gets an access method. +/// +public AccessMethod Get(string accessMethodId = default) +{ +return Get(new GetRequest(accessMethodId: accessMethodId)); +} + +/// +/// Gets an access method. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_methods/get", requestOptions)).EnsureData("/access_methods/get").AccessMethod; +} + +/// +/// Gets an access method. +/// +public async Task GetAsync(string accessMethodId = default) +{ +return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); +} + +/// +/// Request parameters for Get related Access Method resources. +/// +[DataContract(Name = "getRelatedRequest_request")] +public class GetRelatedRequest +{ +[JsonConstructorAttribute] +protected GetRelatedRequest() { } + +public GetRelatedRequest(List accessMethodIds = default, List? exclude = default, List? include = default) +{ +AccessMethodIds = accessMethodIds; +Exclude = exclude; +Include = include; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExcludeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "spaces")] +Spaces = 1, + +[EnumMember(Value = "devices")] +Devices = 2, + +[EnumMember(Value = "acs_entrances")] +AcsEntrances = 3, + +[EnumMember(Value = "access_grants")] +AccessGrants = 4, + +[EnumMember(Value = "access_methods")] +AccessMethods = 5, + +[EnumMember(Value = "instant_keys")] +InstantKeys = 6, + +[EnumMember(Value = "client_sessions")] +ClientSessions = 7, + +[EnumMember(Value = "acs_credentials")] +AcsCredentials = 8, +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum IncludeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "spaces")] +Spaces = 1, + +[EnumMember(Value = "devices")] +Devices = 2, + +[EnumMember(Value = "acs_entrances")] +AcsEntrances = 3, + +[EnumMember(Value = "access_grants")] +AccessGrants = 4, + +[EnumMember(Value = "access_methods")] +AccessMethods = 5, + +[EnumMember(Value = "instant_keys")] +InstantKeys = 6, + +[EnumMember(Value = "client_sessions")] +ClientSessions = 7, + +[EnumMember(Value = "acs_credentials")] +AcsCredentials = 8, +} + +/// +/// IDs of the access methods that you want to get along with their related resources. +/// +[DataMember(Name = "access_method_ids", IsRequired = true, EmitDefaultValue = false)] +public List AccessMethodIds { get; set; } + +[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] +public List? Exclude { get; set; } + +[DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] +public List? Include { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getRelatedResponse_response")] +public class GetRelatedResponse +{ +[JsonConstructorAttribute] +protected GetRelatedResponse() { } + +public GetRelatedResponse(Batch batch = default) +{ +Batch = batch; +} + +/// +/// OK +/// +[DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] +public Batch Batch { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets all related resources for one or more Access Methods. +/// +public Batch GetRelated(GetRelatedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_methods/get_related", requestOptions).EnsureData("/access_methods/get_related").Batch; +} + +/// +/// Gets all related resources for one or more Access Methods. +/// +public Batch GetRelated(List accessMethodIds = default, List? exclude = default, List? include = default) +{ +return GetRelated(new GetRelatedRequest(accessMethodIds: accessMethodIds, exclude: exclude, include: include)); +} + +/// +/// Gets all related resources for one or more Access Methods. +/// +public async Task GetRelatedAsync(GetRelatedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_methods/get_related", requestOptions)).EnsureData("/access_methods/get_related").Batch; +} + +/// +/// Gets all related resources for one or more Access Methods. +/// +public async Task GetRelatedAsync(List accessMethodIds = default, List? exclude = default, List? include = default) +{ +return (await GetRelatedAsync(new GetRelatedRequest(accessMethodIds: accessMethodIds, exclude: exclude, include: include))); +} + +/// +/// Request parameters for List Access Methods. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? accessCodeId = default, string? accessGrantId = default, string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, int? limit = default, string? pageCursor = default, string? spaceId = default) +{ +AccessCodeId = accessCodeId; +AccessGrantId = accessGrantId; +AccessGrantKey = accessGrantKey; +AcsEntranceId = acsEntranceId; +DeviceId = deviceId; +Limit = limit; +PageCursor = pageCursor; +SpaceId = spaceId; +} + +/// +/// ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessCodeId { get; set; } + +/// +/// ID of Access Grant to list access methods for. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantId { get; set; } + +/// +/// Key of Access Grant to list access methods for. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// ID of the entrance for which you want to retrieve all access methods that grant access to it. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsEntranceId { get; set; } + +/// +/// ID of the device by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public int? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// ID of the space by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List accessMethods = default) +{ +AccessMethods = accessMethods; +} + +/// +/// OK +/// +[DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] +public List AccessMethods { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Lists all access methods, usually filtered by Access Grant. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_methods/list", requestOptions).EnsureData("/access_methods/list").AccessMethods; +} + +/// +/// Lists all access methods, usually filtered by Access Grant. +/// +public List List(string? accessCodeId = default, string? accessGrantId = default, string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, int? limit = default, string? pageCursor = default, string? spaceId = default) +{ +return List(new ListRequest(accessCodeId: accessCodeId, accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, deviceId: deviceId, limit: limit, pageCursor: pageCursor, spaceId: spaceId)); +} + +/// +/// Lists all access methods, usually filtered by Access Grant. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_methods/list", requestOptions)).EnsureData("/access_methods/list").AccessMethods; +} + +/// +/// Lists all access methods, usually filtered by Access Grant. +/// +public async Task> ListAsync(string? accessCodeId = default, string? accessGrantId = default, string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, int? limit = default, string? pageCursor = default, string? spaceId = default) +{ +return (await ListAsync(new ListRequest(accessCodeId: accessCodeId, accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, deviceId: deviceId, limit: limit, pageCursor: pageCursor, spaceId: spaceId))); +} + +/// +/// Request parameters for Unlock a Door with an Access Method. +/// +[DataContract(Name = "unlockDoorRequest_request")] +public class UnlockDoorRequest +{ +[JsonConstructorAttribute] +protected UnlockDoorRequest() { } + +public UnlockDoorRequest(string accessMethodId = default, string acsEntranceId = default) +{ +AccessMethodId = accessMethodId; +AcsEntranceId = acsEntranceId; +} + +/// +/// ID of the cloud_key `access_method` to use for the unlock operation. +/// +[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// ID of the entrance to unlock. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "unlockDoorResponse_response")] +public class UnlockDoorResponse +{ +[JsonConstructorAttribute] +protected UnlockDoorResponse() { } + +public UnlockDoorResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. +/// +public ActionAttempt UnlockDoor(UnlockDoorRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/access_methods/unlock_door", requestOptions).EnsureData("/access_methods/unlock_door").ActionAttempt; +} + +/// +/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. +/// +public ActionAttempt UnlockDoor(string accessMethodId = default, string acsEntranceId = default) +{ +return UnlockDoor(new UnlockDoorRequest(accessMethodId: accessMethodId, acsEntranceId: acsEntranceId)); +} + +/// +/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. +/// +public async Task UnlockDoorAsync(UnlockDoorRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/access_methods/unlock_door", requestOptions)).EnsureData("/access_methods/unlock_door").ActionAttempt; +} + +/// +/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. +/// +public async Task UnlockDoorAsync(string accessMethodId = default, string acsEntranceId = default) +{ +return (await UnlockDoorAsync(new UnlockDoorRequest(accessMethodId: accessMethodId, acsEntranceId: acsEntranceId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.AccessMethods AccessMethods => new(this); - } +public partial class SeamClient +{ +public Api.AccessMethods AccessMethods => new(this); +} - public partial interface ISeamClient - { - public Api.AccessMethods AccessMethods { get; } - } +public partial interface ISeamClient +{ +public Api.AccessMethods AccessMethods { get; } +} } diff --git a/src/Seam/Api/ActionAttempts.cs b/src/Seam/Api/ActionAttempts.cs index 166de3a8..7773d33a 100644 --- a/src/Seam/Api/ActionAttempts.cs +++ b/src/Seam/Api/ActionAttempts.cs @@ -9,314 +9,273 @@ namespace Seam.Api { - public class ActionAttempts - { - private ISeamClient _seam; - - public ActionAttempts(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get an Action Attempt. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string actionAttemptId = default) - { - ActionAttemptId = actionAttemptId; - } - - /// - /// ID of the action attempt that you want to get. - /// - [DataMember(Name = "action_attempt_id", IsRequired = true, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [action attempt](https://docs.seam.co/core-concepts/action-attempts). - /// - public ActionAttempt Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/action_attempts/get", requestOptions) - .EnsureData("/action_attempts/get") - .ActionAttempt; - } - - /// - /// Returns a specified [action attempt](https://docs.seam.co/core-concepts/action-attempts). - /// - public ActionAttempt Get(string actionAttemptId = default) - { - return Get(new GetRequest(actionAttemptId: actionAttemptId)); - } - - /// - /// Returns a specified [action attempt](https://docs.seam.co/core-concepts/action-attempts). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/action_attempts/get", requestOptions)) - .EnsureData("/action_attempts/get") - .ActionAttempt; - } - - /// - /// Returns a specified [action attempt](https://docs.seam.co/core-concepts/action-attempts). - /// - public async Task GetAsync(string actionAttemptId = default) - { - return (await GetAsync(new GetRequest(actionAttemptId: actionAttemptId))); - } - - /// - /// Request parameters for List Action Attempts. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - List? actionAttemptIds = default, - string? deviceId = default, - int? limit = default, - string? pageCursor = default - ) - { - ActionAttemptIds = actionAttemptIds; - DeviceId = deviceId; - Limit = limit; - PageCursor = pageCursor; - } - - /// - /// IDs of the action attempts that you want to retrieve. - /// - [DataMember(Name = "action_attempt_ids", IsRequired = false, EmitDefaultValue = false)] - public List? ActionAttemptIds { get; set; } - - /// - /// ID of the device to filter action attempts by. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public int? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List actionAttempts = default) - { - ActionAttempts = actionAttempts; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempts", IsRequired = false, EmitDefaultValue = false)] - public List ActionAttempts { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of the [action attempts](https://docs.seam.co/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/action_attempts/list", requestOptions) - .EnsureData("/action_attempts/list") - .ActionAttempts; - } - - /// - /// Returns a list of the [action attempts](https://docs.seam.co/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. - /// - public List List( - List? actionAttemptIds = default, - string? deviceId = default, - int? limit = default, - string? pageCursor = default - ) - { - return List( - new ListRequest( - actionAttemptIds: actionAttemptIds, - deviceId: deviceId, - limit: limit, - pageCursor: pageCursor - ) - ); - } - - /// - /// Returns a list of the [action attempts](https://docs.seam.co/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/action_attempts/list", requestOptions)) - .EnsureData("/action_attempts/list") - .ActionAttempts; - } - - /// - /// Returns a list of the [action attempts](https://docs.seam.co/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. - /// - public async Task> ListAsync( - List? actionAttemptIds = default, - string? deviceId = default, - int? limit = default, - string? pageCursor = default - ) - { - return ( - await ListAsync( - new ListRequest( - actionAttemptIds: actionAttemptIds, - deviceId: deviceId, - limit: limit, - pageCursor: pageCursor - ) - ) - ); - } - } +public class ActionAttempts +{ +private ISeamClient _seam; + +public ActionAttempts(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get an Action Attempt. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string actionAttemptId = default) +{ +ActionAttemptId = actionAttemptId; +} + +/// +/// ID of the action attempt that you want to get. +/// +[DataMember(Name = "action_attempt_id", IsRequired = true, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). +/// +public ActionAttempt Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/action_attempts/get", requestOptions).EnsureData("/action_attempts/get").ActionAttempt; +} + +/// +/// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). +/// +public ActionAttempt Get(string actionAttemptId = default) +{ +return Get(new GetRequest(actionAttemptId: actionAttemptId)); +} + +/// +/// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/action_attempts/get", requestOptions)).EnsureData("/action_attempts/get").ActionAttempt; +} + +/// +/// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). +/// +public async Task GetAsync(string actionAttemptId = default) +{ +return (await GetAsync(new GetRequest(actionAttemptId: actionAttemptId))); +} + +/// +/// Request parameters for List Action Attempts. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(List? actionAttemptIds = default, string? deviceId = default, int? limit = default, string? pageCursor = default) +{ +ActionAttemptIds = actionAttemptIds; +DeviceId = deviceId; +Limit = limit; +PageCursor = pageCursor; +} + +/// +/// IDs of the action attempts that you want to retrieve. +/// +[DataMember(Name = "action_attempt_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ActionAttemptIds { get; set; } + +/// +/// ID of the device to filter action attempts by. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public int? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List actionAttempts = default) +{ +ActionAttempts = actionAttempts; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempts", IsRequired = false, EmitDefaultValue = false)] +public List ActionAttempts { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/action_attempts/list", requestOptions).EnsureData("/action_attempts/list").ActionAttempts; +} + +/// +/// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. +/// +public List List(List? actionAttemptIds = default, string? deviceId = default, int? limit = default, string? pageCursor = default) +{ +return List(new ListRequest(actionAttemptIds: actionAttemptIds, deviceId: deviceId, limit: limit, pageCursor: pageCursor)); +} + +/// +/// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/action_attempts/list", requestOptions)).EnsureData("/action_attempts/list").ActionAttempts; +} + +/// +/// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. +/// +public async Task> ListAsync(List? actionAttemptIds = default, string? deviceId = default, int? limit = default, string? pageCursor = default) +{ +return (await ListAsync(new ListRequest(actionAttemptIds: actionAttemptIds, deviceId: deviceId, limit: limit, pageCursor: pageCursor))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.ActionAttempts ActionAttempts => new(this); - } - - public partial interface ISeamClient - { - public Api.ActionAttempts ActionAttempts { get; } - } +public partial class SeamClient +{ +public Api.ActionAttempts ActionAttempts => new(this); +} + +public partial interface ISeamClient +{ +public Api.ActionAttempts ActionAttempts { get; } +} } diff --git a/src/Seam/Api/ClientSessions.cs b/src/Seam/Api/ClientSessions.cs index d663b273..4b20d525 100644 --- a/src/Seam/Api/ClientSessions.cs +++ b/src/Seam/Api/ClientSessions.cs @@ -9,1100 +9,871 @@ namespace Seam.Api { - public class ClientSessions - { - private ISeamClient _seam; - - public ClientSessions(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create a Client Session. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? customerId = default, - string? customerKey = default, - string? expiresAt = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - ConnectWebviewIds = connectWebviewIds; - ConnectedAccountIds = connectedAccountIds; - CustomerId = customerId; - CustomerKey = customerKey; - ExpiresAt = expiresAt; - UserIdentifierKey = userIdentifierKey; - UserIdentityId = userIdentityId; - UserIdentityIds = userIdentityIds; - } - - /// - /// IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) for which you want to create a client session. - /// - [DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] - public List? ConnectWebviewIds { get; set; } - - /// - /// IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) for which you want to create a client session. - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Customer ID that you want to associate with the new client session. - /// - [DataMember(Name = "customer_id", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerId { get; set; } - - /// - /// Customer key that you want to associate with the new client session. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] - public string? ExpiresAt { get; set; } - - /// - /// Your user ID for the user for whom you want to create a client session. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. - /// - [Obsolete("Use `user_identity_id` instead.")] - [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] - public List? UserIdentityIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(ClientSession clientSession = default) - { - ClientSession = clientSession; - } - - /// - /// OK - /// - [DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] - public ClientSession ClientSession { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public ClientSession Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Put("/client_sessions/create", requestOptions) - .EnsureData("/client_sessions/create") - .ClientSession; - } - - /// - /// Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public ClientSession Create( - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? customerId = default, - string? customerKey = default, - string? expiresAt = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - return Create( - new CreateRequest( - connectWebviewIds: connectWebviewIds, - connectedAccountIds: connectedAccountIds, - customerId: customerId, - customerKey: customerKey, - expiresAt: expiresAt, - userIdentifierKey: userIdentifierKey, - userIdentityId: userIdentityId, - userIdentityIds: userIdentityIds - ) - ); - } - - /// - /// Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PutAsync("/client_sessions/create", requestOptions)) - .EnsureData("/client_sessions/create") - .ClientSession; - } - - /// - /// Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public async Task CreateAsync( - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? customerId = default, - string? customerKey = default, - string? expiresAt = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - connectWebviewIds: connectWebviewIds, - connectedAccountIds: connectedAccountIds, - customerId: customerId, - customerKey: customerKey, - expiresAt: expiresAt, - userIdentifierKey: userIdentifierKey, - userIdentityId: userIdentityId, - userIdentityIds: userIdentityIds - ) - ) - ); - } - - /// - /// Request parameters for Delete a Client Session. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string clientSessionId = default) - { - ClientSessionId = clientSessionId; - } - - /// - /// ID of the client session that you want to delete. - /// - [DataMember(Name = "client_session_id", IsRequired = true, EmitDefaultValue = false)] - public string ClientSessionId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/client_sessions/delete", requestOptions); - } - - /// - /// Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public void Delete(string clientSessionId = default) - { - Delete(new DeleteRequest(clientSessionId: clientSessionId)); - } - - /// - /// Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/client_sessions/delete", requestOptions); - } - - /// - /// Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public async Task DeleteAsync(string clientSessionId = default) - { - await DeleteAsync(new DeleteRequest(clientSessionId: clientSessionId)); - } - - /// - /// Request parameters for Get a Client Session. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest( - string? clientSessionId = default, - string? userIdentifierKey = default - ) - { - ClientSessionId = clientSessionId; - UserIdentifierKey = userIdentifierKey; - } - - /// - /// ID of the client session that you want to get. - /// - [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] - public string? ClientSessionId { get; set; } - - /// - /// User identifier key associated with the client session that you want to get. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(ClientSession clientSession = default) - { - ClientSession = clientSession; - } - - /// - /// OK - /// - [DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] - public ClientSession ClientSession { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public ClientSession Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/client_sessions/get", requestOptions) - .EnsureData("/client_sessions/get") - .ClientSession; - } - - /// - /// Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public ClientSession Get( - string? clientSessionId = default, - string? userIdentifierKey = default - ) - { - return Get( - new GetRequest( - clientSessionId: clientSessionId, - userIdentifierKey: userIdentifierKey - ) - ); - } - - /// - /// Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/client_sessions/get", requestOptions)) - .EnsureData("/client_sessions/get") - .ClientSession; - } - - /// - /// Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public async Task GetAsync( - string? clientSessionId = default, - string? userIdentifierKey = default - ) - { - return ( - await GetAsync( - new GetRequest( - clientSessionId: clientSessionId, - userIdentifierKey: userIdentifierKey - ) - ) - ); - } - - /// - /// Request parameters for Get or Create a Client Session. - /// - [DataContract(Name = "getOrCreateRequest_request")] - public class GetOrCreateRequest - { - [JsonConstructorAttribute] - protected GetOrCreateRequest() { } - - public GetOrCreateRequest( - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? expiresAt = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - ConnectWebviewIds = connectWebviewIds; - ConnectedAccountIds = connectedAccountIds; - ExpiresAt = expiresAt; - UserIdentifierKey = userIdentifierKey; - UserIdentityId = userIdentityId; - UserIdentityIds = userIdentityIds; - } - - /// - /// IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session). - /// - [DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] - public List? ConnectWebviewIds { get; set; } - - /// - /// IDs of the [connected accounts](https://docs.seam.co/api/connected_accounts) that you want to associate with the client session (or that are already associated with the existing client session). - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it. - /// - [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] - public string? ExpiresAt { get; set; } - - /// - /// Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session). - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session). - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. - /// - [Obsolete("Use `user_identity_id`.")] - [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] - public List? UserIdentityIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getOrCreateResponse_response")] - public class GetOrCreateResponse - { - [JsonConstructorAttribute] - protected GetOrCreateResponse() { } - - public GetOrCreateResponse(ClientSession clientSession = default) - { - ClientSession = clientSession; - } - - /// - /// OK - /// - [DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] - public ClientSession ClientSession { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. - /// - public ClientSession GetOrCreate(GetOrCreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/client_sessions/get_or_create", requestOptions) - .EnsureData("/client_sessions/get_or_create") - .ClientSession; - } - - /// - /// Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. - /// - public ClientSession GetOrCreate( - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? expiresAt = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - return GetOrCreate( - new GetOrCreateRequest( - connectWebviewIds: connectWebviewIds, - connectedAccountIds: connectedAccountIds, - expiresAt: expiresAt, - userIdentifierKey: userIdentifierKey, - userIdentityId: userIdentityId, - userIdentityIds: userIdentityIds - ) - ); - } - - /// - /// Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. - /// - public async Task GetOrCreateAsync(GetOrCreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/client_sessions/get_or_create", - requestOptions - ) - ) - .EnsureData("/client_sessions/get_or_create") - .ClientSession; - } - - /// - /// Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. - /// - public async Task GetOrCreateAsync( - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? expiresAt = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - return ( - await GetOrCreateAsync( - new GetOrCreateRequest( - connectWebviewIds: connectWebviewIds, - connectedAccountIds: connectedAccountIds, - expiresAt: expiresAt, - userIdentifierKey: userIdentifierKey, - userIdentityId: userIdentityId, - userIdentityIds: userIdentityIds - ) - ) - ); - } - - /// - /// Request parameters for Grant Access to a Client Session. - /// - [DataContract(Name = "grantAccessRequest_request")] - public class GrantAccessRequest - { - [JsonConstructorAttribute] - protected GrantAccessRequest() { } - - public GrantAccessRequest( - string? clientSessionId = default, - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - ClientSessionId = clientSessionId; - ConnectWebviewIds = connectWebviewIds; - ConnectedAccountIds = connectedAccountIds; - UserIdentifierKey = userIdentifierKey; - UserIdentityId = userIdentityId; - UserIdentityIds = userIdentityIds; - } - - /// - /// ID of the client session to which you want to grant access to resources. - /// - [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] - public string? ClientSessionId { get; set; } - - /// - /// IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session. - /// - [DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] - public List? ConnectWebviewIds { get; set; } - - /// - /// IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that you want to associate with the client session. - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Your user ID for the user that you want to associate with the client session. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. - /// - [Obsolete("Use `user_identity_id`.")] - [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] - public List? UserIdentityIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. - /// - public void GrantAccess(GrantAccessRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/client_sessions/grant_access", requestOptions); - } - - /// - /// Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. - /// - public void GrantAccess( - string? clientSessionId = default, - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - GrantAccess( - new GrantAccessRequest( - clientSessionId: clientSessionId, - connectWebviewIds: connectWebviewIds, - connectedAccountIds: connectedAccountIds, - userIdentifierKey: userIdentifierKey, - userIdentityId: userIdentityId, - userIdentityIds: userIdentityIds - ) - ); - } - - /// - /// Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. - /// - public async Task GrantAccessAsync(GrantAccessRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/client_sessions/grant_access", requestOptions); - } - - /// - /// Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. - /// - public async Task GrantAccessAsync( - string? clientSessionId = default, - List? connectWebviewIds = default, - List? connectedAccountIds = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List? userIdentityIds = default - ) - { - await GrantAccessAsync( - new GrantAccessRequest( - clientSessionId: clientSessionId, - connectWebviewIds: connectWebviewIds, - connectedAccountIds: connectedAccountIds, - userIdentifierKey: userIdentifierKey, - userIdentityId: userIdentityId, - userIdentityIds: userIdentityIds - ) - ); - } - - /// - /// Request parameters for List Client Sessions. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? clientSessionId = default, - string? connectWebviewId = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - bool? withoutUserIdentifierKey = default - ) - { - ClientSessionId = clientSessionId; - ConnectWebviewId = connectWebviewId; - UserIdentifierKey = userIdentifierKey; - UserIdentityId = userIdentityId; - WithoutUserIdentifierKey = withoutUserIdentifierKey; - } - - /// - /// ID of the client session that you want to retrieve. - /// - [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] - public string? ClientSessionId { get; set; } - - /// - /// ID of the [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a Connect Webview. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectWebviewId { get; set; } - - /// - /// Your user ID for the user by which you want to filter client sessions. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a user identity. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Indicates whether to retrieve only client sessions without associated user identifier keys. - /// - [DataMember( - Name = "without_user_identifier_key", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? WithoutUserIdentifierKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List clientSessions = default) - { - ClientSessions = clientSessions; - } - - /// - /// OK - /// - [DataMember(Name = "client_sessions", IsRequired = false, EmitDefaultValue = false)] - public List ClientSessions { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/client_sessions/list", requestOptions) - .EnsureData("/client_sessions/list") - .ClientSessions; - } - - /// - /// Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public List List( - string? clientSessionId = default, - string? connectWebviewId = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - bool? withoutUserIdentifierKey = default - ) - { - return List( - new ListRequest( - clientSessionId: clientSessionId, - connectWebviewId: connectWebviewId, - userIdentifierKey: userIdentifierKey, - userIdentityId: userIdentityId, - withoutUserIdentifierKey: withoutUserIdentifierKey - ) - ); - } - - /// - /// Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/client_sessions/list", requestOptions)) - .EnsureData("/client_sessions/list") - .ClientSessions; - } - - /// - /// Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - public async Task> ListAsync( - string? clientSessionId = default, - string? connectWebviewId = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - bool? withoutUserIdentifierKey = default - ) - { - return ( - await ListAsync( - new ListRequest( - clientSessionId: clientSessionId, - connectWebviewId: connectWebviewId, - userIdentifierKey: userIdentifierKey, - userIdentityId: userIdentityId, - withoutUserIdentifierKey: withoutUserIdentifierKey - ) - ) - ); - } - - /// - /// Request parameters for Revoke a Client Session. - /// - [DataContract(Name = "revokeRequest_request")] - public class RevokeRequest - { - [JsonConstructorAttribute] - protected RevokeRequest() { } - - public RevokeRequest(string clientSessionId = default) - { - ClientSessionId = clientSessionId; - } - - /// - /// ID of the client session that you want to revoke. - /// - [DataMember(Name = "client_session_id", IsRequired = true, EmitDefaultValue = false)] - public string ClientSessionId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - /// Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action. - /// - public void Revoke(RevokeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/client_sessions/revoke", requestOptions); - } - - /// - /// Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - /// Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action. - /// - public void Revoke(string clientSessionId = default) - { - Revoke(new RevokeRequest(clientSessionId: clientSessionId)); - } - - /// - /// Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - /// Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action. - /// - public async Task RevokeAsync(RevokeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/client_sessions/revoke", requestOptions); - } - - /// - /// Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - /// Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action. - /// - public async Task RevokeAsync(string clientSessionId = default) - { - await RevokeAsync(new RevokeRequest(clientSessionId: clientSessionId)); - } - } +public class ClientSessions +{ +private ISeamClient _seam; + +public ClientSessions(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Client Session. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(List? connectWebviewIds = default, List? connectedAccountIds = default, string? customerId = default, string? customerKey = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +ConnectWebviewIds = connectWebviewIds; +ConnectedAccountIds = connectedAccountIds; +CustomerId = customerId; +CustomerKey = customerKey; +ExpiresAt = expiresAt; +UserIdentifierKey = userIdentifierKey; +UserIdentityId = userIdentityId; +UserIdentityIds = userIdentityIds; +} + +/// +/// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) for which you want to create a client session. +/// +[DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectWebviewIds { get; set; } + +/// +/// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) for which you want to create a client session. +/// +[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectedAccountIds { get; set; } + +/// +/// Customer ID that you want to associate with the new client session. +/// +[DataMember(Name = "customer_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerId { get; set; } + +/// +/// Customer key that you want to associate with the new client session. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] +public string? ExpiresAt { get; set; } + +/// +/// Your user ID for the user for whom you want to create a client session. When you authenticate with a publishable key, the `user_identifier_key` must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the `user_identifier_key` can retrieve the client session. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. +/// +[Obsolete("Use `user_identity_id` instead.")] +[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] +public List? UserIdentityIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(ClientSession clientSession = default) +{ +ClientSession = clientSession; +} + +/// +/// OK +/// +[DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] +public ClientSession ClientSession { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public ClientSession Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Put("/client_sessions/create", requestOptions).EnsureData("/client_sessions/create").ClientSession; +} + +/// +/// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public ClientSession Create(List? connectWebviewIds = default, List? connectedAccountIds = default, string? customerId = default, string? customerKey = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +return Create(new CreateRequest(connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, customerId: customerId, customerKey: customerKey, expiresAt: expiresAt, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds)); +} + +/// +/// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PutAsync("/client_sessions/create", requestOptions)).EnsureData("/client_sessions/create").ClientSession; +} + +/// +/// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public async Task CreateAsync(List? connectWebviewIds = default, List? connectedAccountIds = default, string? customerId = default, string? customerKey = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +return (await CreateAsync(new CreateRequest(connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, customerId: customerId, customerKey: customerKey, expiresAt: expiresAt, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds))); +} + +/// +/// Request parameters for Delete a Client Session. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string clientSessionId = default) +{ +ClientSessionId = clientSessionId; +} + +/// +/// ID of the client session that you want to delete. +/// +[DataMember(Name = "client_session_id", IsRequired = true, EmitDefaultValue = false)] +public string ClientSessionId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/client_sessions/delete", requestOptions); +} + +/// +/// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public void Delete(string clientSessionId = default) +{ +Delete(new DeleteRequest(clientSessionId: clientSessionId)); +} + +/// +/// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/client_sessions/delete", requestOptions); +} + +/// +/// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public async Task DeleteAsync(string clientSessionId = default) +{ +await DeleteAsync(new DeleteRequest(clientSessionId: clientSessionId)); +} + +/// +/// Request parameters for Get a Client Session. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? clientSessionId = default, string? userIdentifierKey = default) +{ +ClientSessionId = clientSessionId; +UserIdentifierKey = userIdentifierKey; +} + +/// +/// ID of the client session that you want to get. +/// +[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] +public string? ClientSessionId { get; set; } + +/// +/// User identifier key associated with the client session that you want to get. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(ClientSession clientSession = default) +{ +ClientSession = clientSession; +} + +/// +/// OK +/// +[DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] +public ClientSession ClientSession { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public ClientSession Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/client_sessions/get", requestOptions).EnsureData("/client_sessions/get").ClientSession; +} + +/// +/// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public ClientSession Get(string? clientSessionId = default, string? userIdentifierKey = default) +{ +return Get(new GetRequest(clientSessionId: clientSessionId, userIdentifierKey: userIdentifierKey)); +} + +/// +/// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/client_sessions/get", requestOptions)).EnsureData("/client_sessions/get").ClientSession; +} + +/// +/// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public async Task GetAsync(string? clientSessionId = default, string? userIdentifierKey = default) +{ +return (await GetAsync(new GetRequest(clientSessionId: clientSessionId, userIdentifierKey: userIdentifierKey))); +} + +/// +/// Request parameters for Get or Create a Client Session. +/// +[DataContract(Name = "getOrCreateRequest_request")] +public class GetOrCreateRequest +{ +[JsonConstructorAttribute] +protected GetOrCreateRequest() { } + +public GetOrCreateRequest(List? connectWebviewIds = default, List? connectedAccountIds = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +ConnectWebviewIds = connectWebviewIds; +ConnectedAccountIds = connectedAccountIds; +ExpiresAt = expiresAt; +UserIdentifierKey = userIdentifierKey; +UserIdentityId = userIdentityId; +UserIdentityIds = userIdentityIds; +} + +/// +/// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session). +/// +[DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectWebviewIds { get; set; } + +/// +/// IDs of the [connected accounts](https://www.seam.co/docs/api/connected_accounts/object) that you want to associate with the client session (or that are already associated with the existing client session). +/// +[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectedAccountIds { get; set; } + +/// +/// Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it. +/// +[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] +public string? ExpiresAt { get; set; } + +/// +/// Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session). When you authenticate with a publishable key, the `user_identifier_key` must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the `user_identifier_key` can retrieve the client session. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session). +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. +/// +[Obsolete("Use `user_identity_id`.")] +[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] +public List? UserIdentityIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getOrCreateResponse_response")] +public class GetOrCreateResponse +{ +[JsonConstructorAttribute] +protected GetOrCreateResponse() { } + +public GetOrCreateResponse(ClientSession clientSession = default) +{ +ClientSession = clientSession; +} + +/// +/// OK +/// +[DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] +public ClientSession ClientSession { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. +/// +public ClientSession GetOrCreate(GetOrCreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/client_sessions/get_or_create", requestOptions).EnsureData("/client_sessions/get_or_create").ClientSession; +} + +/// +/// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. +/// +public ClientSession GetOrCreate(List? connectWebviewIds = default, List? connectedAccountIds = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +return GetOrCreate(new GetOrCreateRequest(connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, expiresAt: expiresAt, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds)); +} + +/// +/// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. +/// +public async Task GetOrCreateAsync(GetOrCreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/client_sessions/get_or_create", requestOptions)).EnsureData("/client_sessions/get_or_create").ClientSession; +} + +/// +/// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. +/// +public async Task GetOrCreateAsync(List? connectWebviewIds = default, List? connectedAccountIds = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +return (await GetOrCreateAsync(new GetOrCreateRequest(connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, expiresAt: expiresAt, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds))); +} + +/// +/// Request parameters for Grant Access to a Client Session. +/// +[DataContract(Name = "grantAccessRequest_request")] +public class GrantAccessRequest +{ +[JsonConstructorAttribute] +protected GrantAccessRequest() { } + +public GrantAccessRequest(string? clientSessionId = default, List? connectWebviewIds = default, List? connectedAccountIds = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +ClientSessionId = clientSessionId; +ConnectWebviewIds = connectWebviewIds; +ConnectedAccountIds = connectedAccountIds; +UserIdentifierKey = userIdentifierKey; +UserIdentityId = userIdentityId; +UserIdentityIds = userIdentityIds; +} + +/// +/// ID of the client session to which you want to grant access to resources. +/// +[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] +public string? ClientSessionId { get; set; } + +/// +/// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) that you want to associate with the client session. +/// +[DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectWebviewIds { get; set; } + +/// +/// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) that you want to associate with the client session. +/// +[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectedAccountIds { get; set; } + +/// +/// Your user ID for the user that you want to associate with the client session. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. +/// +[Obsolete("Use `user_identity_id`.")] +[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] +public List? UserIdentityIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. +/// +public void GrantAccess(GrantAccessRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/client_sessions/grant_access", requestOptions); +} + +/// +/// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. +/// +public void GrantAccess(string? clientSessionId = default, List? connectWebviewIds = default, List? connectedAccountIds = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +GrantAccess(new GrantAccessRequest(clientSessionId: clientSessionId, connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds)); +} + +/// +/// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. +/// +public async Task GrantAccessAsync(GrantAccessRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/client_sessions/grant_access", requestOptions); +} + +/// +/// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. +/// +public async Task GrantAccessAsync(string? clientSessionId = default, List? connectWebviewIds = default, List? connectedAccountIds = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) +{ +await GrantAccessAsync(new GrantAccessRequest(clientSessionId: clientSessionId, connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds)); +} + +/// +/// Request parameters for List Client Sessions. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? clientSessionId = default, string? connectWebviewId = default, string? userIdentifierKey = default, string? userIdentityId = default, bool? withoutUserIdentifierKey = default) +{ +ClientSessionId = clientSessionId; +ConnectWebviewId = connectWebviewId; +UserIdentifierKey = userIdentifierKey; +UserIdentityId = userIdentityId; +WithoutUserIdentifierKey = withoutUserIdentifierKey; +} + +/// +/// ID of the client session that you want to retrieve. +/// +[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] +public string? ClientSessionId { get; set; } + +/// +/// ID of the [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a Connect Webview. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectWebviewId { get; set; } + +/// +/// Your user ID for the user by which you want to filter client sessions. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a user identity. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Indicates whether to retrieve only client sessions without associated user identifier keys. +/// +[DataMember(Name = "without_user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public bool? WithoutUserIdentifierKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List clientSessions = default) +{ +ClientSessions = clientSessions; +} + +/// +/// OK +/// +[DataMember(Name = "client_sessions", IsRequired = false, EmitDefaultValue = false)] +public List ClientSessions { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/client_sessions/list", requestOptions).EnsureData("/client_sessions/list").ClientSessions; +} + +/// +/// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public List List(string? clientSessionId = default, string? connectWebviewId = default, string? userIdentifierKey = default, string? userIdentityId = default, bool? withoutUserIdentifierKey = default) +{ +return List(new ListRequest(clientSessionId: clientSessionId, connectWebviewId: connectWebviewId, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, withoutUserIdentifierKey: withoutUserIdentifierKey)); +} + +/// +/// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/client_sessions/list", requestOptions)).EnsureData("/client_sessions/list").ClientSessions; +} + +/// +/// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +public async Task> ListAsync(string? clientSessionId = default, string? connectWebviewId = default, string? userIdentifierKey = default, string? userIdentityId = default, bool? withoutUserIdentifierKey = default) +{ +return (await ListAsync(new ListRequest(clientSessionId: clientSessionId, connectWebviewId: connectWebviewId, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, withoutUserIdentifierKey: withoutUserIdentifierKey))); +} + +/// +/// Request parameters for Revoke a Client Session. +/// +[DataContract(Name = "revokeRequest_request")] +public class RevokeRequest +{ +[JsonConstructorAttribute] +protected RevokeRequest() { } + +public RevokeRequest(string clientSessionId = default) +{ +ClientSessionId = clientSessionId; +} + +/// +/// ID of the client session that you want to revoke. +/// +[DataMember(Name = "client_session_id", IsRequired = true, EmitDefaultValue = false)] +public string ClientSessionId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +/// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. +/// +public void Revoke(RevokeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/client_sessions/revoke", requestOptions); +} + +/// +/// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +/// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. +/// +public void Revoke(string clientSessionId = default) +{ +Revoke(new RevokeRequest(clientSessionId: clientSessionId)); +} + +/// +/// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +/// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. +/// +public async Task RevokeAsync(RevokeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/client_sessions/revoke", requestOptions); +} + +/// +/// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +/// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. +/// +public async Task RevokeAsync(string clientSessionId = default) +{ +await RevokeAsync(new RevokeRequest(clientSessionId: clientSessionId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.ClientSessions ClientSessions => new(this); - } +public partial class SeamClient +{ +public Api.ClientSessions ClientSessions => new(this); +} - public partial interface ISeamClient - { - public Api.ClientSessions ClientSessions { get; } - } +public partial interface ISeamClient +{ +public Api.ClientSessions ClientSessions { get; } +} } diff --git a/src/Seam/Api/ConnectWebviews.cs b/src/Seam/Api/ConnectWebviews.cs index 5498fb7b..f322b146 100644 --- a/src/Seam/Api/ConnectWebviews.cs +++ b/src/Seam/Api/ConnectWebviews.cs @@ -9,990 +9,867 @@ namespace Seam.Api { - public class ConnectWebviews - { - private ISeamClient _seam; - - public ConnectWebviews(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create a Connect Webview. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - List? acceptedCapabilities = default, - List? acceptedProviders = default, - bool? automaticallyManageNewDevices = default, - object? customMetadata = default, - string? customRedirectFailureUrl = default, - string? customRedirectUrl = default, - string? customerKey = default, - List? excludedProviders = default, - CreateRequest.ProviderCategoryEnum? providerCategory = default, - bool? waitForDeviceCreation = default - ) - { - AcceptedCapabilities = acceptedCapabilities; - AcceptedProviders = acceptedProviders; - AutomaticallyManageNewDevices = automaticallyManageNewDevices; - CustomMetadata = customMetadata; - CustomRedirectFailureUrl = customRedirectFailureUrl; - CustomRedirectUrl = customRedirectUrl; - CustomerKey = customerKey; - ExcludedProviders = excludedProviders; - ProviderCategory = providerCategory; - WaitForDeviceCreation = waitForDeviceCreation; - } - - /// - /// List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AcceptedCapabilitiesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "lock")] - Lock = 1, - - [EnumMember(Value = "thermostat")] - Thermostat = 2, - - [EnumMember(Value = "noise_sensor")] - NoiseSensor = 3, - - [EnumMember(Value = "access_control")] - AccessControl = 4, - - [EnumMember(Value = "camera")] - Camera = 5, - } - - /// - /// Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with no filters. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AcceptedProvidersEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +public class ConnectWebviews +{ +private ISeamClient _seam; + +public ConnectWebviews(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Connect Webview. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(List? acceptedCapabilities = default, List? acceptedProviders = default, bool? automaticallyManageNewDevices = default, object? customMetadata = default, string? customRedirectFailureUrl = default, string? customRedirectUrl = default, string? customerKey = default, List? excludedProviders = default, CreateRequest.ProviderCategoryEnum? providerCategory = default, bool? waitForDeviceCreation = default) +{ +AcceptedCapabilities = acceptedCapabilities; +AcceptedProviders = acceptedProviders; +AutomaticallyManageNewDevices = automaticallyManageNewDevices; +CustomMetadata = customMetadata; +CustomRedirectFailureUrl = customRedirectFailureUrl; +CustomRedirectUrl = customRedirectUrl; +CustomerKey = customerKey; +ExcludedProviders = excludedProviders; +ProviderCategory = providerCategory; +WaitForDeviceCreation = waitForDeviceCreation; +} + +/// +/// List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AcceptedCapabilitiesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "lock")] +Lock = 1, + +[EnumMember(Value = "thermostat")] +Thermostat = 2, + +[EnumMember(Value = "noise_sensor")] +NoiseSensor = 3, + +[EnumMember(Value = "access_control")] +AccessControl = 4, + +[EnumMember(Value = "camera")] +Camera = 5, +} + +/// +/// Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with no filters. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AcceptedProvidersEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "hotek")] +Hotek = 1, + +[EnumMember(Value = "dormakaba_community")] +DormakabaCommunity = 2, + +[EnumMember(Value = "legic_connect")] +LegicConnect = 3, + +[EnumMember(Value = "akuvox")] +Akuvox = 4, + +[EnumMember(Value = "august")] +August = 5, + +[EnumMember(Value = "avigilon_alta")] +AvigilonAlta = 6, + +[EnumMember(Value = "brivo")] +Brivo = 7, + +[EnumMember(Value = "butterflymx")] +Butterflymx = 8, + +[EnumMember(Value = "schlage")] +Schlage = 9, + +[EnumMember(Value = "smartthings")] +Smartthings = 10, + +[EnumMember(Value = "yale")] +Yale = 11, + +[EnumMember(Value = "genie")] +Genie = 12, + +[EnumMember(Value = "doorking")] +Doorking = 13, + +[EnumMember(Value = "salto")] +Salto = 14, + +[EnumMember(Value = "salto_ks")] +SaltoKs = 15, + +[EnumMember(Value = "salto_ks_accept")] +SaltoKsAccept = 16, + +[EnumMember(Value = "lockly")] +Lockly = 17, + +[EnumMember(Value = "ttlock")] +Ttlock = 18, + +[EnumMember(Value = "linear")] +Linear = 19, + +[EnumMember(Value = "noiseaware")] +Noiseaware = 20, + +[EnumMember(Value = "nuki")] +Nuki = 21, + +[EnumMember(Value = "igloo")] +Igloo = 22, + +[EnumMember(Value = "kwikset")] +Kwikset = 23, + +[EnumMember(Value = "minut")] +Minut = 24, + +[EnumMember(Value = "my_2n")] +My_2n = 25, + +[EnumMember(Value = "controlbyweb")] +Controlbyweb = 26, - [EnumMember(Value = "hotek")] - Hotek = 1, +[EnumMember(Value = "nest")] +Nest = 27, - [EnumMember(Value = "dormakaba_community")] - DormakabaCommunity = 2, +[EnumMember(Value = "igloohome")] +Igloohome = 28, - [EnumMember(Value = "legic_connect")] - LegicConnect = 3, +[EnumMember(Value = "ecobee")] +Ecobee = 29, - [EnumMember(Value = "akuvox")] - Akuvox = 4, +[EnumMember(Value = "four_suites")] +FourSuites = 30, - [EnumMember(Value = "august")] - August = 5, +[EnumMember(Value = "dormakaba_oracode")] +DormakabaOracode = 31, - [EnumMember(Value = "avigilon_alta")] - AvigilonAlta = 6, +[EnumMember(Value = "dormakaba_oracode_iho")] +DormakabaOracodeIho = 32, - [EnumMember(Value = "brivo")] - Brivo = 7, +[EnumMember(Value = "pti")] +Pti = 33, - [EnumMember(Value = "butterflymx")] - Butterflymx = 8, +[EnumMember(Value = "wyze")] +Wyze = 34, - [EnumMember(Value = "schlage")] - Schlage = 9, +[EnumMember(Value = "seam_passport")] +SeamPassport = 35, - [EnumMember(Value = "smartthings")] - Smartthings = 10, +[EnumMember(Value = "visionline")] +Visionline = 36, - [EnumMember(Value = "yale")] - Yale = 11, +[EnumMember(Value = "assa_abloy_credential_service")] +AssaAbloyCredentialService = 37, - [EnumMember(Value = "genie")] - Genie = 12, +[EnumMember(Value = "tedee")] +Tedee = 38, - [EnumMember(Value = "doorking")] - Doorking = 13, +[EnumMember(Value = "honeywell_resideo")] +HoneywellResideo = 39, - [EnumMember(Value = "salto")] - Salto = 14, +[EnumMember(Value = "first_alert")] +FirstAlert = 40, - [EnumMember(Value = "salto_ks")] - SaltoKs = 15, +[EnumMember(Value = "latch")] +Latch = 41, - [EnumMember(Value = "salto_ks_accept")] - SaltoKsAccept = 16, +[EnumMember(Value = "akiles")] +Akiles = 42, - [EnumMember(Value = "lockly")] - Lockly = 17, +[EnumMember(Value = "assa_abloy_vostio")] +AssaAbloyVostio = 43, + +[EnumMember(Value = "assa_abloy_vostio_credential_service")] +AssaAbloyVostioCredentialService = 44, + +[EnumMember(Value = "tado")] +Tado = 45, + +[EnumMember(Value = "salto_space")] +SaltoSpace = 46, + +[EnumMember(Value = "sensi")] +Sensi = 47, + +[EnumMember(Value = "keynest")] +Keynest = 48, + +[EnumMember(Value = "korelock")] +Korelock = 49, + +[EnumMember(Value = "keyincode")] +Keyincode = 50, + +[EnumMember(Value = "dormakaba_ambiance")] +DormakabaAmbiance = 51, + +[EnumMember(Value = "ultraloq")] +Ultraloq = 52, + +[EnumMember(Value = "yacan")] +Yacan = 53, + +[EnumMember(Value = "dusaw")] +Dusaw = 54, + +[EnumMember(Value = "sifely")] +Sifely = 55, + +[EnumMember(Value = "thirty_three_lock")] +ThirtyThreeLock = 56, + +[EnumMember(Value = "ring")] +Ring = 57, + +[EnumMember(Value = "tapo")] +Tapo = 58, + +[EnumMember(Value = "arlo")] +Arlo = 59, + +[EnumMember(Value = "reolink")] +Reolink = 60, + +[EnumMember(Value = "ical")] +Ical = 61, + +[EnumMember(Value = "lodgify")] +Lodgify = 62, + +[EnumMember(Value = "hostaway")] +Hostaway = 63, + +[EnumMember(Value = "guesty")] +Guesty = 64, + +[EnumMember(Value = "acuity_scheduling")] +AcuityScheduling = 65, + +[EnumMember(Value = "omnitec")] +Omnitec = 66, + +[EnumMember(Value = "kisi")] +Kisi = 67, + +[EnumMember(Value = "aqara")] +Aqara = 68, + +[EnumMember(Value = "yale_access")] +YaleAccess = 69, + +[EnumMember(Value = "hid_cm")] +HidCm = 70, + +[EnumMember(Value = "google_nest")] +GoogleNest = 71, + +[EnumMember(Value = "slack")] +Slack = 72, +} + +/// +/// Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with the desired `provider_category` filter. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ProviderCategoryEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "stable")] +Stable = 1, + +[EnumMember(Value = "consumer_smartlocks")] +ConsumerSmartlocks = 2, + +[EnumMember(Value = "beta")] +Beta = 3, + +[EnumMember(Value = "thermostats")] +Thermostats = 4, + +[EnumMember(Value = "noise_sensors")] +NoiseSensors = 5, + +[EnumMember(Value = "access_control_systems")] +AccessControlSystems = 6, + +[EnumMember(Value = "cameras")] +Cameras = 7, + +[EnumMember(Value = "connectors")] +Connectors = 8, + +[EnumMember(Value = "internal_beta")] +InternalBeta = 9, +} + +/// +/// List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. +/// +[DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] +public List? AcceptedCapabilities { get; set; } + +/// +/// Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with no filters. +/// +[DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] +public List? AcceptedProviders { get; set; } + +/// +/// Indicates whether newly-added devices should appear as [managed devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). +/// +[DataMember(Name = "automatically_manage_new_devices", IsRequired = false, EmitDefaultValue = false)] +public bool? AutomaticallyManageNewDevices { get; set; } + +/// +/// Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://www.seam.co/docs/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://www.seam.co/docs/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadata { get; set; } + +/// +/// Alternative URL that you want to redirect the user to on an error. If you do not set this parameter, the Connect Webview falls back to the `custom_redirect_url`. +/// +[DataMember(Name = "custom_redirect_failure_url", IsRequired = false, EmitDefaultValue = false)] +public string? CustomRedirectFailureUrl { get; set; } + +/// +/// URL that you want to redirect the user to after the provider login is complete. +/// +[DataMember(Name = "custom_redirect_url", IsRequired = false, EmitDefaultValue = false)] +public string? CustomRedirectUrl { get; set; } + +/// +/// Associate the Connect Webview, the connected account, and all resources under the connected account with a customer. If the connected account already exists, it will be associated with the customer. If the connected account already exists, but is already associated with a customer, the Connect Webview will show an error. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// List of provider keys to exclude from the Connect Webview. These providers will not be shown when the user tries to connect an account. +/// +[DataMember(Name = "excluded_providers", IsRequired = false, EmitDefaultValue = false)] +public List? ExcludedProviders { get; set; } + +/// +/// Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with the desired `provider_category` filter. +/// +[DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] +public CreateRequest.ProviderCategoryEnum? ProviderCategory { get; set; } + +/// +/// Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). +/// +[DataMember(Name = "wait_for_device_creation", IsRequired = false, EmitDefaultValue = false)] +public bool? WaitForDeviceCreation { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "ttlock")] - Ttlock = 18, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "linear")] - Linear = 19, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "noiseaware")] - Noiseaware = 20, +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } - [EnumMember(Value = "nuki")] - Nuki = 21, +public CreateResponse(ConnectWebview connectWebview = default) +{ +ConnectWebview = connectWebview; +} - [EnumMember(Value = "igloo")] - Igloo = 22, +/// +/// OK +/// +[DataMember(Name = "connect_webview", IsRequired = false, EmitDefaultValue = false)] +public ConnectWebview ConnectWebview { get; set; } - [EnumMember(Value = "kwikset")] - Kwikset = 23, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "minut")] - Minut = 24, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "my_2n")] - My_2n = 25, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "controlbyweb")] - Controlbyweb = 26, +/// +/// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. +/// +/// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. +/// +/// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). +/// +public ConnectWebview Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/connect_webviews/create", requestOptions).EnsureData("/connect_webviews/create").ConnectWebview; +} - [EnumMember(Value = "nest")] - Nest = 27, +/// +/// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. +/// +/// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. +/// +/// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). +/// +public ConnectWebview Create(List? acceptedCapabilities = default, List? acceptedProviders = default, bool? automaticallyManageNewDevices = default, object? customMetadata = default, string? customRedirectFailureUrl = default, string? customRedirectUrl = default, string? customerKey = default, List? excludedProviders = default, CreateRequest.ProviderCategoryEnum? providerCategory = default, bool? waitForDeviceCreation = default) +{ +return Create(new CreateRequest(acceptedCapabilities: acceptedCapabilities, acceptedProviders: acceptedProviders, automaticallyManageNewDevices: automaticallyManageNewDevices, customMetadata: customMetadata, customRedirectFailureUrl: customRedirectFailureUrl, customRedirectUrl: customRedirectUrl, customerKey: customerKey, excludedProviders: excludedProviders, providerCategory: providerCategory, waitForDeviceCreation: waitForDeviceCreation)); +} - [EnumMember(Value = "igloohome")] - Igloohome = 28, +/// +/// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. +/// +/// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. +/// +/// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/connect_webviews/create", requestOptions)).EnsureData("/connect_webviews/create").ConnectWebview; +} - [EnumMember(Value = "ecobee")] - Ecobee = 29, +/// +/// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. +/// +/// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. +/// +/// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). +/// +public async Task CreateAsync(List? acceptedCapabilities = default, List? acceptedProviders = default, bool? automaticallyManageNewDevices = default, object? customMetadata = default, string? customRedirectFailureUrl = default, string? customRedirectUrl = default, string? customerKey = default, List? excludedProviders = default, CreateRequest.ProviderCategoryEnum? providerCategory = default, bool? waitForDeviceCreation = default) +{ +return (await CreateAsync(new CreateRequest(acceptedCapabilities: acceptedCapabilities, acceptedProviders: acceptedProviders, automaticallyManageNewDevices: automaticallyManageNewDevices, customMetadata: customMetadata, customRedirectFailureUrl: customRedirectFailureUrl, customRedirectUrl: customRedirectUrl, customerKey: customerKey, excludedProviders: excludedProviders, providerCategory: providerCategory, waitForDeviceCreation: waitForDeviceCreation))); +} - [EnumMember(Value = "four_suites")] - FourSuites = 30, +/// +/// Request parameters for Delete a Connect Webview. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } - [EnumMember(Value = "dormakaba_oracode")] - DormakabaOracode = 31, +public DeleteRequest(string connectWebviewId = default) +{ +ConnectWebviewId = connectWebviewId; +} - [EnumMember(Value = "pti")] - Pti = 32, +/// +/// ID of the Connect Webview that you want to delete. +/// +[DataMember(Name = "connect_webview_id", IsRequired = true, EmitDefaultValue = false)] +public string ConnectWebviewId { get; set; } - [EnumMember(Value = "wyze")] - Wyze = 33, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "seam_passport")] - SeamPassport = 34, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "visionline")] - Visionline = 35, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "assa_abloy_credential_service")] - AssaAbloyCredentialService = 36, +/// +/// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/connect_webviews/delete", requestOptions); +} - [EnumMember(Value = "tedee")] - Tedee = 37, +/// +/// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. +/// +public void Delete(string connectWebviewId = default) +{ +Delete(new DeleteRequest(connectWebviewId: connectWebviewId)); +} - [EnumMember(Value = "honeywell_resideo")] - HoneywellResideo = 38, +/// +/// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/connect_webviews/delete", requestOptions); +} - [EnumMember(Value = "first_alert")] - FirstAlert = 39, +/// +/// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. +/// +public async Task DeleteAsync(string connectWebviewId = default) +{ +await DeleteAsync(new DeleteRequest(connectWebviewId: connectWebviewId)); +} - [EnumMember(Value = "latch")] - Latch = 40, +/// +/// Request parameters for Get a Connect Webview. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } - [EnumMember(Value = "akiles")] - Akiles = 41, +public GetRequest(string connectWebviewId = default) +{ +ConnectWebviewId = connectWebviewId; +} - [EnumMember(Value = "assa_abloy_vostio")] - AssaAbloyVostio = 42, +/// +/// ID of the Connect Webview that you want to get. +/// +[DataMember(Name = "connect_webview_id", IsRequired = true, EmitDefaultValue = false)] +public string ConnectWebviewId { get; set; } - [EnumMember(Value = "assa_abloy_vostio_credential_service")] - AssaAbloyVostioCredentialService = 43, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "tado")] - Tado = 44, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "salto_space")] - SaltoSpace = 45, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "sensi")] - Sensi = 46, +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } - [EnumMember(Value = "keynest")] - Keynest = 47, +public GetResponse(ConnectWebview connectWebview = default) +{ +ConnectWebview = connectWebview; +} - [EnumMember(Value = "korelock")] - Korelock = 48, +/// +/// OK +/// +[DataMember(Name = "connect_webview", IsRequired = false, EmitDefaultValue = false)] +public ConnectWebview ConnectWebview { get; set; } - [EnumMember(Value = "keyincode")] - Keyincode = 49, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "dormakaba_ambiance")] - DormakabaAmbiance = 50, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "ultraloq")] - Ultraloq = 51, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "yacan")] - Yacan = 52, +/// +/// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. +/// +public ConnectWebview Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/connect_webviews/get", requestOptions).EnsureData("/connect_webviews/get").ConnectWebview; +} - [EnumMember(Value = "dusaw")] - Dusaw = 53, +/// +/// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. +/// +public ConnectWebview Get(string connectWebviewId = default) +{ +return Get(new GetRequest(connectWebviewId: connectWebviewId)); +} - [EnumMember(Value = "sifely")] - Sifely = 54, +/// +/// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/connect_webviews/get", requestOptions)).EnsureData("/connect_webviews/get").ConnectWebview; +} - [EnumMember(Value = "thirty_three_lock")] - ThirtyThreeLock = 55, +/// +/// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. +/// +public async Task GetAsync(string connectWebviewId = default) +{ +return (await GetAsync(new GetRequest(connectWebviewId: connectWebviewId))); +} - [EnumMember(Value = "ring")] - Ring = 56, +/// +/// Request parameters for List Connect Webviews. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } - [EnumMember(Value = "ical")] - Ical = 57, +public ListRequest(object? customMetadataHas = default, string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +CustomMetadataHas = customMetadataHas; +CustomerKey = customerKey; +Limit = limit; +PageCursor = pageCursor; +Search = search; +UserIdentifierKey = userIdentifierKey; +} - [EnumMember(Value = "lodgify")] - Lodgify = 58, +/// +/// Custom metadata pairs by which you want to [filter Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. +/// +[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadataHas { get; set; } + +/// +/// Customer key for which you want to list connect webviews. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned Connect Webviews to include all records that satisfy a partial match using `connect_webview_id`, `accepted_providers`, `custom_metadata`, or `customer_key`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// Your user ID for the user by which you want to filter Connect Webviews. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "hostaway")] - Hostaway = 59, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "guesty")] - Guesty = 60, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "acuity_scheduling")] - AcuityScheduling = 61, +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } - [EnumMember(Value = "omnitec")] - Omnitec = 62, +public ListResponse(List connectWebviews = default) +{ +ConnectWebviews = connectWebviews; +} - [EnumMember(Value = "kisi")] - Kisi = 63, +/// +/// OK +/// +[DataMember(Name = "connect_webviews", IsRequired = false, EmitDefaultValue = false)] +public List ConnectWebviews { get; set; } - [EnumMember(Value = "aqara")] - Aqara = 64, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "yale_access")] - YaleAccess = 65, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "hid_cm")] - HidCm = 66, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "google_nest")] - GoogleNest = 67, +/// +/// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/connect_webviews/list", requestOptions).EnsureData("/connect_webviews/list").ConnectWebviews; +} - [EnumMember(Value = "slack")] - Slack = 68, - } +/// +/// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +public List List(object? customMetadataHas = default, string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +return List(new ListRequest(customMetadataHas: customMetadataHas, customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey)); +} - /// - /// Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with the desired `provider_category` filter. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ProviderCategoryEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +/// +/// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/connect_webviews/list", requestOptions)).EnsureData("/connect_webviews/list").ConnectWebviews; +} - [EnumMember(Value = "stable")] - Stable = 1, - - [EnumMember(Value = "consumer_smartlocks")] - ConsumerSmartlocks = 2, - - [EnumMember(Value = "beta")] - Beta = 3, - - [EnumMember(Value = "thermostats")] - Thermostats = 4, - - [EnumMember(Value = "noise_sensors")] - NoiseSensors = 5, - - [EnumMember(Value = "access_control_systems")] - AccessControlSystems = 6, - - [EnumMember(Value = "cameras")] - Cameras = 7, - - [EnumMember(Value = "connectors")] - Connectors = 8, - - [EnumMember(Value = "internal_beta")] - InternalBeta = 9, - } - - /// - /// List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. - /// - [DataMember( - Name = "accepted_capabilities", - IsRequired = false, - EmitDefaultValue = false - )] - public List? AcceptedCapabilities { get; set; } - - /// - /// Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with no filters. - /// - [DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] - public List? AcceptedProviders { get; set; } - - /// - /// Indicates whether newly-added devices should appear as [managed devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). - /// - [DataMember( - Name = "automatically_manage_new_devices", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AutomaticallyManageNewDevices { get; set; } - - /// - /// Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://docs.seam.co/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadata { get; set; } - - /// - /// Alternative URL that you want to redirect the user to on an error. If you do not set this parameter, the Connect Webview falls back to the `custom_redirect_url`. - /// - [DataMember( - Name = "custom_redirect_failure_url", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomRedirectFailureUrl { get; set; } - - /// - /// URL that you want to redirect the user to after the provider login is complete. - /// - [DataMember(Name = "custom_redirect_url", IsRequired = false, EmitDefaultValue = false)] - public string? CustomRedirectUrl { get; set; } - - /// - /// Associate the Connect Webview, the connected account, and all resources under the connected account with a customer. If the connected account already exists, it will be associated with the customer. If the connected account already exists, but is already associated with a customer, the Connect Webview will show an error. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// List of provider keys to exclude from the Connect Webview. These providers will not be shown when the user tries to connect an account. - /// - [DataMember(Name = "excluded_providers", IsRequired = false, EmitDefaultValue = false)] - public List? ExcludedProviders { get; set; } - - /// - /// Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with the desired `provider_category` filter. - /// - [DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] - public CreateRequest.ProviderCategoryEnum? ProviderCategory { get; set; } - - /// - /// Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). - /// - [DataMember( - Name = "wait_for_device_creation", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? WaitForDeviceCreation { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(ConnectWebview connectWebview = default) - { - ConnectWebview = connectWebview; - } - - /// - /// OK - /// - [DataMember(Name = "connect_webview", IsRequired = false, EmitDefaultValue = false)] - public ConnectWebview ConnectWebview { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. - /// - /// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. - /// - /// See also: [Connect Webview Process](https://docs.seam.co/core-concepts/connect-webviews/connect-webview-process). - /// - public ConnectWebview Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/connect_webviews/create", requestOptions) - .EnsureData("/connect_webviews/create") - .ConnectWebview; - } - - /// - /// Creates a new [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. - /// - /// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. - /// - /// See also: [Connect Webview Process](https://docs.seam.co/core-concepts/connect-webviews/connect-webview-process). - /// - public ConnectWebview Create( - List? acceptedCapabilities = default, - List? acceptedProviders = default, - bool? automaticallyManageNewDevices = default, - object? customMetadata = default, - string? customRedirectFailureUrl = default, - string? customRedirectUrl = default, - string? customerKey = default, - List? excludedProviders = default, - CreateRequest.ProviderCategoryEnum? providerCategory = default, - bool? waitForDeviceCreation = default - ) - { - return Create( - new CreateRequest( - acceptedCapabilities: acceptedCapabilities, - acceptedProviders: acceptedProviders, - automaticallyManageNewDevices: automaticallyManageNewDevices, - customMetadata: customMetadata, - customRedirectFailureUrl: customRedirectFailureUrl, - customRedirectUrl: customRedirectUrl, - customerKey: customerKey, - excludedProviders: excludedProviders, - providerCategory: providerCategory, - waitForDeviceCreation: waitForDeviceCreation - ) - ); - } - - /// - /// Creates a new [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. - /// - /// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. - /// - /// See also: [Connect Webview Process](https://docs.seam.co/core-concepts/connect-webviews/connect-webview-process). - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync("/connect_webviews/create", requestOptions) - ) - .EnsureData("/connect_webviews/create") - .ConnectWebview; - } - - /// - /// Creates a new [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. - /// - /// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. - /// - /// See also: [Connect Webview Process](https://docs.seam.co/core-concepts/connect-webviews/connect-webview-process). - /// - public async Task CreateAsync( - List? acceptedCapabilities = default, - List? acceptedProviders = default, - bool? automaticallyManageNewDevices = default, - object? customMetadata = default, - string? customRedirectFailureUrl = default, - string? customRedirectUrl = default, - string? customerKey = default, - List? excludedProviders = default, - CreateRequest.ProviderCategoryEnum? providerCategory = default, - bool? waitForDeviceCreation = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - acceptedCapabilities: acceptedCapabilities, - acceptedProviders: acceptedProviders, - automaticallyManageNewDevices: automaticallyManageNewDevices, - customMetadata: customMetadata, - customRedirectFailureUrl: customRedirectFailureUrl, - customRedirectUrl: customRedirectUrl, - customerKey: customerKey, - excludedProviders: excludedProviders, - providerCategory: providerCategory, - waitForDeviceCreation: waitForDeviceCreation - ) - ) - ); - } - - /// - /// Request parameters for Delete a Connect Webview. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string connectWebviewId = default) - { - ConnectWebviewId = connectWebviewId; - } - - /// - /// ID of the Connect Webview that you want to delete. - /// - [DataMember(Name = "connect_webview_id", IsRequired = true, EmitDefaultValue = false)] - public string ConnectWebviewId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/connect_webviews/delete", requestOptions); - } - - /// - /// Deletes a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. - /// - public void Delete(string connectWebviewId = default) - { - Delete(new DeleteRequest(connectWebviewId: connectWebviewId)); - } - - /// - /// Deletes a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/connect_webviews/delete", requestOptions); - } - - /// - /// Deletes a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. - /// - public async Task DeleteAsync(string connectWebviewId = default) - { - await DeleteAsync(new DeleteRequest(connectWebviewId: connectWebviewId)); - } - - /// - /// Request parameters for Get a Connect Webview. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string connectWebviewId = default) - { - ConnectWebviewId = connectWebviewId; - } - - /// - /// ID of the Connect Webview that you want to get. - /// - [DataMember(Name = "connect_webview_id", IsRequired = true, EmitDefaultValue = false)] - public string ConnectWebviewId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(ConnectWebview connectWebview = default) - { - ConnectWebview = connectWebview; - } - - /// - /// OK - /// - [DataMember(Name = "connect_webview", IsRequired = false, EmitDefaultValue = false)] - public ConnectWebview ConnectWebview { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. - /// - public ConnectWebview Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/connect_webviews/get", requestOptions) - .EnsureData("/connect_webviews/get") - .ConnectWebview; - } - - /// - /// Returns a specified [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. - /// - public ConnectWebview Get(string connectWebviewId = default) - { - return Get(new GetRequest(connectWebviewId: connectWebviewId)); - } - - /// - /// Returns a specified [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/connect_webviews/get", requestOptions)) - .EnsureData("/connect_webviews/get") - .ConnectWebview; - } - - /// - /// Returns a specified [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. - /// - public async Task GetAsync(string connectWebviewId = default) - { - return (await GetAsync(new GetRequest(connectWebviewId: connectWebviewId))); - } - - /// - /// Request parameters for List Connect Webviews. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - object? customMetadataHas = default, - string? customerKey = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - CustomMetadataHas = customMetadataHas; - CustomerKey = customerKey; - Limit = limit; - PageCursor = pageCursor; - Search = search; - UserIdentifierKey = userIdentifierKey; - } - - /// - /// Custom metadata pairs by which you want to [filter Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. - /// - [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadataHas { get; set; } - - /// - /// Customer key for which you want to list connect webviews. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned Connect Webviews to include all records that satisfy a partial match using `connect_webview_id`, `accepted_providers`, `custom_metadata`, or `customer_key`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// Your user ID for the user by which you want to filter Connect Webviews. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List connectWebviews = default) - { - ConnectWebviews = connectWebviews; - } - - /// - /// OK - /// - [DataMember(Name = "connect_webviews", IsRequired = false, EmitDefaultValue = false)] - public List ConnectWebviews { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/connect_webviews/list", requestOptions) - .EnsureData("/connect_webviews/list") - .ConnectWebviews; - } - - /// - /// Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews). - /// - public List List( - object? customMetadataHas = default, - string? customerKey = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - return List( - new ListRequest( - customMetadataHas: customMetadataHas, - customerKey: customerKey, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentifierKey: userIdentifierKey - ) - ); - } - - /// - /// Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/connect_webviews/list", requestOptions)) - .EnsureData("/connect_webviews/list") - .ConnectWebviews; - } - - /// - /// Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews). - /// - public async Task> ListAsync( - object? customMetadataHas = default, - string? customerKey = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - return ( - await ListAsync( - new ListRequest( - customMetadataHas: customMetadataHas, - customerKey: customerKey, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentifierKey: userIdentifierKey - ) - ) - ); - } - } +/// +/// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +public async Task> ListAsync(object? customMetadataHas = default, string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +return (await ListAsync(new ListRequest(customMetadataHas: customMetadataHas, customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.ConnectWebviews ConnectWebviews => new(this); - } +public partial class SeamClient +{ +public Api.ConnectWebviews ConnectWebviews => new(this); +} - public partial interface ISeamClient - { - public Api.ConnectWebviews ConnectWebviews { get; } - } +public partial interface ISeamClient +{ +public Api.ConnectWebviews ConnectWebviews { get; } +} } diff --git a/src/Seam/Api/ConnectedAccounts.cs b/src/Seam/Api/ConnectedAccounts.cs index ab35f5f4..10f7d333 100644 --- a/src/Seam/Api/ConnectedAccounts.cs +++ b/src/Seam/Api/ConnectedAccounts.cs @@ -9,717 +9,605 @@ namespace Seam.Api { - public class ConnectedAccounts - { - private ISeamClient _seam; - - public ConnectedAccounts(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Delete a Connected Account. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string connectedAccountId = default) - { - ConnectedAccountId = connectedAccountId; - } - - /// - /// ID of the connected account that you want to delete. - /// - [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - /// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. - /// - /// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/connected_accounts/delete", requestOptions); - } - - /// - /// Deletes a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - /// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. - /// - /// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. - /// - public void Delete(string connectedAccountId = default) - { - Delete(new DeleteRequest(connectedAccountId: connectedAccountId)); - } - - /// - /// Deletes a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - /// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. - /// - /// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/connected_accounts/delete", requestOptions); - } - - /// - /// Deletes a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - /// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. - /// - /// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. - /// - public async Task DeleteAsync(string connectedAccountId = default) - { - await DeleteAsync(new DeleteRequest(connectedAccountId: connectedAccountId)); - } - - /// - /// Request parameters for Get a Connected Account. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string? connectedAccountId = default, string? email = default) - { - ConnectedAccountId = connectedAccountId; - Email = email; - } - - /// - /// ID of the connected account that you want to get. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Email address associated with the connected account that you want to get. - /// - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string? Email { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(ConnectedAccount connectedAccount = default) - { - ConnectedAccount = connectedAccount; - } - - /// - /// OK - /// - [DataMember(Name = "connected_account", IsRequired = false, EmitDefaultValue = false)] - public ConnectedAccount ConnectedAccount { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - public ConnectedAccount Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/connected_accounts/get", requestOptions) - .EnsureData("/connected_accounts/get") - .ConnectedAccount; - } - - /// - /// Returns a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - public ConnectedAccount Get(string? connectedAccountId = default, string? email = default) - { - return Get(new GetRequest(connectedAccountId: connectedAccountId, email: email)); - } - - /// - /// Returns a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/connected_accounts/get", requestOptions)) - .EnsureData("/connected_accounts/get") - .ConnectedAccount; - } - - /// - /// Returns a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - public async Task GetAsync( - string? connectedAccountId = default, - string? email = default - ) - { - return ( - await GetAsync(new GetRequest(connectedAccountId: connectedAccountId, email: email)) - ); - } - - /// - /// Request parameters for List Connected Accounts. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - object? customMetadataHas = default, - string? customerKey = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? userIdentifierKey = default - ) - { - CustomMetadataHas = customMetadataHas; - CustomerKey = customerKey; - Limit = limit; - PageCursor = pageCursor; - Search = search; - SpaceId = spaceId; - UserIdentifierKey = userIdentifierKey; - } - - /// - /// Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. - /// - [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadataHas { get; set; } - - /// - /// Customer key by which you want to filter connected accounts. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public int? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned connected accounts to include all records that satisfy a partial match using `connected_account_id`, `account_type`, `customer_key`, `custom_metadata`, `user_identifier.username`, `user_identifier.email` or `user_identifier.phone`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// ID of the space by which you want to filter connected accounts. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - /// - /// Your user ID for the user by which you want to filter connected accounts. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List connectedAccounts = default) - { - ConnectedAccounts = connectedAccounts; - } - - /// - /// OK - /// - [DataMember(Name = "connected_accounts", IsRequired = false, EmitDefaultValue = false)] - public List ConnectedAccounts { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [connected accounts](https://docs.seam.co/core-concepts/connected-accounts). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/connected_accounts/list", requestOptions) - .EnsureData("/connected_accounts/list") - .ConnectedAccounts; - } - - /// - /// Returns a list of all [connected accounts](https://docs.seam.co/core-concepts/connected-accounts). - /// - public List List( - object? customMetadataHas = default, - string? customerKey = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? userIdentifierKey = default - ) - { - return List( - new ListRequest( - customMetadataHas: customMetadataHas, - customerKey: customerKey, - limit: limit, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - userIdentifierKey: userIdentifierKey - ) - ); - } - - /// - /// Returns a list of all [connected accounts](https://docs.seam.co/core-concepts/connected-accounts). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/connected_accounts/list", requestOptions)) - .EnsureData("/connected_accounts/list") - .ConnectedAccounts; - } - - /// - /// Returns a list of all [connected accounts](https://docs.seam.co/core-concepts/connected-accounts). - /// - public async Task> ListAsync( - object? customMetadataHas = default, - string? customerKey = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? userIdentifierKey = default - ) - { - return ( - await ListAsync( - new ListRequest( - customMetadataHas: customMetadataHas, - customerKey: customerKey, - limit: limit, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - userIdentifierKey: userIdentifierKey - ) - ) - ); - } - - /// - /// Request parameters for Sync a Connected Account. - /// - [DataContract(Name = "syncRequest_request")] - public class SyncRequest - { - [JsonConstructorAttribute] - protected SyncRequest() { } - - public SyncRequest(string connectedAccountId = default) - { - ConnectedAccountId = connectedAccountId; - } - - /// - /// ID of the connected account that you want to sync. - /// - [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Request a [connected account](https://docs.seam.co/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. - /// - public void Sync(SyncRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/connected_accounts/sync", requestOptions); - } - - /// - /// Request a [connected account](https://docs.seam.co/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. - /// - public void Sync(string connectedAccountId = default) - { - Sync(new SyncRequest(connectedAccountId: connectedAccountId)); - } - - /// - /// Request a [connected account](https://docs.seam.co/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. - /// - public async Task SyncAsync(SyncRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/connected_accounts/sync", requestOptions); - } - - /// - /// Request a [connected account](https://docs.seam.co/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. - /// - public async Task SyncAsync(string connectedAccountId = default) - { - await SyncAsync(new SyncRequest(connectedAccountId: connectedAccountId)); - } - - /// - /// Request parameters for Update a Connected Account. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - List? acceptedCapabilities = default, - bool? automaticallyManageNewDevices = default, - string connectedAccountId = default, - object? customMetadata = default, - string? customerKey = default, - string? displayName = default - ) - { - AcceptedCapabilities = acceptedCapabilities; - AutomaticallyManageNewDevices = automaticallyManageNewDevices; - ConnectedAccountId = connectedAccountId; - CustomMetadata = customMetadata; - CustomerKey = customerKey; - DisplayName = displayName; - } - - /// - /// List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AcceptedCapabilitiesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "lock")] - Lock = 1, - - [EnumMember(Value = "thermostat")] - Thermostat = 2, - - [EnumMember(Value = "noise_sensor")] - NoiseSensor = 3, - - [EnumMember(Value = "access_control")] - AccessControl = 4, - - [EnumMember(Value = "camera")] - Camera = 5, - } - - /// - /// List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. - /// - [DataMember( - Name = "accepted_capabilities", - IsRequired = false, - EmitDefaultValue = false - )] - public List? AcceptedCapabilities { get; set; } - - /// - /// Indicates whether newly-added devices should appear as [managed devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - [DataMember( - Name = "automatically_manage_new_devices", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AutomaticallyManageNewDevices { get; set; } - - /// - /// ID of the connected account that you want to update. - /// - [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://docs.seam.co/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadata { get; set; } - - /// - /// The customer key to associate with this connected account. If provided, the connected account and all resources under the connected account will be moved to this customer. May only be provided if the connected account is not already associated with a customer. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Human-readable name for the connected account, shown in the dashboard. For example, `Booking from Airbnb House 1`. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string? DisplayName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/connected_accounts/update", requestOptions); - } - - /// - /// Updates a [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - public void Update( - List? acceptedCapabilities = default, - bool? automaticallyManageNewDevices = default, - string connectedAccountId = default, - object? customMetadata = default, - string? customerKey = default, - string? displayName = default - ) - { - Update( - new UpdateRequest( - acceptedCapabilities: acceptedCapabilities, - automaticallyManageNewDevices: automaticallyManageNewDevices, - connectedAccountId: connectedAccountId, - customMetadata: customMetadata, - customerKey: customerKey, - displayName: displayName - ) - ); - } - - /// - /// Updates a [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/connected_accounts/update", requestOptions); - } - - /// - /// Updates a [connected account](https://docs.seam.co/core-concepts/connected-accounts). - /// - public async Task UpdateAsync( - List? acceptedCapabilities = default, - bool? automaticallyManageNewDevices = default, - string connectedAccountId = default, - object? customMetadata = default, - string? customerKey = default, - string? displayName = default - ) - { - await UpdateAsync( - new UpdateRequest( - acceptedCapabilities: acceptedCapabilities, - automaticallyManageNewDevices: automaticallyManageNewDevices, - connectedAccountId: connectedAccountId, - customMetadata: customMetadata, - customerKey: customerKey, - displayName: displayName - ) - ); - } - } +public class ConnectedAccounts +{ +private ISeamClient _seam; + +public ConnectedAccounts(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Delete a Connected Account. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string connectedAccountId = default) +{ +ConnectedAccountId = connectedAccountId; +} + +/// +/// ID of the connected account that you want to delete. +/// +[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +/// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. +/// +/// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/connected_accounts/delete", requestOptions); +} + +/// +/// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +/// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. +/// +/// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. +/// +public void Delete(string connectedAccountId = default) +{ +Delete(new DeleteRequest(connectedAccountId: connectedAccountId)); +} + +/// +/// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +/// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. +/// +/// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/connected_accounts/delete", requestOptions); +} + +/// +/// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +/// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. +/// +/// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. +/// +public async Task DeleteAsync(string connectedAccountId = default) +{ +await DeleteAsync(new DeleteRequest(connectedAccountId: connectedAccountId)); +} + +/// +/// Request parameters for Get a Connected Account. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? connectedAccountId = default, string? email = default) +{ +ConnectedAccountId = connectedAccountId; +Email = email; +} + +/// +/// ID of the connected account that you want to get. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Email address associated with the connected account that you want to get. +/// +[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] +public string? Email { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(ConnectedAccount connectedAccount = default) +{ +ConnectedAccount = connectedAccount; +} + +/// +/// OK +/// +[DataMember(Name = "connected_account", IsRequired = false, EmitDefaultValue = false)] +public ConnectedAccount ConnectedAccount { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public ConnectedAccount Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/connected_accounts/get", requestOptions).EnsureData("/connected_accounts/get").ConnectedAccount; +} + +/// +/// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public ConnectedAccount Get(string? connectedAccountId = default, string? email = default) +{ +return Get(new GetRequest(connectedAccountId: connectedAccountId, email: email)); +} + +/// +/// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/connected_accounts/get", requestOptions)).EnsureData("/connected_accounts/get").ConnectedAccount; +} + +/// +/// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public async Task GetAsync(string? connectedAccountId = default, string? email = default) +{ +return (await GetAsync(new GetRequest(connectedAccountId: connectedAccountId, email: email))); +} + +/// +/// Request parameters for List Connected Accounts. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(object? customMetadataHas = default, string? customerKey = default, int? limit = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? userIdentifierKey = default) +{ +CustomMetadataHas = customMetadataHas; +CustomerKey = customerKey; +Limit = limit; +PageCursor = pageCursor; +Search = search; +SpaceId = spaceId; +UserIdentifierKey = userIdentifierKey; +} + +/// +/// Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. +/// +[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadataHas { get; set; } + +/// +/// Customer key by which you want to filter connected accounts. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public int? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned connected accounts to include all records that satisfy a partial match using `connected_account_id`, `account_type`, `customer_key`, `custom_metadata`, `user_identifier.username`, `user_identifier.email` or `user_identifier.phone`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// ID of the space by which you want to filter connected accounts. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +/// +/// Your user ID for the user by which you want to filter connected accounts. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List connectedAccounts = default) +{ +ConnectedAccounts = connectedAccounts; +} + +/// +/// OK +/// +[DataMember(Name = "connected_accounts", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccounts { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/connected_accounts/list", requestOptions).EnsureData("/connected_accounts/list").ConnectedAccounts; +} + +/// +/// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public List List(object? customMetadataHas = default, string? customerKey = default, int? limit = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? userIdentifierKey = default) +{ +return List(new ListRequest(customMetadataHas: customMetadataHas, customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, spaceId: spaceId, userIdentifierKey: userIdentifierKey)); +} + +/// +/// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/connected_accounts/list", requestOptions)).EnsureData("/connected_accounts/list").ConnectedAccounts; +} + +/// +/// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public async Task> ListAsync(object? customMetadataHas = default, string? customerKey = default, int? limit = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? userIdentifierKey = default) +{ +return (await ListAsync(new ListRequest(customMetadataHas: customMetadataHas, customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, spaceId: spaceId, userIdentifierKey: userIdentifierKey))); +} + +/// +/// Request parameters for Sync a Connected Account. +/// +[DataContract(Name = "syncRequest_request")] +public class SyncRequest +{ +[JsonConstructorAttribute] +protected SyncRequest() { } + +public SyncRequest(string connectedAccountId = default) +{ +ConnectedAccountId = connectedAccountId; +} + +/// +/// ID of the connected account that you want to sync. +/// +[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. +/// +public void Sync(SyncRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/connected_accounts/sync", requestOptions); +} + +/// +/// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. +/// +public void Sync(string connectedAccountId = default) +{ +Sync(new SyncRequest(connectedAccountId: connectedAccountId)); +} + +/// +/// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. +/// +public async Task SyncAsync(SyncRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/connected_accounts/sync", requestOptions); +} + +/// +/// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. +/// +public async Task SyncAsync(string connectedAccountId = default) +{ +await SyncAsync(new SyncRequest(connectedAccountId: connectedAccountId)); +} + +/// +/// Request parameters for Update a Connected Account. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(List? acceptedCapabilities = default, bool? automaticallyManageNewDevices = default, string connectedAccountId = default, object? customMetadata = default, string? customerKey = default, string? displayName = default) +{ +AcceptedCapabilities = acceptedCapabilities; +AutomaticallyManageNewDevices = automaticallyManageNewDevices; +ConnectedAccountId = connectedAccountId; +CustomMetadata = customMetadata; +CustomerKey = customerKey; +DisplayName = displayName; +} + +/// +/// List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AcceptedCapabilitiesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "lock")] +Lock = 1, + +[EnumMember(Value = "thermostat")] +Thermostat = 2, + +[EnumMember(Value = "noise_sensor")] +NoiseSensor = 3, + +[EnumMember(Value = "access_control")] +AccessControl = 4, + +[EnumMember(Value = "camera")] +Camera = 5, +} + +/// +/// List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. +/// +[DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] +public List? AcceptedCapabilities { get; set; } + +/// +/// Indicates whether newly-added devices should appear as [managed devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +[DataMember(Name = "automatically_manage_new_devices", IsRequired = false, EmitDefaultValue = false)] +public bool? AutomaticallyManageNewDevices { get; set; } + +/// +/// ID of the connected account that you want to update. +/// +[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://www.seam.co/docs/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadata { get; set; } + +/// +/// The customer key to associate with this connected account. If provided, the connected account and all resources under the connected account will be moved to this customer. May only be provided if the connected account is not already associated with a customer. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Human-readable name for the connected account, shown in the dashboard. For example, `Booking from Airbnb House 1`. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string? DisplayName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/connected_accounts/update", requestOptions); +} + +/// +/// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public void Update(List? acceptedCapabilities = default, bool? automaticallyManageNewDevices = default, string connectedAccountId = default, object? customMetadata = default, string? customerKey = default, string? displayName = default) +{ +Update(new UpdateRequest(acceptedCapabilities: acceptedCapabilities, automaticallyManageNewDevices: automaticallyManageNewDevices, connectedAccountId: connectedAccountId, customMetadata: customMetadata, customerKey: customerKey, displayName: displayName)); +} + +/// +/// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/connected_accounts/update", requestOptions); +} + +/// +/// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). +/// +public async Task UpdateAsync(List? acceptedCapabilities = default, bool? automaticallyManageNewDevices = default, string connectedAccountId = default, object? customMetadata = default, string? customerKey = default, string? displayName = default) +{ +await UpdateAsync(new UpdateRequest(acceptedCapabilities: acceptedCapabilities, automaticallyManageNewDevices: automaticallyManageNewDevices, connectedAccountId: connectedAccountId, customMetadata: customMetadata, customerKey: customerKey, displayName: displayName)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.ConnectedAccounts ConnectedAccounts => new(this); - } +public partial class SeamClient +{ +public Api.ConnectedAccounts ConnectedAccounts => new(this); +} - public partial interface ISeamClient - { - public Api.ConnectedAccounts ConnectedAccounts { get; } - } +public partial interface ISeamClient +{ +public Api.ConnectedAccounts ConnectedAccounts { get; } +} } diff --git a/src/Seam/Api/CredentialsAcs.cs b/src/Seam/Api/CredentialsAcs.cs index 5130261b..1ee3bc72 100644 --- a/src/Seam/Api/CredentialsAcs.cs +++ b/src/Seam/Api/CredentialsAcs.cs @@ -9,1418 +9,1138 @@ namespace Seam.Api { - public class CredentialsAcs - { - private ISeamClient _seam; - - public CredentialsAcs(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Assign a Credential to an ACS User. - /// - [DataContract(Name = "assignRequest_request")] - public class AssignRequest - { - [JsonConstructorAttribute] - protected AssignRequest() { } - - public AssignRequest( - string acsCredentialId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsCredentialId = acsCredentialId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the credential that you want to assign to an access system user. - /// - [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the access system user to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Assigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public void Assign(AssignRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/acs/credentials/assign", requestOptions); - } - - /// - /// Assigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public void Assign( - string acsCredentialId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - Assign( - new AssignRequest( - acsCredentialId: acsCredentialId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Assigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task AssignAsync(AssignRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/acs/credentials/assign", requestOptions); - } - - /// - /// Assigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task AssignAsync( - string acsCredentialId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await AssignAsync( - new AssignRequest( - acsCredentialId: acsCredentialId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for Create a Credential for an ACS User. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - CreateRequest.AccessMethodEnum accessMethod = default, - string? acsSystemId = default, - string? acsUserId = default, - List? allowedAcsEntranceIds = default, - CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, - string? code = default, - string? credentialManagerAcsSystemId = default, - string? endsAt = default, - bool? isMultiPhoneSyncCredential = default, - CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, - string? startsAt = default, - string? userIdentityId = default, - CreateRequestVisionlineMetadata? visionlineMetadata = default - ) - { - AccessMethod = accessMethod; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - AllowedAcsEntranceIds = allowedAcsEntranceIds; - AssaAbloyVostioMetadata = assaAbloyVostioMetadata; - Code = code; - CredentialManagerAcsSystemId = credentialManagerAcsSystemId; - EndsAt = endsAt; - IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; - SaltoSpaceMetadata = saltoSpaceMetadata; - StartsAt = startsAt; - UserIdentityId = userIdentityId; - VisionlineMetadata = visionlineMetadata; - } - - /// - /// Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AccessMethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "access_method", IsRequired = true, EmitDefaultValue = false)] - public CreateRequest.AccessMethodEnum AccessMethod { get; set; } - - /// - /// ID of the access system to which the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// Set of IDs of the [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) for which the new credential grants access. - /// - [DataMember( - Name = "allowed_acs_entrance_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? AllowedAcsEntranceIds { get; set; } - - /// - /// Vostio-specific metadata for the new credential. - /// - [DataMember( - Name = "assa_abloy_vostio_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public CreateRequestAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - - /// - /// Access (PIN) code for the new credential. There may be manufacturer-specific code restrictions. For details, see the applicable [device or system integration guide](https://docs.seam.co/device-and-system-integration-guides). - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// ACS system ID of the credential manager for the new credential. - /// - [DataMember( - Name = "credential_manager_acs_system_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CredentialManagerAcsSystemId { get; set; } - - /// - /// Date and time at which the validity of the new credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Indicates whether the new credential is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). - /// - [DataMember( - Name = "is_multi_phone_sync_credential", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsMultiPhoneSyncCredential { get; set; } - - /// - /// Salto Space-specific metadata for the new credential. - /// - [DataMember( - Name = "salto_space_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public CreateRequestSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } - - /// - /// Date and time at which the validity of the new credential starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// ID of the user identity to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. If the access system contains a user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the access system user. If the access system does not have a corresponding user, one is created. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Visionline-specific metadata for the new credential. - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestVisionlineMetadata? VisionlineMetadata { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestAssaAbloyVostioMetadata_model")] - public class CreateRequestAssaAbloyVostioMetadata - { - [JsonConstructorAttribute] - protected CreateRequestAssaAbloyVostioMetadata() { } - - public CreateRequestAssaAbloyVostioMetadata( - bool? autoJoin = default, - bool? joinAllGuestAcsEntrances = default, - bool? overrideAllGuestAcsEntrances = default, - List? overrideGuestAcsEntranceIds = default - ) - { - AutoJoin = autoJoin; - JoinAllGuestAcsEntrances = joinAllGuestAcsEntrances; - OverrideAllGuestAcsEntrances = overrideAllGuestAcsEntrances; - OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; - } - - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - [DataMember( - Name = "join_all_guest_acs_entrances", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? JoinAllGuestAcsEntrances { get; set; } - - [DataMember( - Name = "override_all_guest_acs_entrances", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OverrideAllGuestAcsEntrances { get; set; } - - [DataMember( - Name = "override_guest_acs_entrance_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? OverrideGuestAcsEntranceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestSaltoSpaceMetadata_model")] - public class CreateRequestSaltoSpaceMetadata - { - [JsonConstructorAttribute] - protected CreateRequestSaltoSpaceMetadata() { } - - public CreateRequestSaltoSpaceMetadata(bool? assignNewKey = default) - { - AssignNewKey = assignNewKey; - } - - /// - /// Indicates whether to assign a first, new card to a user. See also [Programming Salto Space Card-based Credentials](https://docs.seam.co/device-and-system-integration-guides/salto-proaccess-space-access-system/programming-salto-space-card-based-credentials). - /// - [DataMember(Name = "assign_new_key", IsRequired = false, EmitDefaultValue = false)] - public bool? AssignNewKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestVisionlineMetadata_model")] - public class CreateRequestVisionlineMetadata - { - [JsonConstructorAttribute] - protected CreateRequestVisionlineMetadata() { } - - public CreateRequestVisionlineMetadata( - bool? autoJoin = default, - CreateRequestVisionlineMetadata.CardFormatEnum? cardFormat = default, - CreateRequestVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, - List? joinerAcsCredentialIds = default, - bool? mustOverride = default - ) - { - AutoJoin = autoJoin; - CardFormat = cardFormat; - CardFunctionType = cardFunctionType; - JoinerAcsCredentialIds = joinerAcsCredentialIds; - Override = mustOverride; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CardFormatEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "TLCode")] - TlCode = 1, - - [EnumMember(Value = "rfid48")] - Rfid48 = 2, - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CardFunctionTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "guest")] - Guest = 1, - - [EnumMember(Value = "staff")] - Staff = 2, - } - - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - [DataMember(Name = "card_format", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestVisionlineMetadata.CardFormatEnum? CardFormat { get; set; } - - [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - - [DataMember( - Name = "joiner_acs_credential_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? JoinerAcsCredentialIds { get; set; } - - [DataMember(Name = "override", IsRequired = false, EmitDefaultValue = false)] - public bool? Override { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(AcsCredential acsCredential = default) - { - AcsCredential = acsCredential; - } - - /// - /// OK - /// - [DataMember(Name = "acs_credential", IsRequired = false, EmitDefaultValue = false)] - public AcsCredential AcsCredential { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [credential](https://docs.seam.co/low-level-apis/managing-credentials) for a specified [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. - /// - public AcsCredential Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/acs/credentials/create", requestOptions) - .EnsureData("/acs/credentials/create") - .AcsCredential; - } - - /// - /// Creates a new [credential](https://docs.seam.co/low-level-apis/managing-credentials) for a specified [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. - /// - public AcsCredential Create( - CreateRequest.AccessMethodEnum accessMethod = default, - string? acsSystemId = default, - string? acsUserId = default, - List? allowedAcsEntranceIds = default, - CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, - string? code = default, - string? credentialManagerAcsSystemId = default, - string? endsAt = default, - bool? isMultiPhoneSyncCredential = default, - CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, - string? startsAt = default, - string? userIdentityId = default, - CreateRequestVisionlineMetadata? visionlineMetadata = default - ) - { - return Create( - new CreateRequest( - accessMethod: accessMethod, - acsSystemId: acsSystemId, - acsUserId: acsUserId, - allowedAcsEntranceIds: allowedAcsEntranceIds, - assaAbloyVostioMetadata: assaAbloyVostioMetadata, - code: code, - credentialManagerAcsSystemId: credentialManagerAcsSystemId, - endsAt: endsAt, - isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, - saltoSpaceMetadata: saltoSpaceMetadata, - startsAt: startsAt, - userIdentityId: userIdentityId, - visionlineMetadata: visionlineMetadata - ) - ); - } - - /// - /// Creates a new [credential](https://docs.seam.co/low-level-apis/managing-credentials) for a specified [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync("/acs/credentials/create", requestOptions) - ) - .EnsureData("/acs/credentials/create") - .AcsCredential; - } - - /// - /// Creates a new [credential](https://docs.seam.co/low-level-apis/managing-credentials) for a specified [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. - /// - public async Task CreateAsync( - CreateRequest.AccessMethodEnum accessMethod = default, - string? acsSystemId = default, - string? acsUserId = default, - List? allowedAcsEntranceIds = default, - CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, - string? code = default, - string? credentialManagerAcsSystemId = default, - string? endsAt = default, - bool? isMultiPhoneSyncCredential = default, - CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, - string? startsAt = default, - string? userIdentityId = default, - CreateRequestVisionlineMetadata? visionlineMetadata = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - accessMethod: accessMethod, - acsSystemId: acsSystemId, - acsUserId: acsUserId, - allowedAcsEntranceIds: allowedAcsEntranceIds, - assaAbloyVostioMetadata: assaAbloyVostioMetadata, - code: code, - credentialManagerAcsSystemId: credentialManagerAcsSystemId, - endsAt: endsAt, - isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, - saltoSpaceMetadata: saltoSpaceMetadata, - startsAt: startsAt, - userIdentityId: userIdentityId, - visionlineMetadata: visionlineMetadata - ) - ) - ); - } - - /// - /// Request parameters for Delete a Credential. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string acsCredentialId = default) - { - AcsCredentialId = acsCredentialId; - } - - /// - /// ID of the credential that you want to delete. - /// - [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/acs/credentials/delete", requestOptions); - } - - /// - /// Deletes a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public void Delete(string acsCredentialId = default) - { - Delete(new DeleteRequest(acsCredentialId: acsCredentialId)); - } - - /// - /// Deletes a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/acs/credentials/delete", requestOptions); - } - - /// - /// Deletes a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task DeleteAsync(string acsCredentialId = default) - { - await DeleteAsync(new DeleteRequest(acsCredentialId: acsCredentialId)); - } - - /// - /// Request parameters for Get a Credential. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string acsCredentialId = default) - { - AcsCredentialId = acsCredentialId; - } - - /// - /// ID of the credential that you want to get. - /// - [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AcsCredential acsCredential = default) - { - AcsCredential = acsCredential; - } - - /// - /// OK - /// - [DataMember(Name = "acs_credential", IsRequired = false, EmitDefaultValue = false)] - public AcsCredential AcsCredential { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public AcsCredential Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/credentials/get", requestOptions) - .EnsureData("/acs/credentials/get") - .AcsCredential; - } - - /// - /// Returns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public AcsCredential Get(string acsCredentialId = default) - { - return Get(new GetRequest(acsCredentialId: acsCredentialId)); - } - - /// - /// Returns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/credentials/get", requestOptions)) - .EnsureData("/acs/credentials/get") - .AcsCredential; - } - - /// - /// Returns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task GetAsync(string acsCredentialId = default) - { - return (await GetAsync(new GetRequest(acsCredentialId: acsCredentialId))); - } - - /// - /// Request parameters for List Credentials. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? acsSystemId = default, - string? acsUserId = default, - string? createdBefore = default, - bool? isMultiPhoneSyncCredential = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentityId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - CreatedBefore = createdBefore; - IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; - Limit = limit; - PageCursor = pageCursor; - Search = search; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system for which you want to retrieve all credentials. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user for which you want to retrieve all credentials. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// Date and time, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, before which events to return were created. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// Indicates whether you want to retrieve only multi-phone sync credentials or non-multi-phone sync credentials. - /// - [DataMember( - Name = "is_multi_phone_sync_credential", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsMultiPhoneSyncCredential { get; set; } - - /// - /// Number of credentials to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned credentials to include all records that satisfy a partial match using `display_name`, `code`, `card_number`, `acs_user_id` or `acs_credential_id`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// ID of the user identity for which you want to retrieve all credentials. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List acsCredentials = default) - { - AcsCredentials = acsCredentials; - } - - /// - /// OK - /// - [DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] - public List AcsCredentials { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/credentials/list", requestOptions) - .EnsureData("/acs/credentials/list") - .AcsCredentials; - } - - /// - /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public List List( - string? acsSystemId = default, - string? acsUserId = default, - string? createdBefore = default, - bool? isMultiPhoneSyncCredential = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentityId = default - ) - { - return List( - new ListRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - createdBefore: createdBefore, - isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/credentials/list", requestOptions)) - .EnsureData("/acs/credentials/list") - .AcsCredentials; - } - - /// - /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task> ListAsync( - string? acsSystemId = default, - string? acsUserId = default, - string? createdBefore = default, - bool? isMultiPhoneSyncCredential = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentityId = default - ) - { - return ( - await ListAsync( - new ListRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - createdBefore: createdBefore, - isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for List Accessible Entrances. - /// - [DataContract(Name = "listAccessibleEntrancesRequest_request")] - public class ListAccessibleEntrancesRequest - { - [JsonConstructorAttribute] - protected ListAccessibleEntrancesRequest() { } - - public ListAccessibleEntrancesRequest(string acsCredentialId = default) - { - AcsCredentialId = acsCredentialId; - } - - /// - /// ID of the credential for which you want to retrieve all entrances to which the credential grants access. - /// - [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listAccessibleEntrancesResponse_response")] - public class ListAccessibleEntrancesResponse - { - [JsonConstructorAttribute] - protected ListAccessibleEntrancesResponse() { } - - public ListAccessibleEntrancesResponse(List acsEntrances = default) - { - AcsEntrances = acsEntrances; - } - - /// - /// OK - /// - [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] - public List AcsEntrances { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [entrances](https://docs.seam.co/api/acs/entrances) to which a [credential](https://docs.seam.co/api/acs/credentials) grants access. - /// - public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get( - "/acs/credentials/list_accessible_entrances", - requestOptions - ) - .EnsureData("/acs/credentials/list_accessible_entrances") - .AcsEntrances; - } - - /// - /// Returns a list of all [entrances](https://docs.seam.co/api/acs/entrances) to which a [credential](https://docs.seam.co/api/acs/credentials) grants access. - /// - public List ListAccessibleEntrances(string acsCredentialId = default) - { - return ListAccessibleEntrances( - new ListAccessibleEntrancesRequest(acsCredentialId: acsCredentialId) - ); - } - - /// - /// Returns a list of all [entrances](https://docs.seam.co/api/acs/entrances) to which a [credential](https://docs.seam.co/api/acs/credentials) grants access. - /// - public async Task> ListAccessibleEntrancesAsync( - ListAccessibleEntrancesRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/acs/credentials/list_accessible_entrances", - requestOptions - ) - ) - .EnsureData("/acs/credentials/list_accessible_entrances") - .AcsEntrances; - } - - /// - /// Returns a list of all [entrances](https://docs.seam.co/api/acs/entrances) to which a [credential](https://docs.seam.co/api/acs/credentials) grants access. - /// - public async Task> ListAccessibleEntrancesAsync( - string acsCredentialId = default - ) - { - return ( - await ListAccessibleEntrancesAsync( - new ListAccessibleEntrancesRequest(acsCredentialId: acsCredentialId) - ) - ); - } - - /// - /// Request parameters for Unassign a Credential from an ACS User. - /// - [DataContract(Name = "unassignRequest_request")] - public class UnassignRequest - { - [JsonConstructorAttribute] - protected UnassignRequest() { } - - public UnassignRequest( - string acsCredentialId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsCredentialId = acsCredentialId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the credential that you want to unassign from an access system user. - /// - [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the access system user from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Unassigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public void Unassign(UnassignRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/acs/credentials/unassign", requestOptions); - } - - /// - /// Unassigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public void Unassign( - string acsCredentialId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - Unassign( - new UnassignRequest( - acsCredentialId: acsCredentialId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Unassigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task UnassignAsync(UnassignRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/acs/credentials/unassign", requestOptions); - } - - /// - /// Unassigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task UnassignAsync( - string acsCredentialId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await UnassignAsync( - new UnassignRequest( - acsCredentialId: acsCredentialId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for Update a Credential. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string acsCredentialId = default, - string? code = default, - string? endsAt = default - ) - { - AcsCredentialId = acsCredentialId; - Code = code; - EndsAt = endsAt; - } - - /// - /// ID of the credential that you want to update. - /// - [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// Replacement access (PIN) code for the credential that you want to update. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Replacement date and time at which the validity of the credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after the `starts_at` value that you set when creating the credential. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates the code and ends at date and time for a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/acs/credentials/update", requestOptions); - } - - /// - /// Updates the code and ends at date and time for a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public void Update( - string acsCredentialId = default, - string? code = default, - string? endsAt = default - ) - { - Update(new UpdateRequest(acsCredentialId: acsCredentialId, code: code, endsAt: endsAt)); - } - - /// - /// Updates the code and ends at date and time for a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/acs/credentials/update", requestOptions); - } - - /// - /// Updates the code and ends at date and time for a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task UpdateAsync( - string acsCredentialId = default, - string? code = default, - string? endsAt = default - ) - { - await UpdateAsync( - new UpdateRequest(acsCredentialId: acsCredentialId, code: code, endsAt: endsAt) - ); - } - } +public class CredentialsAcs +{ +private ISeamClient _seam; + +public CredentialsAcs(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Assign a Credential to an ACS User. +/// +[DataContract(Name = "assignRequest_request")] +public class AssignRequest +{ +[JsonConstructorAttribute] +protected AssignRequest() { } + +public AssignRequest(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsCredentialId = acsCredentialId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the credential that you want to assign to an access system user. +/// +[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the access system user to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public void Assign(AssignRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/acs/credentials/assign", requestOptions); +} + +/// +/// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public void Assign(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) +{ +Assign(new AssignRequest(acsCredentialId: acsCredentialId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task AssignAsync(AssignRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/acs/credentials/assign", requestOptions); +} + +/// +/// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task AssignAsync(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await AssignAsync(new AssignRequest(acsCredentialId: acsCredentialId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Create a Credential for an ACS User. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(CreateRequest.AccessMethodEnum accessMethod = default, string? acsSystemId = default, string? acsUserId = default, List? allowedAcsEntranceIds = default, CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? code = default, string? credentialManagerAcsSystemId = default, string? endsAt = default, bool? isMultiPhoneSyncCredential = default, CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, string? startsAt = default, string? userIdentityId = default, CreateRequestVisionlineMetadata? visionlineMetadata = default) +{ +AccessMethod = accessMethod; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +AllowedAcsEntranceIds = allowedAcsEntranceIds; +AssaAbloyVostioMetadata = assaAbloyVostioMetadata; +Code = code; +CredentialManagerAcsSystemId = credentialManagerAcsSystemId; +EndsAt = endsAt; +IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; +SaltoSpaceMetadata = saltoSpaceMetadata; +StartsAt = startsAt; +UserIdentityId = userIdentityId; +VisionlineMetadata = visionlineMetadata; +} + +/// +/// Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AccessMethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "access_method", IsRequired = true, EmitDefaultValue = false)] +public CreateRequest.AccessMethodEnum AccessMethod { get; set; } + +/// +/// ID of the access system to which the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// Set of IDs of the [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for which the new credential grants access. +/// +[DataMember(Name = "allowed_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AllowedAcsEntranceIds { get; set; } + +/// +/// Vostio-specific metadata for the new credential. +/// +[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + +/// +/// Access (PIN) code for the new credential. There may be manufacturer-specific code restrictions. For details, see the applicable [device or system integration guide](https://www.seam.co/docs/device-and-system-integration-guides). +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// ACS system ID of the credential manager for the new credential. +/// +[DataMember(Name = "credential_manager_acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? CredentialManagerAcsSystemId { get; set; } + +/// +/// Date and time at which the validity of the new credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Indicates whether the new credential is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). +/// +[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] +public bool? IsMultiPhoneSyncCredential { get; set; } + +/// +/// Salto Space-specific metadata for the new credential. +/// +[DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } + +/// +/// Date and time at which the validity of the new credential starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// ID of the user identity to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. If the access system contains a user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the access system user. If the access system does not have a corresponding user, one is created. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Visionline-specific metadata for the new credential. +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestVisionlineMetadata? VisionlineMetadata { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestAssaAbloyVostioMetadata_model")] +public class CreateRequestAssaAbloyVostioMetadata +{ +[JsonConstructorAttribute] +protected CreateRequestAssaAbloyVostioMetadata() { } + +public CreateRequestAssaAbloyVostioMetadata(bool? autoJoin = default, bool? joinAllGuestAcsEntrances = default, bool? overrideAllGuestAcsEntrances = default, List? overrideGuestAcsEntranceIds = default) +{ +AutoJoin = autoJoin; +JoinAllGuestAcsEntrances = joinAllGuestAcsEntrances; +OverrideAllGuestAcsEntrances = overrideAllGuestAcsEntrances; +OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; +} + +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +[DataMember(Name = "join_all_guest_acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public bool? JoinAllGuestAcsEntrances { get; set; } + +[DataMember(Name = "override_all_guest_acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public bool? OverrideAllGuestAcsEntrances { get; set; } + +[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? OverrideGuestAcsEntranceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestSaltoSpaceMetadata_model")] +public class CreateRequestSaltoSpaceMetadata +{ +[JsonConstructorAttribute] +protected CreateRequestSaltoSpaceMetadata() { } + +public CreateRequestSaltoSpaceMetadata(bool? assignNewKey = default) +{ +AssignNewKey = assignNewKey; +} + +/// +/// Indicates whether to assign a first, new card to a user. See also [Programming Salto Space Card-based Credentials](https://www.seam.co/docs/device-and-system-integration-guides/salto-proaccess-space-access-system/programming-salto-space-card-based-credentials). +/// +[DataMember(Name = "assign_new_key", IsRequired = false, EmitDefaultValue = false)] +public bool? AssignNewKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestVisionlineMetadata_model")] +public class CreateRequestVisionlineMetadata +{ +[JsonConstructorAttribute] +protected CreateRequestVisionlineMetadata() { } + +public CreateRequestVisionlineMetadata(bool? autoJoin = default, CreateRequestVisionlineMetadata.CardFormatEnum? cardFormat = default, CreateRequestVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, List? joinerAcsCredentialIds = default, bool? mustOverride = default) +{ +AutoJoin = autoJoin; +CardFormat = cardFormat; +CardFunctionType = cardFunctionType; +JoinerAcsCredentialIds = joinerAcsCredentialIds; +Override = mustOverride; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CardFormatEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "TLCode")] +TlCode = 1, + +[EnumMember(Value = "rfid48")] +Rfid48 = 2, +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CardFunctionTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "guest")] +Guest = 1, + +[EnumMember(Value = "staff")] +Staff = 2, +} + +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +[DataMember(Name = "card_format", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestVisionlineMetadata.CardFormatEnum? CardFormat { get; set; } + +[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + +[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] +public List? JoinerAcsCredentialIds { get; set; } + +[DataMember(Name = "override", IsRequired = false, EmitDefaultValue = false)] +public bool? Override { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(AcsCredential acsCredential = default) +{ +AcsCredential = acsCredential; +} + +/// +/// OK +/// +[DataMember(Name = "acs_credential", IsRequired = false, EmitDefaultValue = false)] +public AcsCredential AcsCredential { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. +/// +public AcsCredential Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/acs/credentials/create", requestOptions).EnsureData("/acs/credentials/create").AcsCredential; +} + +/// +/// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. +/// +public AcsCredential Create(CreateRequest.AccessMethodEnum accessMethod = default, string? acsSystemId = default, string? acsUserId = default, List? allowedAcsEntranceIds = default, CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? code = default, string? credentialManagerAcsSystemId = default, string? endsAt = default, bool? isMultiPhoneSyncCredential = default, CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, string? startsAt = default, string? userIdentityId = default, CreateRequestVisionlineMetadata? visionlineMetadata = default) +{ +return Create(new CreateRequest(accessMethod: accessMethod, acsSystemId: acsSystemId, acsUserId: acsUserId, allowedAcsEntranceIds: allowedAcsEntranceIds, assaAbloyVostioMetadata: assaAbloyVostioMetadata, code: code, credentialManagerAcsSystemId: credentialManagerAcsSystemId, endsAt: endsAt, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, saltoSpaceMetadata: saltoSpaceMetadata, startsAt: startsAt, userIdentityId: userIdentityId, visionlineMetadata: visionlineMetadata)); +} + +/// +/// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/acs/credentials/create", requestOptions)).EnsureData("/acs/credentials/create").AcsCredential; +} + +/// +/// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. +/// +public async Task CreateAsync(CreateRequest.AccessMethodEnum accessMethod = default, string? acsSystemId = default, string? acsUserId = default, List? allowedAcsEntranceIds = default, CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? code = default, string? credentialManagerAcsSystemId = default, string? endsAt = default, bool? isMultiPhoneSyncCredential = default, CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, string? startsAt = default, string? userIdentityId = default, CreateRequestVisionlineMetadata? visionlineMetadata = default) +{ +return (await CreateAsync(new CreateRequest(accessMethod: accessMethod, acsSystemId: acsSystemId, acsUserId: acsUserId, allowedAcsEntranceIds: allowedAcsEntranceIds, assaAbloyVostioMetadata: assaAbloyVostioMetadata, code: code, credentialManagerAcsSystemId: credentialManagerAcsSystemId, endsAt: endsAt, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, saltoSpaceMetadata: saltoSpaceMetadata, startsAt: startsAt, userIdentityId: userIdentityId, visionlineMetadata: visionlineMetadata))); +} + +/// +/// Request parameters for Delete a Credential. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string acsCredentialId = default) +{ +AcsCredentialId = acsCredentialId; +} + +/// +/// ID of the credential that you want to delete. +/// +[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/acs/credentials/delete", requestOptions); +} + +/// +/// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public void Delete(string acsCredentialId = default) +{ +Delete(new DeleteRequest(acsCredentialId: acsCredentialId)); +} + +/// +/// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/acs/credentials/delete", requestOptions); +} + +/// +/// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task DeleteAsync(string acsCredentialId = default) +{ +await DeleteAsync(new DeleteRequest(acsCredentialId: acsCredentialId)); +} + +/// +/// Request parameters for Get a Credential. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string acsCredentialId = default) +{ +AcsCredentialId = acsCredentialId; +} + +/// +/// ID of the credential that you want to get. +/// +[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AcsCredential acsCredential = default) +{ +AcsCredential = acsCredential; +} + +/// +/// OK +/// +[DataMember(Name = "acs_credential", IsRequired = false, EmitDefaultValue = false)] +public AcsCredential AcsCredential { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public AcsCredential Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/credentials/get", requestOptions).EnsureData("/acs/credentials/get").AcsCredential; +} + +/// +/// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public AcsCredential Get(string acsCredentialId = default) +{ +return Get(new GetRequest(acsCredentialId: acsCredentialId)); +} + +/// +/// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/credentials/get", requestOptions)).EnsureData("/acs/credentials/get").AcsCredential; +} + +/// +/// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task GetAsync(string acsCredentialId = default) +{ +return (await GetAsync(new GetRequest(acsCredentialId: acsCredentialId))); +} + +/// +/// Request parameters for List Credentials. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? acsSystemId = default, string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentityId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +CreatedBefore = createdBefore; +IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; +Limit = limit; +PageCursor = pageCursor; +Search = search; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system for which you want to retrieve all credentials. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user for which you want to retrieve all credentials. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// Date and time, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, before which events to return were created. +/// +[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedBefore { get; set; } + +/// +/// Indicates whether you want to retrieve only multi-phone sync credentials or non-multi-phone sync credentials. +/// +[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] +public bool? IsMultiPhoneSyncCredential { get; set; } + +/// +/// Number of credentials to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned credentials to include all records that satisfy a partial match using `display_name`, `code`, `card_number`, `acs_user_id` or `acs_credential_id`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// ID of the user identity for which you want to retrieve all credentials. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List acsCredentials = default) +{ +AcsCredentials = acsCredentials; +} + +/// +/// OK +/// +[DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] +public List AcsCredentials { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/credentials/list", requestOptions).EnsureData("/acs/credentials/list").AcsCredentials; +} + +/// +/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public List List(string? acsSystemId = default, string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentityId = default) +{ +return List(new ListRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, createdBefore: createdBefore, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, limit: limit, pageCursor: pageCursor, search: search, userIdentityId: userIdentityId)); +} + +/// +/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/credentials/list", requestOptions)).EnsureData("/acs/credentials/list").AcsCredentials; +} + +/// +/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task> ListAsync(string? acsSystemId = default, string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentityId = default) +{ +return (await ListAsync(new ListRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, createdBefore: createdBefore, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, limit: limit, pageCursor: pageCursor, search: search, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for List Accessible Entrances. +/// +[DataContract(Name = "listAccessibleEntrancesRequest_request")] +public class ListAccessibleEntrancesRequest +{ +[JsonConstructorAttribute] +protected ListAccessibleEntrancesRequest() { } + +public ListAccessibleEntrancesRequest(string acsCredentialId = default) +{ +AcsCredentialId = acsCredentialId; +} + +/// +/// ID of the credential for which you want to retrieve all entrances to which the credential grants access. +/// +[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listAccessibleEntrancesResponse_response")] +public class ListAccessibleEntrancesResponse +{ +[JsonConstructorAttribute] +protected ListAccessibleEntrancesResponse() { } + +public ListAccessibleEntrancesResponse(List acsEntrances = default) +{ +AcsEntrances = acsEntrances; +} + +/// +/// OK +/// +[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public List AcsEntrances { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. +/// +public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/credentials/list_accessible_entrances", requestOptions).EnsureData("/acs/credentials/list_accessible_entrances").AcsEntrances; +} + +/// +/// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. +/// +public List ListAccessibleEntrances(string acsCredentialId = default) +{ +return ListAccessibleEntrances(new ListAccessibleEntrancesRequest(acsCredentialId: acsCredentialId)); +} + +/// +/// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. +/// +public async Task> ListAccessibleEntrancesAsync(ListAccessibleEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/credentials/list_accessible_entrances", requestOptions)).EnsureData("/acs/credentials/list_accessible_entrances").AcsEntrances; +} + +/// +/// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. +/// +public async Task> ListAccessibleEntrancesAsync(string acsCredentialId = default) +{ +return (await ListAccessibleEntrancesAsync(new ListAccessibleEntrancesRequest(acsCredentialId: acsCredentialId))); +} + +/// +/// Request parameters for Unassign a Credential from an ACS User. +/// +[DataContract(Name = "unassignRequest_request")] +public class UnassignRequest +{ +[JsonConstructorAttribute] +protected UnassignRequest() { } + +public UnassignRequest(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsCredentialId = acsCredentialId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the credential that you want to unassign from an access system user. +/// +[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the access system user from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public void Unassign(UnassignRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/acs/credentials/unassign", requestOptions); +} + +/// +/// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public void Unassign(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) +{ +Unassign(new UnassignRequest(acsCredentialId: acsCredentialId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task UnassignAsync(UnassignRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/acs/credentials/unassign", requestOptions); +} + +/// +/// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task UnassignAsync(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await UnassignAsync(new UnassignRequest(acsCredentialId: acsCredentialId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Update a Credential. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string acsCredentialId = default, string? code = default, string? endsAt = default) +{ +AcsCredentialId = acsCredentialId; +Code = code; +EndsAt = endsAt; +} + +/// +/// ID of the credential that you want to update. +/// +[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// Replacement access (PIN) code for the credential that you want to update. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Replacement date and time at which the validity of the credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after the `starts_at` value that you set when creating the credential. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/acs/credentials/update", requestOptions); +} + +/// +/// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public void Update(string acsCredentialId = default, string? code = default, string? endsAt = default) +{ +Update(new UpdateRequest(acsCredentialId: acsCredentialId, code: code, endsAt: endsAt)); +} + +/// +/// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/acs/credentials/update", requestOptions); +} + +/// +/// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task UpdateAsync(string acsCredentialId = default, string? code = default, string? endsAt = default) +{ +await UpdateAsync(new UpdateRequest(acsCredentialId: acsCredentialId, code: code, endsAt: endsAt)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.CredentialsAcs CredentialsAcs => new(this); - } +public partial class SeamClient +{ +public Api.CredentialsAcs CredentialsAcs => new(this); +} - public partial interface ISeamClient - { - public Api.CredentialsAcs CredentialsAcs { get; } - } +public partial interface ISeamClient +{ +public Api.CredentialsAcs CredentialsAcs { get; } +} } diff --git a/src/Seam/Api/Customers.cs b/src/Seam/Api/Customers.cs index cd8c0ba5..c0137b10 100644 --- a/src/Seam/Api/Customers.cs +++ b/src/Seam/Api/Customers.cs @@ -9,5212 +9,4492 @@ namespace Seam.Api { - public class Customers - { - private ISeamClient _seam; - - public Customers(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create Customer Portal. - /// - [DataContract(Name = "createPortalRequest_request")] - public class CreatePortalRequest - { - [JsonConstructorAttribute] - protected CreatePortalRequest() { } - - public CreatePortalRequest( - CreatePortalRequestCustomerData? customerData = default, - List? customerResourcesFilters = - default, - string? customizationProfileId = default, - CreatePortalRequestDeepLink? deepLink = default, - bool? excludeLocalePicker = default, - CreatePortalRequestFeatures? features = default, - bool? isEmbedded = default, - CreatePortalRequestLandingPage? landingPage = default, - CreatePortalRequest.LocaleEnum? locale = default, - CreatePortalRequest.NavigationModeEnum? navigationMode = default, - bool? readOnly = default - ) - { - CustomerData = customerData; - CustomerResourcesFilters = customerResourcesFilters; - CustomizationProfileId = customizationProfileId; - DeepLink = deepLink; - ExcludeLocalePicker = excludeLocalePicker; - Features = features; - IsEmbedded = isEmbedded; - LandingPage = landingPage; - Locale = locale; - NavigationMode = navigationMode; - ReadOnly = readOnly; - } - - /// - /// The locale to use for the portal. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum LocaleEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "en-US")] - EnUs = 1, - - [EnumMember(Value = "pt-PT")] - PtPt = 2, - - [EnumMember(Value = "fr-FR")] - FrFr = 3, - - [EnumMember(Value = "it-IT")] - ItIt = 4, - - [EnumMember(Value = "es-ES")] - EsEs = 5, - - [EnumMember(Value = "de-DE")] - DeDe = 6, - - [EnumMember(Value = "nl-NL")] - NlNl = 7, - - [EnumMember(Value = "el-GR")] - ElGr = 8, - - [EnumMember(Value = "pl-PL")] - PlPl = 9, - - [EnumMember(Value = "ru-RU")] - RuRu = 10, - } - - /// - /// Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum NavigationModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "full")] - Full = 1, - - [EnumMember(Value = "restricted")] - Restricted = 2, - } - - [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestCustomerData? CustomerData { get; set; } - - /// - /// Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata. - /// - [DataMember( - Name = "customer_resources_filters", - IsRequired = false, - EmitDefaultValue = false - )] - public List? CustomerResourcesFilters { get; set; } - - /// - /// The ID of the customization profile to use for the portal. - /// - [DataMember( - Name = "customization_profile_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomizationProfileId { get; set; } - - /// - /// Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. - /// - [DataMember(Name = "deep_link", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestDeepLink? DeepLink { get; set; } - - /// - /// Whether to exclude the option to select a locale within the portal UI. - /// - [DataMember( - Name = "exclude_locale_picker", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? ExcludeLocalePicker { get; set; } - - [DataMember(Name = "features", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestFeatures? Features { get; set; } - - /// - /// Whether the portal is embedded in another application. - /// - [DataMember(Name = "is_embedded", IsRequired = false, EmitDefaultValue = false)] - public bool? IsEmbedded { get; set; } - - /// - /// Configuration for the landing page when the portal loads. - /// - [DataMember(Name = "landing_page", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestLandingPage? LandingPage { get; set; } - - /// - /// The locale to use for the portal. - /// - [DataMember(Name = "locale", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequest.LocaleEnum? Locale { get; set; } - - /// - /// Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. - /// - [DataMember(Name = "navigation_mode", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequest.NavigationModeEnum? NavigationMode { get; set; } - - /// - /// Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. - /// - [DataMember(Name = "read_only", IsRequired = false, EmitDefaultValue = false)] - public bool? ReadOnly { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerData_model")] - public class CreatePortalRequestCustomerData - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerData() { } - - public CreatePortalRequestCustomerData( - List? accessGrants = default, - List? bookings = default, - List? buildings = default, - List? commonAreas = default, - string? customerKey = default, - List? facilities = default, - List? guests = default, - List? listings = default, - List? properties = default, - List? propertyListings = default, - List? reservations = default, - List? residents = default, - List? rooms = default, - List? sites = default, - List? spaces = default, - List? staffMembers = default, - List? tenants = default, - List? units = default, - List? userIdentities = default, - List? users = default - ) - { - AccessGrants = accessGrants; - Bookings = bookings; - Buildings = buildings; - CommonAreas = commonAreas; - CustomerKey = customerKey; - Facilities = facilities; - Guests = guests; - Listings = listings; - Properties = properties; - PropertyListings = propertyListings; - Reservations = reservations; - Residents = residents; - Rooms = rooms; - Sites = sites; - Spaces = spaces; - StaffMembers = staffMembers; - Tenants = tenants; - Units = units; - UserIdentities = userIdentities; - Users = users; - } - - /// - /// List of access grants. - /// - [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrants { get; set; } - - /// - /// List of bookings. - /// - [DataMember(Name = "bookings", IsRequired = false, EmitDefaultValue = false)] - public List? Bookings { get; set; } - - /// - /// List of buildings. - /// - [DataMember(Name = "buildings", IsRequired = false, EmitDefaultValue = false)] - public List? Buildings { get; set; } - - /// - /// List of shared common areas. - /// - [DataMember(Name = "common_areas", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreas { get; set; } - - /// - /// Your unique identifier for the customer. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// List of gym or fitness facilities. - /// - [DataMember(Name = "facilities", IsRequired = false, EmitDefaultValue = false)] - public List? Facilities { get; set; } - - /// - /// List of guests. - /// - [DataMember(Name = "guests", IsRequired = false, EmitDefaultValue = false)] - public List? Guests { get; set; } - - /// - /// List of property listings. - /// - [DataMember(Name = "listings", IsRequired = false, EmitDefaultValue = false)] - public List? Listings { get; set; } - - /// - /// List of short-term rental properties. - /// - [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] - public List? Properties { get; set; } - - /// - /// List of property listings. - /// - [DataMember(Name = "property_listings", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyListings { get; set; } - - /// - /// List of reservations. - /// - [DataMember(Name = "reservations", IsRequired = false, EmitDefaultValue = false)] - public List? Reservations { get; set; } - - /// - /// List of residents. - /// - [DataMember(Name = "residents", IsRequired = false, EmitDefaultValue = false)] - public List? Residents { get; set; } - - /// - /// List of hotel or hospitality rooms. - /// - [DataMember(Name = "rooms", IsRequired = false, EmitDefaultValue = false)] - public List? Rooms { get; set; } - - /// - /// List of general sites or areas. - /// - [DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] - public List? Sites { get; set; } - - /// - /// List of general spaces or areas. - /// - [DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] - public List? Spaces { get; set; } - - /// - /// List of staff members. - /// - [DataMember(Name = "staff_members", IsRequired = false, EmitDefaultValue = false)] - public List? StaffMembers { get; set; } - - /// - /// List of tenants. - /// - [DataMember(Name = "tenants", IsRequired = false, EmitDefaultValue = false)] - public List? Tenants { get; set; } - - /// - /// List of multi-family residential units. - /// - [DataMember(Name = "units", IsRequired = false, EmitDefaultValue = false)] - public List? Units { get; set; } - - /// - /// List of user identities. - /// - [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] - public List? UserIdentities { get; set; } - - /// - /// List of users. - /// - [DataMember(Name = "users", IsRequired = false, EmitDefaultValue = false)] - public List? Users { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataAccessGrants_model")] - public class CreatePortalRequestCustomerDataAccessGrants - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataAccessGrants() { } - - public CreatePortalRequestCustomerDataAccessGrants( - string? accessGrantKey = default, - List? buildingKeys = default, - List? commonAreaKeys = default, - string? endsAt = default, - List? facilityKeys = default, - string? guestKey = default, - List? listingKeys = default, - string? name = default, - string? preferredCode = default, - List? propertyKeys = default, - string? residentKey = default, - List? roomKeys = default, - List? spaceKeys = default, - string? startsAt = default, - string? tenantKey = default, - List? unitKeys = default, - string? userIdentityKey = default, - string? userKey = default - ) - { - AccessGrantKey = accessGrantKey; - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - EndsAt = endsAt; - FacilityKeys = facilityKeys; - GuestKey = guestKey; - ListingKeys = listingKeys; - Name = name; - PreferredCode = preferredCode; - PropertyKeys = propertyKeys; - ResidentKey = residentKey; - RoomKeys = roomKeys; - SpaceKeys = spaceKeys; - StartsAt = startsAt; - TenantKey = tenantKey; - UnitKeys = unitKeys; - UserIdentityKey = userIdentityKey; - UserKey = userKey; - } - - /// - /// Your unique identifier for the access grant. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// Building keys associated with the access grant. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// Common area keys associated with the access grant. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// Ending date and time for the access grant. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Facility keys associated with the access grant. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// Guest key associated with the access grant. - /// - [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] - public string? GuestKey { get; set; } - - /// - /// Listing keys associated with the access grant. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// Your name for this access grant resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Preferred PIN code to use when creating access for this reservation. - /// - [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] - public string? PreferredCode { get; set; } - - /// - /// Property keys associated with the access grant. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// Resident key associated with the access grant. - /// - [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResidentKey { get; set; } - - /// - /// Room keys associated with the access grant. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// Space keys associated with the access grant. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Starting date and time for the access grant. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Tenant key associated with the access grant. - /// - [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] - public string? TenantKey { get; set; } - - /// - /// Unit keys associated with the access grant. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - /// - /// User identity key associated with the access grant. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - /// - /// User key associated with the access grant. - /// - [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataBookings_model")] - public class CreatePortalRequestCustomerDataBookings - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataBookings() { } - - public CreatePortalRequestCustomerDataBookings( - string? bookingKey = default, - List? buildingKeys = default, - List? commonAreaKeys = default, - string? endsAt = default, - List? facilityKeys = default, - string? guestKey = default, - List? listingKeys = default, - string? name = default, - string? preferredCode = default, - List? propertyKeys = default, - string? residentKey = default, - List? roomKeys = default, - List? spaceKeys = default, - string? startsAt = default, - string? tenantKey = default, - List? unitKeys = default, - string? userIdentityKey = default, - string? userKey = default - ) - { - BookingKey = bookingKey; - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - EndsAt = endsAt; - FacilityKeys = facilityKeys; - GuestKey = guestKey; - ListingKeys = listingKeys; - Name = name; - PreferredCode = preferredCode; - PropertyKeys = propertyKeys; - ResidentKey = residentKey; - RoomKeys = roomKeys; - SpaceKeys = spaceKeys; - StartsAt = startsAt; - TenantKey = tenantKey; - UnitKeys = unitKeys; - UserIdentityKey = userIdentityKey; - UserKey = userKey; - } - - /// - /// Your unique identifier for the booking. - /// - [DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] - public string? BookingKey { get; set; } - - /// - /// Building keys associated with the access grant. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// Common area keys associated with the access grant. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// Ending date and time for the access grant. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Facility keys associated with the access grant. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// Guest key associated with the access grant. - /// - [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] - public string? GuestKey { get; set; } - - /// - /// Listing keys associated with the access grant. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// Your name for this access grant resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Preferred PIN code to use when creating access for this reservation. - /// - [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] - public string? PreferredCode { get; set; } - - /// - /// Property keys associated with the access grant. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// Resident key associated with the access grant. - /// - [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResidentKey { get; set; } - - /// - /// Room keys associated with the access grant. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// Space keys associated with the access grant. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Starting date and time for the access grant. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Tenant key associated with the access grant. - /// - [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] - public string? TenantKey { get; set; } - - /// - /// Unit keys associated with the access grant. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - /// - /// User identity key associated with the access grant. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - /// - /// User key associated with the access grant. - /// - [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataBuildings_model")] - public class CreatePortalRequestCustomerDataBuildings - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataBuildings() { } - - public CreatePortalRequestCustomerDataBuildings( - string? buildingKey = default, - string? name = default - ) - { - BuildingKey = buildingKey; - Name = name; - } - - /// - /// Your unique identifier for the building. - /// - [DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] - public string? BuildingKey { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataCommonAreas_model")] - public class CreatePortalRequestCustomerDataCommonAreas - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataCommonAreas() { } - - public CreatePortalRequestCustomerDataCommonAreas( - string? commonAreaKey = default, - string? name = default, - string? parentSiteKey = default - ) - { - CommonAreaKey = commonAreaKey; - Name = name; - ParentSiteKey = parentSiteKey; - } - - /// - /// Your unique identifier for the common area. - /// - [DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] - public string? CommonAreaKey { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] - public string? ParentSiteKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataFacilities_model")] - public class CreatePortalRequestCustomerDataFacilities - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataFacilities() { } - - public CreatePortalRequestCustomerDataFacilities( - string? facilityKey = default, - string? name = default - ) - { - FacilityKey = facilityKey; - Name = name; - } - - /// - /// Your unique identifier for the facility. - /// - [DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] - public string? FacilityKey { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataGuests_model")] - public class CreatePortalRequestCustomerDataGuests - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataGuests() { } - - public CreatePortalRequestCustomerDataGuests( - string? emailAddress = default, - string? guestKey = default, - string? name = default, - string? phoneNumber = default - ) - { - EmailAddress = emailAddress; - GuestKey = guestKey; - Name = name; - PhoneNumber = phoneNumber; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your unique identifier for the guest. - /// - [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] - public string? GuestKey { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataListings_model")] - public class CreatePortalRequestCustomerDataListings - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataListings() { } - - public CreatePortalRequestCustomerDataListings( - string? listingKey = default, - string? name = default - ) - { - ListingKey = listingKey; - Name = name; - } - - /// - /// Your unique identifier for the listing. - /// - [DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] - public string? ListingKey { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataProperties_model")] - public class CreatePortalRequestCustomerDataProperties - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataProperties() { } - - public CreatePortalRequestCustomerDataProperties( - string? name = default, - string? propertyKey = default - ) - { - Name = name; - PropertyKey = propertyKey; - } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the property. - /// - [DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] - public string? PropertyKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataPropertyListings_model")] - public class CreatePortalRequestCustomerDataPropertyListings - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataPropertyListings() { } - - public CreatePortalRequestCustomerDataPropertyListings( - object? customMetadata = default, - string? name = default, - string? propertyListingKey = default - ) - { - CustomMetadata = customMetadata; - Name = name; - PropertyListingKey = propertyListingKey; - } - - /// - /// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadata { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the property listing. - /// - [DataMember( - Name = "property_listing_key", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PropertyListingKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataReservations_model")] - public class CreatePortalRequestCustomerDataReservations - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataReservations() { } - - public CreatePortalRequestCustomerDataReservations( - List? buildingKeys = default, - List? commonAreaKeys = default, - object? customMetadata = default, - string? endsAt = default, - List? facilityKeys = default, - string? guestKey = default, - List? listingKeys = default, - string? name = default, - string? preferredCode = default, - List? propertyKeys = default, - string? reservationKey = default, - string? residentKey = default, - List? roomKeys = default, - List? spaceKeys = default, - string? startsAt = default, - string? tenantKey = default, - List? unitKeys = default, - string? userIdentityKey = default, - string? userKey = default - ) - { - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - CustomMetadata = customMetadata; - EndsAt = endsAt; - FacilityKeys = facilityKeys; - GuestKey = guestKey; - ListingKeys = listingKeys; - Name = name; - PreferredCode = preferredCode; - PropertyKeys = propertyKeys; - ReservationKey = reservationKey; - ResidentKey = residentKey; - RoomKeys = roomKeys; - SpaceKeys = spaceKeys; - StartsAt = startsAt; - TenantKey = tenantKey; - UnitKeys = unitKeys; - UserIdentityKey = userIdentityKey; - UserKey = userKey; - } - - /// - /// Building keys associated with the access grant. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// Common area keys associated with the access grant. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadata { get; set; } - - /// - /// Ending date and time for the access grant. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Facility keys associated with the access grant. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// Guest key associated with the access grant. - /// - [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] - public string? GuestKey { get; set; } - - /// - /// Listing keys associated with the access grant. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// Your name for this access grant resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Preferred PIN code to use when creating access for this reservation. - /// - [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] - public string? PreferredCode { get; set; } - - /// - /// Property keys associated with the access grant. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// Your unique identifier for the reservation. - /// - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - /// - /// Resident key associated with the access grant. - /// - [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResidentKey { get; set; } - - /// - /// Room keys associated with the access grant. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// Space keys associated with the access grant. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Starting date and time for the access grant. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Tenant key associated with the access grant. - /// - [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] - public string? TenantKey { get; set; } - - /// - /// Unit keys associated with the access grant. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - /// - /// User identity key associated with the access grant. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - /// - /// User key associated with the access grant. - /// - [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataResidents_model")] - public class CreatePortalRequestCustomerDataResidents - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataResidents() { } - - public CreatePortalRequestCustomerDataResidents( - string? emailAddress = default, - string? name = default, - string? phoneNumber = default, - string? residentKey = default - ) - { - EmailAddress = emailAddress; - Name = name; - PhoneNumber = phoneNumber; - ResidentKey = residentKey; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Your unique identifier for the resident. - /// - [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResidentKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataRooms_model")] - public class CreatePortalRequestCustomerDataRooms - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataRooms() { } - - public CreatePortalRequestCustomerDataRooms( - string? name = default, - string? parentSiteKey = default, - string? roomKey = default - ) - { - Name = name; - ParentSiteKey = parentSiteKey; - RoomKey = roomKey; - } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] - public string? ParentSiteKey { get; set; } - - /// - /// Your unique identifier for the room. - /// - [DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] - public string? RoomKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataSites_model")] - public class CreatePortalRequestCustomerDataSites - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataSites() { } - - public CreatePortalRequestCustomerDataSites( - string? name = default, - string? siteKey = default - ) - { - Name = name; - SiteKey = siteKey; - } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] - public string? SiteKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataSpaces_model")] - public class CreatePortalRequestCustomerDataSpaces - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataSpaces() { } - - public CreatePortalRequestCustomerDataSpaces( - CreatePortalRequestCustomerDataSpacesCustomerData? customerData = default, - int? durationMinutes = default, - CreatePortalRequestCustomerDataSpacesGeolocation? geolocation = default, - string? name = default, - string? parentSiteKey = default, - string? spaceKey = default - ) - { - CustomerData = customerData; - DurationMinutes = durationMinutes; - Geolocation = geolocation; - Name = name; - ParentSiteKey = parentSiteKey; - SpaceKey = spaceKey; - } - - /// - /// Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). - /// - [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestCustomerDataSpacesCustomerData? CustomerData { get; set; } - - /// - /// Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. - /// - [DataMember(Name = "duration_minutes", IsRequired = false, EmitDefaultValue = false)] - public int? DurationMinutes { get; set; } - - /// - /// Geographic coordinates (latitude and longitude) of the space. - /// - [DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestCustomerDataSpacesGeolocation? Geolocation { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] - public string? ParentSiteKey { get; set; } - - /// - /// Your unique identifier for the space. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataSpacesCustomerData_model")] - public class CreatePortalRequestCustomerDataSpacesCustomerData - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataSpacesCustomerData() { } - - public CreatePortalRequestCustomerDataSpacesCustomerData( - string? address = default, - string? defaultCheckinTime = default, - string? defaultCheckoutTime = default, - string? timeZone = default - ) - { - Address = address; - DefaultCheckinTime = defaultCheckinTime; - DefaultCheckoutTime = defaultCheckoutTime; - TimeZone = timeZone; - } - - /// - /// Postal address for the space. - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public string? Address { get; set; } - - /// - /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember( - Name = "default_checkin_time", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCheckinTime { get; set; } - - /// - /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember( - Name = "default_checkout_time", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCheckoutTime { get; set; } - - /// - /// IANA time zone for the space, e.g. America/Los_Angeles. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataSpacesGeolocation_model")] - public class CreatePortalRequestCustomerDataSpacesGeolocation - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataSpacesGeolocation() { } - - public CreatePortalRequestCustomerDataSpacesGeolocation( - float? latitude = default, - float? longitude = default - ) - { - Latitude = latitude; - Longitude = longitude; - } - - /// - /// Latitude of the space, in decimal degrees. - /// - [DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] - public float? Latitude { get; set; } - - /// - /// Longitude of the space, in decimal degrees. - /// - [DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] - public float? Longitude { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataStaffMembers_model")] - public class CreatePortalRequestCustomerDataStaffMembers - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataStaffMembers() { } - - public CreatePortalRequestCustomerDataStaffMembers( - List? buildingKeys = default, - List? commonAreaKeys = default, - string? emailAddress = default, - List? facilityKeys = default, - List? listingKeys = default, - string? name = default, - string? phoneNumber = default, - List? propertyKeys = default, - List? propertyListingKeys = default, - List? roomKeys = default, - List? siteKeys = default, - List? spaceKeys = default, - string? staffMemberKey = default, - List? unitKeys = default - ) - { - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - EmailAddress = emailAddress; - FacilityKeys = facilityKeys; - ListingKeys = listingKeys; - Name = name; - PhoneNumber = phoneNumber; - PropertyKeys = propertyKeys; - PropertyListingKeys = propertyListingKeys; - RoomKeys = roomKeys; - SiteKeys = siteKeys; - SpaceKeys = spaceKeys; - StaffMemberKey = staffMemberKey; - UnitKeys = unitKeys; - } - - /// - /// List of unique identifiers for the buildings the staff member is associated with. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// List of unique identifiers for the common areas the staff member is associated with. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// List of unique identifiers for the facilities the staff member is associated with. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// List of unique identifiers for the listings the staff member is associated with. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// List of unique identifiers for the properties the staff member is associated with. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// List of unique identifiers for the property listings the staff member is associated with. - /// - [DataMember( - Name = "property_listing_keys", - IsRequired = false, - EmitDefaultValue = false - )] - public List? PropertyListingKeys { get; set; } - - /// - /// List of unique identifiers for the rooms the staff member is associated with. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// List of unique identifiers for the sites the staff member is associated with. - /// - [DataMember(Name = "site_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SiteKeys { get; set; } - - /// - /// List of unique identifiers for the spaces the staff member is associated with. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Your unique identifier for the staff. - /// - [DataMember(Name = "staff_member_key", IsRequired = false, EmitDefaultValue = false)] - public string? StaffMemberKey { get; set; } - - /// - /// List of unique identifiers for the units the staff member is associated with. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataTenants_model")] - public class CreatePortalRequestCustomerDataTenants - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataTenants() { } - - public CreatePortalRequestCustomerDataTenants( - string? emailAddress = default, - string? name = default, - string? phoneNumber = default, - string? tenantKey = default - ) - { - EmailAddress = emailAddress; - Name = name; - PhoneNumber = phoneNumber; - TenantKey = tenantKey; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Your unique identifier for the tenant. - /// - [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] - public string? TenantKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataUnits_model")] - public class CreatePortalRequestCustomerDataUnits - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataUnits() { } - - public CreatePortalRequestCustomerDataUnits( - string? name = default, - string? parentSiteKey = default, - string? unitKey = default - ) - { - Name = name; - ParentSiteKey = parentSiteKey; - UnitKey = unitKey; - } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] - public string? ParentSiteKey { get; set; } - - /// - /// Your unique identifier for the unit. - /// - [DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] - public string? UnitKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataUserIdentities_model")] - public class CreatePortalRequestCustomerDataUserIdentities - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataUserIdentities() { } - - public CreatePortalRequestCustomerDataUserIdentities( - string? emailAddress = default, - string? name = default, - string? phoneNumber = default, - string? userIdentityKey = default - ) - { - EmailAddress = emailAddress; - Name = name; - PhoneNumber = phoneNumber; - UserIdentityKey = userIdentityKey; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Your unique identifier for the user identity. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerDataUsers_model")] - public class CreatePortalRequestCustomerDataUsers - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerDataUsers() { } - - public CreatePortalRequestCustomerDataUsers( - string? emailAddress = default, - string? name = default, - string? phoneNumber = default, - string? userKey = default - ) - { - EmailAddress = emailAddress; - Name = name; - PhoneNumber = phoneNumber; - UserKey = userKey; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Your unique identifier for the user. - /// - [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestCustomerResourcesFilters_model")] - public class CreatePortalRequestCustomerResourcesFilters - { - [JsonConstructorAttribute] - protected CreatePortalRequestCustomerResourcesFilters() { } - - public CreatePortalRequestCustomerResourcesFilters( - string? field = default, - CreatePortalRequestCustomerResourcesFilters.OperationEnum? operation = default, - string? value = default - ) - { - Field = field; - Operation = operation; - Value = value; - } - - /// - /// The comparison operation. Currently only '=' is supported. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum OperationEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "=")] - empty = 1, - } - - /// - /// The custom_metadata field name to filter on. - /// - [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] - public string? Field { get; set; } - - /// - /// The comparison operation. Currently only '=' is supported. - /// - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestCustomerResourcesFilters.OperationEnum? Operation { get; set; } - - /// - /// The value to compare against. - /// - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public string? Value { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestDeepLink_model")] - public class CreatePortalRequestDeepLink - { - [JsonConstructorAttribute] - protected CreatePortalRequestDeepLink() { } - - public CreatePortalRequestDeepLink( - string? resourceId = default, - string? resourceKey = default, - CreatePortalRequestDeepLink.ResourceTypeEnum? resourceType = default - ) - { - ResourceId = resourceId; - ResourceKey = resourceKey; - ResourceType = resourceType; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ResourceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "reservation")] - Reservation = 1, - - [EnumMember(Value = "space")] - Space = 2, - - [EnumMember(Value = "device")] - Device = 3, - } - - [DataMember(Name = "resource_id", IsRequired = false, EmitDefaultValue = false)] - public string? ResourceId { get; set; } - - [DataMember(Name = "resource_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResourceKey { get; set; } - - [DataMember(Name = "resource_type", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestDeepLink.ResourceTypeEnum? ResourceType { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestFeatures_model")] - public class CreatePortalRequestFeatures - { - [JsonConstructorAttribute] - protected CreatePortalRequestFeatures() { } - - public CreatePortalRequestFeatures( - CreatePortalRequestFeaturesConfigure? configure = default, - CreatePortalRequestFeaturesConnect? connect = default, - CreatePortalRequestFeaturesManage? manage = default, - CreatePortalRequestFeaturesManageDevices? manageDevices = default, - CreatePortalRequestFeaturesOrganize? organize = default - ) - { - Configure = configure; - Connect = connect; - Manage = manage; - ManageDevices = manageDevices; - Organize = organize; - } - - /// - /// Configuration for the configure feature. - /// - [DataMember(Name = "configure", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestFeaturesConfigure? Configure { get; set; } - - /// - /// Configuration for the connect accounts feature. - /// - [DataMember(Name = "connect", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestFeaturesConnect? Connect { get; set; } - - /// - /// Configuration for the manage feature. - /// - [DataMember(Name = "manage", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestFeaturesManage? Manage { get; set; } - - /// - /// Configuration for the manage devices feature. - /// --- - /// deprecated: Use `manage` instead. - /// --- - /// - [DataMember(Name = "manage_devices", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestFeaturesManageDevices? ManageDevices { get; set; } - - /// - /// Configuration for the organize feature. - /// - [DataMember(Name = "organize", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestFeaturesOrganize? Organize { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestFeaturesConfigure_model")] - public class CreatePortalRequestFeaturesConfigure - { - [JsonConstructorAttribute] - protected CreatePortalRequestFeaturesConfigure() { } - - public CreatePortalRequestFeaturesConfigure( - bool? allowAccessAutomationRuleCustomization = default, - bool? allowClimateAutomationRuleCustomization = default, - bool? allowInstantKeyCustomization = default, - bool? exclude = default - ) - { - AllowAccessAutomationRuleCustomization = allowAccessAutomationRuleCustomization; - AllowClimateAutomationRuleCustomization = allowClimateAutomationRuleCustomization; - AllowInstantKeyCustomization = allowInstantKeyCustomization; - Exclude = exclude; - } - - /// - /// Indicates whether the customer can customize the access automation rules for their properties. - /// - [DataMember( - Name = "allow_access_automation_rule_customization", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AllowAccessAutomationRuleCustomization { get; set; } - - /// - /// Indicates whether the customer can customize the climate automation rules for their properties. - /// - [DataMember( - Name = "allow_climate_automation_rule_customization", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AllowClimateAutomationRuleCustomization { get; set; } - - /// - /// Indicates whether the customer can customize the Instant Key profile for their properties. - /// - [DataMember( - Name = "allow_instant_key_customization", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AllowInstantKeyCustomization { get; set; } - - /// - /// Whether to exclude this feature from the portal. - /// - [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] - public bool? Exclude { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestFeaturesConnect_model")] - public class CreatePortalRequestFeaturesConnect - { - [JsonConstructorAttribute] - protected CreatePortalRequestFeaturesConnect() { } - - public CreatePortalRequestFeaturesConnect( - List? acceptedProviders = default, - bool? exclude = default, - List? excludedProviders = default - ) - { - AcceptedProviders = acceptedProviders; - Exclude = exclude; - ExcludedProviders = excludedProviders; - } - - /// - /// List of provider keys to allow for the connect feature. These providers will be shown when the customer tries to connect an account. - /// - [DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] - public List? AcceptedProviders { get; set; } - - /// - /// Whether to exclude this feature from the portal. - /// - [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] - public bool? Exclude { get; set; } - - /// - /// List of provider keys to exclude from the connect feature. These providers will not be shown when the customer tries to connect an account. - /// - [DataMember(Name = "excluded_providers", IsRequired = false, EmitDefaultValue = false)] - public List? ExcludedProviders { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestFeaturesManage_model")] - public class CreatePortalRequestFeaturesManage - { - [JsonConstructorAttribute] - protected CreatePortalRequestFeaturesManage() { } - - public CreatePortalRequestFeaturesManage( - CreatePortalRequestFeaturesManageDeviceManagementConfirmation? deviceManagementConfirmation = - default, - CreatePortalRequestFeaturesManageEvents? events = default, - bool? exclude = default, - bool? excludeReservationManagement = default, - bool? excludeReservationTechnicalDetails = default, - bool? excludeStaffManagement = default - ) - { - DeviceManagementConfirmation = deviceManagementConfirmation; - Events = events; - Exclude = exclude; - ExcludeReservationManagement = excludeReservationManagement; - ExcludeReservationTechnicalDetails = excludeReservationTechnicalDetails; - ExcludeStaffManagement = excludeStaffManagement; - } - - /// - /// Custom copy for the confirmation modal shown before unmanaged devices are added to a space and begin being managed (and billed). Only takes effect when the MANAGE_DEVICES_CONFIRMATION_MODAL feature flag is enabled for the workspace. Any omitted string falls back to a localized default. - /// - [DataMember( - Name = "device_management_confirmation", - IsRequired = false, - EmitDefaultValue = false - )] - public CreatePortalRequestFeaturesManageDeviceManagementConfirmation? DeviceManagementConfirmation { get; set; } - - /// - /// Configuration for event type filtering in the manage feature. - /// - [DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestFeaturesManageEvents? Events { get; set; } - - /// - /// Whether to exclude this feature from the portal. - /// - [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] - public bool? Exclude { get; set; } - - /// - /// Indicates whether the customer can manage reservations for their properties. - /// - [DataMember( - Name = "exclude_reservation_management", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? ExcludeReservationManagement { get; set; } - - /// - /// Indicates whether to exclude technical details from reservation views. - /// - [DataMember( - Name = "exclude_reservation_technical_details", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? ExcludeReservationTechnicalDetails { get; set; } - - /// - /// Indicates whether the customer can manage staff for their properties. - /// - [DataMember( - Name = "exclude_staff_management", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? ExcludeStaffManagement { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestFeaturesManageDeviceManagementConfirmation_model")] - public class CreatePortalRequestFeaturesManageDeviceManagementConfirmation - { - [JsonConstructorAttribute] - protected CreatePortalRequestFeaturesManageDeviceManagementConfirmation() { } - - public CreatePortalRequestFeaturesManageDeviceManagementConfirmation( - string? body = default, - string? cancelButtonLabel = default, - string? confirmButtonLabel = default, - string? title = default - ) - { - Body = body; - CancelButtonLabel = cancelButtonLabel; - ConfirmButtonLabel = confirmButtonLabel; - Title = title; - } - - /// - /// Custom body text for the confirmation modal. May include the {count} token, which is replaced with the number of devices that will begin being managed. - /// - [DataMember(Name = "body", IsRequired = false, EmitDefaultValue = false)] - public string? Body { get; set; } - - /// - /// Custom label for the cancel button. - /// - [DataMember(Name = "cancel_button_label", IsRequired = false, EmitDefaultValue = false)] - public string? CancelButtonLabel { get; set; } - - /// - /// Custom label for the confirm button. - /// - [DataMember( - Name = "confirm_button_label", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConfirmButtonLabel { get; set; } - - /// - /// Custom title for the confirmation modal. - /// - [DataMember(Name = "title", IsRequired = false, EmitDefaultValue = false)] - public string? Title { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestFeaturesManageEvents_model")] - public class CreatePortalRequestFeaturesManageEvents - { - [JsonConstructorAttribute] - protected CreatePortalRequestFeaturesManageEvents() { } - - public CreatePortalRequestFeaturesManageEvents( - List? allowedEvents = default, - List? defaultEvents = default - ) - { - AllowedEvents = allowedEvents; - DefaultEvents = defaultEvents; - } - - /// - /// List of event types to show in the events filter. When set, only these event types will be available. Leave empty to show all events. - /// - [DataMember(Name = "allowed_events", IsRequired = false, EmitDefaultValue = false)] - public List? AllowedEvents { get; set; } - - /// - /// List of event types that are pre-selected in the events filter when the user first loads the events tab. - /// - [DataMember(Name = "default_events", IsRequired = false, EmitDefaultValue = false)] - public List? DefaultEvents { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestFeaturesManageDevices_model")] - public class CreatePortalRequestFeaturesManageDevices - { - [JsonConstructorAttribute] - protected CreatePortalRequestFeaturesManageDevices() { } - - public CreatePortalRequestFeaturesManageDevices(bool? exclude = default) - { - Exclude = exclude; - } - - /// - /// Whether to exclude this feature from the portal. - /// - [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] - public bool? Exclude { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestFeaturesOrganize_model")] - public class CreatePortalRequestFeaturesOrganize - { - [JsonConstructorAttribute] - protected CreatePortalRequestFeaturesOrganize() { } - - public CreatePortalRequestFeaturesOrganize(bool? exclude = default) - { - Exclude = exclude; - } - - /// - /// Whether to exclude this feature from the portal. - /// - [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] - public bool? Exclude { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestLandingPage_model")] - public class CreatePortalRequestLandingPage - { - [JsonConstructorAttribute] - protected CreatePortalRequestLandingPage() { } - - public CreatePortalRequestLandingPage( - CreatePortalRequestLandingPageManage? manage = default - ) - { - Manage = manage; - } - - [DataMember(Name = "manage", IsRequired = false, EmitDefaultValue = false)] - public CreatePortalRequestLandingPageManage? Manage { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalRequestLandingPageManage_model")] - public class CreatePortalRequestLandingPageManage - { - [JsonConstructorAttribute] - protected CreatePortalRequestLandingPageManage() { } - - public CreatePortalRequestLandingPageManage( - string? accessGrantKey = default, - string? bookingKey = default, - string? buildingKey = default, - string? commonAreaKey = default, - string? facilityKey = default, - string? listingKey = default, - string? propertyKey = default, - string? propertyListingKey = default, - string? reservationKey = default, - string? roomKey = default, - string? siteKey = default, - string? spaceKey = default, - string? unitKey = default - ) - { - AccessGrantKey = accessGrantKey; - BookingKey = bookingKey; - BuildingKey = buildingKey; - CommonAreaKey = commonAreaKey; - FacilityKey = facilityKey; - ListingKey = listingKey; - PropertyKey = propertyKey; - PropertyListingKey = propertyListingKey; - ReservationKey = reservationKey; - RoomKey = roomKey; - SiteKey = siteKey; - SpaceKey = spaceKey; - UnitKey = unitKey; - } - - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - [DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] - public string? BookingKey { get; set; } - - [DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] - public string? BuildingKey { get; set; } - - [DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] - public string? CommonAreaKey { get; set; } - - [DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] - public string? FacilityKey { get; set; } - - [DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] - public string? ListingKey { get; set; } - - [DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] - public string? PropertyKey { get; set; } - - [DataMember( - Name = "property_listing_key", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PropertyListingKey { get; set; } - - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - [DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] - public string? RoomKey { get; set; } - - [DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] - public string? SiteKey { get; set; } - - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - [DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] - public string? UnitKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createPortalResponse_response")] - public class CreatePortalResponse - { - [JsonConstructorAttribute] - protected CreatePortalResponse() { } - - public CreatePortalResponse(CustomerPortal customerPortal = default) - { - CustomerPortal = customerPortal; - } - - /// - /// OK - /// - [DataMember(Name = "customer_portal", IsRequired = false, EmitDefaultValue = false)] - public CustomerPortal CustomerPortal { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new customer portal magic link with configurable features. - /// - public CustomerPortal CreatePortal(CreatePortalRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/customers/create_portal", requestOptions) - .EnsureData("/customers/create_portal") - .CustomerPortal; - } - - /// - /// Creates a new customer portal magic link with configurable features. - /// - public CustomerPortal CreatePortal( - CreatePortalRequestCustomerData? customerData = default, - List? customerResourcesFilters = default, - string? customizationProfileId = default, - CreatePortalRequestDeepLink? deepLink = default, - bool? excludeLocalePicker = default, - CreatePortalRequestFeatures? features = default, - bool? isEmbedded = default, - CreatePortalRequestLandingPage? landingPage = default, - CreatePortalRequest.LocaleEnum? locale = default, - CreatePortalRequest.NavigationModeEnum? navigationMode = default, - bool? readOnly = default - ) - { - return CreatePortal( - new CreatePortalRequest( - customerData: customerData, - customerResourcesFilters: customerResourcesFilters, - customizationProfileId: customizationProfileId, - deepLink: deepLink, - excludeLocalePicker: excludeLocalePicker, - features: features, - isEmbedded: isEmbedded, - landingPage: landingPage, - locale: locale, - navigationMode: navigationMode, - readOnly: readOnly - ) - ); - } - - /// - /// Creates a new customer portal magic link with configurable features. - /// - public async Task CreatePortalAsync(CreatePortalRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/customers/create_portal", - requestOptions - ) - ) - .EnsureData("/customers/create_portal") - .CustomerPortal; - } - - /// - /// Creates a new customer portal magic link with configurable features. - /// - public async Task CreatePortalAsync( - CreatePortalRequestCustomerData? customerData = default, - List? customerResourcesFilters = default, - string? customizationProfileId = default, - CreatePortalRequestDeepLink? deepLink = default, - bool? excludeLocalePicker = default, - CreatePortalRequestFeatures? features = default, - bool? isEmbedded = default, - CreatePortalRequestLandingPage? landingPage = default, - CreatePortalRequest.LocaleEnum? locale = default, - CreatePortalRequest.NavigationModeEnum? navigationMode = default, - bool? readOnly = default - ) - { - return ( - await CreatePortalAsync( - new CreatePortalRequest( - customerData: customerData, - customerResourcesFilters: customerResourcesFilters, - customizationProfileId: customizationProfileId, - deepLink: deepLink, - excludeLocalePicker: excludeLocalePicker, - features: features, - isEmbedded: isEmbedded, - landingPage: landingPage, - locale: locale, - navigationMode: navigationMode, - readOnly: readOnly - ) - ) - ); - } - - /// - /// Request parameters for Delete Customer Data. - /// - [DataContract(Name = "deleteDataRequest_request")] - public class DeleteDataRequest - { - [JsonConstructorAttribute] - protected DeleteDataRequest() { } - - public DeleteDataRequest( - List? accessGrantKeys = default, - List? bookingKeys = default, - List? buildingKeys = default, - List? commonAreaKeys = default, - List? customerKeys = default, - List? facilityKeys = default, - List? guestKeys = default, - List? listingKeys = default, - List? propertyKeys = default, - List? propertyListingKeys = default, - List? reservationKeys = default, - List? residentKeys = default, - List? roomKeys = default, - List? spaceKeys = default, - List? staffMemberKeys = default, - List? tenantKeys = default, - List? unitKeys = default, - List? userIdentityKeys = default, - List? userKeys = default - ) - { - AccessGrantKeys = accessGrantKeys; - BookingKeys = bookingKeys; - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - CustomerKeys = customerKeys; - FacilityKeys = facilityKeys; - GuestKeys = guestKeys; - ListingKeys = listingKeys; - PropertyKeys = propertyKeys; - PropertyListingKeys = propertyListingKeys; - ReservationKeys = reservationKeys; - ResidentKeys = residentKeys; - RoomKeys = roomKeys; - SpaceKeys = spaceKeys; - StaffMemberKeys = staffMemberKeys; - TenantKeys = tenantKeys; - UnitKeys = unitKeys; - UserIdentityKeys = userIdentityKeys; - UserKeys = userKeys; - } - - /// - /// List of access grant keys to delete. - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// List of booking keys to delete. - /// - [DataMember(Name = "booking_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BookingKeys { get; set; } - - /// - /// List of building keys to delete. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// List of common area keys to delete. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// List of customer keys to delete all data for. - /// - [DataMember(Name = "customer_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CustomerKeys { get; set; } - - /// - /// List of facility keys to delete. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// List of guest keys to delete. - /// - [DataMember(Name = "guest_keys", IsRequired = false, EmitDefaultValue = false)] - public List? GuestKeys { get; set; } - - /// - /// List of listing keys to delete. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// List of property keys to delete. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// List of property listing keys to delete. - /// - [DataMember( - Name = "property_listing_keys", - IsRequired = false, - EmitDefaultValue = false - )] - public List? PropertyListingKeys { get; set; } - - /// - /// List of reservation keys to delete. - /// - [DataMember(Name = "reservation_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ReservationKeys { get; set; } - - /// - /// List of resident keys to delete. - /// - [DataMember(Name = "resident_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ResidentKeys { get; set; } - - /// - /// List of room keys to delete. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// List of space keys to delete. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// List of staff member keys to delete. - /// - [DataMember(Name = "staff_member_keys", IsRequired = false, EmitDefaultValue = false)] - public List? StaffMemberKeys { get; set; } - - /// - /// List of tenant keys to delete. - /// - [DataMember(Name = "tenant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? TenantKeys { get; set; } - - /// - /// List of unit keys to delete. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - /// - /// List of user identity keys to delete. - /// - [DataMember(Name = "user_identity_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UserIdentityKeys { get; set; } - - /// - /// List of user keys to delete. - /// - [DataMember(Name = "user_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UserKeys { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes customer data including resources like spaces, properties, rooms, users, etc. - /// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). - /// - public void DeleteData(DeleteDataRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/customers/delete_data", requestOptions); - } - - /// - /// Deletes customer data including resources like spaces, properties, rooms, users, etc. - /// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). - /// - public void DeleteData( - List? accessGrantKeys = default, - List? bookingKeys = default, - List? buildingKeys = default, - List? commonAreaKeys = default, - List? customerKeys = default, - List? facilityKeys = default, - List? guestKeys = default, - List? listingKeys = default, - List? propertyKeys = default, - List? propertyListingKeys = default, - List? reservationKeys = default, - List? residentKeys = default, - List? roomKeys = default, - List? spaceKeys = default, - List? staffMemberKeys = default, - List? tenantKeys = default, - List? unitKeys = default, - List? userIdentityKeys = default, - List? userKeys = default - ) - { - DeleteData( - new DeleteDataRequest( - accessGrantKeys: accessGrantKeys, - bookingKeys: bookingKeys, - buildingKeys: buildingKeys, - commonAreaKeys: commonAreaKeys, - customerKeys: customerKeys, - facilityKeys: facilityKeys, - guestKeys: guestKeys, - listingKeys: listingKeys, - propertyKeys: propertyKeys, - propertyListingKeys: propertyListingKeys, - reservationKeys: reservationKeys, - residentKeys: residentKeys, - roomKeys: roomKeys, - spaceKeys: spaceKeys, - staffMemberKeys: staffMemberKeys, - tenantKeys: tenantKeys, - unitKeys: unitKeys, - userIdentityKeys: userIdentityKeys, - userKeys: userKeys - ) - ); - } - - /// - /// Deletes customer data including resources like spaces, properties, rooms, users, etc. - /// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). - /// - public async Task DeleteDataAsync(DeleteDataRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/customers/delete_data", requestOptions); - } - - /// - /// Deletes customer data including resources like spaces, properties, rooms, users, etc. - /// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). - /// - public async Task DeleteDataAsync( - List? accessGrantKeys = default, - List? bookingKeys = default, - List? buildingKeys = default, - List? commonAreaKeys = default, - List? customerKeys = default, - List? facilityKeys = default, - List? guestKeys = default, - List? listingKeys = default, - List? propertyKeys = default, - List? propertyListingKeys = default, - List? reservationKeys = default, - List? residentKeys = default, - List? roomKeys = default, - List? spaceKeys = default, - List? staffMemberKeys = default, - List? tenantKeys = default, - List? unitKeys = default, - List? userIdentityKeys = default, - List? userKeys = default - ) - { - await DeleteDataAsync( - new DeleteDataRequest( - accessGrantKeys: accessGrantKeys, - bookingKeys: bookingKeys, - buildingKeys: buildingKeys, - commonAreaKeys: commonAreaKeys, - customerKeys: customerKeys, - facilityKeys: facilityKeys, - guestKeys: guestKeys, - listingKeys: listingKeys, - propertyKeys: propertyKeys, - propertyListingKeys: propertyListingKeys, - reservationKeys: reservationKeys, - residentKeys: residentKeys, - roomKeys: roomKeys, - spaceKeys: spaceKeys, - staffMemberKeys: staffMemberKeys, - tenantKeys: tenantKeys, - unitKeys: unitKeys, - userIdentityKeys: userIdentityKeys, - userKeys: userKeys - ) - ); - } - - /// - /// Request parameters for Push Customer Data. - /// - [DataContract(Name = "pushDataRequest_request")] - public class PushDataRequest - { - [JsonConstructorAttribute] - protected PushDataRequest() { } - - public PushDataRequest( - List? accessGrants = default, - List? bookings = default, - List? buildings = default, - List? commonAreas = default, - string customerKey = default, - List? facilities = default, - List? guests = default, - List? listings = default, - List? properties = default, - List? propertyListings = default, - List? reservations = default, - List? residents = default, - List? rooms = default, - List? sites = default, - List? spaces = default, - List? staffMembers = default, - List? tenants = default, - List? units = default, - List? userIdentities = default, - List? users = default - ) - { - AccessGrants = accessGrants; - Bookings = bookings; - Buildings = buildings; - CommonAreas = commonAreas; - CustomerKey = customerKey; - Facilities = facilities; - Guests = guests; - Listings = listings; - Properties = properties; - PropertyListings = propertyListings; - Reservations = reservations; - Residents = residents; - Rooms = rooms; - Sites = sites; - Spaces = spaces; - StaffMembers = staffMembers; - Tenants = tenants; - Units = units; - UserIdentities = userIdentities; - Users = users; - } - - /// - /// List of access grants. - /// - [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrants { get; set; } - - /// - /// List of bookings. - /// - [DataMember(Name = "bookings", IsRequired = false, EmitDefaultValue = false)] - public List? Bookings { get; set; } - - /// - /// List of buildings. - /// - [DataMember(Name = "buildings", IsRequired = false, EmitDefaultValue = false)] - public List? Buildings { get; set; } - - /// - /// List of shared common areas. - /// - [DataMember(Name = "common_areas", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreas { get; set; } - - /// - /// Your unique identifier for the customer. - /// - [DataMember(Name = "customer_key", IsRequired = true, EmitDefaultValue = false)] - public string CustomerKey { get; set; } - - /// - /// List of gym or fitness facilities. - /// - [DataMember(Name = "facilities", IsRequired = false, EmitDefaultValue = false)] - public List? Facilities { get; set; } - - /// - /// List of guests. - /// - [DataMember(Name = "guests", IsRequired = false, EmitDefaultValue = false)] - public List? Guests { get; set; } - - /// - /// List of property listings. - /// - [DataMember(Name = "listings", IsRequired = false, EmitDefaultValue = false)] - public List? Listings { get; set; } - - /// - /// List of short-term rental properties. - /// - [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] - public List? Properties { get; set; } - - /// - /// List of property listings. - /// - [DataMember(Name = "property_listings", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyListings { get; set; } - - /// - /// List of reservations. - /// - [DataMember(Name = "reservations", IsRequired = false, EmitDefaultValue = false)] - public List? Reservations { get; set; } - - /// - /// List of residents. - /// - [DataMember(Name = "residents", IsRequired = false, EmitDefaultValue = false)] - public List? Residents { get; set; } - - /// - /// List of hotel or hospitality rooms. - /// - [DataMember(Name = "rooms", IsRequired = false, EmitDefaultValue = false)] - public List? Rooms { get; set; } - - /// - /// List of general sites or areas. - /// - [DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] - public List? Sites { get; set; } - - /// - /// List of general spaces or areas. - /// - [DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] - public List? Spaces { get; set; } - - /// - /// List of staff members. - /// - [DataMember(Name = "staff_members", IsRequired = false, EmitDefaultValue = false)] - public List? StaffMembers { get; set; } - - /// - /// List of tenants. - /// - [DataMember(Name = "tenants", IsRequired = false, EmitDefaultValue = false)] - public List? Tenants { get; set; } - - /// - /// List of multi-family residential units. - /// - [DataMember(Name = "units", IsRequired = false, EmitDefaultValue = false)] - public List? Units { get; set; } - - /// - /// List of user identities. - /// - [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] - public List? UserIdentities { get; set; } - - /// - /// List of users. - /// - [DataMember(Name = "users", IsRequired = false, EmitDefaultValue = false)] - public List? Users { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestAccessGrants_model")] - public class PushDataRequestAccessGrants - { - [JsonConstructorAttribute] - protected PushDataRequestAccessGrants() { } - - public PushDataRequestAccessGrants( - string? accessGrantKey = default, - List? buildingKeys = default, - List? commonAreaKeys = default, - string? endsAt = default, - List? facilityKeys = default, - string? guestKey = default, - List? listingKeys = default, - string? name = default, - string? preferredCode = default, - List? propertyKeys = default, - string? residentKey = default, - List? roomKeys = default, - List? spaceKeys = default, - string? startsAt = default, - string? tenantKey = default, - List? unitKeys = default, - string? userIdentityKey = default, - string? userKey = default - ) - { - AccessGrantKey = accessGrantKey; - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - EndsAt = endsAt; - FacilityKeys = facilityKeys; - GuestKey = guestKey; - ListingKeys = listingKeys; - Name = name; - PreferredCode = preferredCode; - PropertyKeys = propertyKeys; - ResidentKey = residentKey; - RoomKeys = roomKeys; - SpaceKeys = spaceKeys; - StartsAt = startsAt; - TenantKey = tenantKey; - UnitKeys = unitKeys; - UserIdentityKey = userIdentityKey; - UserKey = userKey; - } - - /// - /// Your unique identifier for the access grant. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// Building keys associated with the access grant. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// Common area keys associated with the access grant. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// Ending date and time for the access grant. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Facility keys associated with the access grant. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// Guest key associated with the access grant. - /// - [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] - public string? GuestKey { get; set; } - - /// - /// Listing keys associated with the access grant. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// Your name for this access grant resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Preferred PIN code to use when creating access for this reservation. - /// - [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] - public string? PreferredCode { get; set; } - - /// - /// Property keys associated with the access grant. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// Resident key associated with the access grant. - /// - [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResidentKey { get; set; } - - /// - /// Room keys associated with the access grant. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// Space keys associated with the access grant. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Starting date and time for the access grant. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Tenant key associated with the access grant. - /// - [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] - public string? TenantKey { get; set; } - - /// - /// Unit keys associated with the access grant. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - /// - /// User identity key associated with the access grant. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - /// - /// User key associated with the access grant. - /// - [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestBookings_model")] - public class PushDataRequestBookings - { - [JsonConstructorAttribute] - protected PushDataRequestBookings() { } - - public PushDataRequestBookings( - string? bookingKey = default, - List? buildingKeys = default, - List? commonAreaKeys = default, - string? endsAt = default, - List? facilityKeys = default, - string? guestKey = default, - List? listingKeys = default, - string? name = default, - string? preferredCode = default, - List? propertyKeys = default, - string? residentKey = default, - List? roomKeys = default, - List? spaceKeys = default, - string? startsAt = default, - string? tenantKey = default, - List? unitKeys = default, - string? userIdentityKey = default, - string? userKey = default - ) - { - BookingKey = bookingKey; - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - EndsAt = endsAt; - FacilityKeys = facilityKeys; - GuestKey = guestKey; - ListingKeys = listingKeys; - Name = name; - PreferredCode = preferredCode; - PropertyKeys = propertyKeys; - ResidentKey = residentKey; - RoomKeys = roomKeys; - SpaceKeys = spaceKeys; - StartsAt = startsAt; - TenantKey = tenantKey; - UnitKeys = unitKeys; - UserIdentityKey = userIdentityKey; - UserKey = userKey; - } - - /// - /// Your unique identifier for the booking. - /// - [DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] - public string? BookingKey { get; set; } - - /// - /// Building keys associated with the access grant. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// Common area keys associated with the access grant. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// Ending date and time for the access grant. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Facility keys associated with the access grant. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// Guest key associated with the access grant. - /// - [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] - public string? GuestKey { get; set; } - - /// - /// Listing keys associated with the access grant. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// Your name for this access grant resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Preferred PIN code to use when creating access for this reservation. - /// - [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] - public string? PreferredCode { get; set; } - - /// - /// Property keys associated with the access grant. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// Resident key associated with the access grant. - /// - [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResidentKey { get; set; } - - /// - /// Room keys associated with the access grant. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// Space keys associated with the access grant. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Starting date and time for the access grant. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Tenant key associated with the access grant. - /// - [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] - public string? TenantKey { get; set; } - - /// - /// Unit keys associated with the access grant. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - /// - /// User identity key associated with the access grant. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - /// - /// User key associated with the access grant. - /// - [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestBuildings_model")] - public class PushDataRequestBuildings - { - [JsonConstructorAttribute] - protected PushDataRequestBuildings() { } - - public PushDataRequestBuildings(string? buildingKey = default, string? name = default) - { - BuildingKey = buildingKey; - Name = name; - } - - /// - /// Your unique identifier for the building. - /// - [DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] - public string? BuildingKey { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestCommonAreas_model")] - public class PushDataRequestCommonAreas - { - [JsonConstructorAttribute] - protected PushDataRequestCommonAreas() { } - - public PushDataRequestCommonAreas( - string? commonAreaKey = default, - string? name = default, - string? parentSiteKey = default - ) - { - CommonAreaKey = commonAreaKey; - Name = name; - ParentSiteKey = parentSiteKey; - } - - /// - /// Your unique identifier for the common area. - /// - [DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] - public string? CommonAreaKey { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] - public string? ParentSiteKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestFacilities_model")] - public class PushDataRequestFacilities - { - [JsonConstructorAttribute] - protected PushDataRequestFacilities() { } - - public PushDataRequestFacilities(string? facilityKey = default, string? name = default) - { - FacilityKey = facilityKey; - Name = name; - } - - /// - /// Your unique identifier for the facility. - /// - [DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] - public string? FacilityKey { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestGuests_model")] - public class PushDataRequestGuests - { - [JsonConstructorAttribute] - protected PushDataRequestGuests() { } - - public PushDataRequestGuests( - string? emailAddress = default, - string? guestKey = default, - string? name = default, - string? phoneNumber = default - ) - { - EmailAddress = emailAddress; - GuestKey = guestKey; - Name = name; - PhoneNumber = phoneNumber; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your unique identifier for the guest. - /// - [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] - public string? GuestKey { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestListings_model")] - public class PushDataRequestListings - { - [JsonConstructorAttribute] - protected PushDataRequestListings() { } - - public PushDataRequestListings(string? listingKey = default, string? name = default) - { - ListingKey = listingKey; - Name = name; - } - - /// - /// Your unique identifier for the listing. - /// - [DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] - public string? ListingKey { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestProperties_model")] - public class PushDataRequestProperties - { - [JsonConstructorAttribute] - protected PushDataRequestProperties() { } - - public PushDataRequestProperties(string? name = default, string? propertyKey = default) - { - Name = name; - PropertyKey = propertyKey; - } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the property. - /// - [DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] - public string? PropertyKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestPropertyListings_model")] - public class PushDataRequestPropertyListings - { - [JsonConstructorAttribute] - protected PushDataRequestPropertyListings() { } - - public PushDataRequestPropertyListings( - object? customMetadata = default, - string? name = default, - string? propertyListingKey = default - ) - { - CustomMetadata = customMetadata; - Name = name; - PropertyListingKey = propertyListingKey; - } - - /// - /// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadata { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the property listing. - /// - [DataMember( - Name = "property_listing_key", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PropertyListingKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestReservations_model")] - public class PushDataRequestReservations - { - [JsonConstructorAttribute] - protected PushDataRequestReservations() { } - - public PushDataRequestReservations( - List? buildingKeys = default, - List? commonAreaKeys = default, - object? customMetadata = default, - string? endsAt = default, - List? facilityKeys = default, - string? guestKey = default, - List? listingKeys = default, - string? name = default, - string? preferredCode = default, - List? propertyKeys = default, - string? reservationKey = default, - string? residentKey = default, - List? roomKeys = default, - List? spaceKeys = default, - string? startsAt = default, - string? tenantKey = default, - List? unitKeys = default, - string? userIdentityKey = default, - string? userKey = default - ) - { - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - CustomMetadata = customMetadata; - EndsAt = endsAt; - FacilityKeys = facilityKeys; - GuestKey = guestKey; - ListingKeys = listingKeys; - Name = name; - PreferredCode = preferredCode; - PropertyKeys = propertyKeys; - ReservationKey = reservationKey; - ResidentKey = residentKey; - RoomKeys = roomKeys; - SpaceKeys = spaceKeys; - StartsAt = startsAt; - TenantKey = tenantKey; - UnitKeys = unitKeys; - UserIdentityKey = userIdentityKey; - UserKey = userKey; - } - - /// - /// Building keys associated with the access grant. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// Common area keys associated with the access grant. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadata { get; set; } - - /// - /// Ending date and time for the access grant. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Facility keys associated with the access grant. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// Guest key associated with the access grant. - /// - [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] - public string? GuestKey { get; set; } - - /// - /// Listing keys associated with the access grant. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// Your name for this access grant resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Preferred PIN code to use when creating access for this reservation. - /// - [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] - public string? PreferredCode { get; set; } - - /// - /// Property keys associated with the access grant. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// Your unique identifier for the reservation. - /// - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - /// - /// Resident key associated with the access grant. - /// - [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResidentKey { get; set; } - - /// - /// Room keys associated with the access grant. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// Space keys associated with the access grant. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Starting date and time for the access grant. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Tenant key associated with the access grant. - /// - [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] - public string? TenantKey { get; set; } - - /// - /// Unit keys associated with the access grant. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - /// - /// User identity key associated with the access grant. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - /// - /// User key associated with the access grant. - /// - [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestResidents_model")] - public class PushDataRequestResidents - { - [JsonConstructorAttribute] - protected PushDataRequestResidents() { } - - public PushDataRequestResidents( - string? emailAddress = default, - string? name = default, - string? phoneNumber = default, - string? residentKey = default - ) - { - EmailAddress = emailAddress; - Name = name; - PhoneNumber = phoneNumber; - ResidentKey = residentKey; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Your unique identifier for the resident. - /// - [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] - public string? ResidentKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestRooms_model")] - public class PushDataRequestRooms - { - [JsonConstructorAttribute] - protected PushDataRequestRooms() { } - - public PushDataRequestRooms( - string? name = default, - string? parentSiteKey = default, - string? roomKey = default - ) - { - Name = name; - ParentSiteKey = parentSiteKey; - RoomKey = roomKey; - } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] - public string? ParentSiteKey { get; set; } - - /// - /// Your unique identifier for the room. - /// - [DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] - public string? RoomKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestSites_model")] - public class PushDataRequestSites - { - [JsonConstructorAttribute] - protected PushDataRequestSites() { } - - public PushDataRequestSites(string? name = default, string? siteKey = default) - { - Name = name; - SiteKey = siteKey; - } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] - public string? SiteKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestSpaces_model")] - public class PushDataRequestSpaces - { - [JsonConstructorAttribute] - protected PushDataRequestSpaces() { } - - public PushDataRequestSpaces( - PushDataRequestSpacesCustomerData? customerData = default, - int? durationMinutes = default, - PushDataRequestSpacesGeolocation? geolocation = default, - string? name = default, - string? parentSiteKey = default, - string? spaceKey = default - ) - { - CustomerData = customerData; - DurationMinutes = durationMinutes; - Geolocation = geolocation; - Name = name; - ParentSiteKey = parentSiteKey; - SpaceKey = spaceKey; - } - - /// - /// Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). - /// - [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] - public PushDataRequestSpacesCustomerData? CustomerData { get; set; } - - /// - /// Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. - /// - [DataMember(Name = "duration_minutes", IsRequired = false, EmitDefaultValue = false)] - public int? DurationMinutes { get; set; } - - /// - /// Geographic coordinates (latitude and longitude) of the space. - /// - [DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] - public PushDataRequestSpacesGeolocation? Geolocation { get; set; } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] - public string? ParentSiteKey { get; set; } - - /// - /// Your unique identifier for the space. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestSpacesCustomerData_model")] - public class PushDataRequestSpacesCustomerData - { - [JsonConstructorAttribute] - protected PushDataRequestSpacesCustomerData() { } - - public PushDataRequestSpacesCustomerData( - string? address = default, - string? defaultCheckinTime = default, - string? defaultCheckoutTime = default, - string? timeZone = default - ) - { - Address = address; - DefaultCheckinTime = defaultCheckinTime; - DefaultCheckoutTime = defaultCheckoutTime; - TimeZone = timeZone; - } - - /// - /// Postal address for the space. - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public string? Address { get; set; } - - /// - /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember( - Name = "default_checkin_time", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCheckinTime { get; set; } - - /// - /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember( - Name = "default_checkout_time", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCheckoutTime { get; set; } - - /// - /// IANA time zone for the space, e.g. America/Los_Angeles. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestSpacesGeolocation_model")] - public class PushDataRequestSpacesGeolocation - { - [JsonConstructorAttribute] - protected PushDataRequestSpacesGeolocation() { } - - public PushDataRequestSpacesGeolocation( - float? latitude = default, - float? longitude = default - ) - { - Latitude = latitude; - Longitude = longitude; - } - - /// - /// Latitude of the space, in decimal degrees. - /// - [DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] - public float? Latitude { get; set; } - - /// - /// Longitude of the space, in decimal degrees. - /// - [DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] - public float? Longitude { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestStaffMembers_model")] - public class PushDataRequestStaffMembers - { - [JsonConstructorAttribute] - protected PushDataRequestStaffMembers() { } - - public PushDataRequestStaffMembers( - List? buildingKeys = default, - List? commonAreaKeys = default, - string? emailAddress = default, - List? facilityKeys = default, - List? listingKeys = default, - string? name = default, - string? phoneNumber = default, - List? propertyKeys = default, - List? propertyListingKeys = default, - List? roomKeys = default, - List? siteKeys = default, - List? spaceKeys = default, - string? staffMemberKey = default, - List? unitKeys = default - ) - { - BuildingKeys = buildingKeys; - CommonAreaKeys = commonAreaKeys; - EmailAddress = emailAddress; - FacilityKeys = facilityKeys; - ListingKeys = listingKeys; - Name = name; - PhoneNumber = phoneNumber; - PropertyKeys = propertyKeys; - PropertyListingKeys = propertyListingKeys; - RoomKeys = roomKeys; - SiteKeys = siteKeys; - SpaceKeys = spaceKeys; - StaffMemberKey = staffMemberKey; - UnitKeys = unitKeys; - } - - /// - /// List of unique identifiers for the buildings the staff member is associated with. - /// - [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] - public List? BuildingKeys { get; set; } - - /// - /// List of unique identifiers for the common areas the staff member is associated with. - /// - [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAreaKeys { get; set; } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// List of unique identifiers for the facilities the staff member is associated with. - /// - [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] - public List? FacilityKeys { get; set; } - - /// - /// List of unique identifiers for the listings the staff member is associated with. - /// - [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] - public List? ListingKeys { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// List of unique identifiers for the properties the staff member is associated with. - /// - [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] - public List? PropertyKeys { get; set; } - - /// - /// List of unique identifiers for the property listings the staff member is associated with. - /// - [DataMember( - Name = "property_listing_keys", - IsRequired = false, - EmitDefaultValue = false - )] - public List? PropertyListingKeys { get; set; } - - /// - /// List of unique identifiers for the rooms the staff member is associated with. - /// - [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] - public List? RoomKeys { get; set; } - - /// - /// List of unique identifiers for the sites the staff member is associated with. - /// - [DataMember(Name = "site_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SiteKeys { get; set; } - - /// - /// List of unique identifiers for the spaces the staff member is associated with. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - /// - /// Your unique identifier for the staff. - /// - [DataMember(Name = "staff_member_key", IsRequired = false, EmitDefaultValue = false)] - public string? StaffMemberKey { get; set; } - - /// - /// List of unique identifiers for the units the staff member is associated with. - /// - [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] - public List? UnitKeys { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestTenants_model")] - public class PushDataRequestTenants - { - [JsonConstructorAttribute] - protected PushDataRequestTenants() { } - - public PushDataRequestTenants( - string? emailAddress = default, - string? name = default, - string? phoneNumber = default, - string? tenantKey = default - ) - { - EmailAddress = emailAddress; - Name = name; - PhoneNumber = phoneNumber; - TenantKey = tenantKey; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Your unique identifier for the tenant. - /// - [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] - public string? TenantKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestUnits_model")] - public class PushDataRequestUnits - { - [JsonConstructorAttribute] - protected PushDataRequestUnits() { } - - public PushDataRequestUnits( - string? name = default, - string? parentSiteKey = default, - string? unitKey = default - ) - { - Name = name; - ParentSiteKey = parentSiteKey; - UnitKey = unitKey; - } - - /// - /// Your display name for this location resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Your unique identifier for the site. - /// - [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] - public string? ParentSiteKey { get; set; } - - /// - /// Your unique identifier for the unit. - /// - [DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] - public string? UnitKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestUserIdentities_model")] - public class PushDataRequestUserIdentities - { - [JsonConstructorAttribute] - protected PushDataRequestUserIdentities() { } - - public PushDataRequestUserIdentities( - string? emailAddress = default, - string? name = default, - string? phoneNumber = default, - string? userIdentityKey = default - ) - { - EmailAddress = emailAddress; - Name = name; - PhoneNumber = phoneNumber; - UserIdentityKey = userIdentityKey; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Your unique identifier for the user identity. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "pushDataRequestUsers_model")] - public class PushDataRequestUsers - { - [JsonConstructorAttribute] - protected PushDataRequestUsers() { } - - public PushDataRequestUsers( - string? emailAddress = default, - string? name = default, - string? phoneNumber = default, - string? userKey = default - ) - { - EmailAddress = emailAddress; - Name = name; - PhoneNumber = phoneNumber; - UserKey = userKey; - } - - /// - /// Email address associated with the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Your display name for this user identity resource. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Phone number associated with the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Your unique identifier for the user. - /// - [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Pushes customer data including resources like spaces, properties, rooms, users, etc. - /// - public void PushData(PushDataRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/customers/push_data", requestOptions); - } - - /// - /// Pushes customer data including resources like spaces, properties, rooms, users, etc. - /// - public void PushData( - List? accessGrants = default, - List? bookings = default, - List? buildings = default, - List? commonAreas = default, - string customerKey = default, - List? facilities = default, - List? guests = default, - List? listings = default, - List? properties = default, - List? propertyListings = default, - List? reservations = default, - List? residents = default, - List? rooms = default, - List? sites = default, - List? spaces = default, - List? staffMembers = default, - List? tenants = default, - List? units = default, - List? userIdentities = default, - List? users = default - ) - { - PushData( - new PushDataRequest( - accessGrants: accessGrants, - bookings: bookings, - buildings: buildings, - commonAreas: commonAreas, - customerKey: customerKey, - facilities: facilities, - guests: guests, - listings: listings, - properties: properties, - propertyListings: propertyListings, - reservations: reservations, - residents: residents, - rooms: rooms, - sites: sites, - spaces: spaces, - staffMembers: staffMembers, - tenants: tenants, - units: units, - userIdentities: userIdentities, - users: users - ) - ); - } - - /// - /// Pushes customer data including resources like spaces, properties, rooms, users, etc. - /// - public async Task PushDataAsync(PushDataRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/customers/push_data", requestOptions); - } - - /// - /// Pushes customer data including resources like spaces, properties, rooms, users, etc. - /// - public async Task PushDataAsync( - List? accessGrants = default, - List? bookings = default, - List? buildings = default, - List? commonAreas = default, - string customerKey = default, - List? facilities = default, - List? guests = default, - List? listings = default, - List? properties = default, - List? propertyListings = default, - List? reservations = default, - List? residents = default, - List? rooms = default, - List? sites = default, - List? spaces = default, - List? staffMembers = default, - List? tenants = default, - List? units = default, - List? userIdentities = default, - List? users = default - ) - { - await PushDataAsync( - new PushDataRequest( - accessGrants: accessGrants, - bookings: bookings, - buildings: buildings, - commonAreas: commonAreas, - customerKey: customerKey, - facilities: facilities, - guests: guests, - listings: listings, - properties: properties, - propertyListings: propertyListings, - reservations: reservations, - residents: residents, - rooms: rooms, - sites: sites, - spaces: spaces, - staffMembers: staffMembers, - tenants: tenants, - units: units, - userIdentities: userIdentities, - users: users - ) - ); - } - } +public class Customers +{ +private ISeamClient _seam; + +public Customers(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create Customer Portal. +/// +[DataContract(Name = "createPortalRequest_request")] +public class CreatePortalRequest +{ +[JsonConstructorAttribute] +protected CreatePortalRequest() { } + +public CreatePortalRequest(CreatePortalRequestCustomerData? customerData = default, List? customerResourcesFilters = default, string? customizationProfileId = default, CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, bool? readOnly = default) +{ +CustomerData = customerData; +CustomerResourcesFilters = customerResourcesFilters; +CustomizationProfileId = customizationProfileId; +DeepLink = deepLink; +ExcludeLocalePicker = excludeLocalePicker; +Features = features; +IsEmbedded = isEmbedded; +LandingPage = landingPage; +Locale = locale; +NavigationMode = navigationMode; +ReadOnly = readOnly; +} + +/// +/// The locale to use for the portal. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum LocaleEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "en-US")] +EnUs = 1, + +[EnumMember(Value = "pt-PT")] +PtPt = 2, + +[EnumMember(Value = "fr-FR")] +FrFr = 3, + +[EnumMember(Value = "it-IT")] +ItIt = 4, + +[EnumMember(Value = "es-ES")] +EsEs = 5, + +[EnumMember(Value = "de-DE")] +DeDe = 6, + +[EnumMember(Value = "nl-NL")] +NlNl = 7, + +[EnumMember(Value = "el-GR")] +ElGr = 8, + +[EnumMember(Value = "pl-PL")] +PlPl = 9, + +[EnumMember(Value = "ru-RU")] +RuRu = 10, +} + +/// +/// Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum NavigationModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "full")] +Full = 1, + +[EnumMember(Value = "restricted")] +Restricted = 2, +} + +[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestCustomerData? CustomerData { get; set; } + +/// +/// Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata. +/// +[DataMember(Name = "customer_resources_filters", IsRequired = false, EmitDefaultValue = false)] +public List? CustomerResourcesFilters { get; set; } + +/// +/// The ID of the customization profile to use for the portal. +/// +[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomizationProfileId { get; set; } + +/// +/// Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. +/// +[DataMember(Name = "deep_link", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestDeepLink? DeepLink { get; set; } + +/// +/// Whether to exclude the option to select a locale within the portal UI. +/// +[DataMember(Name = "exclude_locale_picker", IsRequired = false, EmitDefaultValue = false)] +public bool? ExcludeLocalePicker { get; set; } + +[DataMember(Name = "features", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestFeatures? Features { get; set; } + +/// +/// Whether the portal is embedded in another application. +/// +[DataMember(Name = "is_embedded", IsRequired = false, EmitDefaultValue = false)] +public bool? IsEmbedded { get; set; } + +/// +/// Configuration for the landing page when the portal loads. +/// +[DataMember(Name = "landing_page", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestLandingPage? LandingPage { get; set; } + +/// +/// The locale to use for the portal. +/// +[DataMember(Name = "locale", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequest.LocaleEnum? Locale { get; set; } + +/// +/// Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. +/// +[DataMember(Name = "navigation_mode", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequest.NavigationModeEnum? NavigationMode { get; set; } + +/// +/// Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. +/// +[DataMember(Name = "read_only", IsRequired = false, EmitDefaultValue = false)] +public bool? ReadOnly { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerData_model")] +public class CreatePortalRequestCustomerData +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerData() { } + +public CreatePortalRequestCustomerData(List? accessGrants = default, List? bookings = default, List? buildings = default, List? commonAreas = default, string? customerKey = default, List? facilities = default, List? guests = default, List? listings = default, List? properties = default, List? propertyListings = default, List? reservations = default, List? residents = default, List? rooms = default, List? sites = default, List? spaces = default, List? staffMembers = default, List? tenants = default, List? units = default, List? userIdentities = default, List? users = default) +{ +AccessGrants = accessGrants; +Bookings = bookings; +Buildings = buildings; +CommonAreas = commonAreas; +CustomerKey = customerKey; +Facilities = facilities; +Guests = guests; +Listings = listings; +Properties = properties; +PropertyListings = propertyListings; +Reservations = reservations; +Residents = residents; +Rooms = rooms; +Sites = sites; +Spaces = spaces; +StaffMembers = staffMembers; +Tenants = tenants; +Units = units; +UserIdentities = userIdentities; +Users = users; +} + +/// +/// List of access grants. +/// +[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrants { get; set; } + +/// +/// List of bookings. +/// +[DataMember(Name = "bookings", IsRequired = false, EmitDefaultValue = false)] +public List? Bookings { get; set; } + +/// +/// List of buildings. +/// +[DataMember(Name = "buildings", IsRequired = false, EmitDefaultValue = false)] +public List? Buildings { get; set; } + +/// +/// List of shared common areas. +/// +[DataMember(Name = "common_areas", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreas { get; set; } + +/// +/// Your unique identifier for the customer. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// List of gym or fitness facilities. +/// +[DataMember(Name = "facilities", IsRequired = false, EmitDefaultValue = false)] +public List? Facilities { get; set; } + +/// +/// List of guests. +/// +[DataMember(Name = "guests", IsRequired = false, EmitDefaultValue = false)] +public List? Guests { get; set; } + +/// +/// List of property listings. +/// +[DataMember(Name = "listings", IsRequired = false, EmitDefaultValue = false)] +public List? Listings { get; set; } + +/// +/// List of short-term rental properties. +/// +[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] +public List? Properties { get; set; } + +/// +/// List of property listings. +/// +[DataMember(Name = "property_listings", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyListings { get; set; } + +/// +/// List of reservations. +/// +[DataMember(Name = "reservations", IsRequired = false, EmitDefaultValue = false)] +public List? Reservations { get; set; } + +/// +/// List of residents. +/// +[DataMember(Name = "residents", IsRequired = false, EmitDefaultValue = false)] +public List? Residents { get; set; } + +/// +/// List of hotel or hospitality rooms. +/// +[DataMember(Name = "rooms", IsRequired = false, EmitDefaultValue = false)] +public List? Rooms { get; set; } + +/// +/// List of general sites or areas. +/// +[DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] +public List? Sites { get; set; } + +/// +/// List of general spaces or areas. +/// +[DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] +public List? Spaces { get; set; } + +/// +/// List of staff members. +/// +[DataMember(Name = "staff_members", IsRequired = false, EmitDefaultValue = false)] +public List? StaffMembers { get; set; } + +/// +/// List of tenants. +/// +[DataMember(Name = "tenants", IsRequired = false, EmitDefaultValue = false)] +public List? Tenants { get; set; } + +/// +/// List of multi-family residential units. +/// +[DataMember(Name = "units", IsRequired = false, EmitDefaultValue = false)] +public List? Units { get; set; } + +/// +/// List of user identities. +/// +[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] +public List? UserIdentities { get; set; } + +/// +/// List of users. +/// +[DataMember(Name = "users", IsRequired = false, EmitDefaultValue = false)] +public List? Users { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataAccessGrants_model")] +public class CreatePortalRequestCustomerDataAccessGrants +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataAccessGrants() { } + +public CreatePortalRequestCustomerDataAccessGrants(string? accessGrantKey = default, List? buildingKeys = default, List? commonAreaKeys = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) +{ +AccessGrantKey = accessGrantKey; +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +EndsAt = endsAt; +FacilityKeys = facilityKeys; +GuestKey = guestKey; +ListingKeys = listingKeys; +Name = name; +PreferredCode = preferredCode; +PropertyKeys = propertyKeys; +ResidentKey = residentKey; +RoomKeys = roomKeys; +SpaceKeys = spaceKeys; +StartsAt = startsAt; +TenantKey = tenantKey; +UnitKeys = unitKeys; +UserIdentityKey = userIdentityKey; +UserKey = userKey; +} + +/// +/// Your unique identifier for the access grant. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// Building keys associated with the access grant. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// Common area keys associated with the access grant. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// Ending date and time for the access grant. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Facility keys associated with the access grant. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// Guest key associated with the access grant. +/// +[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] +public string? GuestKey { get; set; } + +/// +/// Listing keys associated with the access grant. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// Your name for this access grant resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Preferred PIN code to use when creating access for this reservation. +/// +[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] +public string? PreferredCode { get; set; } + +/// +/// Property keys associated with the access grant. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// Resident key associated with the access grant. +/// +[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResidentKey { get; set; } + +/// +/// Room keys associated with the access grant. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// Space keys associated with the access grant. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Starting date and time for the access grant. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Tenant key associated with the access grant. +/// +[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] +public string? TenantKey { get; set; } + +/// +/// Unit keys associated with the access grant. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +/// +/// User identity key associated with the access grant. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +/// +/// User key associated with the access grant. +/// +[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataBookings_model")] +public class CreatePortalRequestCustomerDataBookings +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataBookings() { } + +public CreatePortalRequestCustomerDataBookings(string? bookingKey = default, List? buildingKeys = default, List? commonAreaKeys = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) +{ +BookingKey = bookingKey; +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +EndsAt = endsAt; +FacilityKeys = facilityKeys; +GuestKey = guestKey; +ListingKeys = listingKeys; +Name = name; +PreferredCode = preferredCode; +PropertyKeys = propertyKeys; +ResidentKey = residentKey; +RoomKeys = roomKeys; +SpaceKeys = spaceKeys; +StartsAt = startsAt; +TenantKey = tenantKey; +UnitKeys = unitKeys; +UserIdentityKey = userIdentityKey; +UserKey = userKey; +} + +/// +/// Your unique identifier for the booking. +/// +[DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] +public string? BookingKey { get; set; } + +/// +/// Building keys associated with the access grant. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// Common area keys associated with the access grant. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// Ending date and time for the access grant. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Facility keys associated with the access grant. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// Guest key associated with the access grant. +/// +[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] +public string? GuestKey { get; set; } + +/// +/// Listing keys associated with the access grant. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// Your name for this access grant resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Preferred PIN code to use when creating access for this reservation. +/// +[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] +public string? PreferredCode { get; set; } + +/// +/// Property keys associated with the access grant. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// Resident key associated with the access grant. +/// +[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResidentKey { get; set; } + +/// +/// Room keys associated with the access grant. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// Space keys associated with the access grant. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Starting date and time for the access grant. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Tenant key associated with the access grant. +/// +[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] +public string? TenantKey { get; set; } + +/// +/// Unit keys associated with the access grant. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +/// +/// User identity key associated with the access grant. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +/// +/// User key associated with the access grant. +/// +[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataBuildings_model")] +public class CreatePortalRequestCustomerDataBuildings +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataBuildings() { } + +public CreatePortalRequestCustomerDataBuildings(string? buildingKey = default, string? name = default) +{ +BuildingKey = buildingKey; +Name = name; +} + +/// +/// Your unique identifier for the building. +/// +[DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] +public string? BuildingKey { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataCommonAreas_model")] +public class CreatePortalRequestCustomerDataCommonAreas +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataCommonAreas() { } + +public CreatePortalRequestCustomerDataCommonAreas(string? commonAreaKey = default, string? name = default, string? parentSiteKey = default) +{ +CommonAreaKey = commonAreaKey; +Name = name; +ParentSiteKey = parentSiteKey; +} + +/// +/// Your unique identifier for the common area. +/// +[DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] +public string? CommonAreaKey { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] +public string? ParentSiteKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataFacilities_model")] +public class CreatePortalRequestCustomerDataFacilities +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataFacilities() { } + +public CreatePortalRequestCustomerDataFacilities(string? facilityKey = default, string? name = default) +{ +FacilityKey = facilityKey; +Name = name; +} + +/// +/// Your unique identifier for the facility. +/// +[DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] +public string? FacilityKey { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataGuests_model")] +public class CreatePortalRequestCustomerDataGuests +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataGuests() { } + +public CreatePortalRequestCustomerDataGuests(string? emailAddress = default, string? guestKey = default, string? name = default, string? phoneNumber = default) +{ +EmailAddress = emailAddress; +GuestKey = guestKey; +Name = name; +PhoneNumber = phoneNumber; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your unique identifier for the guest. +/// +[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] +public string? GuestKey { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataListings_model")] +public class CreatePortalRequestCustomerDataListings +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataListings() { } + +public CreatePortalRequestCustomerDataListings(string? listingKey = default, string? name = default) +{ +ListingKey = listingKey; +Name = name; +} + +/// +/// Your unique identifier for the listing. +/// +[DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] +public string? ListingKey { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataProperties_model")] +public class CreatePortalRequestCustomerDataProperties +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataProperties() { } + +public CreatePortalRequestCustomerDataProperties(string? name = default, string? propertyKey = default) +{ +Name = name; +PropertyKey = propertyKey; +} + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the property. +/// +[DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] +public string? PropertyKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataPropertyListings_model")] +public class CreatePortalRequestCustomerDataPropertyListings +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataPropertyListings() { } + +public CreatePortalRequestCustomerDataPropertyListings(object? customMetadata = default, string? name = default, string? propertyListingKey = default) +{ +CustomMetadata = customMetadata; +Name = name; +PropertyListingKey = propertyListingKey; +} + +/// +/// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadata { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the property listing. +/// +[DataMember(Name = "property_listing_key", IsRequired = false, EmitDefaultValue = false)] +public string? PropertyListingKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataReservations_model")] +public class CreatePortalRequestCustomerDataReservations +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataReservations() { } + +public CreatePortalRequestCustomerDataReservations(List? buildingKeys = default, List? commonAreaKeys = default, object? customMetadata = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? reservationKey = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) +{ +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +CustomMetadata = customMetadata; +EndsAt = endsAt; +FacilityKeys = facilityKeys; +GuestKey = guestKey; +ListingKeys = listingKeys; +Name = name; +PreferredCode = preferredCode; +PropertyKeys = propertyKeys; +ReservationKey = reservationKey; +ResidentKey = residentKey; +RoomKeys = roomKeys; +SpaceKeys = spaceKeys; +StartsAt = startsAt; +TenantKey = tenantKey; +UnitKeys = unitKeys; +UserIdentityKey = userIdentityKey; +UserKey = userKey; +} + +/// +/// Building keys associated with the access grant. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// Common area keys associated with the access grant. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadata { get; set; } + +/// +/// Ending date and time for the access grant. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Facility keys associated with the access grant. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// Guest key associated with the access grant. +/// +[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] +public string? GuestKey { get; set; } + +/// +/// Listing keys associated with the access grant. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// Your name for this access grant resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Preferred PIN code to use when creating access for this reservation. +/// +[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] +public string? PreferredCode { get; set; } + +/// +/// Property keys associated with the access grant. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// Your unique identifier for the reservation. +/// +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +/// +/// Resident key associated with the access grant. +/// +[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResidentKey { get; set; } + +/// +/// Room keys associated with the access grant. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// Space keys associated with the access grant. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Starting date and time for the access grant. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Tenant key associated with the access grant. +/// +[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] +public string? TenantKey { get; set; } + +/// +/// Unit keys associated with the access grant. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +/// +/// User identity key associated with the access grant. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +/// +/// User key associated with the access grant. +/// +[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataResidents_model")] +public class CreatePortalRequestCustomerDataResidents +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataResidents() { } + +public CreatePortalRequestCustomerDataResidents(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? residentKey = default) +{ +EmailAddress = emailAddress; +Name = name; +PhoneNumber = phoneNumber; +ResidentKey = residentKey; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Your unique identifier for the resident. +/// +[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResidentKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataRooms_model")] +public class CreatePortalRequestCustomerDataRooms +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataRooms() { } + +public CreatePortalRequestCustomerDataRooms(string? name = default, string? parentSiteKey = default, string? roomKey = default) +{ +Name = name; +ParentSiteKey = parentSiteKey; +RoomKey = roomKey; +} + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] +public string? ParentSiteKey { get; set; } + +/// +/// Your unique identifier for the room. +/// +[DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] +public string? RoomKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataSites_model")] +public class CreatePortalRequestCustomerDataSites +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataSites() { } + +public CreatePortalRequestCustomerDataSites(string? name = default, string? siteKey = default) +{ +Name = name; +SiteKey = siteKey; +} + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] +public string? SiteKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataSpaces_model")] +public class CreatePortalRequestCustomerDataSpaces +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataSpaces() { } + +public CreatePortalRequestCustomerDataSpaces(CreatePortalRequestCustomerDataSpacesCustomerData? customerData = default, int? durationMinutes = default, CreatePortalRequestCustomerDataSpacesGeolocation? geolocation = default, string? name = default, string? parentSiteKey = default, string? spaceKey = default) +{ +CustomerData = customerData; +DurationMinutes = durationMinutes; +Geolocation = geolocation; +Name = name; +ParentSiteKey = parentSiteKey; +SpaceKey = spaceKey; +} + +/// +/// Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). +/// +[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestCustomerDataSpacesCustomerData? CustomerData { get; set; } + +/// +/// Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. +/// +[DataMember(Name = "duration_minutes", IsRequired = false, EmitDefaultValue = false)] +public int? DurationMinutes { get; set; } + +/// +/// Geographic coordinates (latitude and longitude) of the space. +/// +[DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestCustomerDataSpacesGeolocation? Geolocation { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] +public string? ParentSiteKey { get; set; } + +/// +/// Your unique identifier for the space. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataSpacesCustomerData_model")] +public class CreatePortalRequestCustomerDataSpacesCustomerData +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataSpacesCustomerData() { } + +public CreatePortalRequestCustomerDataSpacesCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) +{ +Address = address; +DefaultCheckinTime = defaultCheckinTime; +DefaultCheckoutTime = defaultCheckoutTime; +TimeZone = timeZone; +} + +/// +/// Postal address for the space. +/// +[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] +public string? Address { get; set; } + +/// +/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckinTime { get; set; } + +/// +/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckoutTime { get; set; } + +/// +/// IANA time zone for the space, e.g. America/Los_Angeles. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataSpacesGeolocation_model")] +public class CreatePortalRequestCustomerDataSpacesGeolocation +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataSpacesGeolocation() { } + +public CreatePortalRequestCustomerDataSpacesGeolocation(float? latitude = default, float? longitude = default) +{ +Latitude = latitude; +Longitude = longitude; +} + +/// +/// Latitude of the space, in decimal degrees. +/// +[DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] +public float? Latitude { get; set; } + +/// +/// Longitude of the space, in decimal degrees. +/// +[DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] +public float? Longitude { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataStaffMembers_model")] +public class CreatePortalRequestCustomerDataStaffMembers +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataStaffMembers() { } + +public CreatePortalRequestCustomerDataStaffMembers(List? buildingKeys = default, List? commonAreaKeys = default, string? emailAddress = default, List? facilityKeys = default, List? listingKeys = default, string? name = default, string? phoneNumber = default, List? propertyKeys = default, List? propertyListingKeys = default, List? roomKeys = default, List? siteKeys = default, List? spaceKeys = default, string? staffMemberKey = default, List? unitKeys = default) +{ +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +EmailAddress = emailAddress; +FacilityKeys = facilityKeys; +ListingKeys = listingKeys; +Name = name; +PhoneNumber = phoneNumber; +PropertyKeys = propertyKeys; +PropertyListingKeys = propertyListingKeys; +RoomKeys = roomKeys; +SiteKeys = siteKeys; +SpaceKeys = spaceKeys; +StaffMemberKey = staffMemberKey; +UnitKeys = unitKeys; +} + +/// +/// List of unique identifiers for the buildings the staff member is associated with. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// List of unique identifiers for the common areas the staff member is associated with. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// List of unique identifiers for the facilities the staff member is associated with. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// List of unique identifiers for the listings the staff member is associated with. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// List of unique identifiers for the properties the staff member is associated with. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// List of unique identifiers for the property listings the staff member is associated with. +/// +[DataMember(Name = "property_listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyListingKeys { get; set; } + +/// +/// List of unique identifiers for the rooms the staff member is associated with. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// List of unique identifiers for the sites the staff member is associated with. +/// +[DataMember(Name = "site_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SiteKeys { get; set; } + +/// +/// List of unique identifiers for the spaces the staff member is associated with. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Your unique identifier for the staff. +/// +[DataMember(Name = "staff_member_key", IsRequired = false, EmitDefaultValue = false)] +public string? StaffMemberKey { get; set; } + +/// +/// List of unique identifiers for the units the staff member is associated with. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataTenants_model")] +public class CreatePortalRequestCustomerDataTenants +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataTenants() { } + +public CreatePortalRequestCustomerDataTenants(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? tenantKey = default) +{ +EmailAddress = emailAddress; +Name = name; +PhoneNumber = phoneNumber; +TenantKey = tenantKey; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Your unique identifier for the tenant. +/// +[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] +public string? TenantKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataUnits_model")] +public class CreatePortalRequestCustomerDataUnits +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataUnits() { } + +public CreatePortalRequestCustomerDataUnits(string? name = default, string? parentSiteKey = default, string? unitKey = default) +{ +Name = name; +ParentSiteKey = parentSiteKey; +UnitKey = unitKey; +} + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] +public string? ParentSiteKey { get; set; } + +/// +/// Your unique identifier for the unit. +/// +[DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] +public string? UnitKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataUserIdentities_model")] +public class CreatePortalRequestCustomerDataUserIdentities +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataUserIdentities() { } + +public CreatePortalRequestCustomerDataUserIdentities(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? userIdentityKey = default) +{ +EmailAddress = emailAddress; +Name = name; +PhoneNumber = phoneNumber; +UserIdentityKey = userIdentityKey; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Your unique identifier for the user identity. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerDataUsers_model")] +public class CreatePortalRequestCustomerDataUsers +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerDataUsers() { } + +public CreatePortalRequestCustomerDataUsers(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? userKey = default) +{ +EmailAddress = emailAddress; +Name = name; +PhoneNumber = phoneNumber; +UserKey = userKey; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Your unique identifier for the user. +/// +[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestCustomerResourcesFilters_model")] +public class CreatePortalRequestCustomerResourcesFilters +{ +[JsonConstructorAttribute] +protected CreatePortalRequestCustomerResourcesFilters() { } + +public CreatePortalRequestCustomerResourcesFilters(string? field = default, CreatePortalRequestCustomerResourcesFilters.OperationEnum? operation = default, string? value = default) +{ +Field = field; +Operation = operation; +Value = value; +} + +/// +/// The comparison operation. Currently only '=' is supported. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum OperationEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "=")] +empty = 1, +} + +/// +/// The custom_metadata field name to filter on. +/// +[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] +public string? Field { get; set; } + +/// +/// The comparison operation. Currently only '=' is supported. +/// +[DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestCustomerResourcesFilters.OperationEnum? Operation { get; set; } + +/// +/// The value to compare against. +/// +[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] +public string? Value { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestDeepLink_model")] +public class CreatePortalRequestDeepLink +{ +[JsonConstructorAttribute] +protected CreatePortalRequestDeepLink() { } + +public CreatePortalRequestDeepLink(string? resourceId = default, string? resourceKey = default, CreatePortalRequestDeepLink.ResourceTypeEnum? resourceType = default) +{ +ResourceId = resourceId; +ResourceKey = resourceKey; +ResourceType = resourceType; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ResourceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "reservation")] +Reservation = 1, + +[EnumMember(Value = "space")] +Space = 2, + +[EnumMember(Value = "device")] +Device = 3, + +[EnumMember(Value = "acs_entrance")] +AcsEntrance = 4, +} + +[DataMember(Name = "resource_id", IsRequired = false, EmitDefaultValue = false)] +public string? ResourceId { get; set; } + +[DataMember(Name = "resource_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResourceKey { get; set; } + +[DataMember(Name = "resource_type", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestDeepLink.ResourceTypeEnum? ResourceType { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestFeatures_model")] +public class CreatePortalRequestFeatures +{ +[JsonConstructorAttribute] +protected CreatePortalRequestFeatures() { } + +public CreatePortalRequestFeatures(CreatePortalRequestFeaturesConfigure? configure = default, CreatePortalRequestFeaturesConnect? connect = default, CreatePortalRequestFeaturesManage? manage = default, CreatePortalRequestFeaturesManageDevices? manageDevices = default, CreatePortalRequestFeaturesOrganize? organize = default) +{ +Configure = configure; +Connect = connect; +Manage = manage; +ManageDevices = manageDevices; +Organize = organize; +} + +/// +/// Configuration for the configure feature. +/// +[DataMember(Name = "configure", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestFeaturesConfigure? Configure { get; set; } + +/// +/// Configuration for the connect accounts feature. +/// +[DataMember(Name = "connect", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestFeaturesConnect? Connect { get; set; } + +/// +/// Configuration for the manage feature. +/// +[DataMember(Name = "manage", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestFeaturesManage? Manage { get; set; } + +/// +/// Configuration for the manage devices feature. +/// --- +/// deprecated: Use `manage` instead. +/// --- +/// +[DataMember(Name = "manage_devices", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestFeaturesManageDevices? ManageDevices { get; set; } + +/// +/// Configuration for the organize feature. +/// +[DataMember(Name = "organize", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestFeaturesOrganize? Organize { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestFeaturesConfigure_model")] +public class CreatePortalRequestFeaturesConfigure +{ +[JsonConstructorAttribute] +protected CreatePortalRequestFeaturesConfigure() { } + +public CreatePortalRequestFeaturesConfigure(bool? allowAccessAutomationRuleCustomization = default, bool? allowClimateAutomationRuleCustomization = default, bool? allowInstantKeyCustomization = default, bool? exclude = default) +{ +AllowAccessAutomationRuleCustomization = allowAccessAutomationRuleCustomization; +AllowClimateAutomationRuleCustomization = allowClimateAutomationRuleCustomization; +AllowInstantKeyCustomization = allowInstantKeyCustomization; +Exclude = exclude; +} + +/// +/// Indicates whether the customer can customize the access automation rules for their properties. +/// +[DataMember(Name = "allow_access_automation_rule_customization", IsRequired = false, EmitDefaultValue = false)] +public bool? AllowAccessAutomationRuleCustomization { get; set; } + +/// +/// Indicates whether the customer can customize the climate automation rules for their properties. +/// +[DataMember(Name = "allow_climate_automation_rule_customization", IsRequired = false, EmitDefaultValue = false)] +public bool? AllowClimateAutomationRuleCustomization { get; set; } + +/// +/// Indicates whether the customer can customize the Instant Key profile for their properties. +/// +[DataMember(Name = "allow_instant_key_customization", IsRequired = false, EmitDefaultValue = false)] +public bool? AllowInstantKeyCustomization { get; set; } + +/// +/// Whether to exclude this feature from the portal. +/// +[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] +public bool? Exclude { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestFeaturesConnect_model")] +public class CreatePortalRequestFeaturesConnect +{ +[JsonConstructorAttribute] +protected CreatePortalRequestFeaturesConnect() { } + +public CreatePortalRequestFeaturesConnect(List? acceptedProviders = default, bool? exclude = default, List? excludedProviders = default) +{ +AcceptedProviders = acceptedProviders; +Exclude = exclude; +ExcludedProviders = excludedProviders; +} + +/// +/// List of provider keys to allow for the connect feature. These providers will be shown when the customer tries to connect an account. +/// +[DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] +public List? AcceptedProviders { get; set; } + +/// +/// Whether to exclude this feature from the portal. +/// +[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] +public bool? Exclude { get; set; } + +/// +/// List of provider keys to exclude from the connect feature. These providers will not be shown when the customer tries to connect an account. +/// +[DataMember(Name = "excluded_providers", IsRequired = false, EmitDefaultValue = false)] +public List? ExcludedProviders { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestFeaturesManage_model")] +public class CreatePortalRequestFeaturesManage +{ +[JsonConstructorAttribute] +protected CreatePortalRequestFeaturesManage() { } + +public CreatePortalRequestFeaturesManage(CreatePortalRequestFeaturesManageDeviceManagementConfirmation? deviceManagementConfirmation = default, CreatePortalRequestFeaturesManageEvents? events = default, bool? exclude = default, bool? excludeReservationManagement = default, bool? excludeReservationTechnicalDetails = default, bool? excludeStaffManagement = default) +{ +DeviceManagementConfirmation = deviceManagementConfirmation; +Events = events; +Exclude = exclude; +ExcludeReservationManagement = excludeReservationManagement; +ExcludeReservationTechnicalDetails = excludeReservationTechnicalDetails; +ExcludeStaffManagement = excludeStaffManagement; +} + +/// +/// Custom copy for the confirmation modal shown before unmanaged devices are added to a space and begin being managed (and billed). Only takes effect when the MANAGE_DEVICES_CONFIRMATION_MODAL feature flag is enabled for the workspace. Any omitted string falls back to a localized default. +/// +[DataMember(Name = "device_management_confirmation", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestFeaturesManageDeviceManagementConfirmation? DeviceManagementConfirmation { get; set; } + +/// +/// Configuration for event type filtering in the manage feature. +/// +[DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestFeaturesManageEvents? Events { get; set; } + +/// +/// Whether to exclude this feature from the portal. +/// +[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] +public bool? Exclude { get; set; } + +/// +/// Indicates whether the customer can manage reservations for their properties. +/// +[DataMember(Name = "exclude_reservation_management", IsRequired = false, EmitDefaultValue = false)] +public bool? ExcludeReservationManagement { get; set; } + +/// +/// Indicates whether to exclude technical details from reservation views. +/// +[DataMember(Name = "exclude_reservation_technical_details", IsRequired = false, EmitDefaultValue = false)] +public bool? ExcludeReservationTechnicalDetails { get; set; } + +/// +/// Indicates whether the customer can manage staff for their properties. +/// +[DataMember(Name = "exclude_staff_management", IsRequired = false, EmitDefaultValue = false)] +public bool? ExcludeStaffManagement { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestFeaturesManageDeviceManagementConfirmation_model")] +public class CreatePortalRequestFeaturesManageDeviceManagementConfirmation +{ +[JsonConstructorAttribute] +protected CreatePortalRequestFeaturesManageDeviceManagementConfirmation() { } + +public CreatePortalRequestFeaturesManageDeviceManagementConfirmation(string? body = default, string? cancelButtonLabel = default, string? confirmButtonLabel = default, string? title = default) +{ +Body = body; +CancelButtonLabel = cancelButtonLabel; +ConfirmButtonLabel = confirmButtonLabel; +Title = title; +} + +/// +/// Custom body text for the confirmation modal. May include the {count} token, which is replaced with the number of devices that will begin being managed. +/// +[DataMember(Name = "body", IsRequired = false, EmitDefaultValue = false)] +public string? Body { get; set; } + +/// +/// Custom label for the cancel button. +/// +[DataMember(Name = "cancel_button_label", IsRequired = false, EmitDefaultValue = false)] +public string? CancelButtonLabel { get; set; } + +/// +/// Custom label for the confirm button. +/// +[DataMember(Name = "confirm_button_label", IsRequired = false, EmitDefaultValue = false)] +public string? ConfirmButtonLabel { get; set; } + +/// +/// Custom title for the confirmation modal. +/// +[DataMember(Name = "title", IsRequired = false, EmitDefaultValue = false)] +public string? Title { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestFeaturesManageEvents_model")] +public class CreatePortalRequestFeaturesManageEvents +{ +[JsonConstructorAttribute] +protected CreatePortalRequestFeaturesManageEvents() { } + +public CreatePortalRequestFeaturesManageEvents(List? allowedEvents = default, List? defaultEvents = default) +{ +AllowedEvents = allowedEvents; +DefaultEvents = defaultEvents; +} + +/// +/// List of event types to show in the events filter. When set, only these event types will be available. Leave empty to show all events. +/// +[DataMember(Name = "allowed_events", IsRequired = false, EmitDefaultValue = false)] +public List? AllowedEvents { get; set; } + +/// +/// List of event types that are pre-selected in the events filter when the user first loads the events tab. +/// +[DataMember(Name = "default_events", IsRequired = false, EmitDefaultValue = false)] +public List? DefaultEvents { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestFeaturesManageDevices_model")] +public class CreatePortalRequestFeaturesManageDevices +{ +[JsonConstructorAttribute] +protected CreatePortalRequestFeaturesManageDevices() { } + +public CreatePortalRequestFeaturesManageDevices(bool? exclude = default) +{ +Exclude = exclude; +} + +/// +/// Whether to exclude this feature from the portal. +/// +[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] +public bool? Exclude { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestFeaturesOrganize_model")] +public class CreatePortalRequestFeaturesOrganize +{ +[JsonConstructorAttribute] +protected CreatePortalRequestFeaturesOrganize() { } + +public CreatePortalRequestFeaturesOrganize(bool? exclude = default) +{ +Exclude = exclude; +} + +/// +/// Whether to exclude this feature from the portal. +/// +[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] +public bool? Exclude { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestLandingPage_model")] +public class CreatePortalRequestLandingPage +{ +[JsonConstructorAttribute] +protected CreatePortalRequestLandingPage() { } + +public CreatePortalRequestLandingPage(CreatePortalRequestLandingPageManage? manage = default) +{ +Manage = manage; +} + +[DataMember(Name = "manage", IsRequired = false, EmitDefaultValue = false)] +public CreatePortalRequestLandingPageManage? Manage { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalRequestLandingPageManage_model")] +public class CreatePortalRequestLandingPageManage +{ +[JsonConstructorAttribute] +protected CreatePortalRequestLandingPageManage() { } + +public CreatePortalRequestLandingPageManage(string? accessGrantKey = default, string? bookingKey = default, string? buildingKey = default, string? commonAreaKey = default, string? facilityKey = default, string? listingKey = default, string? propertyKey = default, string? propertyListingKey = default, string? reservationKey = default, string? roomKey = default, string? siteKey = default, string? spaceKey = default, string? unitKey = default) +{ +AccessGrantKey = accessGrantKey; +BookingKey = bookingKey; +BuildingKey = buildingKey; +CommonAreaKey = commonAreaKey; +FacilityKey = facilityKey; +ListingKey = listingKey; +PropertyKey = propertyKey; +PropertyListingKey = propertyListingKey; +ReservationKey = reservationKey; +RoomKey = roomKey; +SiteKey = siteKey; +SpaceKey = spaceKey; +UnitKey = unitKey; +} + +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +[DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] +public string? BookingKey { get; set; } + +[DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] +public string? BuildingKey { get; set; } + +[DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] +public string? CommonAreaKey { get; set; } + +[DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] +public string? FacilityKey { get; set; } + +[DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] +public string? ListingKey { get; set; } + +[DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] +public string? PropertyKey { get; set; } + +[DataMember(Name = "property_listing_key", IsRequired = false, EmitDefaultValue = false)] +public string? PropertyListingKey { get; set; } + +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +[DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] +public string? RoomKey { get; set; } + +[DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] +public string? SiteKey { get; set; } + +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +[DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] +public string? UnitKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createPortalResponse_response")] +public class CreatePortalResponse +{ +[JsonConstructorAttribute] +protected CreatePortalResponse() { } + +public CreatePortalResponse(CustomerPortal customerPortal = default) +{ +CustomerPortal = customerPortal; +} + +/// +/// OK +/// +[DataMember(Name = "customer_portal", IsRequired = false, EmitDefaultValue = false)] +public CustomerPortal CustomerPortal { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new customer portal magic link with configurable features. +/// +public CustomerPortal CreatePortal(CreatePortalRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/customers/create_portal", requestOptions).EnsureData("/customers/create_portal").CustomerPortal; +} + +/// +/// Creates a new customer portal magic link with configurable features. +/// +public CustomerPortal CreatePortal(CreatePortalRequestCustomerData? customerData = default, List? customerResourcesFilters = default, string? customizationProfileId = default, CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, bool? readOnly = default) +{ +return CreatePortal(new CreatePortalRequest(customerData: customerData, customerResourcesFilters: customerResourcesFilters, customizationProfileId: customizationProfileId, deepLink: deepLink, excludeLocalePicker: excludeLocalePicker, features: features, isEmbedded: isEmbedded, landingPage: landingPage, locale: locale, navigationMode: navigationMode, readOnly: readOnly)); +} + +/// +/// Creates a new customer portal magic link with configurable features. +/// +public async Task CreatePortalAsync(CreatePortalRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/customers/create_portal", requestOptions)).EnsureData("/customers/create_portal").CustomerPortal; +} + +/// +/// Creates a new customer portal magic link with configurable features. +/// +public async Task CreatePortalAsync(CreatePortalRequestCustomerData? customerData = default, List? customerResourcesFilters = default, string? customizationProfileId = default, CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, bool? readOnly = default) +{ +return (await CreatePortalAsync(new CreatePortalRequest(customerData: customerData, customerResourcesFilters: customerResourcesFilters, customizationProfileId: customizationProfileId, deepLink: deepLink, excludeLocalePicker: excludeLocalePicker, features: features, isEmbedded: isEmbedded, landingPage: landingPage, locale: locale, navigationMode: navigationMode, readOnly: readOnly))); +} + +/// +/// Request parameters for Delete Customer Data. +/// +[DataContract(Name = "deleteDataRequest_request")] +public class DeleteDataRequest +{ +[JsonConstructorAttribute] +protected DeleteDataRequest() { } + +public DeleteDataRequest(List? accessGrantKeys = default, List? bookingKeys = default, List? buildingKeys = default, List? commonAreaKeys = default, List? customerKeys = default, List? facilityKeys = default, List? guestKeys = default, List? listingKeys = default, List? propertyKeys = default, List? propertyListingKeys = default, List? reservationKeys = default, List? residentKeys = default, List? roomKeys = default, List? spaceKeys = default, List? staffMemberKeys = default, List? tenantKeys = default, List? unitKeys = default, List? userIdentityKeys = default, List? userKeys = default) +{ +AccessGrantKeys = accessGrantKeys; +BookingKeys = bookingKeys; +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +CustomerKeys = customerKeys; +FacilityKeys = facilityKeys; +GuestKeys = guestKeys; +ListingKeys = listingKeys; +PropertyKeys = propertyKeys; +PropertyListingKeys = propertyListingKeys; +ReservationKeys = reservationKeys; +ResidentKeys = residentKeys; +RoomKeys = roomKeys; +SpaceKeys = spaceKeys; +StaffMemberKeys = staffMemberKeys; +TenantKeys = tenantKeys; +UnitKeys = unitKeys; +UserIdentityKeys = userIdentityKeys; +UserKeys = userKeys; +} + +/// +/// List of access grant keys to delete. +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// List of booking keys to delete. +/// +[DataMember(Name = "booking_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BookingKeys { get; set; } + +/// +/// List of building keys to delete. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// List of common area keys to delete. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// List of customer keys to delete all data for. +/// +[DataMember(Name = "customer_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CustomerKeys { get; set; } + +/// +/// List of facility keys to delete. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// List of guest keys to delete. +/// +[DataMember(Name = "guest_keys", IsRequired = false, EmitDefaultValue = false)] +public List? GuestKeys { get; set; } + +/// +/// List of listing keys to delete. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// List of property keys to delete. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// List of property listing keys to delete. +/// +[DataMember(Name = "property_listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyListingKeys { get; set; } + +/// +/// List of reservation keys to delete. +/// +[DataMember(Name = "reservation_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ReservationKeys { get; set; } + +/// +/// List of resident keys to delete. +/// +[DataMember(Name = "resident_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ResidentKeys { get; set; } + +/// +/// List of room keys to delete. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// List of space keys to delete. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// List of staff member keys to delete. +/// +[DataMember(Name = "staff_member_keys", IsRequired = false, EmitDefaultValue = false)] +public List? StaffMemberKeys { get; set; } + +/// +/// List of tenant keys to delete. +/// +[DataMember(Name = "tenant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? TenantKeys { get; set; } + +/// +/// List of unit keys to delete. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +/// +/// List of user identity keys to delete. +/// +[DataMember(Name = "user_identity_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UserIdentityKeys { get; set; } + +/// +/// List of user keys to delete. +/// +[DataMember(Name = "user_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UserKeys { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes customer data including resources like spaces, properties, rooms, users, etc. +/// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). +/// +public void DeleteData(DeleteDataRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/customers/delete_data", requestOptions); +} + +/// +/// Deletes customer data including resources like spaces, properties, rooms, users, etc. +/// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). +/// +public void DeleteData(List? accessGrantKeys = default, List? bookingKeys = default, List? buildingKeys = default, List? commonAreaKeys = default, List? customerKeys = default, List? facilityKeys = default, List? guestKeys = default, List? listingKeys = default, List? propertyKeys = default, List? propertyListingKeys = default, List? reservationKeys = default, List? residentKeys = default, List? roomKeys = default, List? spaceKeys = default, List? staffMemberKeys = default, List? tenantKeys = default, List? unitKeys = default, List? userIdentityKeys = default, List? userKeys = default) +{ +DeleteData(new DeleteDataRequest(accessGrantKeys: accessGrantKeys, bookingKeys: bookingKeys, buildingKeys: buildingKeys, commonAreaKeys: commonAreaKeys, customerKeys: customerKeys, facilityKeys: facilityKeys, guestKeys: guestKeys, listingKeys: listingKeys, propertyKeys: propertyKeys, propertyListingKeys: propertyListingKeys, reservationKeys: reservationKeys, residentKeys: residentKeys, roomKeys: roomKeys, spaceKeys: spaceKeys, staffMemberKeys: staffMemberKeys, tenantKeys: tenantKeys, unitKeys: unitKeys, userIdentityKeys: userIdentityKeys, userKeys: userKeys)); +} + +/// +/// Deletes customer data including resources like spaces, properties, rooms, users, etc. +/// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). +/// +public async Task DeleteDataAsync(DeleteDataRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/customers/delete_data", requestOptions); +} + +/// +/// Deletes customer data including resources like spaces, properties, rooms, users, etc. +/// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). +/// +public async Task DeleteDataAsync(List? accessGrantKeys = default, List? bookingKeys = default, List? buildingKeys = default, List? commonAreaKeys = default, List? customerKeys = default, List? facilityKeys = default, List? guestKeys = default, List? listingKeys = default, List? propertyKeys = default, List? propertyListingKeys = default, List? reservationKeys = default, List? residentKeys = default, List? roomKeys = default, List? spaceKeys = default, List? staffMemberKeys = default, List? tenantKeys = default, List? unitKeys = default, List? userIdentityKeys = default, List? userKeys = default) +{ +await DeleteDataAsync(new DeleteDataRequest(accessGrantKeys: accessGrantKeys, bookingKeys: bookingKeys, buildingKeys: buildingKeys, commonAreaKeys: commonAreaKeys, customerKeys: customerKeys, facilityKeys: facilityKeys, guestKeys: guestKeys, listingKeys: listingKeys, propertyKeys: propertyKeys, propertyListingKeys: propertyListingKeys, reservationKeys: reservationKeys, residentKeys: residentKeys, roomKeys: roomKeys, spaceKeys: spaceKeys, staffMemberKeys: staffMemberKeys, tenantKeys: tenantKeys, unitKeys: unitKeys, userIdentityKeys: userIdentityKeys, userKeys: userKeys)); +} + +/// +/// Request parameters for Push Customer Data. +/// +[DataContract(Name = "pushDataRequest_request")] +public class PushDataRequest +{ +[JsonConstructorAttribute] +protected PushDataRequest() { } + +public PushDataRequest(List? accessGrants = default, List? bookings = default, List? buildings = default, List? commonAreas = default, string customerKey = default, List? facilities = default, List? guests = default, List? listings = default, List? properties = default, List? propertyListings = default, List? reservations = default, List? residents = default, List? rooms = default, List? sites = default, List? spaces = default, List? staffMembers = default, List? tenants = default, List? units = default, List? userIdentities = default, List? users = default) +{ +AccessGrants = accessGrants; +Bookings = bookings; +Buildings = buildings; +CommonAreas = commonAreas; +CustomerKey = customerKey; +Facilities = facilities; +Guests = guests; +Listings = listings; +Properties = properties; +PropertyListings = propertyListings; +Reservations = reservations; +Residents = residents; +Rooms = rooms; +Sites = sites; +Spaces = spaces; +StaffMembers = staffMembers; +Tenants = tenants; +Units = units; +UserIdentities = userIdentities; +Users = users; +} + +/// +/// List of access grants. +/// +[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrants { get; set; } + +/// +/// List of bookings. +/// +[DataMember(Name = "bookings", IsRequired = false, EmitDefaultValue = false)] +public List? Bookings { get; set; } + +/// +/// List of buildings. +/// +[DataMember(Name = "buildings", IsRequired = false, EmitDefaultValue = false)] +public List? Buildings { get; set; } + +/// +/// List of shared common areas. +/// +[DataMember(Name = "common_areas", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreas { get; set; } + +/// +/// Your unique identifier for the customer. +/// +[DataMember(Name = "customer_key", IsRequired = true, EmitDefaultValue = false)] +public string CustomerKey { get; set; } + +/// +/// List of gym or fitness facilities. +/// +[DataMember(Name = "facilities", IsRequired = false, EmitDefaultValue = false)] +public List? Facilities { get; set; } + +/// +/// List of guests. +/// +[DataMember(Name = "guests", IsRequired = false, EmitDefaultValue = false)] +public List? Guests { get; set; } + +/// +/// List of property listings. +/// +[DataMember(Name = "listings", IsRequired = false, EmitDefaultValue = false)] +public List? Listings { get; set; } + +/// +/// List of short-term rental properties. +/// +[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] +public List? Properties { get; set; } + +/// +/// List of property listings. +/// +[DataMember(Name = "property_listings", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyListings { get; set; } + +/// +/// List of reservations. +/// +[DataMember(Name = "reservations", IsRequired = false, EmitDefaultValue = false)] +public List? Reservations { get; set; } + +/// +/// List of residents. +/// +[DataMember(Name = "residents", IsRequired = false, EmitDefaultValue = false)] +public List? Residents { get; set; } + +/// +/// List of hotel or hospitality rooms. +/// +[DataMember(Name = "rooms", IsRequired = false, EmitDefaultValue = false)] +public List? Rooms { get; set; } + +/// +/// List of general sites or areas. +/// +[DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] +public List? Sites { get; set; } + +/// +/// List of general spaces or areas. +/// +[DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] +public List? Spaces { get; set; } + +/// +/// List of staff members. +/// +[DataMember(Name = "staff_members", IsRequired = false, EmitDefaultValue = false)] +public List? StaffMembers { get; set; } + +/// +/// List of tenants. +/// +[DataMember(Name = "tenants", IsRequired = false, EmitDefaultValue = false)] +public List? Tenants { get; set; } + +/// +/// List of multi-family residential units. +/// +[DataMember(Name = "units", IsRequired = false, EmitDefaultValue = false)] +public List? Units { get; set; } + +/// +/// List of user identities. +/// +[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] +public List? UserIdentities { get; set; } + +/// +/// List of users. +/// +[DataMember(Name = "users", IsRequired = false, EmitDefaultValue = false)] +public List? Users { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestAccessGrants_model")] +public class PushDataRequestAccessGrants +{ +[JsonConstructorAttribute] +protected PushDataRequestAccessGrants() { } + +public PushDataRequestAccessGrants(string? accessGrantKey = default, List? buildingKeys = default, List? commonAreaKeys = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) +{ +AccessGrantKey = accessGrantKey; +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +EndsAt = endsAt; +FacilityKeys = facilityKeys; +GuestKey = guestKey; +ListingKeys = listingKeys; +Name = name; +PreferredCode = preferredCode; +PropertyKeys = propertyKeys; +ResidentKey = residentKey; +RoomKeys = roomKeys; +SpaceKeys = spaceKeys; +StartsAt = startsAt; +TenantKey = tenantKey; +UnitKeys = unitKeys; +UserIdentityKey = userIdentityKey; +UserKey = userKey; +} + +/// +/// Your unique identifier for the access grant. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// Building keys associated with the access grant. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// Common area keys associated with the access grant. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// Ending date and time for the access grant. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Facility keys associated with the access grant. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// Guest key associated with the access grant. +/// +[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] +public string? GuestKey { get; set; } + +/// +/// Listing keys associated with the access grant. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// Your name for this access grant resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Preferred PIN code to use when creating access for this reservation. +/// +[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] +public string? PreferredCode { get; set; } + +/// +/// Property keys associated with the access grant. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// Resident key associated with the access grant. +/// +[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResidentKey { get; set; } + +/// +/// Room keys associated with the access grant. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// Space keys associated with the access grant. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Starting date and time for the access grant. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Tenant key associated with the access grant. +/// +[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] +public string? TenantKey { get; set; } + +/// +/// Unit keys associated with the access grant. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +/// +/// User identity key associated with the access grant. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +/// +/// User key associated with the access grant. +/// +[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestBookings_model")] +public class PushDataRequestBookings +{ +[JsonConstructorAttribute] +protected PushDataRequestBookings() { } + +public PushDataRequestBookings(string? bookingKey = default, List? buildingKeys = default, List? commonAreaKeys = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) +{ +BookingKey = bookingKey; +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +EndsAt = endsAt; +FacilityKeys = facilityKeys; +GuestKey = guestKey; +ListingKeys = listingKeys; +Name = name; +PreferredCode = preferredCode; +PropertyKeys = propertyKeys; +ResidentKey = residentKey; +RoomKeys = roomKeys; +SpaceKeys = spaceKeys; +StartsAt = startsAt; +TenantKey = tenantKey; +UnitKeys = unitKeys; +UserIdentityKey = userIdentityKey; +UserKey = userKey; +} + +/// +/// Your unique identifier for the booking. +/// +[DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] +public string? BookingKey { get; set; } + +/// +/// Building keys associated with the access grant. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// Common area keys associated with the access grant. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// Ending date and time for the access grant. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Facility keys associated with the access grant. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// Guest key associated with the access grant. +/// +[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] +public string? GuestKey { get; set; } + +/// +/// Listing keys associated with the access grant. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// Your name for this access grant resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Preferred PIN code to use when creating access for this reservation. +/// +[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] +public string? PreferredCode { get; set; } + +/// +/// Property keys associated with the access grant. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// Resident key associated with the access grant. +/// +[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResidentKey { get; set; } + +/// +/// Room keys associated with the access grant. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// Space keys associated with the access grant. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Starting date and time for the access grant. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Tenant key associated with the access grant. +/// +[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] +public string? TenantKey { get; set; } + +/// +/// Unit keys associated with the access grant. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +/// +/// User identity key associated with the access grant. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +/// +/// User key associated with the access grant. +/// +[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestBuildings_model")] +public class PushDataRequestBuildings +{ +[JsonConstructorAttribute] +protected PushDataRequestBuildings() { } + +public PushDataRequestBuildings(string? buildingKey = default, string? name = default) +{ +BuildingKey = buildingKey; +Name = name; +} + +/// +/// Your unique identifier for the building. +/// +[DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] +public string? BuildingKey { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestCommonAreas_model")] +public class PushDataRequestCommonAreas +{ +[JsonConstructorAttribute] +protected PushDataRequestCommonAreas() { } + +public PushDataRequestCommonAreas(string? commonAreaKey = default, string? name = default, string? parentSiteKey = default) +{ +CommonAreaKey = commonAreaKey; +Name = name; +ParentSiteKey = parentSiteKey; +} + +/// +/// Your unique identifier for the common area. +/// +[DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] +public string? CommonAreaKey { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] +public string? ParentSiteKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestFacilities_model")] +public class PushDataRequestFacilities +{ +[JsonConstructorAttribute] +protected PushDataRequestFacilities() { } + +public PushDataRequestFacilities(string? facilityKey = default, string? name = default) +{ +FacilityKey = facilityKey; +Name = name; +} + +/// +/// Your unique identifier for the facility. +/// +[DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] +public string? FacilityKey { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestGuests_model")] +public class PushDataRequestGuests +{ +[JsonConstructorAttribute] +protected PushDataRequestGuests() { } + +public PushDataRequestGuests(string? emailAddress = default, string? guestKey = default, string? name = default, string? phoneNumber = default) +{ +EmailAddress = emailAddress; +GuestKey = guestKey; +Name = name; +PhoneNumber = phoneNumber; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your unique identifier for the guest. +/// +[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] +public string? GuestKey { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestListings_model")] +public class PushDataRequestListings +{ +[JsonConstructorAttribute] +protected PushDataRequestListings() { } + +public PushDataRequestListings(string? listingKey = default, string? name = default) +{ +ListingKey = listingKey; +Name = name; +} + +/// +/// Your unique identifier for the listing. +/// +[DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] +public string? ListingKey { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestProperties_model")] +public class PushDataRequestProperties +{ +[JsonConstructorAttribute] +protected PushDataRequestProperties() { } + +public PushDataRequestProperties(string? name = default, string? propertyKey = default) +{ +Name = name; +PropertyKey = propertyKey; +} + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the property. +/// +[DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] +public string? PropertyKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestPropertyListings_model")] +public class PushDataRequestPropertyListings +{ +[JsonConstructorAttribute] +protected PushDataRequestPropertyListings() { } + +public PushDataRequestPropertyListings(object? customMetadata = default, string? name = default, string? propertyListingKey = default) +{ +CustomMetadata = customMetadata; +Name = name; +PropertyListingKey = propertyListingKey; +} + +/// +/// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadata { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the property listing. +/// +[DataMember(Name = "property_listing_key", IsRequired = false, EmitDefaultValue = false)] +public string? PropertyListingKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestReservations_model")] +public class PushDataRequestReservations +{ +[JsonConstructorAttribute] +protected PushDataRequestReservations() { } + +public PushDataRequestReservations(List? buildingKeys = default, List? commonAreaKeys = default, object? customMetadata = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? reservationKey = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) +{ +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +CustomMetadata = customMetadata; +EndsAt = endsAt; +FacilityKeys = facilityKeys; +GuestKey = guestKey; +ListingKeys = listingKeys; +Name = name; +PreferredCode = preferredCode; +PropertyKeys = propertyKeys; +ReservationKey = reservationKey; +ResidentKey = residentKey; +RoomKeys = roomKeys; +SpaceKeys = spaceKeys; +StartsAt = startsAt; +TenantKey = tenantKey; +UnitKeys = unitKeys; +UserIdentityKey = userIdentityKey; +UserKey = userKey; +} + +/// +/// Building keys associated with the access grant. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// Common area keys associated with the access grant. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadata { get; set; } + +/// +/// Ending date and time for the access grant. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Facility keys associated with the access grant. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// Guest key associated with the access grant. +/// +[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] +public string? GuestKey { get; set; } + +/// +/// Listing keys associated with the access grant. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// Your name for this access grant resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Preferred PIN code to use when creating access for this reservation. +/// +[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] +public string? PreferredCode { get; set; } + +/// +/// Property keys associated with the access grant. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// Your unique identifier for the reservation. +/// +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +/// +/// Resident key associated with the access grant. +/// +[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResidentKey { get; set; } + +/// +/// Room keys associated with the access grant. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// Space keys associated with the access grant. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Starting date and time for the access grant. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Tenant key associated with the access grant. +/// +[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] +public string? TenantKey { get; set; } + +/// +/// Unit keys associated with the access grant. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +/// +/// User identity key associated with the access grant. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +/// +/// User key associated with the access grant. +/// +[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestResidents_model")] +public class PushDataRequestResidents +{ +[JsonConstructorAttribute] +protected PushDataRequestResidents() { } + +public PushDataRequestResidents(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? residentKey = default) +{ +EmailAddress = emailAddress; +Name = name; +PhoneNumber = phoneNumber; +ResidentKey = residentKey; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Your unique identifier for the resident. +/// +[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] +public string? ResidentKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestRooms_model")] +public class PushDataRequestRooms +{ +[JsonConstructorAttribute] +protected PushDataRequestRooms() { } + +public PushDataRequestRooms(string? name = default, string? parentSiteKey = default, string? roomKey = default) +{ +Name = name; +ParentSiteKey = parentSiteKey; +RoomKey = roomKey; +} + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] +public string? ParentSiteKey { get; set; } + +/// +/// Your unique identifier for the room. +/// +[DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] +public string? RoomKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestSites_model")] +public class PushDataRequestSites +{ +[JsonConstructorAttribute] +protected PushDataRequestSites() { } + +public PushDataRequestSites(string? name = default, string? siteKey = default) +{ +Name = name; +SiteKey = siteKey; +} + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] +public string? SiteKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestSpaces_model")] +public class PushDataRequestSpaces +{ +[JsonConstructorAttribute] +protected PushDataRequestSpaces() { } + +public PushDataRequestSpaces(PushDataRequestSpacesCustomerData? customerData = default, int? durationMinutes = default, PushDataRequestSpacesGeolocation? geolocation = default, string? name = default, string? parentSiteKey = default, string? spaceKey = default) +{ +CustomerData = customerData; +DurationMinutes = durationMinutes; +Geolocation = geolocation; +Name = name; +ParentSiteKey = parentSiteKey; +SpaceKey = spaceKey; +} + +/// +/// Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). +/// +[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] +public PushDataRequestSpacesCustomerData? CustomerData { get; set; } + +/// +/// Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. +/// +[DataMember(Name = "duration_minutes", IsRequired = false, EmitDefaultValue = false)] +public int? DurationMinutes { get; set; } + +/// +/// Geographic coordinates (latitude and longitude) of the space. +/// +[DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] +public PushDataRequestSpacesGeolocation? Geolocation { get; set; } + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] +public string? ParentSiteKey { get; set; } + +/// +/// Your unique identifier for the space. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestSpacesCustomerData_model")] +public class PushDataRequestSpacesCustomerData +{ +[JsonConstructorAttribute] +protected PushDataRequestSpacesCustomerData() { } + +public PushDataRequestSpacesCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) +{ +Address = address; +DefaultCheckinTime = defaultCheckinTime; +DefaultCheckoutTime = defaultCheckoutTime; +TimeZone = timeZone; +} + +/// +/// Postal address for the space. +/// +[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] +public string? Address { get; set; } + +/// +/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckinTime { get; set; } + +/// +/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckoutTime { get; set; } + +/// +/// IANA time zone for the space, e.g. America/Los_Angeles. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestSpacesGeolocation_model")] +public class PushDataRequestSpacesGeolocation +{ +[JsonConstructorAttribute] +protected PushDataRequestSpacesGeolocation() { } + +public PushDataRequestSpacesGeolocation(float? latitude = default, float? longitude = default) +{ +Latitude = latitude; +Longitude = longitude; +} + +/// +/// Latitude of the space, in decimal degrees. +/// +[DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] +public float? Latitude { get; set; } + +/// +/// Longitude of the space, in decimal degrees. +/// +[DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] +public float? Longitude { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestStaffMembers_model")] +public class PushDataRequestStaffMembers +{ +[JsonConstructorAttribute] +protected PushDataRequestStaffMembers() { } + +public PushDataRequestStaffMembers(List? buildingKeys = default, List? commonAreaKeys = default, string? emailAddress = default, List? facilityKeys = default, List? listingKeys = default, string? name = default, string? phoneNumber = default, List? propertyKeys = default, List? propertyListingKeys = default, List? roomKeys = default, List? siteKeys = default, List? spaceKeys = default, string? staffMemberKey = default, List? unitKeys = default) +{ +BuildingKeys = buildingKeys; +CommonAreaKeys = commonAreaKeys; +EmailAddress = emailAddress; +FacilityKeys = facilityKeys; +ListingKeys = listingKeys; +Name = name; +PhoneNumber = phoneNumber; +PropertyKeys = propertyKeys; +PropertyListingKeys = propertyListingKeys; +RoomKeys = roomKeys; +SiteKeys = siteKeys; +SpaceKeys = spaceKeys; +StaffMemberKey = staffMemberKey; +UnitKeys = unitKeys; +} + +/// +/// List of unique identifiers for the buildings the staff member is associated with. +/// +[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] +public List? BuildingKeys { get; set; } + +/// +/// List of unique identifiers for the common areas the staff member is associated with. +/// +[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAreaKeys { get; set; } + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// List of unique identifiers for the facilities the staff member is associated with. +/// +[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] +public List? FacilityKeys { get; set; } + +/// +/// List of unique identifiers for the listings the staff member is associated with. +/// +[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? ListingKeys { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// List of unique identifiers for the properties the staff member is associated with. +/// +[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyKeys { get; set; } + +/// +/// List of unique identifiers for the property listings the staff member is associated with. +/// +[DataMember(Name = "property_listing_keys", IsRequired = false, EmitDefaultValue = false)] +public List? PropertyListingKeys { get; set; } + +/// +/// List of unique identifiers for the rooms the staff member is associated with. +/// +[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] +public List? RoomKeys { get; set; } + +/// +/// List of unique identifiers for the sites the staff member is associated with. +/// +[DataMember(Name = "site_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SiteKeys { get; set; } + +/// +/// List of unique identifiers for the spaces the staff member is associated with. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +/// +/// Your unique identifier for the staff. +/// +[DataMember(Name = "staff_member_key", IsRequired = false, EmitDefaultValue = false)] +public string? StaffMemberKey { get; set; } + +/// +/// List of unique identifiers for the units the staff member is associated with. +/// +[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] +public List? UnitKeys { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestTenants_model")] +public class PushDataRequestTenants +{ +[JsonConstructorAttribute] +protected PushDataRequestTenants() { } + +public PushDataRequestTenants(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? tenantKey = default) +{ +EmailAddress = emailAddress; +Name = name; +PhoneNumber = phoneNumber; +TenantKey = tenantKey; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Your unique identifier for the tenant. +/// +[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] +public string? TenantKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestUnits_model")] +public class PushDataRequestUnits +{ +[JsonConstructorAttribute] +protected PushDataRequestUnits() { } + +public PushDataRequestUnits(string? name = default, string? parentSiteKey = default, string? unitKey = default) +{ +Name = name; +ParentSiteKey = parentSiteKey; +UnitKey = unitKey; +} + +/// +/// Your display name for this location resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Your unique identifier for the site. +/// +[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] +public string? ParentSiteKey { get; set; } + +/// +/// Your unique identifier for the unit. +/// +[DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] +public string? UnitKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestUserIdentities_model")] +public class PushDataRequestUserIdentities +{ +[JsonConstructorAttribute] +protected PushDataRequestUserIdentities() { } + +public PushDataRequestUserIdentities(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? userIdentityKey = default) +{ +EmailAddress = emailAddress; +Name = name; +PhoneNumber = phoneNumber; +UserIdentityKey = userIdentityKey; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Your unique identifier for the user identity. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "pushDataRequestUsers_model")] +public class PushDataRequestUsers +{ +[JsonConstructorAttribute] +protected PushDataRequestUsers() { } + +public PushDataRequestUsers(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? userKey = default) +{ +EmailAddress = emailAddress; +Name = name; +PhoneNumber = phoneNumber; +UserKey = userKey; +} + +/// +/// Email address associated with the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Your display name for this user identity resource. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Phone number associated with the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Your unique identifier for the user. +/// +[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Pushes customer data including resources like spaces, properties, rooms, users, etc. +/// +public void PushData(PushDataRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/customers/push_data", requestOptions); +} + +/// +/// Pushes customer data including resources like spaces, properties, rooms, users, etc. +/// +public void PushData(List? accessGrants = default, List? bookings = default, List? buildings = default, List? commonAreas = default, string customerKey = default, List? facilities = default, List? guests = default, List? listings = default, List? properties = default, List? propertyListings = default, List? reservations = default, List? residents = default, List? rooms = default, List? sites = default, List? spaces = default, List? staffMembers = default, List? tenants = default, List? units = default, List? userIdentities = default, List? users = default) +{ +PushData(new PushDataRequest(accessGrants: accessGrants, bookings: bookings, buildings: buildings, commonAreas: commonAreas, customerKey: customerKey, facilities: facilities, guests: guests, listings: listings, properties: properties, propertyListings: propertyListings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staffMembers: staffMembers, tenants: tenants, units: units, userIdentities: userIdentities, users: users)); +} + +/// +/// Pushes customer data including resources like spaces, properties, rooms, users, etc. +/// +public async Task PushDataAsync(PushDataRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/customers/push_data", requestOptions); +} + +/// +/// Pushes customer data including resources like spaces, properties, rooms, users, etc. +/// +public async Task PushDataAsync(List? accessGrants = default, List? bookings = default, List? buildings = default, List? commonAreas = default, string customerKey = default, List? facilities = default, List? guests = default, List? listings = default, List? properties = default, List? propertyListings = default, List? reservations = default, List? residents = default, List? rooms = default, List? sites = default, List? spaces = default, List? staffMembers = default, List? tenants = default, List? units = default, List? userIdentities = default, List? users = default) +{ +await PushDataAsync(new PushDataRequest(accessGrants: accessGrants, bookings: bookings, buildings: buildings, commonAreas: commonAreas, customerKey: customerKey, facilities: facilities, guests: guests, listings: listings, properties: properties, propertyListings: propertyListings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staffMembers: staffMembers, tenants: tenants, units: units, userIdentities: userIdentities, users: users)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Customers Customers => new(this); - } +public partial class SeamClient +{ +public Api.Customers Customers => new(this); +} - public partial interface ISeamClient - { - public Api.Customers Customers { get; } - } +public partial interface ISeamClient +{ +public Api.Customers Customers { get; } +} } diff --git a/src/Seam/Api/DailyProgramsThermostats.cs b/src/Seam/Api/DailyProgramsThermostats.cs index a1752068..aa7510ee 100644 --- a/src/Seam/Api/DailyProgramsThermostats.cs +++ b/src/Seam/Api/DailyProgramsThermostats.cs @@ -9,526 +9,444 @@ namespace Seam.Api { - public class DailyProgramsThermostats - { - private ISeamClient _seam; - - public DailyProgramsThermostats(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create a Thermostat Daily Program. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - string deviceId = default, - string name = default, - List periods = default - ) - { - DeviceId = deviceId; - Name = name; - Periods = periods; - } - - /// - /// ID of the thermostat device for which you want to create a daily program. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Name of the thermostat daily program. - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Array of thermostat daily program periods. - /// - [DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)] - public List Periods { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestPeriods_model")] - public class CreateRequestPeriods - { - [JsonConstructorAttribute] - protected CreateRequestPeriods() { } - - public CreateRequestPeriods( - string? climatePresetKey = default, - string? startsAtTime = default - ) - { - ClimatePresetKey = climatePresetKey; - StartsAtTime = startsAtTime; - } - - /// - /// Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string? ClimatePresetKey { get; set; } - - /// - /// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAtTime { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(ThermostatDailyProgram thermostatDailyProgram = default) - { - ThermostatDailyProgram = thermostatDailyProgram; - } - - /// - /// OK - /// - [DataMember( - Name = "thermostat_daily_program", - IsRequired = false, - EmitDefaultValue = false - )] - public ThermostatDailyProgram ThermostatDailyProgram { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. - /// - public ThermostatDailyProgram Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/thermostats/daily_programs/create", requestOptions) - .EnsureData("/thermostats/daily_programs/create") - .ThermostatDailyProgram; - } - - /// - /// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. - /// - public ThermostatDailyProgram Create( - string deviceId = default, - string name = default, - List periods = default - ) - { - return Create(new CreateRequest(deviceId: deviceId, name: name, periods: periods)); - } - - /// - /// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/thermostats/daily_programs/create", - requestOptions - ) - ) - .EnsureData("/thermostats/daily_programs/create") - .ThermostatDailyProgram; - } - - /// - /// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. - /// - public async Task CreateAsync( - string deviceId = default, - string name = default, - List periods = default - ) - { - return ( - await CreateAsync( - new CreateRequest(deviceId: deviceId, name: name, periods: periods) - ) - ); - } - - /// - /// Request parameters for Delete a Thermostat Daily Program. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string thermostatDailyProgramId = default) - { - ThermostatDailyProgramId = thermostatDailyProgramId; - } - - /// - /// ID of the thermostat daily program that you want to delete. - /// - [DataMember( - Name = "thermostat_daily_program_id", - IsRequired = true, - EmitDefaultValue = false - )] - public string ThermostatDailyProgramId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a thermostat daily program. - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/thermostats/daily_programs/delete", requestOptions); - } - - /// - /// Deletes a thermostat daily program. - /// - public void Delete(string thermostatDailyProgramId = default) - { - Delete(new DeleteRequest(thermostatDailyProgramId: thermostatDailyProgramId)); - } - - /// - /// Deletes a thermostat daily program. - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/thermostats/daily_programs/delete", requestOptions); - } - - /// - /// Deletes a thermostat daily program. - /// - public async Task DeleteAsync(string thermostatDailyProgramId = default) - { - await DeleteAsync( - new DeleteRequest(thermostatDailyProgramId: thermostatDailyProgramId) - ); - } - - /// - /// Request parameters for Update a Thermostat Daily Program. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string name = default, - List periods = default, - string thermostatDailyProgramId = default - ) - { - Name = name; - Periods = periods; - ThermostatDailyProgramId = thermostatDailyProgramId; - } - - /// - /// Name of the thermostat daily program that you want to update. - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program. - /// - [DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)] - public List Periods { get; set; } - - /// - /// ID of the thermostat daily program that you want to update. - /// - [DataMember( - Name = "thermostat_daily_program_id", - IsRequired = true, - EmitDefaultValue = false - )] - public string ThermostatDailyProgramId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateRequestPeriods_model")] - public class UpdateRequestPeriods - { - [JsonConstructorAttribute] - protected UpdateRequestPeriods() { } - - public UpdateRequestPeriods( - string? climatePresetKey = default, - string? startsAtTime = default - ) - { - ClimatePresetKey = climatePresetKey; - StartsAtTime = startsAtTime; - } - - /// - /// Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string? ClimatePresetKey { get; set; } - - /// - /// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAtTime { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateResponse_response")] - public class UpdateResponse - { - [JsonConstructorAttribute] - protected UpdateResponse() { } - - public UpdateResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. - /// - public ActionAttempt Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Patch("/thermostats/daily_programs/update", requestOptions) - .EnsureData("/thermostats/daily_programs/update") - .ActionAttempt; - } - - /// - /// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. - /// - public ActionAttempt Update( - string name = default, - List periods = default, - string thermostatDailyProgramId = default - ) - { - return Update( - new UpdateRequest( - name: name, - periods: periods, - thermostatDailyProgramId: thermostatDailyProgramId - ) - ); - } - - /// - /// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PatchAsync( - "/thermostats/daily_programs/update", - requestOptions - ) - ) - .EnsureData("/thermostats/daily_programs/update") - .ActionAttempt; - } - - /// - /// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. - /// - public async Task UpdateAsync( - string name = default, - List periods = default, - string thermostatDailyProgramId = default - ) - { - return ( - await UpdateAsync( - new UpdateRequest( - name: name, - periods: periods, - thermostatDailyProgramId: thermostatDailyProgramId - ) - ) - ); - } - } +public class DailyProgramsThermostats +{ +private ISeamClient _seam; + +public DailyProgramsThermostats(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Thermostat Daily Program. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(string deviceId = default, string name = default, List periods = default) +{ +DeviceId = deviceId; +Name = name; +Periods = periods; +} + +/// +/// ID of the thermostat device for which you want to create a daily program. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Name of the thermostat daily program. +/// +[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// Array of thermostat daily program periods. +/// +[DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)] +public List Periods { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestPeriods_model")] +public class CreateRequestPeriods +{ +[JsonConstructorAttribute] +protected CreateRequestPeriods() { } + +public CreateRequestPeriods(string? climatePresetKey = default, string? startsAtTime = default) +{ +ClimatePresetKey = climatePresetKey; +StartsAtTime = startsAtTime; +} + +/// +/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string? ClimatePresetKey { get; set; } + +/// +/// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAtTime { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(ThermostatDailyProgram thermostatDailyProgram = default) +{ +ThermostatDailyProgram = thermostatDailyProgram; +} + +/// +/// OK +/// +[DataMember(Name = "thermostat_daily_program", IsRequired = false, EmitDefaultValue = false)] +public ThermostatDailyProgram ThermostatDailyProgram { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. +/// +public ThermostatDailyProgram Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/daily_programs/create", requestOptions).EnsureData("/thermostats/daily_programs/create").ThermostatDailyProgram; +} + +/// +/// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. +/// +public ThermostatDailyProgram Create(string deviceId = default, string name = default, List periods = default) +{ +return Create(new CreateRequest(deviceId: deviceId, name: name, periods: periods)); +} + +/// +/// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/daily_programs/create", requestOptions)).EnsureData("/thermostats/daily_programs/create").ThermostatDailyProgram; +} + +/// +/// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. +/// +public async Task CreateAsync(string deviceId = default, string name = default, List periods = default) +{ +return (await CreateAsync(new CreateRequest(deviceId: deviceId, name: name, periods: periods))); +} + +/// +/// Request parameters for Delete a Thermostat Daily Program. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string thermostatDailyProgramId = default) +{ +ThermostatDailyProgramId = thermostatDailyProgramId; +} + +/// +/// ID of the thermostat daily program that you want to delete. +/// +[DataMember(Name = "thermostat_daily_program_id", IsRequired = true, EmitDefaultValue = false)] +public string ThermostatDailyProgramId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a thermostat daily program. +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/thermostats/daily_programs/delete", requestOptions); +} + +/// +/// Deletes a thermostat daily program. +/// +public void Delete(string thermostatDailyProgramId = default) +{ +Delete(new DeleteRequest(thermostatDailyProgramId: thermostatDailyProgramId)); +} + +/// +/// Deletes a thermostat daily program. +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/thermostats/daily_programs/delete", requestOptions); +} + +/// +/// Deletes a thermostat daily program. +/// +public async Task DeleteAsync(string thermostatDailyProgramId = default) +{ +await DeleteAsync(new DeleteRequest(thermostatDailyProgramId: thermostatDailyProgramId)); +} + +/// +/// Request parameters for Update a Thermostat Daily Program. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string name = default, List periods = default, string thermostatDailyProgramId = default) +{ +Name = name; +Periods = periods; +ThermostatDailyProgramId = thermostatDailyProgramId; +} + +/// +/// Name of the thermostat daily program that you want to update. +/// +[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program. +/// +[DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)] +public List Periods { get; set; } + +/// +/// ID of the thermostat daily program that you want to update. +/// +[DataMember(Name = "thermostat_daily_program_id", IsRequired = true, EmitDefaultValue = false)] +public string ThermostatDailyProgramId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateRequestPeriods_model")] +public class UpdateRequestPeriods +{ +[JsonConstructorAttribute] +protected UpdateRequestPeriods() { } + +public UpdateRequestPeriods(string? climatePresetKey = default, string? startsAtTime = default) +{ +ClimatePresetKey = climatePresetKey; +StartsAtTime = startsAtTime; +} + +/// +/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string? ClimatePresetKey { get; set; } + +/// +/// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAtTime { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateResponse_response")] +public class UpdateResponse +{ +[JsonConstructorAttribute] +protected UpdateResponse() { } + +public UpdateResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. +/// +public ActionAttempt Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Patch("/thermostats/daily_programs/update", requestOptions).EnsureData("/thermostats/daily_programs/update").ActionAttempt; +} + +/// +/// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. +/// +public ActionAttempt Update(string name = default, List periods = default, string thermostatDailyProgramId = default) +{ +return Update(new UpdateRequest(name: name, periods: periods, thermostatDailyProgramId: thermostatDailyProgramId)); +} + +/// +/// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PatchAsync("/thermostats/daily_programs/update", requestOptions)).EnsureData("/thermostats/daily_programs/update").ActionAttempt; +} + +/// +/// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. +/// +public async Task UpdateAsync(string name = default, List periods = default, string thermostatDailyProgramId = default) +{ +return (await UpdateAsync(new UpdateRequest(name: name, periods: periods, thermostatDailyProgramId: thermostatDailyProgramId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.DailyProgramsThermostats DailyProgramsThermostats => new(this); - } +public partial class SeamClient +{ +public Api.DailyProgramsThermostats DailyProgramsThermostats => new(this); +} - public partial interface ISeamClient - { - public Api.DailyProgramsThermostats DailyProgramsThermostats { get; } - } +public partial interface ISeamClient +{ +public Api.DailyProgramsThermostats DailyProgramsThermostats { get; } +} } diff --git a/src/Seam/Api/Devices.cs b/src/Seam/Api/Devices.cs index 88e3f917..2fc41245 100644 --- a/src/Seam/Api/Devices.cs +++ b/src/Seam/Api/Devices.cs @@ -9,5464 +9,5299 @@ namespace Seam.Api { - public class Devices - { - private ISeamClient _seam; - - public Devices(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get a Device. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string? deviceId = default, string? name = default) - { - DeviceId = deviceId; - Name = name; - } - - /// - /// ID of the device that you want to get. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Name of the device that you want to get. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(Device device = default) - { - Device = device; - } - - /// - /// OK - /// - [DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] - public Device Device { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [device](https://docs.seam.co/core-concepts/devices). - /// - /// You must specify either `device_id` or `name`. - /// - public Device Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/devices/get", requestOptions) - .EnsureData("/devices/get") - .Device; - } - - /// - /// Returns a specified [device](https://docs.seam.co/core-concepts/devices). - /// - /// You must specify either `device_id` or `name`. - /// - public Device Get(string? deviceId = default, string? name = default) - { - return Get(new GetRequest(deviceId: deviceId, name: name)); - } - - /// - /// Returns a specified [device](https://docs.seam.co/core-concepts/devices). - /// - /// You must specify either `device_id` or `name`. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/devices/get", requestOptions)) - .EnsureData("/devices/get") - .Device; - } - - /// - /// Returns a specified [device](https://docs.seam.co/core-concepts/devices). - /// - /// You must specify either `device_id` or `name`. - /// - public async Task GetAsync(string? deviceId = default, string? name = default) - { - return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); - } - - /// - /// Request parameters for List Devices. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? connectWebviewId = default, - string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, - string? customerKey = default, - List? deviceIds = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountId = connectedAccountId; - ConnectedAccountIds = connectedAccountIds; - CreatedBefore = createdBefore; - CustomMetadataHas = customMetadataHas; - CustomerKey = customerKey; - DeviceIds = deviceIds; - DeviceType = deviceType; - DeviceTypes = deviceTypes; - Limit = limit; - Manufacturer = manufacturer; - PageCursor = pageCursor; - Search = search; - SpaceId = spaceId; - UnstableLocationId = unstableLocationId; - UserIdentifierKey = userIdentifierKey; - } - - /// - /// Device type for which you want to list devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "akuvox_lock")] - AkuvoxLock = 1, - - [EnumMember(Value = "august_lock")] - AugustLock = 2, - - [EnumMember(Value = "brivo_access_point")] - BrivoAccessPoint = 3, - - [EnumMember(Value = "butterflymx_panel")] - ButterflymxPanel = 4, - - [EnumMember(Value = "avigilon_alta_entry")] - AvigilonAltaEntry = 5, - - [EnumMember(Value = "doorking_lock")] - DoorkingLock = 6, - - [EnumMember(Value = "genie_door")] - GenieDoor = 7, - - [EnumMember(Value = "igloo_lock")] - IglooLock = 8, - - [EnumMember(Value = "linear_lock")] - LinearLock = 9, - - [EnumMember(Value = "lockly_lock")] - LocklyLock = 10, - - [EnumMember(Value = "kwikset_lock")] - KwiksetLock = 11, - - [EnumMember(Value = "nuki_lock")] - NukiLock = 12, - - [EnumMember(Value = "salto_lock")] - SaltoLock = 13, - - [EnumMember(Value = "schlage_lock")] - SchlageLock = 14, - - [EnumMember(Value = "smartthings_lock")] - SmartthingsLock = 15, +public class Devices +{ +private ISeamClient _seam; - [EnumMember(Value = "wyze_lock")] - WyzeLock = 16, +public Devices(ISeamClient seam) +{ +_seam = seam; +} - [EnumMember(Value = "yale_lock")] - YaleLock = 17, +/// +/// Request parameters for Get a Device. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } - [EnumMember(Value = "two_n_intercom")] - TwoNIntercom = 18, +public GetRequest(string? deviceId = default, string? name = default) +{ +DeviceId = deviceId; +Name = name; +} - [EnumMember(Value = "controlbyweb_device")] - ControlbywebDevice = 19, +/// +/// ID of the device that you want to get. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } - [EnumMember(Value = "ttlock_lock")] - TtlockLock = 20, +/// +/// Name of the device that you want to get. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } - [EnumMember(Value = "igloohome_lock")] - IgloohomeLock = 21, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "four_suites_door")] - FourSuitesDoor = 22, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "dormakaba_oracode_door")] - DormakabaOracodeDoor = 23, +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } - [EnumMember(Value = "tedee_lock")] - TedeeLock = 24, +public GetResponse(Device device = default) +{ +Device = device; +} - [EnumMember(Value = "akiles_lock")] - AkilesLock = 25, +/// +/// OK +/// +[DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] +public Device Device { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "ultraloq_lock")] - UltraloqLock = 26, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "yacan_lock")] - YacanLock = 27, +/// +/// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +/// You must specify either `device_id` or `name`. +/// +public Device Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/devices/get", requestOptions).EnsureData("/devices/get").Device; +} - [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 28, +/// +/// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +/// You must specify either `device_id` or `name`. +/// +public Device Get(string? deviceId = default, string? name = default) +{ +return Get(new GetRequest(deviceId: deviceId, name: name)); +} - [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 29, +/// +/// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +/// You must specify either `device_id` or `name`. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/devices/get", requestOptions)).EnsureData("/devices/get").Device; +} - [EnumMember(Value = "kisi_lock")] - KisiLock = 30, +/// +/// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +/// You must specify either `device_id` or `name`. +/// +public async Task GetAsync(string? deviceId = default, string? name = default) +{ +return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); +} - [EnumMember(Value = "aqara_lock")] - AqaraLock = 31, +/// +/// Request parameters for List Devices. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } - [EnumMember(Value = "keynest_key")] - KeynestKey = 32, +public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? unstableLocationId = default, string? userIdentifierKey = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountId = connectedAccountId; +ConnectedAccountIds = connectedAccountIds; +CreatedBefore = createdBefore; +CustomMetadataHas = customMetadataHas; +CustomerKey = customerKey; +DeviceIds = deviceIds; +DeviceType = deviceType; +DeviceTypes = deviceTypes; +Limit = limit; +Manufacturer = manufacturer; +PageCursor = pageCursor; +Search = search; +SpaceId = spaceId; +UnstableLocationId = unstableLocationId; +UserIdentifierKey = userIdentifierKey; +} - [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 33, +/// +/// Device type for which you want to list devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "minut_sensor")] - MinutSensor = 34, +[EnumMember(Value = "akuvox_lock")] +AkuvoxLock = 1, - [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 35, +[EnumMember(Value = "august_lock")] +AugustLock = 2, - [EnumMember(Value = "nest_thermostat")] - NestThermostat = 36, +[EnumMember(Value = "brivo_access_point")] +BrivoAccessPoint = 3, - [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 37, +[EnumMember(Value = "butterflymx_panel")] +ButterflymxPanel = 4, - [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 38, +[EnumMember(Value = "avigilon_alta_entry")] +AvigilonAltaEntry = 5, - [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 39, +[EnumMember(Value = "doorking_lock")] +DoorkingLock = 6, - [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 40, +[EnumMember(Value = "genie_door")] +GenieDoor = 7, - [EnumMember(Value = "ios_phone")] - IosPhone = 41, +[EnumMember(Value = "igloo_lock")] +IglooLock = 8, - [EnumMember(Value = "android_phone")] - AndroidPhone = 42, +[EnumMember(Value = "linear_lock")] +LinearLock = 9, - [EnumMember(Value = "ring_camera")] - RingCamera = 43, - } +[EnumMember(Value = "lockly_lock")] +LocklyLock = 10, - /// - /// Array of device types for which you want to list devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "kwikset_lock")] +KwiksetLock = 11, - [EnumMember(Value = "akuvox_lock")] - AkuvoxLock = 1, +[EnumMember(Value = "nuki_lock")] +NukiLock = 12, - [EnumMember(Value = "august_lock")] - AugustLock = 2, +[EnumMember(Value = "salto_lock")] +SaltoLock = 13, - [EnumMember(Value = "brivo_access_point")] - BrivoAccessPoint = 3, +[EnumMember(Value = "schlage_lock")] +SchlageLock = 14, - [EnumMember(Value = "butterflymx_panel")] - ButterflymxPanel = 4, +[EnumMember(Value = "smartthings_lock")] +SmartthingsLock = 15, - [EnumMember(Value = "avigilon_alta_entry")] - AvigilonAltaEntry = 5, +[EnumMember(Value = "wyze_lock")] +WyzeLock = 16, - [EnumMember(Value = "doorking_lock")] - DoorkingLock = 6, +[EnumMember(Value = "yale_lock")] +YaleLock = 17, - [EnumMember(Value = "genie_door")] - GenieDoor = 7, +[EnumMember(Value = "two_n_intercom")] +TwoNIntercom = 18, - [EnumMember(Value = "igloo_lock")] - IglooLock = 8, +[EnumMember(Value = "controlbyweb_device")] +ControlbywebDevice = 19, - [EnumMember(Value = "linear_lock")] - LinearLock = 9, +[EnumMember(Value = "ttlock_lock")] +TtlockLock = 20, - [EnumMember(Value = "lockly_lock")] - LocklyLock = 10, +[EnumMember(Value = "igloohome_lock")] +IgloohomeLock = 21, - [EnumMember(Value = "kwikset_lock")] - KwiksetLock = 11, +[EnumMember(Value = "four_suites_door")] +FourSuitesDoor = 22, - [EnumMember(Value = "nuki_lock")] - NukiLock = 12, +[EnumMember(Value = "dormakaba_oracode_door")] +DormakabaOracodeDoor = 23, - [EnumMember(Value = "salto_lock")] - SaltoLock = 13, +[EnumMember(Value = "tedee_lock")] +TedeeLock = 24, - [EnumMember(Value = "schlage_lock")] - SchlageLock = 14, +[EnumMember(Value = "akiles_lock")] +AkilesLock = 25, - [EnumMember(Value = "smartthings_lock")] - SmartthingsLock = 15, +[EnumMember(Value = "ultraloq_lock")] +UltraloqLock = 26, - [EnumMember(Value = "wyze_lock")] - WyzeLock = 16, +[EnumMember(Value = "yacan_lock")] +YacanLock = 27, - [EnumMember(Value = "yale_lock")] - YaleLock = 17, +[EnumMember(Value = "keyincode_lock")] +KeyincodeLock = 28, - [EnumMember(Value = "two_n_intercom")] - TwoNIntercom = 18, +[EnumMember(Value = "omnitec_lock")] +OmnitecLock = 29, - [EnumMember(Value = "controlbyweb_device")] - ControlbywebDevice = 19, +[EnumMember(Value = "kisi_lock")] +KisiLock = 30, - [EnumMember(Value = "ttlock_lock")] - TtlockLock = 20, +[EnumMember(Value = "aqara_lock")] +AqaraLock = 31, - [EnumMember(Value = "igloohome_lock")] - IgloohomeLock = 21, +[EnumMember(Value = "keynest_key")] +KeynestKey = 32, - [EnumMember(Value = "four_suites_door")] - FourSuitesDoor = 22, +[EnumMember(Value = "noiseaware_activity_zone")] +NoiseawareActivityZone = 33, - [EnumMember(Value = "dormakaba_oracode_door")] - DormakabaOracodeDoor = 23, +[EnumMember(Value = "minut_sensor")] +MinutSensor = 34, - [EnumMember(Value = "tedee_lock")] - TedeeLock = 24, +[EnumMember(Value = "ecobee_thermostat")] +EcobeeThermostat = 35, - [EnumMember(Value = "akiles_lock")] - AkilesLock = 25, +[EnumMember(Value = "nest_thermostat")] +NestThermostat = 36, - [EnumMember(Value = "ultraloq_lock")] - UltraloqLock = 26, +[EnumMember(Value = "honeywell_resideo_thermostat")] +HoneywellResideoThermostat = 37, - [EnumMember(Value = "yacan_lock")] - YacanLock = 27, +[EnumMember(Value = "tado_thermostat")] +TadoThermostat = 38, - [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 28, +[EnumMember(Value = "sensi_thermostat")] +SensiThermostat = 39, - [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 29, +[EnumMember(Value = "smartthings_thermostat")] +SmartthingsThermostat = 40, - [EnumMember(Value = "kisi_lock")] - KisiLock = 30, +[EnumMember(Value = "ios_phone")] +IosPhone = 41, - [EnumMember(Value = "aqara_lock")] - AqaraLock = 31, +[EnumMember(Value = "android_phone")] +AndroidPhone = 42, - [EnumMember(Value = "keynest_key")] - KeynestKey = 32, +[EnumMember(Value = "ring_camera")] +RingCamera = 43, - [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 33, +[EnumMember(Value = "tapo_camera")] +TapoCamera = 44, - [EnumMember(Value = "minut_sensor")] - MinutSensor = 34, +[EnumMember(Value = "arlo_camera")] +ArloCamera = 45, - [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 35, +[EnumMember(Value = "reolink_camera")] +ReolinkCamera = 46, +} - [EnumMember(Value = "nest_thermostat")] - NestThermostat = 36, +/// +/// Array of device types for which you want to list devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 37, +[EnumMember(Value = "akuvox_lock")] +AkuvoxLock = 1, - [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 38, +[EnumMember(Value = "august_lock")] +AugustLock = 2, - [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 39, +[EnumMember(Value = "brivo_access_point")] +BrivoAccessPoint = 3, - [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 40, +[EnumMember(Value = "butterflymx_panel")] +ButterflymxPanel = 4, - [EnumMember(Value = "ios_phone")] - IosPhone = 41, +[EnumMember(Value = "avigilon_alta_entry")] +AvigilonAltaEntry = 5, - [EnumMember(Value = "android_phone")] - AndroidPhone = 42, +[EnumMember(Value = "doorking_lock")] +DoorkingLock = 6, - [EnumMember(Value = "ring_camera")] - RingCamera = 43, - } +[EnumMember(Value = "genie_door")] +GenieDoor = 7, - /// - /// Manufacturer for which you want to list devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ManufacturerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "igloo_lock")] +IglooLock = 8, - [EnumMember(Value = "akuvox")] - Akuvox = 1, +[EnumMember(Value = "linear_lock")] +LinearLock = 9, - [EnumMember(Value = "august")] - August = 2, +[EnumMember(Value = "lockly_lock")] +LocklyLock = 10, - [EnumMember(Value = "avigilon_alta")] - AvigilonAlta = 3, +[EnumMember(Value = "kwikset_lock")] +KwiksetLock = 11, - [EnumMember(Value = "brivo")] - Brivo = 4, +[EnumMember(Value = "nuki_lock")] +NukiLock = 12, - [EnumMember(Value = "butterflymx")] - Butterflymx = 5, +[EnumMember(Value = "salto_lock")] +SaltoLock = 13, - [EnumMember(Value = "doorking")] - Doorking = 6, +[EnumMember(Value = "schlage_lock")] +SchlageLock = 14, - [EnumMember(Value = "four_suites")] - FourSuites = 7, +[EnumMember(Value = "smartthings_lock")] +SmartthingsLock = 15, - [EnumMember(Value = "genie")] - Genie = 8, +[EnumMember(Value = "wyze_lock")] +WyzeLock = 16, - [EnumMember(Value = "igloo")] - Igloo = 9, +[EnumMember(Value = "yale_lock")] +YaleLock = 17, - [EnumMember(Value = "keywe")] - Keywe = 10, +[EnumMember(Value = "two_n_intercom")] +TwoNIntercom = 18, - [EnumMember(Value = "kwikset")] - Kwikset = 11, +[EnumMember(Value = "controlbyweb_device")] +ControlbywebDevice = 19, - [EnumMember(Value = "linear")] - Linear = 12, +[EnumMember(Value = "ttlock_lock")] +TtlockLock = 20, - [EnumMember(Value = "nuki")] - Nuki = 13, +[EnumMember(Value = "igloohome_lock")] +IgloohomeLock = 21, - [EnumMember(Value = "philia")] - Philia = 14, +[EnumMember(Value = "four_suites_door")] +FourSuitesDoor = 22, - [EnumMember(Value = "salto")] - Salto = 15, +[EnumMember(Value = "dormakaba_oracode_door")] +DormakabaOracodeDoor = 23, - [EnumMember(Value = "samsung")] - Samsung = 16, +[EnumMember(Value = "tedee_lock")] +TedeeLock = 24, - [EnumMember(Value = "schlage")] - Schlage = 17, +[EnumMember(Value = "akiles_lock")] +AkilesLock = 25, - [EnumMember(Value = "seam")] - Seam = 18, +[EnumMember(Value = "ultraloq_lock")] +UltraloqLock = 26, - [EnumMember(Value = "unknown")] - Unknown = 19, +[EnumMember(Value = "yacan_lock")] +YacanLock = 27, - [EnumMember(Value = "wyze")] - Wyze = 20, +[EnumMember(Value = "keyincode_lock")] +KeyincodeLock = 28, - [EnumMember(Value = "yale")] - Yale = 21, +[EnumMember(Value = "omnitec_lock")] +OmnitecLock = 29, - [EnumMember(Value = "two_n")] - TwoN = 22, +[EnumMember(Value = "kisi_lock")] +KisiLock = 30, - [EnumMember(Value = "ttlock")] - Ttlock = 23, +[EnumMember(Value = "aqara_lock")] +AqaraLock = 31, - [EnumMember(Value = "igloohome")] - Igloohome = 24, +[EnumMember(Value = "keynest_key")] +KeynestKey = 32, - [EnumMember(Value = "controlbyweb")] - Controlbyweb = 25, +[EnumMember(Value = "noiseaware_activity_zone")] +NoiseawareActivityZone = 33, - [EnumMember(Value = "dormakaba_oracode")] - DormakabaOracode = 26, +[EnumMember(Value = "minut_sensor")] +MinutSensor = 34, - [EnumMember(Value = "tedee")] - Tedee = 27, +[EnumMember(Value = "ecobee_thermostat")] +EcobeeThermostat = 35, - [EnumMember(Value = "keyincode")] - Keyincode = 28, +[EnumMember(Value = "nest_thermostat")] +NestThermostat = 36, - [EnumMember(Value = "akiles")] - Akiles = 29, +[EnumMember(Value = "honeywell_resideo_thermostat")] +HoneywellResideoThermostat = 37, - [EnumMember(Value = "aqara")] - Aqara = 30, +[EnumMember(Value = "tado_thermostat")] +TadoThermostat = 38, - [EnumMember(Value = "ecobee")] - Ecobee = 31, +[EnumMember(Value = "sensi_thermostat")] +SensiThermostat = 39, - [EnumMember(Value = "honeywell_resideo")] - HoneywellResideo = 32, +[EnumMember(Value = "smartthings_thermostat")] +SmartthingsThermostat = 40, - [EnumMember(Value = "keynest")] - Keynest = 33, +[EnumMember(Value = "ios_phone")] +IosPhone = 41, - [EnumMember(Value = "korelock")] - Korelock = 34, +[EnumMember(Value = "android_phone")] +AndroidPhone = 42, - [EnumMember(Value = "lockly")] - Lockly = 35, +[EnumMember(Value = "ring_camera")] +RingCamera = 43, - [EnumMember(Value = "minut")] - Minut = 36, +[EnumMember(Value = "tapo_camera")] +TapoCamera = 44, - [EnumMember(Value = "nest")] - Nest = 37, +[EnumMember(Value = "arlo_camera")] +ArloCamera = 45, - [EnumMember(Value = "noiseaware")] - Noiseaware = 38, +[EnumMember(Value = "reolink_camera")] +ReolinkCamera = 46, +} - [EnumMember(Value = "sensi")] - Sensi = 39, +/// +/// Manufacturer for which you want to list devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ManufacturerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "smartthings")] - Smartthings = 40, +[EnumMember(Value = "akuvox")] +Akuvox = 1, - [EnumMember(Value = "tado")] - Tado = 41, +[EnumMember(Value = "august")] +August = 2, - [EnumMember(Value = "ultraloq")] - Ultraloq = 42, +[EnumMember(Value = "avigilon_alta")] +AvigilonAlta = 3, - [EnumMember(Value = "ring")] - Ring = 43, +[EnumMember(Value = "brivo")] +Brivo = 4, - [EnumMember(Value = "ical")] - Ical = 44, +[EnumMember(Value = "butterflymx")] +Butterflymx = 5, - [EnumMember(Value = "lodgify")] - Lodgify = 45, +[EnumMember(Value = "doorking")] +Doorking = 6, - [EnumMember(Value = "hostaway")] - Hostaway = 46, +[EnumMember(Value = "four_suites")] +FourSuites = 7, - [EnumMember(Value = "guesty")] - Guesty = 47, +[EnumMember(Value = "genie")] +Genie = 8, - [EnumMember(Value = "acuity_scheduling")] - AcuityScheduling = 48, +[EnumMember(Value = "igloo")] +Igloo = 9, - [EnumMember(Value = "omnitec")] - Omnitec = 49, +[EnumMember(Value = "keywe")] +Keywe = 10, - [EnumMember(Value = "kisi")] - Kisi = 50, +[EnumMember(Value = "kwikset")] +Kwikset = 11, - [EnumMember(Value = "slack")] - Slack = 51, - - [EnumMember(Value = "yacan")] - Yacan = 52, - } - - /// - /// ID of the Connect Webview for which you want to list devices. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectWebviewId { get; set; } - - /// - /// ID of the connected account for which you want to list devices. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Array of IDs of the connected accounts for which you want to list devices. - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Timestamp by which to limit returned devices. Returns devices created before this timestamp. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. - /// - [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadataHas { get; set; } - - /// - /// Customer key for which you want to list devices. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Array of device IDs for which you want to list devices. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - - /// - /// Device type for which you want to list devices. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - - /// - /// Array of device types for which you want to list devices. - /// - [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceTypes { get; set; } - - /// - /// Numerical limit on the number of devices to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Manufacturer for which you want to list devices. - /// - [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// ID of the space for which you want to list devices. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - [Obsolete("Use `space_id`.")] - [DataMember( - Name = "unstable_location_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UnstableLocationId { get; set; } - - /// - /// Your own internal user ID for the user for which you want to list devices. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List devices = default) - { - Devices = devices; - } - - /// - /// OK - /// - [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] - public List Devices { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [devices](https://docs.seam.co/core-concepts/devices). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/devices/list", requestOptions) - .EnsureData("/devices/list") - .Devices; - } - - /// - /// Returns a list of all [devices](https://docs.seam.co/core-concepts/devices). - /// - public List List( - string? connectWebviewId = default, - string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, - string? customerKey = default, - List? deviceIds = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default - ) - { - return List( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customMetadataHas: customMetadataHas, - customerKey: customerKey, - deviceIds: deviceIds, - deviceType: deviceType, - deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey - ) - ); - } - - /// - /// Returns a list of all [devices](https://docs.seam.co/core-concepts/devices). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/devices/list", requestOptions)) - .EnsureData("/devices/list") - .Devices; - } - - /// - /// Returns a list of all [devices](https://docs.seam.co/core-concepts/devices). - /// - public async Task> ListAsync( - string? connectWebviewId = default, - string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - object? customMetadataHas = default, - string? customerKey = default, - List? deviceIds = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default, - string? unstableLocationId = default, - string? userIdentifierKey = default - ) - { - return ( - await ListAsync( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customMetadataHas: customMetadataHas, - customerKey: customerKey, - deviceIds: deviceIds, - deviceType: deviceType, - deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search, - spaceId: spaceId, - unstableLocationId: unstableLocationId, - userIdentifierKey: userIdentifierKey - ) - ) - ); - } - - /// - /// Request parameters for List Device Providers. - /// - [DataContract(Name = "listDeviceProvidersRequest_request")] - public class ListDeviceProvidersRequest - { - [JsonConstructorAttribute] - protected ListDeviceProvidersRequest() { } - - public ListDeviceProvidersRequest( - ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default - ) - { - ProviderCategory = providerCategory; - } - - /// - /// Category for which you want to list providers. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ProviderCategoryEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "stable")] - Stable = 1, - - [EnumMember(Value = "consumer_smartlocks")] - ConsumerSmartlocks = 2, - - [EnumMember(Value = "beta")] - Beta = 3, - - [EnumMember(Value = "thermostats")] - Thermostats = 4, - - [EnumMember(Value = "noise_sensors")] - NoiseSensors = 5, - - [EnumMember(Value = "access_control_systems")] - AccessControlSystems = 6, - - [EnumMember(Value = "cameras")] - Cameras = 7, - - [EnumMember(Value = "connectors")] - Connectors = 8, - } - - /// - /// Category for which you want to list providers. - /// - [DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] - public ListDeviceProvidersRequest.ProviderCategoryEnum? ProviderCategory { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listDeviceProvidersResponse_response")] - public class ListDeviceProvidersResponse - { - [JsonConstructorAttribute] - protected ListDeviceProvidersResponse() { } - - public ListDeviceProvidersResponse(List deviceProviders = default) - { - DeviceProviders = deviceProviders; - } - - /// - /// OK - /// - [DataMember(Name = "device_providers", IsRequired = false, EmitDefaultValue = false)] - public List DeviceProviders { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all device providers. - /// - /// The information that this endpoint returns for each provider includes a set of [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. - /// - /// When you create a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). - /// - public List ListDeviceProviders(ListDeviceProvidersRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/devices/list_device_providers", requestOptions) - .EnsureData("/devices/list_device_providers") - .DeviceProviders; - } - - /// - /// Returns a list of all device providers. - /// - /// The information that this endpoint returns for each provider includes a set of [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. - /// - /// When you create a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). - /// - public List ListDeviceProviders( - ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default - ) - { - return ListDeviceProviders( - new ListDeviceProvidersRequest(providerCategory: providerCategory) - ); - } - - /// - /// Returns a list of all device providers. - /// - /// The information that this endpoint returns for each provider includes a set of [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. - /// - /// When you create a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). - /// - public async Task> ListDeviceProvidersAsync( - ListDeviceProvidersRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/devices/list_device_providers", - requestOptions - ) - ) - .EnsureData("/devices/list_device_providers") - .DeviceProviders; - } - - /// - /// Returns a list of all device providers. - /// - /// The information that this endpoint returns for each provider includes a set of [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. - /// - /// When you create a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). - /// - public async Task> ListDeviceProvidersAsync( - ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default - ) - { - return ( - await ListDeviceProvidersAsync( - new ListDeviceProvidersRequest(providerCategory: providerCategory) - ) - ); - } - - /// - /// Request parameters for Report Provider Metadata. - /// - [DataContract(Name = "reportProviderMetadataRequest_request")] - public class ReportProviderMetadataRequest - { - [JsonConstructorAttribute] - protected ReportProviderMetadataRequest() { } - - public ReportProviderMetadataRequest( - List devices = default - ) - { - Devices = devices; - } - - /// - /// Array of devices with provider metadata to update - /// - [DataMember(Name = "devices", IsRequired = true, EmitDefaultValue = false)] - public List Devices { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "reportProviderMetadataRequestDevices_model")] - public class ReportProviderMetadataRequestDevices - { - [JsonConstructorAttribute] - protected ReportProviderMetadataRequestDevices() { } - - public ReportProviderMetadataRequestDevices( - string? deviceId = default, - ReportProviderMetadataRequestDevicesOmnitecMetadata? omnitecMetadata = default, - ReportProviderMetadataRequestDevicesSchlageMetadata? schlageMetadata = default, - ReportProviderMetadataRequestDevicesUltraloqMetadata? ultraloqMetadata = default - ) - { - DeviceId = deviceId; - OmnitecMetadata = omnitecMetadata; - SchlageMetadata = schlageMetadata; - UltraloqMetadata = ultraloqMetadata; - } - - /// - /// ID of the device to update - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Omnitec-specific metadata to update - /// - [DataMember(Name = "omnitec_metadata", IsRequired = false, EmitDefaultValue = false)] - public ReportProviderMetadataRequestDevicesOmnitecMetadata? OmnitecMetadata { get; set; } - - /// - /// Schlage-specific metadata to update - /// - [DataMember(Name = "schlage_metadata", IsRequired = false, EmitDefaultValue = false)] - public ReportProviderMetadataRequestDevicesSchlageMetadata? SchlageMetadata { get; set; } - - /// - /// Ultraloq-specific metadata to update - /// - [DataMember(Name = "ultraloq_metadata", IsRequired = false, EmitDefaultValue = false)] - public ReportProviderMetadataRequestDevicesUltraloqMetadata? UltraloqMetadata { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "reportProviderMetadataRequestDevicesOmnitecMetadata_model")] - public class ReportProviderMetadataRequestDevicesOmnitecMetadata - { - [JsonConstructorAttribute] - protected ReportProviderMetadataRequestDevicesOmnitecMetadata() { } - - public ReportProviderMetadataRequestDevicesOmnitecMetadata( - ReportProviderMetadataRequestDevicesOmnitecMetadata.TimeZoneEnum? timeZone = default - ) - { - TimeZone = timeZone; - } - - /// - /// IANA timezone for the Omnitec device - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TimeZoneEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "Africa/Abidjan")] - AfricaAbidjan = 1, - - [EnumMember(Value = "Africa/Accra")] - AfricaAccra = 2, - - [EnumMember(Value = "Africa/Addis_Ababa")] - AfricaAddisAbaba = 3, +[EnumMember(Value = "linear")] +Linear = 12, - [EnumMember(Value = "Africa/Algiers")] - AfricaAlgiers = 4, +[EnumMember(Value = "nuki")] +Nuki = 13, - [EnumMember(Value = "Africa/Asmera")] - AfricaAsmera = 5, +[EnumMember(Value = "philia")] +Philia = 14, - [EnumMember(Value = "Africa/Bamako")] - AfricaBamako = 6, +[EnumMember(Value = "salto")] +Salto = 15, - [EnumMember(Value = "Africa/Bangui")] - AfricaBangui = 7, +[EnumMember(Value = "samsung")] +Samsung = 16, - [EnumMember(Value = "Africa/Banjul")] - AfricaBanjul = 8, +[EnumMember(Value = "schlage")] +Schlage = 17, - [EnumMember(Value = "Africa/Bissau")] - AfricaBissau = 9, +[EnumMember(Value = "seam")] +Seam = 18, - [EnumMember(Value = "Africa/Blantyre")] - AfricaBlantyre = 10, +[EnumMember(Value = "unknown")] +Unknown = 19, - [EnumMember(Value = "Africa/Brazzaville")] - AfricaBrazzaville = 11, +[EnumMember(Value = "wyze")] +Wyze = 20, - [EnumMember(Value = "Africa/Bujumbura")] - AfricaBujumbura = 12, +[EnumMember(Value = "yale")] +Yale = 21, - [EnumMember(Value = "Africa/Cairo")] - AfricaCairo = 13, +[EnumMember(Value = "two_n")] +TwoN = 22, - [EnumMember(Value = "Africa/Casablanca")] - AfricaCasablanca = 14, +[EnumMember(Value = "ttlock")] +Ttlock = 23, - [EnumMember(Value = "Africa/Ceuta")] - AfricaCeuta = 15, +[EnumMember(Value = "igloohome")] +Igloohome = 24, - [EnumMember(Value = "Africa/Conakry")] - AfricaConakry = 16, +[EnumMember(Value = "controlbyweb")] +Controlbyweb = 25, - [EnumMember(Value = "Africa/Dakar")] - AfricaDakar = 17, +[EnumMember(Value = "tedee")] +Tedee = 26, - [EnumMember(Value = "Africa/Dar_es_Salaam")] - AfricaDarEsSalaam = 18, +[EnumMember(Value = "keyincode")] +Keyincode = 27, - [EnumMember(Value = "Africa/Djibouti")] - AfricaDjibouti = 19, +[EnumMember(Value = "akiles")] +Akiles = 28, - [EnumMember(Value = "Africa/Douala")] - AfricaDouala = 20, +[EnumMember(Value = "aqara")] +Aqara = 29, - [EnumMember(Value = "Africa/El_Aaiun")] - AfricaElAaiun = 21, +[EnumMember(Value = "ecobee")] +Ecobee = 30, - [EnumMember(Value = "Africa/Freetown")] - AfricaFreetown = 22, +[EnumMember(Value = "eufy")] +Eufy = 31, - [EnumMember(Value = "Africa/Gaborone")] - AfricaGaborone = 23, +[EnumMember(Value = "dormakaba_oracode")] +DormakabaOracode = 32, - [EnumMember(Value = "Africa/Harare")] - AfricaHarare = 24, +[EnumMember(Value = "dormakaba_oracode_iho")] +DormakabaOracodeIho = 33, - [EnumMember(Value = "Africa/Johannesburg")] - AfricaJohannesburg = 25, +[EnumMember(Value = "honeywell_resideo")] +HoneywellResideo = 34, - [EnumMember(Value = "Africa/Juba")] - AfricaJuba = 26, +[EnumMember(Value = "keynest")] +Keynest = 35, - [EnumMember(Value = "Africa/Kampala")] - AfricaKampala = 27, +[EnumMember(Value = "korelock")] +Korelock = 36, - [EnumMember(Value = "Africa/Khartoum")] - AfricaKhartoum = 28, +[EnumMember(Value = "lockly")] +Lockly = 37, - [EnumMember(Value = "Africa/Kigali")] - AfricaKigali = 29, +[EnumMember(Value = "minut")] +Minut = 38, - [EnumMember(Value = "Africa/Kinshasa")] - AfricaKinshasa = 30, +[EnumMember(Value = "nest")] +Nest = 39, - [EnumMember(Value = "Africa/Lagos")] - AfricaLagos = 31, +[EnumMember(Value = "noiseaware")] +Noiseaware = 40, - [EnumMember(Value = "Africa/Libreville")] - AfricaLibreville = 32, +[EnumMember(Value = "sensi")] +Sensi = 41, - [EnumMember(Value = "Africa/Lome")] - AfricaLome = 33, +[EnumMember(Value = "smartthings")] +Smartthings = 42, + +[EnumMember(Value = "tado")] +Tado = 43, + +[EnumMember(Value = "ultraloq")] +Ultraloq = 44, + +[EnumMember(Value = "ring")] +Ring = 45, + +[EnumMember(Value = "tapo")] +Tapo = 46, + +[EnumMember(Value = "arlo")] +Arlo = 47, + +[EnumMember(Value = "reolink")] +Reolink = 48, + +[EnumMember(Value = "ical")] +Ical = 49, + +[EnumMember(Value = "lodgify")] +Lodgify = 50, + +[EnumMember(Value = "hostaway")] +Hostaway = 51, + +[EnumMember(Value = "guesty")] +Guesty = 52, + +[EnumMember(Value = "acuity_scheduling")] +AcuityScheduling = 53, + +[EnumMember(Value = "omnitec")] +Omnitec = 54, + +[EnumMember(Value = "kisi")] +Kisi = 55, + +[EnumMember(Value = "slack")] +Slack = 56, + +[EnumMember(Value = "yacan")] +Yacan = 57, +} + +/// +/// ID of the Connect Webview for which you want to list devices. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectWebviewId { get; set; } + +/// +/// ID of the connected account for which you want to list devices. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Array of IDs of the connected accounts for which you want to list devices. +/// +[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectedAccountIds { get; set; } + +/// +/// Timestamp by which to limit returned devices. Returns devices created before this timestamp. +/// +[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedBefore { get; set; } + +/// +/// Set of key:value [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. +/// +[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadataHas { get; set; } + +/// +/// Customer key for which you want to list devices. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Array of device IDs for which you want to list devices. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceIds { get; set; } + +/// +/// Device type for which you want to list devices. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + +/// +/// Array of device types for which you want to list devices. +/// +[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceTypes { get; set; } + +/// +/// Numerical limit on the number of devices to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Manufacturer for which you want to list devices. +/// +[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// ID of the space for which you want to list devices. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +[Obsolete("Use `space_id`.")] +[DataMember(Name = "unstable_location_id", IsRequired = false, EmitDefaultValue = false)] +public string? UnstableLocationId { get; set; } + +/// +/// Your own internal user ID for the user for which you want to list devices. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List devices = default) +{ +Devices = devices; +} + +/// +/// OK +/// +[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] +public List Devices { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} - [EnumMember(Value = "Africa/Luanda")] - AfricaLuanda = 34, +/// +/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/devices/list", requestOptions).EnsureData("/devices/list").Devices; +} - [EnumMember(Value = "Africa/Lubumbashi")] - AfricaLubumbashi = 35, +/// +/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). +/// +public List List(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? unstableLocationId = default, string? userIdentifierKey = default) +{ +return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, customMetadataHas: customMetadataHas, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, search: search, spaceId: spaceId, unstableLocationId: unstableLocationId, userIdentifierKey: userIdentifierKey)); +} - [EnumMember(Value = "Africa/Lusaka")] - AfricaLusaka = 36, +/// +/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/devices/list", requestOptions)).EnsureData("/devices/list").Devices; +} - [EnumMember(Value = "Africa/Malabo")] - AfricaMalabo = 37, +/// +/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). +/// +public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? unstableLocationId = default, string? userIdentifierKey = default) +{ +return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, customMetadataHas: customMetadataHas, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, search: search, spaceId: spaceId, unstableLocationId: unstableLocationId, userIdentifierKey: userIdentifierKey))); +} - [EnumMember(Value = "Africa/Maputo")] - AfricaMaputo = 38, +/// +/// Request parameters for List Device Providers. +/// +[DataContract(Name = "listDeviceProvidersRequest_request")] +public class ListDeviceProvidersRequest +{ +[JsonConstructorAttribute] +protected ListDeviceProvidersRequest() { } - [EnumMember(Value = "Africa/Maseru")] - AfricaMaseru = 39, +public ListDeviceProvidersRequest(ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default) +{ +ProviderCategory = providerCategory; +} - [EnumMember(Value = "Africa/Mbabane")] - AfricaMbabane = 40, +/// +/// Category for which you want to list providers. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ProviderCategoryEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "Africa/Mogadishu")] - AfricaMogadishu = 41, +[EnumMember(Value = "stable")] +Stable = 1, - [EnumMember(Value = "Africa/Monrovia")] - AfricaMonrovia = 42, +[EnumMember(Value = "consumer_smartlocks")] +ConsumerSmartlocks = 2, - [EnumMember(Value = "Africa/Nairobi")] - AfricaNairobi = 43, +[EnumMember(Value = "beta")] +Beta = 3, - [EnumMember(Value = "Africa/Ndjamena")] - AfricaNdjamena = 44, +[EnumMember(Value = "thermostats")] +Thermostats = 4, - [EnumMember(Value = "Africa/Niamey")] - AfricaNiamey = 45, +[EnumMember(Value = "noise_sensors")] +NoiseSensors = 5, - [EnumMember(Value = "Africa/Nouakchott")] - AfricaNouakchott = 46, +[EnumMember(Value = "access_control_systems")] +AccessControlSystems = 6, - [EnumMember(Value = "Africa/Ouagadougou")] - AfricaOuagadougou = 47, +[EnumMember(Value = "cameras")] +Cameras = 7, - [EnumMember(Value = "Africa/Porto-Novo")] - AfricaPortoNovo = 48, +[EnumMember(Value = "connectors")] +Connectors = 8, +} - [EnumMember(Value = "Africa/Sao_Tome")] - AfricaSaoTome = 49, +/// +/// Category for which you want to list providers. +/// +[DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] +public ListDeviceProvidersRequest.ProviderCategoryEnum? ProviderCategory { get; set; } - [EnumMember(Value = "Africa/Tripoli")] - AfricaTripoli = 50, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "Africa/Tunis")] - AfricaTunis = 51, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "Africa/Windhoek")] - AfricaWindhoek = 52, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "America/Adak")] - AmericaAdak = 53, +[DataContract(Name = "listDeviceProvidersResponse_response")] +public class ListDeviceProvidersResponse +{ +[JsonConstructorAttribute] +protected ListDeviceProvidersResponse() { } - [EnumMember(Value = "America/Anchorage")] - AmericaAnchorage = 54, +public ListDeviceProvidersResponse(List deviceProviders = default) +{ +DeviceProviders = deviceProviders; +} - [EnumMember(Value = "America/Anguilla")] - AmericaAnguilla = 55, +/// +/// OK +/// +[DataMember(Name = "device_providers", IsRequired = false, EmitDefaultValue = false)] +public List DeviceProviders { get; set; } - [EnumMember(Value = "America/Antigua")] - AmericaAntigua = 56, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "America/Araguaina")] - AmericaAraguaina = 57, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "America/Argentina/La_Rioja")] - AmericaArgentinaLaRioja = 58, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "America/Argentina/Rio_Gallegos")] - AmericaArgentinaRioGallegos = 59, +/// +/// Returns a list of all device providers. +/// +/// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. +/// +/// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). +/// +public List ListDeviceProviders(ListDeviceProvidersRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/devices/list_device_providers", requestOptions).EnsureData("/devices/list_device_providers").DeviceProviders; +} - [EnumMember(Value = "America/Argentina/Salta")] - AmericaArgentinaSalta = 60, +/// +/// Returns a list of all device providers. +/// +/// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. +/// +/// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). +/// +public List ListDeviceProviders(ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default) +{ +return ListDeviceProviders(new ListDeviceProvidersRequest(providerCategory: providerCategory)); +} - [EnumMember(Value = "America/Argentina/San_Juan")] - AmericaArgentinaSanJuan = 61, +/// +/// Returns a list of all device providers. +/// +/// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. +/// +/// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). +/// +public async Task> ListDeviceProvidersAsync(ListDeviceProvidersRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/devices/list_device_providers", requestOptions)).EnsureData("/devices/list_device_providers").DeviceProviders; +} - [EnumMember(Value = "America/Argentina/San_Luis")] - AmericaArgentinaSanLuis = 62, +/// +/// Returns a list of all device providers. +/// +/// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. +/// +/// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). +/// +public async Task> ListDeviceProvidersAsync(ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default) +{ +return (await ListDeviceProvidersAsync(new ListDeviceProvidersRequest(providerCategory: providerCategory))); +} - [EnumMember(Value = "America/Argentina/Tucuman")] - AmericaArgentinaTucuman = 63, +/// +/// Request parameters for Report Provider Metadata. +/// +[DataContract(Name = "reportProviderMetadataRequest_request")] +public class ReportProviderMetadataRequest +{ +[JsonConstructorAttribute] +protected ReportProviderMetadataRequest() { } - [EnumMember(Value = "America/Argentina/Ushuaia")] - AmericaArgentinaUshuaia = 64, +public ReportProviderMetadataRequest(List devices = default) +{ +Devices = devices; +} - [EnumMember(Value = "America/Aruba")] - AmericaAruba = 65, +/// +/// Array of devices with provider metadata to update +/// +[DataMember(Name = "devices", IsRequired = true, EmitDefaultValue = false)] +public List Devices { get; set; } - [EnumMember(Value = "America/Asuncion")] - AmericaAsuncion = 66, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "America/Bahia")] - AmericaBahia = 67, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "America/Bahia_Banderas")] - AmericaBahiaBanderas = 68, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "America/Barbados")] - AmericaBarbados = 69, +[DataContract(Name = "reportProviderMetadataRequestDevices_model")] +public class ReportProviderMetadataRequestDevices +{ +[JsonConstructorAttribute] +protected ReportProviderMetadataRequestDevices() { } - [EnumMember(Value = "America/Belem")] - AmericaBelem = 70, +public ReportProviderMetadataRequestDevices(string? deviceId = default, ReportProviderMetadataRequestDevicesOmnitecMetadata? omnitecMetadata = default, ReportProviderMetadataRequestDevicesSchlageMetadata? schlageMetadata = default, ReportProviderMetadataRequestDevicesUltraloqMetadata? ultraloqMetadata = default) +{ +DeviceId = deviceId; +OmnitecMetadata = omnitecMetadata; +SchlageMetadata = schlageMetadata; +UltraloqMetadata = ultraloqMetadata; +} - [EnumMember(Value = "America/Belize")] - AmericaBelize = 71, +/// +/// ID of the device to update +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Omnitec-specific metadata to update +/// +[DataMember(Name = "omnitec_metadata", IsRequired = false, EmitDefaultValue = false)] +public ReportProviderMetadataRequestDevicesOmnitecMetadata? OmnitecMetadata { get; set; } + +/// +/// Schlage-specific metadata to update +/// +[DataMember(Name = "schlage_metadata", IsRequired = false, EmitDefaultValue = false)] +public ReportProviderMetadataRequestDevicesSchlageMetadata? SchlageMetadata { get; set; } + +/// +/// Ultraloq-specific metadata to update +/// +[DataMember(Name = "ultraloq_metadata", IsRequired = false, EmitDefaultValue = false)] +public ReportProviderMetadataRequestDevicesUltraloqMetadata? UltraloqMetadata { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "America/Blanc-Sablon")] - AmericaBlancSablon = 72, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "America/Boa_Vista")] - AmericaBoaVista = 73, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "America/Bogota")] - AmericaBogota = 74, +[DataContract(Name = "reportProviderMetadataRequestDevicesOmnitecMetadata_model")] +public class ReportProviderMetadataRequestDevicesOmnitecMetadata +{ +[JsonConstructorAttribute] +protected ReportProviderMetadataRequestDevicesOmnitecMetadata() { } - [EnumMember(Value = "America/Boise")] - AmericaBoise = 75, +public ReportProviderMetadataRequestDevicesOmnitecMetadata(ReportProviderMetadataRequestDevicesOmnitecMetadata.TimeZoneEnum? timeZone = default) +{ +TimeZone = timeZone; +} - [EnumMember(Value = "America/Buenos_Aires")] - AmericaBuenosAires = 76, +/// +/// IANA timezone for the Omnitec device +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TimeZoneEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "America/Cambridge_Bay")] - AmericaCambridgeBay = 77, +[EnumMember(Value = "Africa/Abidjan")] +AfricaAbidjan = 1, - [EnumMember(Value = "America/Campo_Grande")] - AmericaCampoGrande = 78, +[EnumMember(Value = "Africa/Accra")] +AfricaAccra = 2, - [EnumMember(Value = "America/Cancun")] - AmericaCancun = 79, +[EnumMember(Value = "Africa/Addis_Ababa")] +AfricaAddisAbaba = 3, - [EnumMember(Value = "America/Caracas")] - AmericaCaracas = 80, +[EnumMember(Value = "Africa/Algiers")] +AfricaAlgiers = 4, - [EnumMember(Value = "America/Catamarca")] - AmericaCatamarca = 81, +[EnumMember(Value = "Africa/Asmera")] +AfricaAsmera = 5, - [EnumMember(Value = "America/Cayenne")] - AmericaCayenne = 82, +[EnumMember(Value = "Africa/Bamako")] +AfricaBamako = 6, - [EnumMember(Value = "America/Cayman")] - AmericaCayman = 83, +[EnumMember(Value = "Africa/Bangui")] +AfricaBangui = 7, - [EnumMember(Value = "America/Chicago")] - AmericaChicago = 84, +[EnumMember(Value = "Africa/Banjul")] +AfricaBanjul = 8, - [EnumMember(Value = "America/Chihuahua")] - AmericaChihuahua = 85, +[EnumMember(Value = "Africa/Bissau")] +AfricaBissau = 9, - [EnumMember(Value = "America/Ciudad_Juarez")] - AmericaCiudadJuarez = 86, +[EnumMember(Value = "Africa/Blantyre")] +AfricaBlantyre = 10, - [EnumMember(Value = "America/Coral_Harbour")] - AmericaCoralHarbour = 87, +[EnumMember(Value = "Africa/Brazzaville")] +AfricaBrazzaville = 11, - [EnumMember(Value = "America/Cordoba")] - AmericaCordoba = 88, +[EnumMember(Value = "Africa/Bujumbura")] +AfricaBujumbura = 12, - [EnumMember(Value = "America/Costa_Rica")] - AmericaCostaRica = 89, +[EnumMember(Value = "Africa/Cairo")] +AfricaCairo = 13, - [EnumMember(Value = "America/Creston")] - AmericaCreston = 90, +[EnumMember(Value = "Africa/Casablanca")] +AfricaCasablanca = 14, - [EnumMember(Value = "America/Cuiaba")] - AmericaCuiaba = 91, +[EnumMember(Value = "Africa/Ceuta")] +AfricaCeuta = 15, - [EnumMember(Value = "America/Curacao")] - AmericaCuracao = 92, +[EnumMember(Value = "Africa/Conakry")] +AfricaConakry = 16, - [EnumMember(Value = "America/Danmarkshavn")] - AmericaDanmarkshavn = 93, +[EnumMember(Value = "Africa/Dakar")] +AfricaDakar = 17, - [EnumMember(Value = "America/Dawson")] - AmericaDawson = 94, +[EnumMember(Value = "Africa/Dar_es_Salaam")] +AfricaDarEsSalaam = 18, - [EnumMember(Value = "America/Dawson_Creek")] - AmericaDawsonCreek = 95, +[EnumMember(Value = "Africa/Djibouti")] +AfricaDjibouti = 19, - [EnumMember(Value = "America/Denver")] - AmericaDenver = 96, +[EnumMember(Value = "Africa/Douala")] +AfricaDouala = 20, - [EnumMember(Value = "America/Detroit")] - AmericaDetroit = 97, +[EnumMember(Value = "Africa/El_Aaiun")] +AfricaElAaiun = 21, - [EnumMember(Value = "America/Dominica")] - AmericaDominica = 98, +[EnumMember(Value = "Africa/Freetown")] +AfricaFreetown = 22, - [EnumMember(Value = "America/Edmonton")] - AmericaEdmonton = 99, +[EnumMember(Value = "Africa/Gaborone")] +AfricaGaborone = 23, - [EnumMember(Value = "America/Eirunepe")] - AmericaEirunepe = 100, +[EnumMember(Value = "Africa/Harare")] +AfricaHarare = 24, - [EnumMember(Value = "America/El_Salvador")] - AmericaElSalvador = 101, +[EnumMember(Value = "Africa/Johannesburg")] +AfricaJohannesburg = 25, - [EnumMember(Value = "America/Fort_Nelson")] - AmericaFortNelson = 102, +[EnumMember(Value = "Africa/Juba")] +AfricaJuba = 26, - [EnumMember(Value = "America/Fortaleza")] - AmericaFortaleza = 103, +[EnumMember(Value = "Africa/Kampala")] +AfricaKampala = 27, - [EnumMember(Value = "America/Glace_Bay")] - AmericaGlaceBay = 104, +[EnumMember(Value = "Africa/Khartoum")] +AfricaKhartoum = 28, - [EnumMember(Value = "America/Godthab")] - AmericaGodthab = 105, +[EnumMember(Value = "Africa/Kigali")] +AfricaKigali = 29, - [EnumMember(Value = "America/Goose_Bay")] - AmericaGooseBay = 106, +[EnumMember(Value = "Africa/Kinshasa")] +AfricaKinshasa = 30, - [EnumMember(Value = "America/Grand_Turk")] - AmericaGrandTurk = 107, +[EnumMember(Value = "Africa/Lagos")] +AfricaLagos = 31, - [EnumMember(Value = "America/Grenada")] - AmericaGrenada = 108, +[EnumMember(Value = "Africa/Libreville")] +AfricaLibreville = 32, - [EnumMember(Value = "America/Guadeloupe")] - AmericaGuadeloupe = 109, +[EnumMember(Value = "Africa/Lome")] +AfricaLome = 33, - [EnumMember(Value = "America/Guatemala")] - AmericaGuatemala = 110, +[EnumMember(Value = "Africa/Luanda")] +AfricaLuanda = 34, - [EnumMember(Value = "America/Guayaquil")] - AmericaGuayaquil = 111, +[EnumMember(Value = "Africa/Lubumbashi")] +AfricaLubumbashi = 35, - [EnumMember(Value = "America/Guyana")] - AmericaGuyana = 112, +[EnumMember(Value = "Africa/Lusaka")] +AfricaLusaka = 36, - [EnumMember(Value = "America/Halifax")] - AmericaHalifax = 113, +[EnumMember(Value = "Africa/Malabo")] +AfricaMalabo = 37, - [EnumMember(Value = "America/Havana")] - AmericaHavana = 114, +[EnumMember(Value = "Africa/Maputo")] +AfricaMaputo = 38, - [EnumMember(Value = "America/Hermosillo")] - AmericaHermosillo = 115, +[EnumMember(Value = "Africa/Maseru")] +AfricaMaseru = 39, - [EnumMember(Value = "America/Indiana/Knox")] - AmericaIndianaKnox = 116, +[EnumMember(Value = "Africa/Mbabane")] +AfricaMbabane = 40, - [EnumMember(Value = "America/Indiana/Marengo")] - AmericaIndianaMarengo = 117, +[EnumMember(Value = "Africa/Mogadishu")] +AfricaMogadishu = 41, - [EnumMember(Value = "America/Indiana/Petersburg")] - AmericaIndianaPetersburg = 118, +[EnumMember(Value = "Africa/Monrovia")] +AfricaMonrovia = 42, - [EnumMember(Value = "America/Indiana/Tell_City")] - AmericaIndianaTellCity = 119, +[EnumMember(Value = "Africa/Nairobi")] +AfricaNairobi = 43, - [EnumMember(Value = "America/Indiana/Vevay")] - AmericaIndianaVevay = 120, +[EnumMember(Value = "Africa/Ndjamena")] +AfricaNdjamena = 44, - [EnumMember(Value = "America/Indiana/Vincennes")] - AmericaIndianaVincennes = 121, +[EnumMember(Value = "Africa/Niamey")] +AfricaNiamey = 45, - [EnumMember(Value = "America/Indiana/Winamac")] - AmericaIndianaWinamac = 122, +[EnumMember(Value = "Africa/Nouakchott")] +AfricaNouakchott = 46, - [EnumMember(Value = "America/Indianapolis")] - AmericaIndianapolis = 123, +[EnumMember(Value = "Africa/Ouagadougou")] +AfricaOuagadougou = 47, - [EnumMember(Value = "America/Inuvik")] - AmericaInuvik = 124, +[EnumMember(Value = "Africa/Porto-Novo")] +AfricaPortoNovo = 48, - [EnumMember(Value = "America/Iqaluit")] - AmericaIqaluit = 125, +[EnumMember(Value = "Africa/Sao_Tome")] +AfricaSaoTome = 49, - [EnumMember(Value = "America/Jamaica")] - AmericaJamaica = 126, +[EnumMember(Value = "Africa/Tripoli")] +AfricaTripoli = 50, - [EnumMember(Value = "America/Jujuy")] - AmericaJujuy = 127, +[EnumMember(Value = "Africa/Tunis")] +AfricaTunis = 51, - [EnumMember(Value = "America/Juneau")] - AmericaJuneau = 128, +[EnumMember(Value = "Africa/Windhoek")] +AfricaWindhoek = 52, - [EnumMember(Value = "America/Kentucky/Monticello")] - AmericaKentuckyMonticello = 129, +[EnumMember(Value = "America/Adak")] +AmericaAdak = 53, - [EnumMember(Value = "America/Kralendijk")] - AmericaKralendijk = 130, +[EnumMember(Value = "America/Anchorage")] +AmericaAnchorage = 54, - [EnumMember(Value = "America/La_Paz")] - AmericaLaPaz = 131, +[EnumMember(Value = "America/Anguilla")] +AmericaAnguilla = 55, - [EnumMember(Value = "America/Lima")] - AmericaLima = 132, +[EnumMember(Value = "America/Antigua")] +AmericaAntigua = 56, - [EnumMember(Value = "America/Los_Angeles")] - AmericaLosAngeles = 133, +[EnumMember(Value = "America/Araguaina")] +AmericaAraguaina = 57, - [EnumMember(Value = "America/Louisville")] - AmericaLouisville = 134, +[EnumMember(Value = "America/Argentina/La_Rioja")] +AmericaArgentinaLaRioja = 58, - [EnumMember(Value = "America/Lower_Princes")] - AmericaLowerPrinces = 135, +[EnumMember(Value = "America/Argentina/Rio_Gallegos")] +AmericaArgentinaRioGallegos = 59, - [EnumMember(Value = "America/Maceio")] - AmericaMaceio = 136, +[EnumMember(Value = "America/Argentina/Salta")] +AmericaArgentinaSalta = 60, - [EnumMember(Value = "America/Managua")] - AmericaManagua = 137, +[EnumMember(Value = "America/Argentina/San_Juan")] +AmericaArgentinaSanJuan = 61, - [EnumMember(Value = "America/Manaus")] - AmericaManaus = 138, +[EnumMember(Value = "America/Argentina/San_Luis")] +AmericaArgentinaSanLuis = 62, - [EnumMember(Value = "America/Marigot")] - AmericaMarigot = 139, +[EnumMember(Value = "America/Argentina/Tucuman")] +AmericaArgentinaTucuman = 63, - [EnumMember(Value = "America/Martinique")] - AmericaMartinique = 140, +[EnumMember(Value = "America/Argentina/Ushuaia")] +AmericaArgentinaUshuaia = 64, - [EnumMember(Value = "America/Matamoros")] - AmericaMatamoros = 141, +[EnumMember(Value = "America/Aruba")] +AmericaAruba = 65, - [EnumMember(Value = "America/Mazatlan")] - AmericaMazatlan = 142, +[EnumMember(Value = "America/Asuncion")] +AmericaAsuncion = 66, - [EnumMember(Value = "America/Mendoza")] - AmericaMendoza = 143, +[EnumMember(Value = "America/Bahia")] +AmericaBahia = 67, - [EnumMember(Value = "America/Menominee")] - AmericaMenominee = 144, +[EnumMember(Value = "America/Bahia_Banderas")] +AmericaBahiaBanderas = 68, - [EnumMember(Value = "America/Merida")] - AmericaMerida = 145, +[EnumMember(Value = "America/Barbados")] +AmericaBarbados = 69, - [EnumMember(Value = "America/Metlakatla")] - AmericaMetlakatla = 146, +[EnumMember(Value = "America/Belem")] +AmericaBelem = 70, - [EnumMember(Value = "America/Mexico_City")] - AmericaMexicoCity = 147, +[EnumMember(Value = "America/Belize")] +AmericaBelize = 71, - [EnumMember(Value = "America/Miquelon")] - AmericaMiquelon = 148, +[EnumMember(Value = "America/Blanc-Sablon")] +AmericaBlancSablon = 72, - [EnumMember(Value = "America/Moncton")] - AmericaMoncton = 149, +[EnumMember(Value = "America/Boa_Vista")] +AmericaBoaVista = 73, - [EnumMember(Value = "America/Monterrey")] - AmericaMonterrey = 150, +[EnumMember(Value = "America/Bogota")] +AmericaBogota = 74, - [EnumMember(Value = "America/Montevideo")] - AmericaMontevideo = 151, +[EnumMember(Value = "America/Boise")] +AmericaBoise = 75, - [EnumMember(Value = "America/Montreal")] - AmericaMontreal = 152, +[EnumMember(Value = "America/Buenos_Aires")] +AmericaBuenosAires = 76, - [EnumMember(Value = "America/Montserrat")] - AmericaMontserrat = 153, +[EnumMember(Value = "America/Cambridge_Bay")] +AmericaCambridgeBay = 77, - [EnumMember(Value = "America/Nassau")] - AmericaNassau = 154, +[EnumMember(Value = "America/Campo_Grande")] +AmericaCampoGrande = 78, - [EnumMember(Value = "America/New_York")] - AmericaNewYork = 155, +[EnumMember(Value = "America/Cancun")] +AmericaCancun = 79, - [EnumMember(Value = "America/Nipigon")] - AmericaNipigon = 156, +[EnumMember(Value = "America/Caracas")] +AmericaCaracas = 80, - [EnumMember(Value = "America/Nome")] - AmericaNome = 157, +[EnumMember(Value = "America/Catamarca")] +AmericaCatamarca = 81, - [EnumMember(Value = "America/Noronha")] - AmericaNoronha = 158, +[EnumMember(Value = "America/Cayenne")] +AmericaCayenne = 82, - [EnumMember(Value = "America/North_Dakota/Beulah")] - AmericaNorthDakotaBeulah = 159, +[EnumMember(Value = "America/Cayman")] +AmericaCayman = 83, - [EnumMember(Value = "America/North_Dakota/Center")] - AmericaNorthDakotaCenter = 160, +[EnumMember(Value = "America/Chicago")] +AmericaChicago = 84, - [EnumMember(Value = "America/North_Dakota/New_Salem")] - AmericaNorthDakotaNewSalem = 161, +[EnumMember(Value = "America/Chihuahua")] +AmericaChihuahua = 85, - [EnumMember(Value = "America/Ojinaga")] - AmericaOjinaga = 162, +[EnumMember(Value = "America/Ciudad_Juarez")] +AmericaCiudadJuarez = 86, - [EnumMember(Value = "America/Panama")] - AmericaPanama = 163, +[EnumMember(Value = "America/Coral_Harbour")] +AmericaCoralHarbour = 87, - [EnumMember(Value = "America/Pangnirtung")] - AmericaPangnirtung = 164, +[EnumMember(Value = "America/Cordoba")] +AmericaCordoba = 88, - [EnumMember(Value = "America/Paramaribo")] - AmericaParamaribo = 165, +[EnumMember(Value = "America/Costa_Rica")] +AmericaCostaRica = 89, - [EnumMember(Value = "America/Phoenix")] - AmericaPhoenix = 166, +[EnumMember(Value = "America/Creston")] +AmericaCreston = 90, - [EnumMember(Value = "America/Port-au-Prince")] - AmericaPortAuPrince = 167, +[EnumMember(Value = "America/Cuiaba")] +AmericaCuiaba = 91, - [EnumMember(Value = "America/Port_of_Spain")] - AmericaPortOfSpain = 168, +[EnumMember(Value = "America/Curacao")] +AmericaCuracao = 92, - [EnumMember(Value = "America/Porto_Velho")] - AmericaPortoVelho = 169, +[EnumMember(Value = "America/Danmarkshavn")] +AmericaDanmarkshavn = 93, - [EnumMember(Value = "America/Puerto_Rico")] - AmericaPuertoRico = 170, +[EnumMember(Value = "America/Dawson")] +AmericaDawson = 94, - [EnumMember(Value = "America/Punta_Arenas")] - AmericaPuntaArenas = 171, +[EnumMember(Value = "America/Dawson_Creek")] +AmericaDawsonCreek = 95, - [EnumMember(Value = "America/Rainy_River")] - AmericaRainyRiver = 172, +[EnumMember(Value = "America/Denver")] +AmericaDenver = 96, - [EnumMember(Value = "America/Rankin_Inlet")] - AmericaRankinInlet = 173, +[EnumMember(Value = "America/Detroit")] +AmericaDetroit = 97, - [EnumMember(Value = "America/Recife")] - AmericaRecife = 174, +[EnumMember(Value = "America/Dominica")] +AmericaDominica = 98, - [EnumMember(Value = "America/Regina")] - AmericaRegina = 175, +[EnumMember(Value = "America/Edmonton")] +AmericaEdmonton = 99, - [EnumMember(Value = "America/Resolute")] - AmericaResolute = 176, +[EnumMember(Value = "America/Eirunepe")] +AmericaEirunepe = 100, - [EnumMember(Value = "America/Rio_Branco")] - AmericaRioBranco = 177, +[EnumMember(Value = "America/El_Salvador")] +AmericaElSalvador = 101, - [EnumMember(Value = "America/Santa_Isabel")] - AmericaSantaIsabel = 178, +[EnumMember(Value = "America/Fort_Nelson")] +AmericaFortNelson = 102, - [EnumMember(Value = "America/Santarem")] - AmericaSantarem = 179, +[EnumMember(Value = "America/Fortaleza")] +AmericaFortaleza = 103, - [EnumMember(Value = "America/Santiago")] - AmericaSantiago = 180, +[EnumMember(Value = "America/Glace_Bay")] +AmericaGlaceBay = 104, - [EnumMember(Value = "America/Santo_Domingo")] - AmericaSantoDomingo = 181, +[EnumMember(Value = "America/Godthab")] +AmericaGodthab = 105, - [EnumMember(Value = "America/Sao_Paulo")] - AmericaSaoPaulo = 182, +[EnumMember(Value = "America/Goose_Bay")] +AmericaGooseBay = 106, - [EnumMember(Value = "America/Scoresbysund")] - AmericaScoresbysund = 183, +[EnumMember(Value = "America/Grand_Turk")] +AmericaGrandTurk = 107, - [EnumMember(Value = "America/Sitka")] - AmericaSitka = 184, +[EnumMember(Value = "America/Grenada")] +AmericaGrenada = 108, - [EnumMember(Value = "America/St_Barthelemy")] - AmericaStBarthelemy = 185, +[EnumMember(Value = "America/Guadeloupe")] +AmericaGuadeloupe = 109, - [EnumMember(Value = "America/St_Johns")] - AmericaStJohns = 186, +[EnumMember(Value = "America/Guatemala")] +AmericaGuatemala = 110, - [EnumMember(Value = "America/St_Kitts")] - AmericaStKitts = 187, +[EnumMember(Value = "America/Guayaquil")] +AmericaGuayaquil = 111, - [EnumMember(Value = "America/St_Lucia")] - AmericaStLucia = 188, +[EnumMember(Value = "America/Guyana")] +AmericaGuyana = 112, - [EnumMember(Value = "America/St_Thomas")] - AmericaStThomas = 189, +[EnumMember(Value = "America/Halifax")] +AmericaHalifax = 113, - [EnumMember(Value = "America/St_Vincent")] - AmericaStVincent = 190, +[EnumMember(Value = "America/Havana")] +AmericaHavana = 114, - [EnumMember(Value = "America/Swift_Current")] - AmericaSwiftCurrent = 191, +[EnumMember(Value = "America/Hermosillo")] +AmericaHermosillo = 115, - [EnumMember(Value = "America/Tegucigalpa")] - AmericaTegucigalpa = 192, +[EnumMember(Value = "America/Indiana/Knox")] +AmericaIndianaKnox = 116, - [EnumMember(Value = "America/Thule")] - AmericaThule = 193, +[EnumMember(Value = "America/Indiana/Marengo")] +AmericaIndianaMarengo = 117, - [EnumMember(Value = "America/Thunder_Bay")] - AmericaThunderBay = 194, +[EnumMember(Value = "America/Indiana/Petersburg")] +AmericaIndianaPetersburg = 118, - [EnumMember(Value = "America/Tijuana")] - AmericaTijuana = 195, +[EnumMember(Value = "America/Indiana/Tell_City")] +AmericaIndianaTellCity = 119, - [EnumMember(Value = "America/Toronto")] - AmericaToronto = 196, +[EnumMember(Value = "America/Indiana/Vevay")] +AmericaIndianaVevay = 120, - [EnumMember(Value = "America/Tortola")] - AmericaTortola = 197, +[EnumMember(Value = "America/Indiana/Vincennes")] +AmericaIndianaVincennes = 121, - [EnumMember(Value = "America/Vancouver")] - AmericaVancouver = 198, +[EnumMember(Value = "America/Indiana/Winamac")] +AmericaIndianaWinamac = 122, - [EnumMember(Value = "America/Whitehorse")] - AmericaWhitehorse = 199, +[EnumMember(Value = "America/Indianapolis")] +AmericaIndianapolis = 123, - [EnumMember(Value = "America/Winnipeg")] - AmericaWinnipeg = 200, +[EnumMember(Value = "America/Inuvik")] +AmericaInuvik = 124, - [EnumMember(Value = "America/Yakutat")] - AmericaYakutat = 201, +[EnumMember(Value = "America/Iqaluit")] +AmericaIqaluit = 125, - [EnumMember(Value = "America/Yellowknife")] - AmericaYellowknife = 202, +[EnumMember(Value = "America/Jamaica")] +AmericaJamaica = 126, - [EnumMember(Value = "Antarctica/Casey")] - AntarcticaCasey = 203, +[EnumMember(Value = "America/Jujuy")] +AmericaJujuy = 127, - [EnumMember(Value = "Antarctica/Davis")] - AntarcticaDavis = 204, +[EnumMember(Value = "America/Juneau")] +AmericaJuneau = 128, - [EnumMember(Value = "Antarctica/DumontDUrville")] - AntarcticaDumontDUrville = 205, +[EnumMember(Value = "America/Kentucky/Monticello")] +AmericaKentuckyMonticello = 129, - [EnumMember(Value = "Antarctica/Macquarie")] - AntarcticaMacquarie = 206, +[EnumMember(Value = "America/Kralendijk")] +AmericaKralendijk = 130, - [EnumMember(Value = "Antarctica/Mawson")] - AntarcticaMawson = 207, +[EnumMember(Value = "America/La_Paz")] +AmericaLaPaz = 131, - [EnumMember(Value = "Antarctica/McMurdo")] - AntarcticaMcMurdo = 208, +[EnumMember(Value = "America/Lima")] +AmericaLima = 132, - [EnumMember(Value = "Antarctica/Palmer")] - AntarcticaPalmer = 209, +[EnumMember(Value = "America/Los_Angeles")] +AmericaLosAngeles = 133, - [EnumMember(Value = "Antarctica/Rothera")] - AntarcticaRothera = 210, +[EnumMember(Value = "America/Louisville")] +AmericaLouisville = 134, - [EnumMember(Value = "Antarctica/Syowa")] - AntarcticaSyowa = 211, +[EnumMember(Value = "America/Lower_Princes")] +AmericaLowerPrinces = 135, - [EnumMember(Value = "Antarctica/Troll")] - AntarcticaTroll = 212, +[EnumMember(Value = "America/Maceio")] +AmericaMaceio = 136, - [EnumMember(Value = "Antarctica/Vostok")] - AntarcticaVostok = 213, +[EnumMember(Value = "America/Managua")] +AmericaManagua = 137, - [EnumMember(Value = "Arctic/Longyearbyen")] - ArcticLongyearbyen = 214, +[EnumMember(Value = "America/Manaus")] +AmericaManaus = 138, - [EnumMember(Value = "Asia/Aden")] - AsiaAden = 215, +[EnumMember(Value = "America/Marigot")] +AmericaMarigot = 139, - [EnumMember(Value = "Asia/Almaty")] - AsiaAlmaty = 216, +[EnumMember(Value = "America/Martinique")] +AmericaMartinique = 140, - [EnumMember(Value = "Asia/Amman")] - AsiaAmman = 217, +[EnumMember(Value = "America/Matamoros")] +AmericaMatamoros = 141, - [EnumMember(Value = "Asia/Anadyr")] - AsiaAnadyr = 218, +[EnumMember(Value = "America/Mazatlan")] +AmericaMazatlan = 142, - [EnumMember(Value = "Asia/Aqtau")] - AsiaAqtau = 219, +[EnumMember(Value = "America/Mendoza")] +AmericaMendoza = 143, - [EnumMember(Value = "Asia/Aqtobe")] - AsiaAqtobe = 220, +[EnumMember(Value = "America/Menominee")] +AmericaMenominee = 144, - [EnumMember(Value = "Asia/Ashgabat")] - AsiaAshgabat = 221, +[EnumMember(Value = "America/Merida")] +AmericaMerida = 145, - [EnumMember(Value = "Asia/Atyrau")] - AsiaAtyrau = 222, +[EnumMember(Value = "America/Metlakatla")] +AmericaMetlakatla = 146, - [EnumMember(Value = "Asia/Baghdad")] - AsiaBaghdad = 223, +[EnumMember(Value = "America/Mexico_City")] +AmericaMexicoCity = 147, - [EnumMember(Value = "Asia/Bahrain")] - AsiaBahrain = 224, +[EnumMember(Value = "America/Miquelon")] +AmericaMiquelon = 148, - [EnumMember(Value = "Asia/Baku")] - AsiaBaku = 225, +[EnumMember(Value = "America/Moncton")] +AmericaMoncton = 149, - [EnumMember(Value = "Asia/Bangkok")] - AsiaBangkok = 226, +[EnumMember(Value = "America/Monterrey")] +AmericaMonterrey = 150, - [EnumMember(Value = "Asia/Barnaul")] - AsiaBarnaul = 227, +[EnumMember(Value = "America/Montevideo")] +AmericaMontevideo = 151, - [EnumMember(Value = "Asia/Beirut")] - AsiaBeirut = 228, +[EnumMember(Value = "America/Montreal")] +AmericaMontreal = 152, - [EnumMember(Value = "Asia/Bishkek")] - AsiaBishkek = 229, +[EnumMember(Value = "America/Montserrat")] +AmericaMontserrat = 153, - [EnumMember(Value = "Asia/Brunei")] - AsiaBrunei = 230, +[EnumMember(Value = "America/Nassau")] +AmericaNassau = 154, - [EnumMember(Value = "Asia/Calcutta")] - AsiaCalcutta = 231, +[EnumMember(Value = "America/New_York")] +AmericaNewYork = 155, - [EnumMember(Value = "Asia/Chita")] - AsiaChita = 232, +[EnumMember(Value = "America/Nipigon")] +AmericaNipigon = 156, - [EnumMember(Value = "Asia/Choibalsan")] - AsiaChoibalsan = 233, +[EnumMember(Value = "America/Nome")] +AmericaNome = 157, - [EnumMember(Value = "Asia/Colombo")] - AsiaColombo = 234, +[EnumMember(Value = "America/Noronha")] +AmericaNoronha = 158, - [EnumMember(Value = "Asia/Damascus")] - AsiaDamascus = 235, +[EnumMember(Value = "America/North_Dakota/Beulah")] +AmericaNorthDakotaBeulah = 159, - [EnumMember(Value = "Asia/Dhaka")] - AsiaDhaka = 236, +[EnumMember(Value = "America/North_Dakota/Center")] +AmericaNorthDakotaCenter = 160, - [EnumMember(Value = "Asia/Dili")] - AsiaDili = 237, +[EnumMember(Value = "America/North_Dakota/New_Salem")] +AmericaNorthDakotaNewSalem = 161, - [EnumMember(Value = "Asia/Dubai")] - AsiaDubai = 238, +[EnumMember(Value = "America/Ojinaga")] +AmericaOjinaga = 162, - [EnumMember(Value = "Asia/Dushanbe")] - AsiaDushanbe = 239, +[EnumMember(Value = "America/Panama")] +AmericaPanama = 163, - [EnumMember(Value = "Asia/Famagusta")] - AsiaFamagusta = 240, +[EnumMember(Value = "America/Pangnirtung")] +AmericaPangnirtung = 164, - [EnumMember(Value = "Asia/Gaza")] - AsiaGaza = 241, +[EnumMember(Value = "America/Paramaribo")] +AmericaParamaribo = 165, - [EnumMember(Value = "Asia/Hebron")] - AsiaHebron = 242, +[EnumMember(Value = "America/Phoenix")] +AmericaPhoenix = 166, - [EnumMember(Value = "Asia/Hong_Kong")] - AsiaHongKong = 243, +[EnumMember(Value = "America/Port-au-Prince")] +AmericaPortAuPrince = 167, - [EnumMember(Value = "Asia/Hovd")] - AsiaHovd = 244, +[EnumMember(Value = "America/Port_of_Spain")] +AmericaPortOfSpain = 168, - [EnumMember(Value = "Asia/Irkutsk")] - AsiaIrkutsk = 245, +[EnumMember(Value = "America/Porto_Velho")] +AmericaPortoVelho = 169, - [EnumMember(Value = "Asia/Jakarta")] - AsiaJakarta = 246, +[EnumMember(Value = "America/Puerto_Rico")] +AmericaPuertoRico = 170, - [EnumMember(Value = "Asia/Jayapura")] - AsiaJayapura = 247, +[EnumMember(Value = "America/Punta_Arenas")] +AmericaPuntaArenas = 171, - [EnumMember(Value = "Asia/Jerusalem")] - AsiaJerusalem = 248, +[EnumMember(Value = "America/Rainy_River")] +AmericaRainyRiver = 172, - [EnumMember(Value = "Asia/Kabul")] - AsiaKabul = 249, +[EnumMember(Value = "America/Rankin_Inlet")] +AmericaRankinInlet = 173, - [EnumMember(Value = "Asia/Kamchatka")] - AsiaKamchatka = 250, +[EnumMember(Value = "America/Recife")] +AmericaRecife = 174, - [EnumMember(Value = "Asia/Karachi")] - AsiaKarachi = 251, +[EnumMember(Value = "America/Regina")] +AmericaRegina = 175, - [EnumMember(Value = "Asia/Katmandu")] - AsiaKatmandu = 252, +[EnumMember(Value = "America/Resolute")] +AmericaResolute = 176, - [EnumMember(Value = "Asia/Khandyga")] - AsiaKhandyga = 253, +[EnumMember(Value = "America/Rio_Branco")] +AmericaRioBranco = 177, - [EnumMember(Value = "Asia/Krasnoyarsk")] - AsiaKrasnoyarsk = 254, +[EnumMember(Value = "America/Santa_Isabel")] +AmericaSantaIsabel = 178, - [EnumMember(Value = "Asia/Kuala_Lumpur")] - AsiaKualaLumpur = 255, +[EnumMember(Value = "America/Santarem")] +AmericaSantarem = 179, - [EnumMember(Value = "Asia/Kuching")] - AsiaKuching = 256, +[EnumMember(Value = "America/Santiago")] +AmericaSantiago = 180, - [EnumMember(Value = "Asia/Kuwait")] - AsiaKuwait = 257, +[EnumMember(Value = "America/Santo_Domingo")] +AmericaSantoDomingo = 181, - [EnumMember(Value = "Asia/Macau")] - AsiaMacau = 258, +[EnumMember(Value = "America/Sao_Paulo")] +AmericaSaoPaulo = 182, - [EnumMember(Value = "Asia/Magadan")] - AsiaMagadan = 259, +[EnumMember(Value = "America/Scoresbysund")] +AmericaScoresbysund = 183, - [EnumMember(Value = "Asia/Makassar")] - AsiaMakassar = 260, +[EnumMember(Value = "America/Sitka")] +AmericaSitka = 184, - [EnumMember(Value = "Asia/Manila")] - AsiaManila = 261, +[EnumMember(Value = "America/St_Barthelemy")] +AmericaStBarthelemy = 185, - [EnumMember(Value = "Asia/Muscat")] - AsiaMuscat = 262, +[EnumMember(Value = "America/St_Johns")] +AmericaStJohns = 186, - [EnumMember(Value = "Asia/Nicosia")] - AsiaNicosia = 263, +[EnumMember(Value = "America/St_Kitts")] +AmericaStKitts = 187, - [EnumMember(Value = "Asia/Novokuznetsk")] - AsiaNovokuznetsk = 264, +[EnumMember(Value = "America/St_Lucia")] +AmericaStLucia = 188, - [EnumMember(Value = "Asia/Novosibirsk")] - AsiaNovosibirsk = 265, +[EnumMember(Value = "America/St_Thomas")] +AmericaStThomas = 189, - [EnumMember(Value = "Asia/Omsk")] - AsiaOmsk = 266, +[EnumMember(Value = "America/St_Vincent")] +AmericaStVincent = 190, - [EnumMember(Value = "Asia/Oral")] - AsiaOral = 267, +[EnumMember(Value = "America/Swift_Current")] +AmericaSwiftCurrent = 191, - [EnumMember(Value = "Asia/Phnom_Penh")] - AsiaPhnomPenh = 268, +[EnumMember(Value = "America/Tegucigalpa")] +AmericaTegucigalpa = 192, - [EnumMember(Value = "Asia/Pontianak")] - AsiaPontianak = 269, +[EnumMember(Value = "America/Thule")] +AmericaThule = 193, - [EnumMember(Value = "Asia/Pyongyang")] - AsiaPyongyang = 270, +[EnumMember(Value = "America/Thunder_Bay")] +AmericaThunderBay = 194, - [EnumMember(Value = "Asia/Qatar")] - AsiaQatar = 271, +[EnumMember(Value = "America/Tijuana")] +AmericaTijuana = 195, - [EnumMember(Value = "Asia/Qostanay")] - AsiaQostanay = 272, +[EnumMember(Value = "America/Toronto")] +AmericaToronto = 196, - [EnumMember(Value = "Asia/Qyzylorda")] - AsiaQyzylorda = 273, +[EnumMember(Value = "America/Tortola")] +AmericaTortola = 197, - [EnumMember(Value = "Asia/Rangoon")] - AsiaRangoon = 274, +[EnumMember(Value = "America/Vancouver")] +AmericaVancouver = 198, - [EnumMember(Value = "Asia/Riyadh")] - AsiaRiyadh = 275, +[EnumMember(Value = "America/Whitehorse")] +AmericaWhitehorse = 199, - [EnumMember(Value = "Asia/Saigon")] - AsiaSaigon = 276, +[EnumMember(Value = "America/Winnipeg")] +AmericaWinnipeg = 200, - [EnumMember(Value = "Asia/Sakhalin")] - AsiaSakhalin = 277, +[EnumMember(Value = "America/Yakutat")] +AmericaYakutat = 201, - [EnumMember(Value = "Asia/Samarkand")] - AsiaSamarkand = 278, +[EnumMember(Value = "America/Yellowknife")] +AmericaYellowknife = 202, - [EnumMember(Value = "Asia/Seoul")] - AsiaSeoul = 279, +[EnumMember(Value = "Antarctica/Casey")] +AntarcticaCasey = 203, - [EnumMember(Value = "Asia/Shanghai")] - AsiaShanghai = 280, +[EnumMember(Value = "Antarctica/Davis")] +AntarcticaDavis = 204, - [EnumMember(Value = "Asia/Singapore")] - AsiaSingapore = 281, +[EnumMember(Value = "Antarctica/DumontDUrville")] +AntarcticaDumontDUrville = 205, - [EnumMember(Value = "Asia/Srednekolymsk")] - AsiaSrednekolymsk = 282, +[EnumMember(Value = "Antarctica/Macquarie")] +AntarcticaMacquarie = 206, - [EnumMember(Value = "Asia/Taipei")] - AsiaTaipei = 283, +[EnumMember(Value = "Antarctica/Mawson")] +AntarcticaMawson = 207, - [EnumMember(Value = "Asia/Tashkent")] - AsiaTashkent = 284, +[EnumMember(Value = "Antarctica/McMurdo")] +AntarcticaMcMurdo = 208, - [EnumMember(Value = "Asia/Tbilisi")] - AsiaTbilisi = 285, +[EnumMember(Value = "Antarctica/Palmer")] +AntarcticaPalmer = 209, - [EnumMember(Value = "Asia/Tehran")] - AsiaTehran = 286, +[EnumMember(Value = "Antarctica/Rothera")] +AntarcticaRothera = 210, - [EnumMember(Value = "Asia/Thimphu")] - AsiaThimphu = 287, +[EnumMember(Value = "Antarctica/Syowa")] +AntarcticaSyowa = 211, - [EnumMember(Value = "Asia/Tokyo")] - AsiaTokyo = 288, +[EnumMember(Value = "Antarctica/Troll")] +AntarcticaTroll = 212, - [EnumMember(Value = "Asia/Tomsk")] - AsiaTomsk = 289, +[EnumMember(Value = "Antarctica/Vostok")] +AntarcticaVostok = 213, - [EnumMember(Value = "Asia/Ulaanbaatar")] - AsiaUlaanbaatar = 290, +[EnumMember(Value = "Arctic/Longyearbyen")] +ArcticLongyearbyen = 214, - [EnumMember(Value = "Asia/Urumqi")] - AsiaUrumqi = 291, +[EnumMember(Value = "Asia/Aden")] +AsiaAden = 215, - [EnumMember(Value = "Asia/Ust-Nera")] - AsiaUstNera = 292, +[EnumMember(Value = "Asia/Almaty")] +AsiaAlmaty = 216, - [EnumMember(Value = "Asia/Vientiane")] - AsiaVientiane = 293, +[EnumMember(Value = "Asia/Amman")] +AsiaAmman = 217, - [EnumMember(Value = "Asia/Vladivostok")] - AsiaVladivostok = 294, +[EnumMember(Value = "Asia/Anadyr")] +AsiaAnadyr = 218, - [EnumMember(Value = "Asia/Yakutsk")] - AsiaYakutsk = 295, +[EnumMember(Value = "Asia/Aqtau")] +AsiaAqtau = 219, - [EnumMember(Value = "Asia/Yekaterinburg")] - AsiaYekaterinburg = 296, +[EnumMember(Value = "Asia/Aqtobe")] +AsiaAqtobe = 220, - [EnumMember(Value = "Asia/Yerevan")] - AsiaYerevan = 297, +[EnumMember(Value = "Asia/Ashgabat")] +AsiaAshgabat = 221, - [EnumMember(Value = "Atlantic/Azores")] - AtlanticAzores = 298, +[EnumMember(Value = "Asia/Atyrau")] +AsiaAtyrau = 222, - [EnumMember(Value = "Atlantic/Bermuda")] - AtlanticBermuda = 299, +[EnumMember(Value = "Asia/Baghdad")] +AsiaBaghdad = 223, - [EnumMember(Value = "Atlantic/Canary")] - AtlanticCanary = 300, +[EnumMember(Value = "Asia/Bahrain")] +AsiaBahrain = 224, - [EnumMember(Value = "Atlantic/Cape_Verde")] - AtlanticCapeVerde = 301, +[EnumMember(Value = "Asia/Baku")] +AsiaBaku = 225, - [EnumMember(Value = "Atlantic/Faeroe")] - AtlanticFaeroe = 302, +[EnumMember(Value = "Asia/Bangkok")] +AsiaBangkok = 226, - [EnumMember(Value = "Atlantic/Madeira")] - AtlanticMadeira = 303, +[EnumMember(Value = "Asia/Barnaul")] +AsiaBarnaul = 227, - [EnumMember(Value = "Atlantic/Reykjavik")] - AtlanticReykjavik = 304, +[EnumMember(Value = "Asia/Beirut")] +AsiaBeirut = 228, - [EnumMember(Value = "Atlantic/South_Georgia")] - AtlanticSouthGeorgia = 305, +[EnumMember(Value = "Asia/Bishkek")] +AsiaBishkek = 229, - [EnumMember(Value = "Atlantic/St_Helena")] - AtlanticStHelena = 306, +[EnumMember(Value = "Asia/Brunei")] +AsiaBrunei = 230, - [EnumMember(Value = "Atlantic/Stanley")] - AtlanticStanley = 307, +[EnumMember(Value = "Asia/Calcutta")] +AsiaCalcutta = 231, - [EnumMember(Value = "Australia/Adelaide")] - AustraliaAdelaide = 308, +[EnumMember(Value = "Asia/Chita")] +AsiaChita = 232, - [EnumMember(Value = "Australia/Brisbane")] - AustraliaBrisbane = 309, +[EnumMember(Value = "Asia/Choibalsan")] +AsiaChoibalsan = 233, - [EnumMember(Value = "Australia/Broken_Hill")] - AustraliaBrokenHill = 310, +[EnumMember(Value = "Asia/Colombo")] +AsiaColombo = 234, - [EnumMember(Value = "Australia/Currie")] - AustraliaCurrie = 311, +[EnumMember(Value = "Asia/Damascus")] +AsiaDamascus = 235, - [EnumMember(Value = "Australia/Darwin")] - AustraliaDarwin = 312, +[EnumMember(Value = "Asia/Dhaka")] +AsiaDhaka = 236, - [EnumMember(Value = "Australia/Eucla")] - AustraliaEucla = 313, +[EnumMember(Value = "Asia/Dili")] +AsiaDili = 237, - [EnumMember(Value = "Australia/Hobart")] - AustraliaHobart = 314, +[EnumMember(Value = "Asia/Dubai")] +AsiaDubai = 238, - [EnumMember(Value = "Australia/Lindeman")] - AustraliaLindeman = 315, +[EnumMember(Value = "Asia/Dushanbe")] +AsiaDushanbe = 239, - [EnumMember(Value = "Australia/Lord_Howe")] - AustraliaLordHowe = 316, +[EnumMember(Value = "Asia/Famagusta")] +AsiaFamagusta = 240, - [EnumMember(Value = "Australia/Melbourne")] - AustraliaMelbourne = 317, +[EnumMember(Value = "Asia/Gaza")] +AsiaGaza = 241, - [EnumMember(Value = "Australia/Perth")] - AustraliaPerth = 318, +[EnumMember(Value = "Asia/Hebron")] +AsiaHebron = 242, - [EnumMember(Value = "Australia/Sydney")] - AustraliaSydney = 319, +[EnumMember(Value = "Asia/Hong_Kong")] +AsiaHongKong = 243, - [EnumMember(Value = "Europe/Amsterdam")] - EuropeAmsterdam = 320, +[EnumMember(Value = "Asia/Hovd")] +AsiaHovd = 244, - [EnumMember(Value = "Europe/Andorra")] - EuropeAndorra = 321, +[EnumMember(Value = "Asia/Irkutsk")] +AsiaIrkutsk = 245, - [EnumMember(Value = "Europe/Astrakhan")] - EuropeAstrakhan = 322, +[EnumMember(Value = "Asia/Jakarta")] +AsiaJakarta = 246, - [EnumMember(Value = "Europe/Athens")] - EuropeAthens = 323, +[EnumMember(Value = "Asia/Jayapura")] +AsiaJayapura = 247, - [EnumMember(Value = "Europe/Belgrade")] - EuropeBelgrade = 324, +[EnumMember(Value = "Asia/Jerusalem")] +AsiaJerusalem = 248, - [EnumMember(Value = "Europe/Berlin")] - EuropeBerlin = 325, +[EnumMember(Value = "Asia/Kabul")] +AsiaKabul = 249, - [EnumMember(Value = "Europe/Bratislava")] - EuropeBratislava = 326, +[EnumMember(Value = "Asia/Kamchatka")] +AsiaKamchatka = 250, - [EnumMember(Value = "Europe/Brussels")] - EuropeBrussels = 327, +[EnumMember(Value = "Asia/Karachi")] +AsiaKarachi = 251, - [EnumMember(Value = "Europe/Bucharest")] - EuropeBucharest = 328, +[EnumMember(Value = "Asia/Katmandu")] +AsiaKatmandu = 252, - [EnumMember(Value = "Europe/Budapest")] - EuropeBudapest = 329, +[EnumMember(Value = "Asia/Khandyga")] +AsiaKhandyga = 253, - [EnumMember(Value = "Europe/Busingen")] - EuropeBusingen = 330, +[EnumMember(Value = "Asia/Krasnoyarsk")] +AsiaKrasnoyarsk = 254, - [EnumMember(Value = "Europe/Chisinau")] - EuropeChisinau = 331, +[EnumMember(Value = "Asia/Kuala_Lumpur")] +AsiaKualaLumpur = 255, - [EnumMember(Value = "Europe/Copenhagen")] - EuropeCopenhagen = 332, +[EnumMember(Value = "Asia/Kuching")] +AsiaKuching = 256, - [EnumMember(Value = "Europe/Dublin")] - EuropeDublin = 333, +[EnumMember(Value = "Asia/Kuwait")] +AsiaKuwait = 257, - [EnumMember(Value = "Europe/Gibraltar")] - EuropeGibraltar = 334, +[EnumMember(Value = "Asia/Macau")] +AsiaMacau = 258, - [EnumMember(Value = "Europe/Guernsey")] - EuropeGuernsey = 335, +[EnumMember(Value = "Asia/Magadan")] +AsiaMagadan = 259, - [EnumMember(Value = "Europe/Helsinki")] - EuropeHelsinki = 336, +[EnumMember(Value = "Asia/Makassar")] +AsiaMakassar = 260, - [EnumMember(Value = "Europe/Isle_of_Man")] - EuropeIsleOfMan = 337, +[EnumMember(Value = "Asia/Manila")] +AsiaManila = 261, - [EnumMember(Value = "Europe/Istanbul")] - EuropeIstanbul = 338, +[EnumMember(Value = "Asia/Muscat")] +AsiaMuscat = 262, - [EnumMember(Value = "Europe/Jersey")] - EuropeJersey = 339, +[EnumMember(Value = "Asia/Nicosia")] +AsiaNicosia = 263, - [EnumMember(Value = "Europe/Kaliningrad")] - EuropeKaliningrad = 340, +[EnumMember(Value = "Asia/Novokuznetsk")] +AsiaNovokuznetsk = 264, - [EnumMember(Value = "Europe/Kiev")] - EuropeKiev = 341, +[EnumMember(Value = "Asia/Novosibirsk")] +AsiaNovosibirsk = 265, - [EnumMember(Value = "Europe/Kirov")] - EuropeKirov = 342, +[EnumMember(Value = "Asia/Omsk")] +AsiaOmsk = 266, - [EnumMember(Value = "Europe/Lisbon")] - EuropeLisbon = 343, +[EnumMember(Value = "Asia/Oral")] +AsiaOral = 267, - [EnumMember(Value = "Europe/Ljubljana")] - EuropeLjubljana = 344, +[EnumMember(Value = "Asia/Phnom_Penh")] +AsiaPhnomPenh = 268, - [EnumMember(Value = "Europe/London")] - EuropeLondon = 345, +[EnumMember(Value = "Asia/Pontianak")] +AsiaPontianak = 269, - [EnumMember(Value = "Europe/Luxembourg")] - EuropeLuxembourg = 346, +[EnumMember(Value = "Asia/Pyongyang")] +AsiaPyongyang = 270, - [EnumMember(Value = "Europe/Madrid")] - EuropeMadrid = 347, +[EnumMember(Value = "Asia/Qatar")] +AsiaQatar = 271, - [EnumMember(Value = "Europe/Malta")] - EuropeMalta = 348, +[EnumMember(Value = "Asia/Qostanay")] +AsiaQostanay = 272, - [EnumMember(Value = "Europe/Mariehamn")] - EuropeMariehamn = 349, +[EnumMember(Value = "Asia/Qyzylorda")] +AsiaQyzylorda = 273, - [EnumMember(Value = "Europe/Minsk")] - EuropeMinsk = 350, +[EnumMember(Value = "Asia/Rangoon")] +AsiaRangoon = 274, - [EnumMember(Value = "Europe/Monaco")] - EuropeMonaco = 351, +[EnumMember(Value = "Asia/Riyadh")] +AsiaRiyadh = 275, - [EnumMember(Value = "Europe/Moscow")] - EuropeMoscow = 352, +[EnumMember(Value = "Asia/Saigon")] +AsiaSaigon = 276, - [EnumMember(Value = "Europe/Oslo")] - EuropeOslo = 353, +[EnumMember(Value = "Asia/Sakhalin")] +AsiaSakhalin = 277, - [EnumMember(Value = "Europe/Paris")] - EuropeParis = 354, +[EnumMember(Value = "Asia/Samarkand")] +AsiaSamarkand = 278, - [EnumMember(Value = "Europe/Podgorica")] - EuropePodgorica = 355, +[EnumMember(Value = "Asia/Seoul")] +AsiaSeoul = 279, - [EnumMember(Value = "Europe/Prague")] - EuropePrague = 356, +[EnumMember(Value = "Asia/Shanghai")] +AsiaShanghai = 280, - [EnumMember(Value = "Europe/Riga")] - EuropeRiga = 357, +[EnumMember(Value = "Asia/Singapore")] +AsiaSingapore = 281, - [EnumMember(Value = "Europe/Rome")] - EuropeRome = 358, +[EnumMember(Value = "Asia/Srednekolymsk")] +AsiaSrednekolymsk = 282, - [EnumMember(Value = "Europe/Samara")] - EuropeSamara = 359, +[EnumMember(Value = "Asia/Taipei")] +AsiaTaipei = 283, - [EnumMember(Value = "Europe/San_Marino")] - EuropeSanMarino = 360, +[EnumMember(Value = "Asia/Tashkent")] +AsiaTashkent = 284, - [EnumMember(Value = "Europe/Sarajevo")] - EuropeSarajevo = 361, +[EnumMember(Value = "Asia/Tbilisi")] +AsiaTbilisi = 285, - [EnumMember(Value = "Europe/Saratov")] - EuropeSaratov = 362, +[EnumMember(Value = "Asia/Tehran")] +AsiaTehran = 286, - [EnumMember(Value = "Europe/Simferopol")] - EuropeSimferopol = 363, +[EnumMember(Value = "Asia/Thimphu")] +AsiaThimphu = 287, - [EnumMember(Value = "Europe/Skopje")] - EuropeSkopje = 364, +[EnumMember(Value = "Asia/Tokyo")] +AsiaTokyo = 288, - [EnumMember(Value = "Europe/Sofia")] - EuropeSofia = 365, +[EnumMember(Value = "Asia/Tomsk")] +AsiaTomsk = 289, - [EnumMember(Value = "Europe/Stockholm")] - EuropeStockholm = 366, +[EnumMember(Value = "Asia/Ulaanbaatar")] +AsiaUlaanbaatar = 290, - [EnumMember(Value = "Europe/Tallinn")] - EuropeTallinn = 367, +[EnumMember(Value = "Asia/Urumqi")] +AsiaUrumqi = 291, - [EnumMember(Value = "Europe/Tirane")] - EuropeTirane = 368, +[EnumMember(Value = "Asia/Ust-Nera")] +AsiaUstNera = 292, - [EnumMember(Value = "Europe/Ulyanovsk")] - EuropeUlyanovsk = 369, +[EnumMember(Value = "Asia/Vientiane")] +AsiaVientiane = 293, - [EnumMember(Value = "Europe/Uzhgorod")] - EuropeUzhgorod = 370, +[EnumMember(Value = "Asia/Vladivostok")] +AsiaVladivostok = 294, - [EnumMember(Value = "Europe/Vaduz")] - EuropeVaduz = 371, +[EnumMember(Value = "Asia/Yakutsk")] +AsiaYakutsk = 295, - [EnumMember(Value = "Europe/Vatican")] - EuropeVatican = 372, +[EnumMember(Value = "Asia/Yekaterinburg")] +AsiaYekaterinburg = 296, - [EnumMember(Value = "Europe/Vienna")] - EuropeVienna = 373, +[EnumMember(Value = "Asia/Yerevan")] +AsiaYerevan = 297, - [EnumMember(Value = "Europe/Vilnius")] - EuropeVilnius = 374, +[EnumMember(Value = "Atlantic/Azores")] +AtlanticAzores = 298, - [EnumMember(Value = "Europe/Volgograd")] - EuropeVolgograd = 375, +[EnumMember(Value = "Atlantic/Bermuda")] +AtlanticBermuda = 299, - [EnumMember(Value = "Europe/Warsaw")] - EuropeWarsaw = 376, +[EnumMember(Value = "Atlantic/Canary")] +AtlanticCanary = 300, - [EnumMember(Value = "Europe/Zagreb")] - EuropeZagreb = 377, +[EnumMember(Value = "Atlantic/Cape_Verde")] +AtlanticCapeVerde = 301, - [EnumMember(Value = "Europe/Zaporozhye")] - EuropeZaporozhye = 378, +[EnumMember(Value = "Atlantic/Faeroe")] +AtlanticFaeroe = 302, - [EnumMember(Value = "Europe/Zurich")] - EuropeZurich = 379, +[EnumMember(Value = "Atlantic/Madeira")] +AtlanticMadeira = 303, - [EnumMember(Value = "Indian/Antananarivo")] - IndianAntananarivo = 380, +[EnumMember(Value = "Atlantic/Reykjavik")] +AtlanticReykjavik = 304, - [EnumMember(Value = "Indian/Chagos")] - IndianChagos = 381, +[EnumMember(Value = "Atlantic/South_Georgia")] +AtlanticSouthGeorgia = 305, - [EnumMember(Value = "Indian/Christmas")] - IndianChristmas = 382, +[EnumMember(Value = "Atlantic/St_Helena")] +AtlanticStHelena = 306, - [EnumMember(Value = "Indian/Cocos")] - IndianCocos = 383, +[EnumMember(Value = "Atlantic/Stanley")] +AtlanticStanley = 307, - [EnumMember(Value = "Indian/Comoro")] - IndianComoro = 384, +[EnumMember(Value = "Australia/Adelaide")] +AustraliaAdelaide = 308, - [EnumMember(Value = "Indian/Kerguelen")] - IndianKerguelen = 385, +[EnumMember(Value = "Australia/Brisbane")] +AustraliaBrisbane = 309, - [EnumMember(Value = "Indian/Mahe")] - IndianMahe = 386, +[EnumMember(Value = "Australia/Broken_Hill")] +AustraliaBrokenHill = 310, - [EnumMember(Value = "Indian/Maldives")] - IndianMaldives = 387, +[EnumMember(Value = "Australia/Currie")] +AustraliaCurrie = 311, - [EnumMember(Value = "Indian/Mauritius")] - IndianMauritius = 388, +[EnumMember(Value = "Australia/Darwin")] +AustraliaDarwin = 312, - [EnumMember(Value = "Indian/Mayotte")] - IndianMayotte = 389, +[EnumMember(Value = "Australia/Eucla")] +AustraliaEucla = 313, - [EnumMember(Value = "Indian/Reunion")] - IndianReunion = 390, +[EnumMember(Value = "Australia/Hobart")] +AustraliaHobart = 314, - [EnumMember(Value = "Pacific/Apia")] - PacificApia = 391, +[EnumMember(Value = "Australia/Lindeman")] +AustraliaLindeman = 315, - [EnumMember(Value = "Pacific/Auckland")] - PacificAuckland = 392, +[EnumMember(Value = "Australia/Lord_Howe")] +AustraliaLordHowe = 316, - [EnumMember(Value = "Pacific/Bougainville")] - PacificBougainville = 393, +[EnumMember(Value = "Australia/Melbourne")] +AustraliaMelbourne = 317, - [EnumMember(Value = "Pacific/Chatham")] - PacificChatham = 394, +[EnumMember(Value = "Australia/Perth")] +AustraliaPerth = 318, - [EnumMember(Value = "Pacific/Easter")] - PacificEaster = 395, +[EnumMember(Value = "Australia/Sydney")] +AustraliaSydney = 319, - [EnumMember(Value = "Pacific/Efate")] - PacificEfate = 396, +[EnumMember(Value = "Europe/Amsterdam")] +EuropeAmsterdam = 320, - [EnumMember(Value = "Pacific/Enderbury")] - PacificEnderbury = 397, +[EnumMember(Value = "Europe/Andorra")] +EuropeAndorra = 321, - [EnumMember(Value = "Pacific/Fakaofo")] - PacificFakaofo = 398, +[EnumMember(Value = "Europe/Astrakhan")] +EuropeAstrakhan = 322, - [EnumMember(Value = "Pacific/Fiji")] - PacificFiji = 399, +[EnumMember(Value = "Europe/Athens")] +EuropeAthens = 323, - [EnumMember(Value = "Pacific/Funafuti")] - PacificFunafuti = 400, +[EnumMember(Value = "Europe/Belgrade")] +EuropeBelgrade = 324, - [EnumMember(Value = "Pacific/Galapagos")] - PacificGalapagos = 401, +[EnumMember(Value = "Europe/Berlin")] +EuropeBerlin = 325, - [EnumMember(Value = "Pacific/Gambier")] - PacificGambier = 402, +[EnumMember(Value = "Europe/Bratislava")] +EuropeBratislava = 326, - [EnumMember(Value = "Pacific/Guadalcanal")] - PacificGuadalcanal = 403, +[EnumMember(Value = "Europe/Brussels")] +EuropeBrussels = 327, - [EnumMember(Value = "Pacific/Guam")] - PacificGuam = 404, +[EnumMember(Value = "Europe/Bucharest")] +EuropeBucharest = 328, - [EnumMember(Value = "Pacific/Honolulu")] - PacificHonolulu = 405, +[EnumMember(Value = "Europe/Budapest")] +EuropeBudapest = 329, - [EnumMember(Value = "Pacific/Johnston")] - PacificJohnston = 406, +[EnumMember(Value = "Europe/Busingen")] +EuropeBusingen = 330, - [EnumMember(Value = "Pacific/Kiritimati")] - PacificKiritimati = 407, +[EnumMember(Value = "Europe/Chisinau")] +EuropeChisinau = 331, - [EnumMember(Value = "Pacific/Kosrae")] - PacificKosrae = 408, +[EnumMember(Value = "Europe/Copenhagen")] +EuropeCopenhagen = 332, - [EnumMember(Value = "Pacific/Kwajalein")] - PacificKwajalein = 409, +[EnumMember(Value = "Europe/Dublin")] +EuropeDublin = 333, - [EnumMember(Value = "Pacific/Majuro")] - PacificMajuro = 410, +[EnumMember(Value = "Europe/Gibraltar")] +EuropeGibraltar = 334, - [EnumMember(Value = "Pacific/Marquesas")] - PacificMarquesas = 411, +[EnumMember(Value = "Europe/Guernsey")] +EuropeGuernsey = 335, - [EnumMember(Value = "Pacific/Midway")] - PacificMidway = 412, +[EnumMember(Value = "Europe/Helsinki")] +EuropeHelsinki = 336, - [EnumMember(Value = "Pacific/Nauru")] - PacificNauru = 413, +[EnumMember(Value = "Europe/Isle_of_Man")] +EuropeIsleOfMan = 337, - [EnumMember(Value = "Pacific/Niue")] - PacificNiue = 414, +[EnumMember(Value = "Europe/Istanbul")] +EuropeIstanbul = 338, - [EnumMember(Value = "Pacific/Norfolk")] - PacificNorfolk = 415, +[EnumMember(Value = "Europe/Jersey")] +EuropeJersey = 339, - [EnumMember(Value = "Pacific/Noumea")] - PacificNoumea = 416, +[EnumMember(Value = "Europe/Kaliningrad")] +EuropeKaliningrad = 340, - [EnumMember(Value = "Pacific/Pago_Pago")] - PacificPagoPago = 417, +[EnumMember(Value = "Europe/Kiev")] +EuropeKiev = 341, - [EnumMember(Value = "Pacific/Palau")] - PacificPalau = 418, +[EnumMember(Value = "Europe/Kirov")] +EuropeKirov = 342, - [EnumMember(Value = "Pacific/Pitcairn")] - PacificPitcairn = 419, +[EnumMember(Value = "Europe/Lisbon")] +EuropeLisbon = 343, - [EnumMember(Value = "Pacific/Ponape")] - PacificPonape = 420, +[EnumMember(Value = "Europe/Ljubljana")] +EuropeLjubljana = 344, - [EnumMember(Value = "Pacific/Port_Moresby")] - PacificPortMoresby = 421, +[EnumMember(Value = "Europe/London")] +EuropeLondon = 345, - [EnumMember(Value = "Pacific/Rarotonga")] - PacificRarotonga = 422, +[EnumMember(Value = "Europe/Luxembourg")] +EuropeLuxembourg = 346, - [EnumMember(Value = "Pacific/Saipan")] - PacificSaipan = 423, +[EnumMember(Value = "Europe/Madrid")] +EuropeMadrid = 347, - [EnumMember(Value = "Pacific/Tahiti")] - PacificTahiti = 424, +[EnumMember(Value = "Europe/Malta")] +EuropeMalta = 348, - [EnumMember(Value = "Pacific/Tarawa")] - PacificTarawa = 425, +[EnumMember(Value = "Europe/Mariehamn")] +EuropeMariehamn = 349, - [EnumMember(Value = "Pacific/Tongatapu")] - PacificTongatapu = 426, +[EnumMember(Value = "Europe/Minsk")] +EuropeMinsk = 350, - [EnumMember(Value = "Pacific/Truk")] - PacificTruk = 427, +[EnumMember(Value = "Europe/Monaco")] +EuropeMonaco = 351, - [EnumMember(Value = "Pacific/Wake")] - PacificWake = 428, +[EnumMember(Value = "Europe/Moscow")] +EuropeMoscow = 352, - [EnumMember(Value = "Pacific/Wallis")] - PacificWallis = 429, - } +[EnumMember(Value = "Europe/Oslo")] +EuropeOslo = 353, - /// - /// IANA timezone for the Omnitec device - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public ReportProviderMetadataRequestDevicesOmnitecMetadata.TimeZoneEnum? TimeZone { get; set; } +[EnumMember(Value = "Europe/Paris")] +EuropeParis = 354, - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); +[EnumMember(Value = "Europe/Podgorica")] +EuropePodgorica = 355, - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } +[EnumMember(Value = "Europe/Prague")] +EuropePrague = 356, - return stringWriter.ToString(); - } - } +[EnumMember(Value = "Europe/Riga")] +EuropeRiga = 357, - [DataContract(Name = "reportProviderMetadataRequestDevicesSchlageMetadata_model")] - public class ReportProviderMetadataRequestDevicesSchlageMetadata - { - [JsonConstructorAttribute] - protected ReportProviderMetadataRequestDevicesSchlageMetadata() { } +[EnumMember(Value = "Europe/Rome")] +EuropeRome = 358, - public ReportProviderMetadataRequestDevicesSchlageMetadata( - ReportProviderMetadataRequestDevicesSchlageMetadata.TimeZoneEnum? timeZone = default - ) - { - TimeZone = timeZone; - } +[EnumMember(Value = "Europe/Samara")] +EuropeSamara = 359, - /// - /// IANA timezone for the Schlage device - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TimeZoneEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "Europe/San_Marino")] +EuropeSanMarino = 360, - [EnumMember(Value = "Africa/Abidjan")] - AfricaAbidjan = 1, +[EnumMember(Value = "Europe/Sarajevo")] +EuropeSarajevo = 361, - [EnumMember(Value = "Africa/Accra")] - AfricaAccra = 2, +[EnumMember(Value = "Europe/Saratov")] +EuropeSaratov = 362, - [EnumMember(Value = "Africa/Addis_Ababa")] - AfricaAddisAbaba = 3, +[EnumMember(Value = "Europe/Simferopol")] +EuropeSimferopol = 363, - [EnumMember(Value = "Africa/Algiers")] - AfricaAlgiers = 4, +[EnumMember(Value = "Europe/Skopje")] +EuropeSkopje = 364, - [EnumMember(Value = "Africa/Asmera")] - AfricaAsmera = 5, +[EnumMember(Value = "Europe/Sofia")] +EuropeSofia = 365, - [EnumMember(Value = "Africa/Bamako")] - AfricaBamako = 6, +[EnumMember(Value = "Europe/Stockholm")] +EuropeStockholm = 366, - [EnumMember(Value = "Africa/Bangui")] - AfricaBangui = 7, +[EnumMember(Value = "Europe/Tallinn")] +EuropeTallinn = 367, - [EnumMember(Value = "Africa/Banjul")] - AfricaBanjul = 8, +[EnumMember(Value = "Europe/Tirane")] +EuropeTirane = 368, - [EnumMember(Value = "Africa/Bissau")] - AfricaBissau = 9, +[EnumMember(Value = "Europe/Ulyanovsk")] +EuropeUlyanovsk = 369, - [EnumMember(Value = "Africa/Blantyre")] - AfricaBlantyre = 10, +[EnumMember(Value = "Europe/Uzhgorod")] +EuropeUzhgorod = 370, - [EnumMember(Value = "Africa/Brazzaville")] - AfricaBrazzaville = 11, +[EnumMember(Value = "Europe/Vaduz")] +EuropeVaduz = 371, - [EnumMember(Value = "Africa/Bujumbura")] - AfricaBujumbura = 12, +[EnumMember(Value = "Europe/Vatican")] +EuropeVatican = 372, - [EnumMember(Value = "Africa/Cairo")] - AfricaCairo = 13, +[EnumMember(Value = "Europe/Vienna")] +EuropeVienna = 373, - [EnumMember(Value = "Africa/Casablanca")] - AfricaCasablanca = 14, +[EnumMember(Value = "Europe/Vilnius")] +EuropeVilnius = 374, - [EnumMember(Value = "Africa/Ceuta")] - AfricaCeuta = 15, +[EnumMember(Value = "Europe/Volgograd")] +EuropeVolgograd = 375, - [EnumMember(Value = "Africa/Conakry")] - AfricaConakry = 16, +[EnumMember(Value = "Europe/Warsaw")] +EuropeWarsaw = 376, - [EnumMember(Value = "Africa/Dakar")] - AfricaDakar = 17, +[EnumMember(Value = "Europe/Zagreb")] +EuropeZagreb = 377, - [EnumMember(Value = "Africa/Dar_es_Salaam")] - AfricaDarEsSalaam = 18, +[EnumMember(Value = "Europe/Zaporozhye")] +EuropeZaporozhye = 378, - [EnumMember(Value = "Africa/Djibouti")] - AfricaDjibouti = 19, +[EnumMember(Value = "Europe/Zurich")] +EuropeZurich = 379, - [EnumMember(Value = "Africa/Douala")] - AfricaDouala = 20, +[EnumMember(Value = "Indian/Antananarivo")] +IndianAntananarivo = 380, - [EnumMember(Value = "Africa/El_Aaiun")] - AfricaElAaiun = 21, +[EnumMember(Value = "Indian/Chagos")] +IndianChagos = 381, - [EnumMember(Value = "Africa/Freetown")] - AfricaFreetown = 22, +[EnumMember(Value = "Indian/Christmas")] +IndianChristmas = 382, - [EnumMember(Value = "Africa/Gaborone")] - AfricaGaborone = 23, +[EnumMember(Value = "Indian/Cocos")] +IndianCocos = 383, - [EnumMember(Value = "Africa/Harare")] - AfricaHarare = 24, +[EnumMember(Value = "Indian/Comoro")] +IndianComoro = 384, - [EnumMember(Value = "Africa/Johannesburg")] - AfricaJohannesburg = 25, +[EnumMember(Value = "Indian/Kerguelen")] +IndianKerguelen = 385, - [EnumMember(Value = "Africa/Juba")] - AfricaJuba = 26, +[EnumMember(Value = "Indian/Mahe")] +IndianMahe = 386, - [EnumMember(Value = "Africa/Kampala")] - AfricaKampala = 27, +[EnumMember(Value = "Indian/Maldives")] +IndianMaldives = 387, - [EnumMember(Value = "Africa/Khartoum")] - AfricaKhartoum = 28, +[EnumMember(Value = "Indian/Mauritius")] +IndianMauritius = 388, - [EnumMember(Value = "Africa/Kigali")] - AfricaKigali = 29, +[EnumMember(Value = "Indian/Mayotte")] +IndianMayotte = 389, - [EnumMember(Value = "Africa/Kinshasa")] - AfricaKinshasa = 30, +[EnumMember(Value = "Indian/Reunion")] +IndianReunion = 390, - [EnumMember(Value = "Africa/Lagos")] - AfricaLagos = 31, +[EnumMember(Value = "Pacific/Apia")] +PacificApia = 391, - [EnumMember(Value = "Africa/Libreville")] - AfricaLibreville = 32, +[EnumMember(Value = "Pacific/Auckland")] +PacificAuckland = 392, - [EnumMember(Value = "Africa/Lome")] - AfricaLome = 33, +[EnumMember(Value = "Pacific/Bougainville")] +PacificBougainville = 393, - [EnumMember(Value = "Africa/Luanda")] - AfricaLuanda = 34, +[EnumMember(Value = "Pacific/Chatham")] +PacificChatham = 394, - [EnumMember(Value = "Africa/Lubumbashi")] - AfricaLubumbashi = 35, +[EnumMember(Value = "Pacific/Easter")] +PacificEaster = 395, - [EnumMember(Value = "Africa/Lusaka")] - AfricaLusaka = 36, +[EnumMember(Value = "Pacific/Efate")] +PacificEfate = 396, - [EnumMember(Value = "Africa/Malabo")] - AfricaMalabo = 37, +[EnumMember(Value = "Pacific/Enderbury")] +PacificEnderbury = 397, - [EnumMember(Value = "Africa/Maputo")] - AfricaMaputo = 38, +[EnumMember(Value = "Pacific/Fakaofo")] +PacificFakaofo = 398, - [EnumMember(Value = "Africa/Maseru")] - AfricaMaseru = 39, +[EnumMember(Value = "Pacific/Fiji")] +PacificFiji = 399, - [EnumMember(Value = "Africa/Mbabane")] - AfricaMbabane = 40, +[EnumMember(Value = "Pacific/Funafuti")] +PacificFunafuti = 400, - [EnumMember(Value = "Africa/Mogadishu")] - AfricaMogadishu = 41, +[EnumMember(Value = "Pacific/Galapagos")] +PacificGalapagos = 401, - [EnumMember(Value = "Africa/Monrovia")] - AfricaMonrovia = 42, +[EnumMember(Value = "Pacific/Gambier")] +PacificGambier = 402, - [EnumMember(Value = "Africa/Nairobi")] - AfricaNairobi = 43, +[EnumMember(Value = "Pacific/Guadalcanal")] +PacificGuadalcanal = 403, - [EnumMember(Value = "Africa/Ndjamena")] - AfricaNdjamena = 44, +[EnumMember(Value = "Pacific/Guam")] +PacificGuam = 404, - [EnumMember(Value = "Africa/Niamey")] - AfricaNiamey = 45, +[EnumMember(Value = "Pacific/Honolulu")] +PacificHonolulu = 405, - [EnumMember(Value = "Africa/Nouakchott")] - AfricaNouakchott = 46, +[EnumMember(Value = "Pacific/Johnston")] +PacificJohnston = 406, - [EnumMember(Value = "Africa/Ouagadougou")] - AfricaOuagadougou = 47, +[EnumMember(Value = "Pacific/Kiritimati")] +PacificKiritimati = 407, - [EnumMember(Value = "Africa/Porto-Novo")] - AfricaPortoNovo = 48, +[EnumMember(Value = "Pacific/Kosrae")] +PacificKosrae = 408, - [EnumMember(Value = "Africa/Sao_Tome")] - AfricaSaoTome = 49, +[EnumMember(Value = "Pacific/Kwajalein")] +PacificKwajalein = 409, - [EnumMember(Value = "Africa/Tripoli")] - AfricaTripoli = 50, +[EnumMember(Value = "Pacific/Majuro")] +PacificMajuro = 410, - [EnumMember(Value = "Africa/Tunis")] - AfricaTunis = 51, +[EnumMember(Value = "Pacific/Marquesas")] +PacificMarquesas = 411, - [EnumMember(Value = "Africa/Windhoek")] - AfricaWindhoek = 52, +[EnumMember(Value = "Pacific/Midway")] +PacificMidway = 412, - [EnumMember(Value = "America/Adak")] - AmericaAdak = 53, +[EnumMember(Value = "Pacific/Nauru")] +PacificNauru = 413, - [EnumMember(Value = "America/Anchorage")] - AmericaAnchorage = 54, +[EnumMember(Value = "Pacific/Niue")] +PacificNiue = 414, - [EnumMember(Value = "America/Anguilla")] - AmericaAnguilla = 55, +[EnumMember(Value = "Pacific/Norfolk")] +PacificNorfolk = 415, - [EnumMember(Value = "America/Antigua")] - AmericaAntigua = 56, +[EnumMember(Value = "Pacific/Noumea")] +PacificNoumea = 416, - [EnumMember(Value = "America/Araguaina")] - AmericaAraguaina = 57, +[EnumMember(Value = "Pacific/Pago_Pago")] +PacificPagoPago = 417, - [EnumMember(Value = "America/Argentina/La_Rioja")] - AmericaArgentinaLaRioja = 58, +[EnumMember(Value = "Pacific/Palau")] +PacificPalau = 418, - [EnumMember(Value = "America/Argentina/Rio_Gallegos")] - AmericaArgentinaRioGallegos = 59, +[EnumMember(Value = "Pacific/Pitcairn")] +PacificPitcairn = 419, - [EnumMember(Value = "America/Argentina/Salta")] - AmericaArgentinaSalta = 60, +[EnumMember(Value = "Pacific/Ponape")] +PacificPonape = 420, - [EnumMember(Value = "America/Argentina/San_Juan")] - AmericaArgentinaSanJuan = 61, +[EnumMember(Value = "Pacific/Port_Moresby")] +PacificPortMoresby = 421, - [EnumMember(Value = "America/Argentina/San_Luis")] - AmericaArgentinaSanLuis = 62, +[EnumMember(Value = "Pacific/Rarotonga")] +PacificRarotonga = 422, - [EnumMember(Value = "America/Argentina/Tucuman")] - AmericaArgentinaTucuman = 63, +[EnumMember(Value = "Pacific/Saipan")] +PacificSaipan = 423, - [EnumMember(Value = "America/Argentina/Ushuaia")] - AmericaArgentinaUshuaia = 64, +[EnumMember(Value = "Pacific/Tahiti")] +PacificTahiti = 424, - [EnumMember(Value = "America/Aruba")] - AmericaAruba = 65, +[EnumMember(Value = "Pacific/Tarawa")] +PacificTarawa = 425, - [EnumMember(Value = "America/Asuncion")] - AmericaAsuncion = 66, +[EnumMember(Value = "Pacific/Tongatapu")] +PacificTongatapu = 426, - [EnumMember(Value = "America/Bahia")] - AmericaBahia = 67, +[EnumMember(Value = "Pacific/Truk")] +PacificTruk = 427, - [EnumMember(Value = "America/Bahia_Banderas")] - AmericaBahiaBanderas = 68, +[EnumMember(Value = "Pacific/Wake")] +PacificWake = 428, - [EnumMember(Value = "America/Barbados")] - AmericaBarbados = 69, +[EnumMember(Value = "Pacific/Wallis")] +PacificWallis = 429, +} - [EnumMember(Value = "America/Belem")] - AmericaBelem = 70, +/// +/// IANA timezone for the Omnitec device +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public ReportProviderMetadataRequestDevicesOmnitecMetadata.TimeZoneEnum? TimeZone { get; set; } - [EnumMember(Value = "America/Belize")] - AmericaBelize = 71, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "America/Blanc-Sablon")] - AmericaBlancSablon = 72, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "America/Boa_Vista")] - AmericaBoaVista = 73, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "America/Bogota")] - AmericaBogota = 74, +[DataContract(Name = "reportProviderMetadataRequestDevicesSchlageMetadata_model")] +public class ReportProviderMetadataRequestDevicesSchlageMetadata +{ +[JsonConstructorAttribute] +protected ReportProviderMetadataRequestDevicesSchlageMetadata() { } - [EnumMember(Value = "America/Boise")] - AmericaBoise = 75, +public ReportProviderMetadataRequestDevicesSchlageMetadata(ReportProviderMetadataRequestDevicesSchlageMetadata.TimeZoneEnum? timeZone = default) +{ +TimeZone = timeZone; +} - [EnumMember(Value = "America/Buenos_Aires")] - AmericaBuenosAires = 76, +/// +/// IANA timezone for the Schlage device +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TimeZoneEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "America/Cambridge_Bay")] - AmericaCambridgeBay = 77, +[EnumMember(Value = "Africa/Abidjan")] +AfricaAbidjan = 1, - [EnumMember(Value = "America/Campo_Grande")] - AmericaCampoGrande = 78, +[EnumMember(Value = "Africa/Accra")] +AfricaAccra = 2, - [EnumMember(Value = "America/Cancun")] - AmericaCancun = 79, +[EnumMember(Value = "Africa/Addis_Ababa")] +AfricaAddisAbaba = 3, - [EnumMember(Value = "America/Caracas")] - AmericaCaracas = 80, +[EnumMember(Value = "Africa/Algiers")] +AfricaAlgiers = 4, - [EnumMember(Value = "America/Catamarca")] - AmericaCatamarca = 81, +[EnumMember(Value = "Africa/Asmera")] +AfricaAsmera = 5, - [EnumMember(Value = "America/Cayenne")] - AmericaCayenne = 82, +[EnumMember(Value = "Africa/Bamako")] +AfricaBamako = 6, - [EnumMember(Value = "America/Cayman")] - AmericaCayman = 83, +[EnumMember(Value = "Africa/Bangui")] +AfricaBangui = 7, - [EnumMember(Value = "America/Chicago")] - AmericaChicago = 84, +[EnumMember(Value = "Africa/Banjul")] +AfricaBanjul = 8, - [EnumMember(Value = "America/Chihuahua")] - AmericaChihuahua = 85, +[EnumMember(Value = "Africa/Bissau")] +AfricaBissau = 9, - [EnumMember(Value = "America/Ciudad_Juarez")] - AmericaCiudadJuarez = 86, +[EnumMember(Value = "Africa/Blantyre")] +AfricaBlantyre = 10, - [EnumMember(Value = "America/Coral_Harbour")] - AmericaCoralHarbour = 87, +[EnumMember(Value = "Africa/Brazzaville")] +AfricaBrazzaville = 11, - [EnumMember(Value = "America/Cordoba")] - AmericaCordoba = 88, +[EnumMember(Value = "Africa/Bujumbura")] +AfricaBujumbura = 12, - [EnumMember(Value = "America/Costa_Rica")] - AmericaCostaRica = 89, +[EnumMember(Value = "Africa/Cairo")] +AfricaCairo = 13, - [EnumMember(Value = "America/Creston")] - AmericaCreston = 90, +[EnumMember(Value = "Africa/Casablanca")] +AfricaCasablanca = 14, - [EnumMember(Value = "America/Cuiaba")] - AmericaCuiaba = 91, +[EnumMember(Value = "Africa/Ceuta")] +AfricaCeuta = 15, - [EnumMember(Value = "America/Curacao")] - AmericaCuracao = 92, +[EnumMember(Value = "Africa/Conakry")] +AfricaConakry = 16, - [EnumMember(Value = "America/Danmarkshavn")] - AmericaDanmarkshavn = 93, +[EnumMember(Value = "Africa/Dakar")] +AfricaDakar = 17, - [EnumMember(Value = "America/Dawson")] - AmericaDawson = 94, +[EnumMember(Value = "Africa/Dar_es_Salaam")] +AfricaDarEsSalaam = 18, - [EnumMember(Value = "America/Dawson_Creek")] - AmericaDawsonCreek = 95, +[EnumMember(Value = "Africa/Djibouti")] +AfricaDjibouti = 19, - [EnumMember(Value = "America/Denver")] - AmericaDenver = 96, +[EnumMember(Value = "Africa/Douala")] +AfricaDouala = 20, - [EnumMember(Value = "America/Detroit")] - AmericaDetroit = 97, +[EnumMember(Value = "Africa/El_Aaiun")] +AfricaElAaiun = 21, - [EnumMember(Value = "America/Dominica")] - AmericaDominica = 98, +[EnumMember(Value = "Africa/Freetown")] +AfricaFreetown = 22, - [EnumMember(Value = "America/Edmonton")] - AmericaEdmonton = 99, +[EnumMember(Value = "Africa/Gaborone")] +AfricaGaborone = 23, - [EnumMember(Value = "America/Eirunepe")] - AmericaEirunepe = 100, +[EnumMember(Value = "Africa/Harare")] +AfricaHarare = 24, - [EnumMember(Value = "America/El_Salvador")] - AmericaElSalvador = 101, +[EnumMember(Value = "Africa/Johannesburg")] +AfricaJohannesburg = 25, - [EnumMember(Value = "America/Fort_Nelson")] - AmericaFortNelson = 102, +[EnumMember(Value = "Africa/Juba")] +AfricaJuba = 26, - [EnumMember(Value = "America/Fortaleza")] - AmericaFortaleza = 103, +[EnumMember(Value = "Africa/Kampala")] +AfricaKampala = 27, - [EnumMember(Value = "America/Glace_Bay")] - AmericaGlaceBay = 104, +[EnumMember(Value = "Africa/Khartoum")] +AfricaKhartoum = 28, - [EnumMember(Value = "America/Godthab")] - AmericaGodthab = 105, +[EnumMember(Value = "Africa/Kigali")] +AfricaKigali = 29, - [EnumMember(Value = "America/Goose_Bay")] - AmericaGooseBay = 106, +[EnumMember(Value = "Africa/Kinshasa")] +AfricaKinshasa = 30, - [EnumMember(Value = "America/Grand_Turk")] - AmericaGrandTurk = 107, +[EnumMember(Value = "Africa/Lagos")] +AfricaLagos = 31, - [EnumMember(Value = "America/Grenada")] - AmericaGrenada = 108, +[EnumMember(Value = "Africa/Libreville")] +AfricaLibreville = 32, - [EnumMember(Value = "America/Guadeloupe")] - AmericaGuadeloupe = 109, +[EnumMember(Value = "Africa/Lome")] +AfricaLome = 33, - [EnumMember(Value = "America/Guatemala")] - AmericaGuatemala = 110, +[EnumMember(Value = "Africa/Luanda")] +AfricaLuanda = 34, - [EnumMember(Value = "America/Guayaquil")] - AmericaGuayaquil = 111, +[EnumMember(Value = "Africa/Lubumbashi")] +AfricaLubumbashi = 35, - [EnumMember(Value = "America/Guyana")] - AmericaGuyana = 112, +[EnumMember(Value = "Africa/Lusaka")] +AfricaLusaka = 36, - [EnumMember(Value = "America/Halifax")] - AmericaHalifax = 113, +[EnumMember(Value = "Africa/Malabo")] +AfricaMalabo = 37, - [EnumMember(Value = "America/Havana")] - AmericaHavana = 114, +[EnumMember(Value = "Africa/Maputo")] +AfricaMaputo = 38, - [EnumMember(Value = "America/Hermosillo")] - AmericaHermosillo = 115, +[EnumMember(Value = "Africa/Maseru")] +AfricaMaseru = 39, - [EnumMember(Value = "America/Indiana/Knox")] - AmericaIndianaKnox = 116, +[EnumMember(Value = "Africa/Mbabane")] +AfricaMbabane = 40, - [EnumMember(Value = "America/Indiana/Marengo")] - AmericaIndianaMarengo = 117, +[EnumMember(Value = "Africa/Mogadishu")] +AfricaMogadishu = 41, - [EnumMember(Value = "America/Indiana/Petersburg")] - AmericaIndianaPetersburg = 118, +[EnumMember(Value = "Africa/Monrovia")] +AfricaMonrovia = 42, - [EnumMember(Value = "America/Indiana/Tell_City")] - AmericaIndianaTellCity = 119, +[EnumMember(Value = "Africa/Nairobi")] +AfricaNairobi = 43, - [EnumMember(Value = "America/Indiana/Vevay")] - AmericaIndianaVevay = 120, +[EnumMember(Value = "Africa/Ndjamena")] +AfricaNdjamena = 44, - [EnumMember(Value = "America/Indiana/Vincennes")] - AmericaIndianaVincennes = 121, +[EnumMember(Value = "Africa/Niamey")] +AfricaNiamey = 45, - [EnumMember(Value = "America/Indiana/Winamac")] - AmericaIndianaWinamac = 122, +[EnumMember(Value = "Africa/Nouakchott")] +AfricaNouakchott = 46, - [EnumMember(Value = "America/Indianapolis")] - AmericaIndianapolis = 123, +[EnumMember(Value = "Africa/Ouagadougou")] +AfricaOuagadougou = 47, - [EnumMember(Value = "America/Inuvik")] - AmericaInuvik = 124, +[EnumMember(Value = "Africa/Porto-Novo")] +AfricaPortoNovo = 48, - [EnumMember(Value = "America/Iqaluit")] - AmericaIqaluit = 125, +[EnumMember(Value = "Africa/Sao_Tome")] +AfricaSaoTome = 49, - [EnumMember(Value = "America/Jamaica")] - AmericaJamaica = 126, +[EnumMember(Value = "Africa/Tripoli")] +AfricaTripoli = 50, - [EnumMember(Value = "America/Jujuy")] - AmericaJujuy = 127, +[EnumMember(Value = "Africa/Tunis")] +AfricaTunis = 51, - [EnumMember(Value = "America/Juneau")] - AmericaJuneau = 128, +[EnumMember(Value = "Africa/Windhoek")] +AfricaWindhoek = 52, - [EnumMember(Value = "America/Kentucky/Monticello")] - AmericaKentuckyMonticello = 129, +[EnumMember(Value = "America/Adak")] +AmericaAdak = 53, - [EnumMember(Value = "America/Kralendijk")] - AmericaKralendijk = 130, +[EnumMember(Value = "America/Anchorage")] +AmericaAnchorage = 54, - [EnumMember(Value = "America/La_Paz")] - AmericaLaPaz = 131, +[EnumMember(Value = "America/Anguilla")] +AmericaAnguilla = 55, - [EnumMember(Value = "America/Lima")] - AmericaLima = 132, +[EnumMember(Value = "America/Antigua")] +AmericaAntigua = 56, - [EnumMember(Value = "America/Los_Angeles")] - AmericaLosAngeles = 133, +[EnumMember(Value = "America/Araguaina")] +AmericaAraguaina = 57, - [EnumMember(Value = "America/Louisville")] - AmericaLouisville = 134, +[EnumMember(Value = "America/Argentina/La_Rioja")] +AmericaArgentinaLaRioja = 58, - [EnumMember(Value = "America/Lower_Princes")] - AmericaLowerPrinces = 135, +[EnumMember(Value = "America/Argentina/Rio_Gallegos")] +AmericaArgentinaRioGallegos = 59, - [EnumMember(Value = "America/Maceio")] - AmericaMaceio = 136, +[EnumMember(Value = "America/Argentina/Salta")] +AmericaArgentinaSalta = 60, - [EnumMember(Value = "America/Managua")] - AmericaManagua = 137, +[EnumMember(Value = "America/Argentina/San_Juan")] +AmericaArgentinaSanJuan = 61, - [EnumMember(Value = "America/Manaus")] - AmericaManaus = 138, +[EnumMember(Value = "America/Argentina/San_Luis")] +AmericaArgentinaSanLuis = 62, - [EnumMember(Value = "America/Marigot")] - AmericaMarigot = 139, +[EnumMember(Value = "America/Argentina/Tucuman")] +AmericaArgentinaTucuman = 63, - [EnumMember(Value = "America/Martinique")] - AmericaMartinique = 140, +[EnumMember(Value = "America/Argentina/Ushuaia")] +AmericaArgentinaUshuaia = 64, - [EnumMember(Value = "America/Matamoros")] - AmericaMatamoros = 141, +[EnumMember(Value = "America/Aruba")] +AmericaAruba = 65, - [EnumMember(Value = "America/Mazatlan")] - AmericaMazatlan = 142, +[EnumMember(Value = "America/Asuncion")] +AmericaAsuncion = 66, - [EnumMember(Value = "America/Mendoza")] - AmericaMendoza = 143, +[EnumMember(Value = "America/Bahia")] +AmericaBahia = 67, - [EnumMember(Value = "America/Menominee")] - AmericaMenominee = 144, +[EnumMember(Value = "America/Bahia_Banderas")] +AmericaBahiaBanderas = 68, - [EnumMember(Value = "America/Merida")] - AmericaMerida = 145, +[EnumMember(Value = "America/Barbados")] +AmericaBarbados = 69, - [EnumMember(Value = "America/Metlakatla")] - AmericaMetlakatla = 146, +[EnumMember(Value = "America/Belem")] +AmericaBelem = 70, - [EnumMember(Value = "America/Mexico_City")] - AmericaMexicoCity = 147, +[EnumMember(Value = "America/Belize")] +AmericaBelize = 71, - [EnumMember(Value = "America/Miquelon")] - AmericaMiquelon = 148, +[EnumMember(Value = "America/Blanc-Sablon")] +AmericaBlancSablon = 72, - [EnumMember(Value = "America/Moncton")] - AmericaMoncton = 149, +[EnumMember(Value = "America/Boa_Vista")] +AmericaBoaVista = 73, - [EnumMember(Value = "America/Monterrey")] - AmericaMonterrey = 150, +[EnumMember(Value = "America/Bogota")] +AmericaBogota = 74, - [EnumMember(Value = "America/Montevideo")] - AmericaMontevideo = 151, +[EnumMember(Value = "America/Boise")] +AmericaBoise = 75, - [EnumMember(Value = "America/Montreal")] - AmericaMontreal = 152, +[EnumMember(Value = "America/Buenos_Aires")] +AmericaBuenosAires = 76, - [EnumMember(Value = "America/Montserrat")] - AmericaMontserrat = 153, +[EnumMember(Value = "America/Cambridge_Bay")] +AmericaCambridgeBay = 77, - [EnumMember(Value = "America/Nassau")] - AmericaNassau = 154, +[EnumMember(Value = "America/Campo_Grande")] +AmericaCampoGrande = 78, - [EnumMember(Value = "America/New_York")] - AmericaNewYork = 155, +[EnumMember(Value = "America/Cancun")] +AmericaCancun = 79, - [EnumMember(Value = "America/Nipigon")] - AmericaNipigon = 156, +[EnumMember(Value = "America/Caracas")] +AmericaCaracas = 80, - [EnumMember(Value = "America/Nome")] - AmericaNome = 157, +[EnumMember(Value = "America/Catamarca")] +AmericaCatamarca = 81, - [EnumMember(Value = "America/Noronha")] - AmericaNoronha = 158, +[EnumMember(Value = "America/Cayenne")] +AmericaCayenne = 82, - [EnumMember(Value = "America/North_Dakota/Beulah")] - AmericaNorthDakotaBeulah = 159, +[EnumMember(Value = "America/Cayman")] +AmericaCayman = 83, - [EnumMember(Value = "America/North_Dakota/Center")] - AmericaNorthDakotaCenter = 160, +[EnumMember(Value = "America/Chicago")] +AmericaChicago = 84, - [EnumMember(Value = "America/North_Dakota/New_Salem")] - AmericaNorthDakotaNewSalem = 161, +[EnumMember(Value = "America/Chihuahua")] +AmericaChihuahua = 85, - [EnumMember(Value = "America/Ojinaga")] - AmericaOjinaga = 162, +[EnumMember(Value = "America/Ciudad_Juarez")] +AmericaCiudadJuarez = 86, - [EnumMember(Value = "America/Panama")] - AmericaPanama = 163, +[EnumMember(Value = "America/Coral_Harbour")] +AmericaCoralHarbour = 87, - [EnumMember(Value = "America/Pangnirtung")] - AmericaPangnirtung = 164, +[EnumMember(Value = "America/Cordoba")] +AmericaCordoba = 88, - [EnumMember(Value = "America/Paramaribo")] - AmericaParamaribo = 165, +[EnumMember(Value = "America/Costa_Rica")] +AmericaCostaRica = 89, - [EnumMember(Value = "America/Phoenix")] - AmericaPhoenix = 166, +[EnumMember(Value = "America/Creston")] +AmericaCreston = 90, - [EnumMember(Value = "America/Port-au-Prince")] - AmericaPortAuPrince = 167, +[EnumMember(Value = "America/Cuiaba")] +AmericaCuiaba = 91, - [EnumMember(Value = "America/Port_of_Spain")] - AmericaPortOfSpain = 168, +[EnumMember(Value = "America/Curacao")] +AmericaCuracao = 92, - [EnumMember(Value = "America/Porto_Velho")] - AmericaPortoVelho = 169, +[EnumMember(Value = "America/Danmarkshavn")] +AmericaDanmarkshavn = 93, - [EnumMember(Value = "America/Puerto_Rico")] - AmericaPuertoRico = 170, +[EnumMember(Value = "America/Dawson")] +AmericaDawson = 94, - [EnumMember(Value = "America/Punta_Arenas")] - AmericaPuntaArenas = 171, +[EnumMember(Value = "America/Dawson_Creek")] +AmericaDawsonCreek = 95, - [EnumMember(Value = "America/Rainy_River")] - AmericaRainyRiver = 172, +[EnumMember(Value = "America/Denver")] +AmericaDenver = 96, - [EnumMember(Value = "America/Rankin_Inlet")] - AmericaRankinInlet = 173, +[EnumMember(Value = "America/Detroit")] +AmericaDetroit = 97, - [EnumMember(Value = "America/Recife")] - AmericaRecife = 174, +[EnumMember(Value = "America/Dominica")] +AmericaDominica = 98, - [EnumMember(Value = "America/Regina")] - AmericaRegina = 175, +[EnumMember(Value = "America/Edmonton")] +AmericaEdmonton = 99, - [EnumMember(Value = "America/Resolute")] - AmericaResolute = 176, +[EnumMember(Value = "America/Eirunepe")] +AmericaEirunepe = 100, - [EnumMember(Value = "America/Rio_Branco")] - AmericaRioBranco = 177, +[EnumMember(Value = "America/El_Salvador")] +AmericaElSalvador = 101, - [EnumMember(Value = "America/Santa_Isabel")] - AmericaSantaIsabel = 178, +[EnumMember(Value = "America/Fort_Nelson")] +AmericaFortNelson = 102, - [EnumMember(Value = "America/Santarem")] - AmericaSantarem = 179, +[EnumMember(Value = "America/Fortaleza")] +AmericaFortaleza = 103, - [EnumMember(Value = "America/Santiago")] - AmericaSantiago = 180, +[EnumMember(Value = "America/Glace_Bay")] +AmericaGlaceBay = 104, - [EnumMember(Value = "America/Santo_Domingo")] - AmericaSantoDomingo = 181, +[EnumMember(Value = "America/Godthab")] +AmericaGodthab = 105, - [EnumMember(Value = "America/Sao_Paulo")] - AmericaSaoPaulo = 182, +[EnumMember(Value = "America/Goose_Bay")] +AmericaGooseBay = 106, - [EnumMember(Value = "America/Scoresbysund")] - AmericaScoresbysund = 183, +[EnumMember(Value = "America/Grand_Turk")] +AmericaGrandTurk = 107, - [EnumMember(Value = "America/Sitka")] - AmericaSitka = 184, +[EnumMember(Value = "America/Grenada")] +AmericaGrenada = 108, - [EnumMember(Value = "America/St_Barthelemy")] - AmericaStBarthelemy = 185, +[EnumMember(Value = "America/Guadeloupe")] +AmericaGuadeloupe = 109, - [EnumMember(Value = "America/St_Johns")] - AmericaStJohns = 186, +[EnumMember(Value = "America/Guatemala")] +AmericaGuatemala = 110, - [EnumMember(Value = "America/St_Kitts")] - AmericaStKitts = 187, +[EnumMember(Value = "America/Guayaquil")] +AmericaGuayaquil = 111, - [EnumMember(Value = "America/St_Lucia")] - AmericaStLucia = 188, +[EnumMember(Value = "America/Guyana")] +AmericaGuyana = 112, - [EnumMember(Value = "America/St_Thomas")] - AmericaStThomas = 189, +[EnumMember(Value = "America/Halifax")] +AmericaHalifax = 113, - [EnumMember(Value = "America/St_Vincent")] - AmericaStVincent = 190, +[EnumMember(Value = "America/Havana")] +AmericaHavana = 114, - [EnumMember(Value = "America/Swift_Current")] - AmericaSwiftCurrent = 191, +[EnumMember(Value = "America/Hermosillo")] +AmericaHermosillo = 115, - [EnumMember(Value = "America/Tegucigalpa")] - AmericaTegucigalpa = 192, +[EnumMember(Value = "America/Indiana/Knox")] +AmericaIndianaKnox = 116, - [EnumMember(Value = "America/Thule")] - AmericaThule = 193, +[EnumMember(Value = "America/Indiana/Marengo")] +AmericaIndianaMarengo = 117, - [EnumMember(Value = "America/Thunder_Bay")] - AmericaThunderBay = 194, +[EnumMember(Value = "America/Indiana/Petersburg")] +AmericaIndianaPetersburg = 118, - [EnumMember(Value = "America/Tijuana")] - AmericaTijuana = 195, +[EnumMember(Value = "America/Indiana/Tell_City")] +AmericaIndianaTellCity = 119, - [EnumMember(Value = "America/Toronto")] - AmericaToronto = 196, +[EnumMember(Value = "America/Indiana/Vevay")] +AmericaIndianaVevay = 120, - [EnumMember(Value = "America/Tortola")] - AmericaTortola = 197, +[EnumMember(Value = "America/Indiana/Vincennes")] +AmericaIndianaVincennes = 121, - [EnumMember(Value = "America/Vancouver")] - AmericaVancouver = 198, +[EnumMember(Value = "America/Indiana/Winamac")] +AmericaIndianaWinamac = 122, - [EnumMember(Value = "America/Whitehorse")] - AmericaWhitehorse = 199, +[EnumMember(Value = "America/Indianapolis")] +AmericaIndianapolis = 123, - [EnumMember(Value = "America/Winnipeg")] - AmericaWinnipeg = 200, +[EnumMember(Value = "America/Inuvik")] +AmericaInuvik = 124, - [EnumMember(Value = "America/Yakutat")] - AmericaYakutat = 201, +[EnumMember(Value = "America/Iqaluit")] +AmericaIqaluit = 125, - [EnumMember(Value = "America/Yellowknife")] - AmericaYellowknife = 202, +[EnumMember(Value = "America/Jamaica")] +AmericaJamaica = 126, - [EnumMember(Value = "Antarctica/Casey")] - AntarcticaCasey = 203, +[EnumMember(Value = "America/Jujuy")] +AmericaJujuy = 127, - [EnumMember(Value = "Antarctica/Davis")] - AntarcticaDavis = 204, +[EnumMember(Value = "America/Juneau")] +AmericaJuneau = 128, - [EnumMember(Value = "Antarctica/DumontDUrville")] - AntarcticaDumontDUrville = 205, +[EnumMember(Value = "America/Kentucky/Monticello")] +AmericaKentuckyMonticello = 129, - [EnumMember(Value = "Antarctica/Macquarie")] - AntarcticaMacquarie = 206, +[EnumMember(Value = "America/Kralendijk")] +AmericaKralendijk = 130, - [EnumMember(Value = "Antarctica/Mawson")] - AntarcticaMawson = 207, +[EnumMember(Value = "America/La_Paz")] +AmericaLaPaz = 131, - [EnumMember(Value = "Antarctica/McMurdo")] - AntarcticaMcMurdo = 208, +[EnumMember(Value = "America/Lima")] +AmericaLima = 132, - [EnumMember(Value = "Antarctica/Palmer")] - AntarcticaPalmer = 209, +[EnumMember(Value = "America/Los_Angeles")] +AmericaLosAngeles = 133, - [EnumMember(Value = "Antarctica/Rothera")] - AntarcticaRothera = 210, +[EnumMember(Value = "America/Louisville")] +AmericaLouisville = 134, - [EnumMember(Value = "Antarctica/Syowa")] - AntarcticaSyowa = 211, +[EnumMember(Value = "America/Lower_Princes")] +AmericaLowerPrinces = 135, - [EnumMember(Value = "Antarctica/Troll")] - AntarcticaTroll = 212, +[EnumMember(Value = "America/Maceio")] +AmericaMaceio = 136, - [EnumMember(Value = "Antarctica/Vostok")] - AntarcticaVostok = 213, +[EnumMember(Value = "America/Managua")] +AmericaManagua = 137, - [EnumMember(Value = "Arctic/Longyearbyen")] - ArcticLongyearbyen = 214, +[EnumMember(Value = "America/Manaus")] +AmericaManaus = 138, - [EnumMember(Value = "Asia/Aden")] - AsiaAden = 215, +[EnumMember(Value = "America/Marigot")] +AmericaMarigot = 139, - [EnumMember(Value = "Asia/Almaty")] - AsiaAlmaty = 216, +[EnumMember(Value = "America/Martinique")] +AmericaMartinique = 140, - [EnumMember(Value = "Asia/Amman")] - AsiaAmman = 217, +[EnumMember(Value = "America/Matamoros")] +AmericaMatamoros = 141, - [EnumMember(Value = "Asia/Anadyr")] - AsiaAnadyr = 218, +[EnumMember(Value = "America/Mazatlan")] +AmericaMazatlan = 142, - [EnumMember(Value = "Asia/Aqtau")] - AsiaAqtau = 219, +[EnumMember(Value = "America/Mendoza")] +AmericaMendoza = 143, - [EnumMember(Value = "Asia/Aqtobe")] - AsiaAqtobe = 220, +[EnumMember(Value = "America/Menominee")] +AmericaMenominee = 144, - [EnumMember(Value = "Asia/Ashgabat")] - AsiaAshgabat = 221, +[EnumMember(Value = "America/Merida")] +AmericaMerida = 145, - [EnumMember(Value = "Asia/Atyrau")] - AsiaAtyrau = 222, +[EnumMember(Value = "America/Metlakatla")] +AmericaMetlakatla = 146, - [EnumMember(Value = "Asia/Baghdad")] - AsiaBaghdad = 223, +[EnumMember(Value = "America/Mexico_City")] +AmericaMexicoCity = 147, - [EnumMember(Value = "Asia/Bahrain")] - AsiaBahrain = 224, +[EnumMember(Value = "America/Miquelon")] +AmericaMiquelon = 148, - [EnumMember(Value = "Asia/Baku")] - AsiaBaku = 225, +[EnumMember(Value = "America/Moncton")] +AmericaMoncton = 149, - [EnumMember(Value = "Asia/Bangkok")] - AsiaBangkok = 226, +[EnumMember(Value = "America/Monterrey")] +AmericaMonterrey = 150, - [EnumMember(Value = "Asia/Barnaul")] - AsiaBarnaul = 227, +[EnumMember(Value = "America/Montevideo")] +AmericaMontevideo = 151, - [EnumMember(Value = "Asia/Beirut")] - AsiaBeirut = 228, +[EnumMember(Value = "America/Montreal")] +AmericaMontreal = 152, - [EnumMember(Value = "Asia/Bishkek")] - AsiaBishkek = 229, +[EnumMember(Value = "America/Montserrat")] +AmericaMontserrat = 153, - [EnumMember(Value = "Asia/Brunei")] - AsiaBrunei = 230, +[EnumMember(Value = "America/Nassau")] +AmericaNassau = 154, - [EnumMember(Value = "Asia/Calcutta")] - AsiaCalcutta = 231, +[EnumMember(Value = "America/New_York")] +AmericaNewYork = 155, - [EnumMember(Value = "Asia/Chita")] - AsiaChita = 232, +[EnumMember(Value = "America/Nipigon")] +AmericaNipigon = 156, - [EnumMember(Value = "Asia/Choibalsan")] - AsiaChoibalsan = 233, +[EnumMember(Value = "America/Nome")] +AmericaNome = 157, - [EnumMember(Value = "Asia/Colombo")] - AsiaColombo = 234, +[EnumMember(Value = "America/Noronha")] +AmericaNoronha = 158, - [EnumMember(Value = "Asia/Damascus")] - AsiaDamascus = 235, +[EnumMember(Value = "America/North_Dakota/Beulah")] +AmericaNorthDakotaBeulah = 159, - [EnumMember(Value = "Asia/Dhaka")] - AsiaDhaka = 236, +[EnumMember(Value = "America/North_Dakota/Center")] +AmericaNorthDakotaCenter = 160, - [EnumMember(Value = "Asia/Dili")] - AsiaDili = 237, +[EnumMember(Value = "America/North_Dakota/New_Salem")] +AmericaNorthDakotaNewSalem = 161, - [EnumMember(Value = "Asia/Dubai")] - AsiaDubai = 238, +[EnumMember(Value = "America/Ojinaga")] +AmericaOjinaga = 162, - [EnumMember(Value = "Asia/Dushanbe")] - AsiaDushanbe = 239, +[EnumMember(Value = "America/Panama")] +AmericaPanama = 163, - [EnumMember(Value = "Asia/Famagusta")] - AsiaFamagusta = 240, +[EnumMember(Value = "America/Pangnirtung")] +AmericaPangnirtung = 164, - [EnumMember(Value = "Asia/Gaza")] - AsiaGaza = 241, +[EnumMember(Value = "America/Paramaribo")] +AmericaParamaribo = 165, - [EnumMember(Value = "Asia/Hebron")] - AsiaHebron = 242, +[EnumMember(Value = "America/Phoenix")] +AmericaPhoenix = 166, - [EnumMember(Value = "Asia/Hong_Kong")] - AsiaHongKong = 243, +[EnumMember(Value = "America/Port-au-Prince")] +AmericaPortAuPrince = 167, - [EnumMember(Value = "Asia/Hovd")] - AsiaHovd = 244, +[EnumMember(Value = "America/Port_of_Spain")] +AmericaPortOfSpain = 168, - [EnumMember(Value = "Asia/Irkutsk")] - AsiaIrkutsk = 245, +[EnumMember(Value = "America/Porto_Velho")] +AmericaPortoVelho = 169, - [EnumMember(Value = "Asia/Jakarta")] - AsiaJakarta = 246, +[EnumMember(Value = "America/Puerto_Rico")] +AmericaPuertoRico = 170, - [EnumMember(Value = "Asia/Jayapura")] - AsiaJayapura = 247, +[EnumMember(Value = "America/Punta_Arenas")] +AmericaPuntaArenas = 171, - [EnumMember(Value = "Asia/Jerusalem")] - AsiaJerusalem = 248, +[EnumMember(Value = "America/Rainy_River")] +AmericaRainyRiver = 172, - [EnumMember(Value = "Asia/Kabul")] - AsiaKabul = 249, +[EnumMember(Value = "America/Rankin_Inlet")] +AmericaRankinInlet = 173, - [EnumMember(Value = "Asia/Kamchatka")] - AsiaKamchatka = 250, +[EnumMember(Value = "America/Recife")] +AmericaRecife = 174, - [EnumMember(Value = "Asia/Karachi")] - AsiaKarachi = 251, +[EnumMember(Value = "America/Regina")] +AmericaRegina = 175, - [EnumMember(Value = "Asia/Katmandu")] - AsiaKatmandu = 252, +[EnumMember(Value = "America/Resolute")] +AmericaResolute = 176, - [EnumMember(Value = "Asia/Khandyga")] - AsiaKhandyga = 253, +[EnumMember(Value = "America/Rio_Branco")] +AmericaRioBranco = 177, - [EnumMember(Value = "Asia/Krasnoyarsk")] - AsiaKrasnoyarsk = 254, +[EnumMember(Value = "America/Santa_Isabel")] +AmericaSantaIsabel = 178, - [EnumMember(Value = "Asia/Kuala_Lumpur")] - AsiaKualaLumpur = 255, +[EnumMember(Value = "America/Santarem")] +AmericaSantarem = 179, - [EnumMember(Value = "Asia/Kuching")] - AsiaKuching = 256, +[EnumMember(Value = "America/Santiago")] +AmericaSantiago = 180, - [EnumMember(Value = "Asia/Kuwait")] - AsiaKuwait = 257, +[EnumMember(Value = "America/Santo_Domingo")] +AmericaSantoDomingo = 181, - [EnumMember(Value = "Asia/Macau")] - AsiaMacau = 258, +[EnumMember(Value = "America/Sao_Paulo")] +AmericaSaoPaulo = 182, - [EnumMember(Value = "Asia/Magadan")] - AsiaMagadan = 259, +[EnumMember(Value = "America/Scoresbysund")] +AmericaScoresbysund = 183, - [EnumMember(Value = "Asia/Makassar")] - AsiaMakassar = 260, +[EnumMember(Value = "America/Sitka")] +AmericaSitka = 184, - [EnumMember(Value = "Asia/Manila")] - AsiaManila = 261, +[EnumMember(Value = "America/St_Barthelemy")] +AmericaStBarthelemy = 185, - [EnumMember(Value = "Asia/Muscat")] - AsiaMuscat = 262, +[EnumMember(Value = "America/St_Johns")] +AmericaStJohns = 186, - [EnumMember(Value = "Asia/Nicosia")] - AsiaNicosia = 263, +[EnumMember(Value = "America/St_Kitts")] +AmericaStKitts = 187, - [EnumMember(Value = "Asia/Novokuznetsk")] - AsiaNovokuznetsk = 264, +[EnumMember(Value = "America/St_Lucia")] +AmericaStLucia = 188, - [EnumMember(Value = "Asia/Novosibirsk")] - AsiaNovosibirsk = 265, +[EnumMember(Value = "America/St_Thomas")] +AmericaStThomas = 189, - [EnumMember(Value = "Asia/Omsk")] - AsiaOmsk = 266, +[EnumMember(Value = "America/St_Vincent")] +AmericaStVincent = 190, - [EnumMember(Value = "Asia/Oral")] - AsiaOral = 267, +[EnumMember(Value = "America/Swift_Current")] +AmericaSwiftCurrent = 191, - [EnumMember(Value = "Asia/Phnom_Penh")] - AsiaPhnomPenh = 268, +[EnumMember(Value = "America/Tegucigalpa")] +AmericaTegucigalpa = 192, - [EnumMember(Value = "Asia/Pontianak")] - AsiaPontianak = 269, +[EnumMember(Value = "America/Thule")] +AmericaThule = 193, - [EnumMember(Value = "Asia/Pyongyang")] - AsiaPyongyang = 270, +[EnumMember(Value = "America/Thunder_Bay")] +AmericaThunderBay = 194, - [EnumMember(Value = "Asia/Qatar")] - AsiaQatar = 271, +[EnumMember(Value = "America/Tijuana")] +AmericaTijuana = 195, - [EnumMember(Value = "Asia/Qostanay")] - AsiaQostanay = 272, +[EnumMember(Value = "America/Toronto")] +AmericaToronto = 196, - [EnumMember(Value = "Asia/Qyzylorda")] - AsiaQyzylorda = 273, +[EnumMember(Value = "America/Tortola")] +AmericaTortola = 197, - [EnumMember(Value = "Asia/Rangoon")] - AsiaRangoon = 274, +[EnumMember(Value = "America/Vancouver")] +AmericaVancouver = 198, - [EnumMember(Value = "Asia/Riyadh")] - AsiaRiyadh = 275, +[EnumMember(Value = "America/Whitehorse")] +AmericaWhitehorse = 199, - [EnumMember(Value = "Asia/Saigon")] - AsiaSaigon = 276, +[EnumMember(Value = "America/Winnipeg")] +AmericaWinnipeg = 200, - [EnumMember(Value = "Asia/Sakhalin")] - AsiaSakhalin = 277, +[EnumMember(Value = "America/Yakutat")] +AmericaYakutat = 201, - [EnumMember(Value = "Asia/Samarkand")] - AsiaSamarkand = 278, +[EnumMember(Value = "America/Yellowknife")] +AmericaYellowknife = 202, - [EnumMember(Value = "Asia/Seoul")] - AsiaSeoul = 279, +[EnumMember(Value = "Antarctica/Casey")] +AntarcticaCasey = 203, - [EnumMember(Value = "Asia/Shanghai")] - AsiaShanghai = 280, +[EnumMember(Value = "Antarctica/Davis")] +AntarcticaDavis = 204, - [EnumMember(Value = "Asia/Singapore")] - AsiaSingapore = 281, +[EnumMember(Value = "Antarctica/DumontDUrville")] +AntarcticaDumontDUrville = 205, - [EnumMember(Value = "Asia/Srednekolymsk")] - AsiaSrednekolymsk = 282, +[EnumMember(Value = "Antarctica/Macquarie")] +AntarcticaMacquarie = 206, - [EnumMember(Value = "Asia/Taipei")] - AsiaTaipei = 283, +[EnumMember(Value = "Antarctica/Mawson")] +AntarcticaMawson = 207, - [EnumMember(Value = "Asia/Tashkent")] - AsiaTashkent = 284, +[EnumMember(Value = "Antarctica/McMurdo")] +AntarcticaMcMurdo = 208, - [EnumMember(Value = "Asia/Tbilisi")] - AsiaTbilisi = 285, +[EnumMember(Value = "Antarctica/Palmer")] +AntarcticaPalmer = 209, - [EnumMember(Value = "Asia/Tehran")] - AsiaTehran = 286, +[EnumMember(Value = "Antarctica/Rothera")] +AntarcticaRothera = 210, - [EnumMember(Value = "Asia/Thimphu")] - AsiaThimphu = 287, +[EnumMember(Value = "Antarctica/Syowa")] +AntarcticaSyowa = 211, - [EnumMember(Value = "Asia/Tokyo")] - AsiaTokyo = 288, +[EnumMember(Value = "Antarctica/Troll")] +AntarcticaTroll = 212, - [EnumMember(Value = "Asia/Tomsk")] - AsiaTomsk = 289, +[EnumMember(Value = "Antarctica/Vostok")] +AntarcticaVostok = 213, - [EnumMember(Value = "Asia/Ulaanbaatar")] - AsiaUlaanbaatar = 290, +[EnumMember(Value = "Arctic/Longyearbyen")] +ArcticLongyearbyen = 214, - [EnumMember(Value = "Asia/Urumqi")] - AsiaUrumqi = 291, +[EnumMember(Value = "Asia/Aden")] +AsiaAden = 215, - [EnumMember(Value = "Asia/Ust-Nera")] - AsiaUstNera = 292, +[EnumMember(Value = "Asia/Almaty")] +AsiaAlmaty = 216, - [EnumMember(Value = "Asia/Vientiane")] - AsiaVientiane = 293, +[EnumMember(Value = "Asia/Amman")] +AsiaAmman = 217, - [EnumMember(Value = "Asia/Vladivostok")] - AsiaVladivostok = 294, +[EnumMember(Value = "Asia/Anadyr")] +AsiaAnadyr = 218, - [EnumMember(Value = "Asia/Yakutsk")] - AsiaYakutsk = 295, +[EnumMember(Value = "Asia/Aqtau")] +AsiaAqtau = 219, - [EnumMember(Value = "Asia/Yekaterinburg")] - AsiaYekaterinburg = 296, +[EnumMember(Value = "Asia/Aqtobe")] +AsiaAqtobe = 220, - [EnumMember(Value = "Asia/Yerevan")] - AsiaYerevan = 297, +[EnumMember(Value = "Asia/Ashgabat")] +AsiaAshgabat = 221, - [EnumMember(Value = "Atlantic/Azores")] - AtlanticAzores = 298, +[EnumMember(Value = "Asia/Atyrau")] +AsiaAtyrau = 222, - [EnumMember(Value = "Atlantic/Bermuda")] - AtlanticBermuda = 299, +[EnumMember(Value = "Asia/Baghdad")] +AsiaBaghdad = 223, - [EnumMember(Value = "Atlantic/Canary")] - AtlanticCanary = 300, +[EnumMember(Value = "Asia/Bahrain")] +AsiaBahrain = 224, - [EnumMember(Value = "Atlantic/Cape_Verde")] - AtlanticCapeVerde = 301, +[EnumMember(Value = "Asia/Baku")] +AsiaBaku = 225, - [EnumMember(Value = "Atlantic/Faeroe")] - AtlanticFaeroe = 302, +[EnumMember(Value = "Asia/Bangkok")] +AsiaBangkok = 226, - [EnumMember(Value = "Atlantic/Madeira")] - AtlanticMadeira = 303, +[EnumMember(Value = "Asia/Barnaul")] +AsiaBarnaul = 227, - [EnumMember(Value = "Atlantic/Reykjavik")] - AtlanticReykjavik = 304, +[EnumMember(Value = "Asia/Beirut")] +AsiaBeirut = 228, - [EnumMember(Value = "Atlantic/South_Georgia")] - AtlanticSouthGeorgia = 305, +[EnumMember(Value = "Asia/Bishkek")] +AsiaBishkek = 229, - [EnumMember(Value = "Atlantic/St_Helena")] - AtlanticStHelena = 306, +[EnumMember(Value = "Asia/Brunei")] +AsiaBrunei = 230, - [EnumMember(Value = "Atlantic/Stanley")] - AtlanticStanley = 307, +[EnumMember(Value = "Asia/Calcutta")] +AsiaCalcutta = 231, - [EnumMember(Value = "Australia/Adelaide")] - AustraliaAdelaide = 308, +[EnumMember(Value = "Asia/Chita")] +AsiaChita = 232, - [EnumMember(Value = "Australia/Brisbane")] - AustraliaBrisbane = 309, +[EnumMember(Value = "Asia/Choibalsan")] +AsiaChoibalsan = 233, - [EnumMember(Value = "Australia/Broken_Hill")] - AustraliaBrokenHill = 310, +[EnumMember(Value = "Asia/Colombo")] +AsiaColombo = 234, - [EnumMember(Value = "Australia/Currie")] - AustraliaCurrie = 311, +[EnumMember(Value = "Asia/Damascus")] +AsiaDamascus = 235, - [EnumMember(Value = "Australia/Darwin")] - AustraliaDarwin = 312, +[EnumMember(Value = "Asia/Dhaka")] +AsiaDhaka = 236, - [EnumMember(Value = "Australia/Eucla")] - AustraliaEucla = 313, +[EnumMember(Value = "Asia/Dili")] +AsiaDili = 237, - [EnumMember(Value = "Australia/Hobart")] - AustraliaHobart = 314, +[EnumMember(Value = "Asia/Dubai")] +AsiaDubai = 238, - [EnumMember(Value = "Australia/Lindeman")] - AustraliaLindeman = 315, +[EnumMember(Value = "Asia/Dushanbe")] +AsiaDushanbe = 239, - [EnumMember(Value = "Australia/Lord_Howe")] - AustraliaLordHowe = 316, +[EnumMember(Value = "Asia/Famagusta")] +AsiaFamagusta = 240, - [EnumMember(Value = "Australia/Melbourne")] - AustraliaMelbourne = 317, +[EnumMember(Value = "Asia/Gaza")] +AsiaGaza = 241, - [EnumMember(Value = "Australia/Perth")] - AustraliaPerth = 318, +[EnumMember(Value = "Asia/Hebron")] +AsiaHebron = 242, - [EnumMember(Value = "Australia/Sydney")] - AustraliaSydney = 319, +[EnumMember(Value = "Asia/Hong_Kong")] +AsiaHongKong = 243, - [EnumMember(Value = "Europe/Amsterdam")] - EuropeAmsterdam = 320, +[EnumMember(Value = "Asia/Hovd")] +AsiaHovd = 244, - [EnumMember(Value = "Europe/Andorra")] - EuropeAndorra = 321, +[EnumMember(Value = "Asia/Irkutsk")] +AsiaIrkutsk = 245, - [EnumMember(Value = "Europe/Astrakhan")] - EuropeAstrakhan = 322, +[EnumMember(Value = "Asia/Jakarta")] +AsiaJakarta = 246, - [EnumMember(Value = "Europe/Athens")] - EuropeAthens = 323, +[EnumMember(Value = "Asia/Jayapura")] +AsiaJayapura = 247, - [EnumMember(Value = "Europe/Belgrade")] - EuropeBelgrade = 324, +[EnumMember(Value = "Asia/Jerusalem")] +AsiaJerusalem = 248, - [EnumMember(Value = "Europe/Berlin")] - EuropeBerlin = 325, +[EnumMember(Value = "Asia/Kabul")] +AsiaKabul = 249, - [EnumMember(Value = "Europe/Bratislava")] - EuropeBratislava = 326, +[EnumMember(Value = "Asia/Kamchatka")] +AsiaKamchatka = 250, - [EnumMember(Value = "Europe/Brussels")] - EuropeBrussels = 327, +[EnumMember(Value = "Asia/Karachi")] +AsiaKarachi = 251, - [EnumMember(Value = "Europe/Bucharest")] - EuropeBucharest = 328, +[EnumMember(Value = "Asia/Katmandu")] +AsiaKatmandu = 252, - [EnumMember(Value = "Europe/Budapest")] - EuropeBudapest = 329, +[EnumMember(Value = "Asia/Khandyga")] +AsiaKhandyga = 253, - [EnumMember(Value = "Europe/Busingen")] - EuropeBusingen = 330, +[EnumMember(Value = "Asia/Krasnoyarsk")] +AsiaKrasnoyarsk = 254, - [EnumMember(Value = "Europe/Chisinau")] - EuropeChisinau = 331, +[EnumMember(Value = "Asia/Kuala_Lumpur")] +AsiaKualaLumpur = 255, - [EnumMember(Value = "Europe/Copenhagen")] - EuropeCopenhagen = 332, +[EnumMember(Value = "Asia/Kuching")] +AsiaKuching = 256, - [EnumMember(Value = "Europe/Dublin")] - EuropeDublin = 333, +[EnumMember(Value = "Asia/Kuwait")] +AsiaKuwait = 257, - [EnumMember(Value = "Europe/Gibraltar")] - EuropeGibraltar = 334, +[EnumMember(Value = "Asia/Macau")] +AsiaMacau = 258, - [EnumMember(Value = "Europe/Guernsey")] - EuropeGuernsey = 335, +[EnumMember(Value = "Asia/Magadan")] +AsiaMagadan = 259, - [EnumMember(Value = "Europe/Helsinki")] - EuropeHelsinki = 336, +[EnumMember(Value = "Asia/Makassar")] +AsiaMakassar = 260, - [EnumMember(Value = "Europe/Isle_of_Man")] - EuropeIsleOfMan = 337, +[EnumMember(Value = "Asia/Manila")] +AsiaManila = 261, - [EnumMember(Value = "Europe/Istanbul")] - EuropeIstanbul = 338, +[EnumMember(Value = "Asia/Muscat")] +AsiaMuscat = 262, - [EnumMember(Value = "Europe/Jersey")] - EuropeJersey = 339, +[EnumMember(Value = "Asia/Nicosia")] +AsiaNicosia = 263, - [EnumMember(Value = "Europe/Kaliningrad")] - EuropeKaliningrad = 340, +[EnumMember(Value = "Asia/Novokuznetsk")] +AsiaNovokuznetsk = 264, - [EnumMember(Value = "Europe/Kiev")] - EuropeKiev = 341, +[EnumMember(Value = "Asia/Novosibirsk")] +AsiaNovosibirsk = 265, - [EnumMember(Value = "Europe/Kirov")] - EuropeKirov = 342, +[EnumMember(Value = "Asia/Omsk")] +AsiaOmsk = 266, - [EnumMember(Value = "Europe/Lisbon")] - EuropeLisbon = 343, +[EnumMember(Value = "Asia/Oral")] +AsiaOral = 267, - [EnumMember(Value = "Europe/Ljubljana")] - EuropeLjubljana = 344, +[EnumMember(Value = "Asia/Phnom_Penh")] +AsiaPhnomPenh = 268, - [EnumMember(Value = "Europe/London")] - EuropeLondon = 345, +[EnumMember(Value = "Asia/Pontianak")] +AsiaPontianak = 269, - [EnumMember(Value = "Europe/Luxembourg")] - EuropeLuxembourg = 346, +[EnumMember(Value = "Asia/Pyongyang")] +AsiaPyongyang = 270, - [EnumMember(Value = "Europe/Madrid")] - EuropeMadrid = 347, +[EnumMember(Value = "Asia/Qatar")] +AsiaQatar = 271, - [EnumMember(Value = "Europe/Malta")] - EuropeMalta = 348, +[EnumMember(Value = "Asia/Qostanay")] +AsiaQostanay = 272, - [EnumMember(Value = "Europe/Mariehamn")] - EuropeMariehamn = 349, +[EnumMember(Value = "Asia/Qyzylorda")] +AsiaQyzylorda = 273, - [EnumMember(Value = "Europe/Minsk")] - EuropeMinsk = 350, +[EnumMember(Value = "Asia/Rangoon")] +AsiaRangoon = 274, - [EnumMember(Value = "Europe/Monaco")] - EuropeMonaco = 351, +[EnumMember(Value = "Asia/Riyadh")] +AsiaRiyadh = 275, - [EnumMember(Value = "Europe/Moscow")] - EuropeMoscow = 352, +[EnumMember(Value = "Asia/Saigon")] +AsiaSaigon = 276, - [EnumMember(Value = "Europe/Oslo")] - EuropeOslo = 353, +[EnumMember(Value = "Asia/Sakhalin")] +AsiaSakhalin = 277, - [EnumMember(Value = "Europe/Paris")] - EuropeParis = 354, +[EnumMember(Value = "Asia/Samarkand")] +AsiaSamarkand = 278, - [EnumMember(Value = "Europe/Podgorica")] - EuropePodgorica = 355, +[EnumMember(Value = "Asia/Seoul")] +AsiaSeoul = 279, - [EnumMember(Value = "Europe/Prague")] - EuropePrague = 356, +[EnumMember(Value = "Asia/Shanghai")] +AsiaShanghai = 280, - [EnumMember(Value = "Europe/Riga")] - EuropeRiga = 357, +[EnumMember(Value = "Asia/Singapore")] +AsiaSingapore = 281, - [EnumMember(Value = "Europe/Rome")] - EuropeRome = 358, +[EnumMember(Value = "Asia/Srednekolymsk")] +AsiaSrednekolymsk = 282, - [EnumMember(Value = "Europe/Samara")] - EuropeSamara = 359, +[EnumMember(Value = "Asia/Taipei")] +AsiaTaipei = 283, - [EnumMember(Value = "Europe/San_Marino")] - EuropeSanMarino = 360, +[EnumMember(Value = "Asia/Tashkent")] +AsiaTashkent = 284, - [EnumMember(Value = "Europe/Sarajevo")] - EuropeSarajevo = 361, +[EnumMember(Value = "Asia/Tbilisi")] +AsiaTbilisi = 285, - [EnumMember(Value = "Europe/Saratov")] - EuropeSaratov = 362, +[EnumMember(Value = "Asia/Tehran")] +AsiaTehran = 286, - [EnumMember(Value = "Europe/Simferopol")] - EuropeSimferopol = 363, +[EnumMember(Value = "Asia/Thimphu")] +AsiaThimphu = 287, - [EnumMember(Value = "Europe/Skopje")] - EuropeSkopje = 364, +[EnumMember(Value = "Asia/Tokyo")] +AsiaTokyo = 288, - [EnumMember(Value = "Europe/Sofia")] - EuropeSofia = 365, +[EnumMember(Value = "Asia/Tomsk")] +AsiaTomsk = 289, - [EnumMember(Value = "Europe/Stockholm")] - EuropeStockholm = 366, +[EnumMember(Value = "Asia/Ulaanbaatar")] +AsiaUlaanbaatar = 290, - [EnumMember(Value = "Europe/Tallinn")] - EuropeTallinn = 367, +[EnumMember(Value = "Asia/Urumqi")] +AsiaUrumqi = 291, - [EnumMember(Value = "Europe/Tirane")] - EuropeTirane = 368, +[EnumMember(Value = "Asia/Ust-Nera")] +AsiaUstNera = 292, - [EnumMember(Value = "Europe/Ulyanovsk")] - EuropeUlyanovsk = 369, +[EnumMember(Value = "Asia/Vientiane")] +AsiaVientiane = 293, - [EnumMember(Value = "Europe/Uzhgorod")] - EuropeUzhgorod = 370, +[EnumMember(Value = "Asia/Vladivostok")] +AsiaVladivostok = 294, - [EnumMember(Value = "Europe/Vaduz")] - EuropeVaduz = 371, +[EnumMember(Value = "Asia/Yakutsk")] +AsiaYakutsk = 295, - [EnumMember(Value = "Europe/Vatican")] - EuropeVatican = 372, +[EnumMember(Value = "Asia/Yekaterinburg")] +AsiaYekaterinburg = 296, - [EnumMember(Value = "Europe/Vienna")] - EuropeVienna = 373, +[EnumMember(Value = "Asia/Yerevan")] +AsiaYerevan = 297, - [EnumMember(Value = "Europe/Vilnius")] - EuropeVilnius = 374, +[EnumMember(Value = "Atlantic/Azores")] +AtlanticAzores = 298, - [EnumMember(Value = "Europe/Volgograd")] - EuropeVolgograd = 375, +[EnumMember(Value = "Atlantic/Bermuda")] +AtlanticBermuda = 299, - [EnumMember(Value = "Europe/Warsaw")] - EuropeWarsaw = 376, +[EnumMember(Value = "Atlantic/Canary")] +AtlanticCanary = 300, - [EnumMember(Value = "Europe/Zagreb")] - EuropeZagreb = 377, +[EnumMember(Value = "Atlantic/Cape_Verde")] +AtlanticCapeVerde = 301, - [EnumMember(Value = "Europe/Zaporozhye")] - EuropeZaporozhye = 378, +[EnumMember(Value = "Atlantic/Faeroe")] +AtlanticFaeroe = 302, - [EnumMember(Value = "Europe/Zurich")] - EuropeZurich = 379, +[EnumMember(Value = "Atlantic/Madeira")] +AtlanticMadeira = 303, - [EnumMember(Value = "Indian/Antananarivo")] - IndianAntananarivo = 380, +[EnumMember(Value = "Atlantic/Reykjavik")] +AtlanticReykjavik = 304, - [EnumMember(Value = "Indian/Chagos")] - IndianChagos = 381, +[EnumMember(Value = "Atlantic/South_Georgia")] +AtlanticSouthGeorgia = 305, - [EnumMember(Value = "Indian/Christmas")] - IndianChristmas = 382, +[EnumMember(Value = "Atlantic/St_Helena")] +AtlanticStHelena = 306, - [EnumMember(Value = "Indian/Cocos")] - IndianCocos = 383, +[EnumMember(Value = "Atlantic/Stanley")] +AtlanticStanley = 307, - [EnumMember(Value = "Indian/Comoro")] - IndianComoro = 384, +[EnumMember(Value = "Australia/Adelaide")] +AustraliaAdelaide = 308, - [EnumMember(Value = "Indian/Kerguelen")] - IndianKerguelen = 385, +[EnumMember(Value = "Australia/Brisbane")] +AustraliaBrisbane = 309, - [EnumMember(Value = "Indian/Mahe")] - IndianMahe = 386, +[EnumMember(Value = "Australia/Broken_Hill")] +AustraliaBrokenHill = 310, - [EnumMember(Value = "Indian/Maldives")] - IndianMaldives = 387, +[EnumMember(Value = "Australia/Currie")] +AustraliaCurrie = 311, - [EnumMember(Value = "Indian/Mauritius")] - IndianMauritius = 388, +[EnumMember(Value = "Australia/Darwin")] +AustraliaDarwin = 312, - [EnumMember(Value = "Indian/Mayotte")] - IndianMayotte = 389, +[EnumMember(Value = "Australia/Eucla")] +AustraliaEucla = 313, - [EnumMember(Value = "Indian/Reunion")] - IndianReunion = 390, +[EnumMember(Value = "Australia/Hobart")] +AustraliaHobart = 314, - [EnumMember(Value = "Pacific/Apia")] - PacificApia = 391, +[EnumMember(Value = "Australia/Lindeman")] +AustraliaLindeman = 315, - [EnumMember(Value = "Pacific/Auckland")] - PacificAuckland = 392, +[EnumMember(Value = "Australia/Lord_Howe")] +AustraliaLordHowe = 316, - [EnumMember(Value = "Pacific/Bougainville")] - PacificBougainville = 393, +[EnumMember(Value = "Australia/Melbourne")] +AustraliaMelbourne = 317, - [EnumMember(Value = "Pacific/Chatham")] - PacificChatham = 394, +[EnumMember(Value = "Australia/Perth")] +AustraliaPerth = 318, - [EnumMember(Value = "Pacific/Easter")] - PacificEaster = 395, +[EnumMember(Value = "Australia/Sydney")] +AustraliaSydney = 319, - [EnumMember(Value = "Pacific/Efate")] - PacificEfate = 396, +[EnumMember(Value = "Europe/Amsterdam")] +EuropeAmsterdam = 320, - [EnumMember(Value = "Pacific/Enderbury")] - PacificEnderbury = 397, +[EnumMember(Value = "Europe/Andorra")] +EuropeAndorra = 321, - [EnumMember(Value = "Pacific/Fakaofo")] - PacificFakaofo = 398, +[EnumMember(Value = "Europe/Astrakhan")] +EuropeAstrakhan = 322, - [EnumMember(Value = "Pacific/Fiji")] - PacificFiji = 399, +[EnumMember(Value = "Europe/Athens")] +EuropeAthens = 323, - [EnumMember(Value = "Pacific/Funafuti")] - PacificFunafuti = 400, +[EnumMember(Value = "Europe/Belgrade")] +EuropeBelgrade = 324, - [EnumMember(Value = "Pacific/Galapagos")] - PacificGalapagos = 401, +[EnumMember(Value = "Europe/Berlin")] +EuropeBerlin = 325, - [EnumMember(Value = "Pacific/Gambier")] - PacificGambier = 402, +[EnumMember(Value = "Europe/Bratislava")] +EuropeBratislava = 326, - [EnumMember(Value = "Pacific/Guadalcanal")] - PacificGuadalcanal = 403, +[EnumMember(Value = "Europe/Brussels")] +EuropeBrussels = 327, - [EnumMember(Value = "Pacific/Guam")] - PacificGuam = 404, +[EnumMember(Value = "Europe/Bucharest")] +EuropeBucharest = 328, - [EnumMember(Value = "Pacific/Honolulu")] - PacificHonolulu = 405, +[EnumMember(Value = "Europe/Budapest")] +EuropeBudapest = 329, - [EnumMember(Value = "Pacific/Johnston")] - PacificJohnston = 406, +[EnumMember(Value = "Europe/Busingen")] +EuropeBusingen = 330, - [EnumMember(Value = "Pacific/Kiritimati")] - PacificKiritimati = 407, +[EnumMember(Value = "Europe/Chisinau")] +EuropeChisinau = 331, - [EnumMember(Value = "Pacific/Kosrae")] - PacificKosrae = 408, +[EnumMember(Value = "Europe/Copenhagen")] +EuropeCopenhagen = 332, - [EnumMember(Value = "Pacific/Kwajalein")] - PacificKwajalein = 409, +[EnumMember(Value = "Europe/Dublin")] +EuropeDublin = 333, - [EnumMember(Value = "Pacific/Majuro")] - PacificMajuro = 410, +[EnumMember(Value = "Europe/Gibraltar")] +EuropeGibraltar = 334, - [EnumMember(Value = "Pacific/Marquesas")] - PacificMarquesas = 411, +[EnumMember(Value = "Europe/Guernsey")] +EuropeGuernsey = 335, - [EnumMember(Value = "Pacific/Midway")] - PacificMidway = 412, +[EnumMember(Value = "Europe/Helsinki")] +EuropeHelsinki = 336, - [EnumMember(Value = "Pacific/Nauru")] - PacificNauru = 413, +[EnumMember(Value = "Europe/Isle_of_Man")] +EuropeIsleOfMan = 337, - [EnumMember(Value = "Pacific/Niue")] - PacificNiue = 414, +[EnumMember(Value = "Europe/Istanbul")] +EuropeIstanbul = 338, - [EnumMember(Value = "Pacific/Norfolk")] - PacificNorfolk = 415, +[EnumMember(Value = "Europe/Jersey")] +EuropeJersey = 339, - [EnumMember(Value = "Pacific/Noumea")] - PacificNoumea = 416, +[EnumMember(Value = "Europe/Kaliningrad")] +EuropeKaliningrad = 340, - [EnumMember(Value = "Pacific/Pago_Pago")] - PacificPagoPago = 417, +[EnumMember(Value = "Europe/Kiev")] +EuropeKiev = 341, - [EnumMember(Value = "Pacific/Palau")] - PacificPalau = 418, +[EnumMember(Value = "Europe/Kirov")] +EuropeKirov = 342, - [EnumMember(Value = "Pacific/Pitcairn")] - PacificPitcairn = 419, +[EnumMember(Value = "Europe/Lisbon")] +EuropeLisbon = 343, - [EnumMember(Value = "Pacific/Ponape")] - PacificPonape = 420, +[EnumMember(Value = "Europe/Ljubljana")] +EuropeLjubljana = 344, - [EnumMember(Value = "Pacific/Port_Moresby")] - PacificPortMoresby = 421, +[EnumMember(Value = "Europe/London")] +EuropeLondon = 345, - [EnumMember(Value = "Pacific/Rarotonga")] - PacificRarotonga = 422, +[EnumMember(Value = "Europe/Luxembourg")] +EuropeLuxembourg = 346, - [EnumMember(Value = "Pacific/Saipan")] - PacificSaipan = 423, +[EnumMember(Value = "Europe/Madrid")] +EuropeMadrid = 347, - [EnumMember(Value = "Pacific/Tahiti")] - PacificTahiti = 424, +[EnumMember(Value = "Europe/Malta")] +EuropeMalta = 348, - [EnumMember(Value = "Pacific/Tarawa")] - PacificTarawa = 425, +[EnumMember(Value = "Europe/Mariehamn")] +EuropeMariehamn = 349, - [EnumMember(Value = "Pacific/Tongatapu")] - PacificTongatapu = 426, +[EnumMember(Value = "Europe/Minsk")] +EuropeMinsk = 350, - [EnumMember(Value = "Pacific/Truk")] - PacificTruk = 427, +[EnumMember(Value = "Europe/Monaco")] +EuropeMonaco = 351, - [EnumMember(Value = "Pacific/Wake")] - PacificWake = 428, +[EnumMember(Value = "Europe/Moscow")] +EuropeMoscow = 352, - [EnumMember(Value = "Pacific/Wallis")] - PacificWallis = 429, - } +[EnumMember(Value = "Europe/Oslo")] +EuropeOslo = 353, - /// - /// IANA timezone for the Schlage device - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public ReportProviderMetadataRequestDevicesSchlageMetadata.TimeZoneEnum? TimeZone { get; set; } +[EnumMember(Value = "Europe/Paris")] +EuropeParis = 354, - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); +[EnumMember(Value = "Europe/Podgorica")] +EuropePodgorica = 355, - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } +[EnumMember(Value = "Europe/Prague")] +EuropePrague = 356, - return stringWriter.ToString(); - } - } +[EnumMember(Value = "Europe/Riga")] +EuropeRiga = 357, - [DataContract(Name = "reportProviderMetadataRequestDevicesUltraloqMetadata_model")] - public class ReportProviderMetadataRequestDevicesUltraloqMetadata - { - [JsonConstructorAttribute] - protected ReportProviderMetadataRequestDevicesUltraloqMetadata() { } +[EnumMember(Value = "Europe/Rome")] +EuropeRome = 358, - public ReportProviderMetadataRequestDevicesUltraloqMetadata( - ReportProviderMetadataRequestDevicesUltraloqMetadata.TimeZoneEnum? timeZone = - default - ) - { - TimeZone = timeZone; - } +[EnumMember(Value = "Europe/Samara")] +EuropeSamara = 359, - /// - /// IANA timezone for the Ultraloq device - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TimeZoneEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "Europe/San_Marino")] +EuropeSanMarino = 360, - [EnumMember(Value = "Africa/Abidjan")] - AfricaAbidjan = 1, +[EnumMember(Value = "Europe/Sarajevo")] +EuropeSarajevo = 361, - [EnumMember(Value = "Africa/Accra")] - AfricaAccra = 2, +[EnumMember(Value = "Europe/Saratov")] +EuropeSaratov = 362, - [EnumMember(Value = "Africa/Addis_Ababa")] - AfricaAddisAbaba = 3, +[EnumMember(Value = "Europe/Simferopol")] +EuropeSimferopol = 363, - [EnumMember(Value = "Africa/Algiers")] - AfricaAlgiers = 4, +[EnumMember(Value = "Europe/Skopje")] +EuropeSkopje = 364, - [EnumMember(Value = "Africa/Asmera")] - AfricaAsmera = 5, +[EnumMember(Value = "Europe/Sofia")] +EuropeSofia = 365, - [EnumMember(Value = "Africa/Bamako")] - AfricaBamako = 6, +[EnumMember(Value = "Europe/Stockholm")] +EuropeStockholm = 366, - [EnumMember(Value = "Africa/Bangui")] - AfricaBangui = 7, +[EnumMember(Value = "Europe/Tallinn")] +EuropeTallinn = 367, - [EnumMember(Value = "Africa/Banjul")] - AfricaBanjul = 8, +[EnumMember(Value = "Europe/Tirane")] +EuropeTirane = 368, - [EnumMember(Value = "Africa/Bissau")] - AfricaBissau = 9, +[EnumMember(Value = "Europe/Ulyanovsk")] +EuropeUlyanovsk = 369, - [EnumMember(Value = "Africa/Blantyre")] - AfricaBlantyre = 10, +[EnumMember(Value = "Europe/Uzhgorod")] +EuropeUzhgorod = 370, - [EnumMember(Value = "Africa/Brazzaville")] - AfricaBrazzaville = 11, +[EnumMember(Value = "Europe/Vaduz")] +EuropeVaduz = 371, - [EnumMember(Value = "Africa/Bujumbura")] - AfricaBujumbura = 12, +[EnumMember(Value = "Europe/Vatican")] +EuropeVatican = 372, - [EnumMember(Value = "Africa/Cairo")] - AfricaCairo = 13, +[EnumMember(Value = "Europe/Vienna")] +EuropeVienna = 373, - [EnumMember(Value = "Africa/Casablanca")] - AfricaCasablanca = 14, +[EnumMember(Value = "Europe/Vilnius")] +EuropeVilnius = 374, - [EnumMember(Value = "Africa/Ceuta")] - AfricaCeuta = 15, +[EnumMember(Value = "Europe/Volgograd")] +EuropeVolgograd = 375, - [EnumMember(Value = "Africa/Conakry")] - AfricaConakry = 16, +[EnumMember(Value = "Europe/Warsaw")] +EuropeWarsaw = 376, - [EnumMember(Value = "Africa/Dakar")] - AfricaDakar = 17, +[EnumMember(Value = "Europe/Zagreb")] +EuropeZagreb = 377, - [EnumMember(Value = "Africa/Dar_es_Salaam")] - AfricaDarEsSalaam = 18, +[EnumMember(Value = "Europe/Zaporozhye")] +EuropeZaporozhye = 378, - [EnumMember(Value = "Africa/Djibouti")] - AfricaDjibouti = 19, +[EnumMember(Value = "Europe/Zurich")] +EuropeZurich = 379, - [EnumMember(Value = "Africa/Douala")] - AfricaDouala = 20, +[EnumMember(Value = "Indian/Antananarivo")] +IndianAntananarivo = 380, - [EnumMember(Value = "Africa/El_Aaiun")] - AfricaElAaiun = 21, +[EnumMember(Value = "Indian/Chagos")] +IndianChagos = 381, - [EnumMember(Value = "Africa/Freetown")] - AfricaFreetown = 22, +[EnumMember(Value = "Indian/Christmas")] +IndianChristmas = 382, - [EnumMember(Value = "Africa/Gaborone")] - AfricaGaborone = 23, +[EnumMember(Value = "Indian/Cocos")] +IndianCocos = 383, - [EnumMember(Value = "Africa/Harare")] - AfricaHarare = 24, +[EnumMember(Value = "Indian/Comoro")] +IndianComoro = 384, - [EnumMember(Value = "Africa/Johannesburg")] - AfricaJohannesburg = 25, +[EnumMember(Value = "Indian/Kerguelen")] +IndianKerguelen = 385, - [EnumMember(Value = "Africa/Juba")] - AfricaJuba = 26, +[EnumMember(Value = "Indian/Mahe")] +IndianMahe = 386, - [EnumMember(Value = "Africa/Kampala")] - AfricaKampala = 27, +[EnumMember(Value = "Indian/Maldives")] +IndianMaldives = 387, - [EnumMember(Value = "Africa/Khartoum")] - AfricaKhartoum = 28, +[EnumMember(Value = "Indian/Mauritius")] +IndianMauritius = 388, - [EnumMember(Value = "Africa/Kigali")] - AfricaKigali = 29, +[EnumMember(Value = "Indian/Mayotte")] +IndianMayotte = 389, - [EnumMember(Value = "Africa/Kinshasa")] - AfricaKinshasa = 30, +[EnumMember(Value = "Indian/Reunion")] +IndianReunion = 390, - [EnumMember(Value = "Africa/Lagos")] - AfricaLagos = 31, +[EnumMember(Value = "Pacific/Apia")] +PacificApia = 391, - [EnumMember(Value = "Africa/Libreville")] - AfricaLibreville = 32, +[EnumMember(Value = "Pacific/Auckland")] +PacificAuckland = 392, - [EnumMember(Value = "Africa/Lome")] - AfricaLome = 33, +[EnumMember(Value = "Pacific/Bougainville")] +PacificBougainville = 393, - [EnumMember(Value = "Africa/Luanda")] - AfricaLuanda = 34, +[EnumMember(Value = "Pacific/Chatham")] +PacificChatham = 394, - [EnumMember(Value = "Africa/Lubumbashi")] - AfricaLubumbashi = 35, +[EnumMember(Value = "Pacific/Easter")] +PacificEaster = 395, - [EnumMember(Value = "Africa/Lusaka")] - AfricaLusaka = 36, +[EnumMember(Value = "Pacific/Efate")] +PacificEfate = 396, - [EnumMember(Value = "Africa/Malabo")] - AfricaMalabo = 37, +[EnumMember(Value = "Pacific/Enderbury")] +PacificEnderbury = 397, - [EnumMember(Value = "Africa/Maputo")] - AfricaMaputo = 38, +[EnumMember(Value = "Pacific/Fakaofo")] +PacificFakaofo = 398, - [EnumMember(Value = "Africa/Maseru")] - AfricaMaseru = 39, +[EnumMember(Value = "Pacific/Fiji")] +PacificFiji = 399, - [EnumMember(Value = "Africa/Mbabane")] - AfricaMbabane = 40, +[EnumMember(Value = "Pacific/Funafuti")] +PacificFunafuti = 400, - [EnumMember(Value = "Africa/Mogadishu")] - AfricaMogadishu = 41, +[EnumMember(Value = "Pacific/Galapagos")] +PacificGalapagos = 401, - [EnumMember(Value = "Africa/Monrovia")] - AfricaMonrovia = 42, +[EnumMember(Value = "Pacific/Gambier")] +PacificGambier = 402, - [EnumMember(Value = "Africa/Nairobi")] - AfricaNairobi = 43, +[EnumMember(Value = "Pacific/Guadalcanal")] +PacificGuadalcanal = 403, - [EnumMember(Value = "Africa/Ndjamena")] - AfricaNdjamena = 44, +[EnumMember(Value = "Pacific/Guam")] +PacificGuam = 404, - [EnumMember(Value = "Africa/Niamey")] - AfricaNiamey = 45, +[EnumMember(Value = "Pacific/Honolulu")] +PacificHonolulu = 405, - [EnumMember(Value = "Africa/Nouakchott")] - AfricaNouakchott = 46, +[EnumMember(Value = "Pacific/Johnston")] +PacificJohnston = 406, - [EnumMember(Value = "Africa/Ouagadougou")] - AfricaOuagadougou = 47, +[EnumMember(Value = "Pacific/Kiritimati")] +PacificKiritimati = 407, - [EnumMember(Value = "Africa/Porto-Novo")] - AfricaPortoNovo = 48, +[EnumMember(Value = "Pacific/Kosrae")] +PacificKosrae = 408, - [EnumMember(Value = "Africa/Sao_Tome")] - AfricaSaoTome = 49, +[EnumMember(Value = "Pacific/Kwajalein")] +PacificKwajalein = 409, - [EnumMember(Value = "Africa/Tripoli")] - AfricaTripoli = 50, +[EnumMember(Value = "Pacific/Majuro")] +PacificMajuro = 410, - [EnumMember(Value = "Africa/Tunis")] - AfricaTunis = 51, +[EnumMember(Value = "Pacific/Marquesas")] +PacificMarquesas = 411, - [EnumMember(Value = "Africa/Windhoek")] - AfricaWindhoek = 52, +[EnumMember(Value = "Pacific/Midway")] +PacificMidway = 412, - [EnumMember(Value = "America/Adak")] - AmericaAdak = 53, +[EnumMember(Value = "Pacific/Nauru")] +PacificNauru = 413, - [EnumMember(Value = "America/Anchorage")] - AmericaAnchorage = 54, +[EnumMember(Value = "Pacific/Niue")] +PacificNiue = 414, - [EnumMember(Value = "America/Anguilla")] - AmericaAnguilla = 55, +[EnumMember(Value = "Pacific/Norfolk")] +PacificNorfolk = 415, - [EnumMember(Value = "America/Antigua")] - AmericaAntigua = 56, +[EnumMember(Value = "Pacific/Noumea")] +PacificNoumea = 416, - [EnumMember(Value = "America/Araguaina")] - AmericaAraguaina = 57, +[EnumMember(Value = "Pacific/Pago_Pago")] +PacificPagoPago = 417, - [EnumMember(Value = "America/Argentina/La_Rioja")] - AmericaArgentinaLaRioja = 58, +[EnumMember(Value = "Pacific/Palau")] +PacificPalau = 418, - [EnumMember(Value = "America/Argentina/Rio_Gallegos")] - AmericaArgentinaRioGallegos = 59, +[EnumMember(Value = "Pacific/Pitcairn")] +PacificPitcairn = 419, - [EnumMember(Value = "America/Argentina/Salta")] - AmericaArgentinaSalta = 60, +[EnumMember(Value = "Pacific/Ponape")] +PacificPonape = 420, - [EnumMember(Value = "America/Argentina/San_Juan")] - AmericaArgentinaSanJuan = 61, +[EnumMember(Value = "Pacific/Port_Moresby")] +PacificPortMoresby = 421, - [EnumMember(Value = "America/Argentina/San_Luis")] - AmericaArgentinaSanLuis = 62, +[EnumMember(Value = "Pacific/Rarotonga")] +PacificRarotonga = 422, - [EnumMember(Value = "America/Argentina/Tucuman")] - AmericaArgentinaTucuman = 63, +[EnumMember(Value = "Pacific/Saipan")] +PacificSaipan = 423, - [EnumMember(Value = "America/Argentina/Ushuaia")] - AmericaArgentinaUshuaia = 64, +[EnumMember(Value = "Pacific/Tahiti")] +PacificTahiti = 424, - [EnumMember(Value = "America/Aruba")] - AmericaAruba = 65, +[EnumMember(Value = "Pacific/Tarawa")] +PacificTarawa = 425, - [EnumMember(Value = "America/Asuncion")] - AmericaAsuncion = 66, +[EnumMember(Value = "Pacific/Tongatapu")] +PacificTongatapu = 426, - [EnumMember(Value = "America/Bahia")] - AmericaBahia = 67, +[EnumMember(Value = "Pacific/Truk")] +PacificTruk = 427, - [EnumMember(Value = "America/Bahia_Banderas")] - AmericaBahiaBanderas = 68, +[EnumMember(Value = "Pacific/Wake")] +PacificWake = 428, - [EnumMember(Value = "America/Barbados")] - AmericaBarbados = 69, +[EnumMember(Value = "Pacific/Wallis")] +PacificWallis = 429, +} - [EnumMember(Value = "America/Belem")] - AmericaBelem = 70, +/// +/// IANA timezone for the Schlage device +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public ReportProviderMetadataRequestDevicesSchlageMetadata.TimeZoneEnum? TimeZone { get; set; } - [EnumMember(Value = "America/Belize")] - AmericaBelize = 71, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "America/Blanc-Sablon")] - AmericaBlancSablon = 72, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "America/Boa_Vista")] - AmericaBoaVista = 73, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "America/Bogota")] - AmericaBogota = 74, +[DataContract(Name = "reportProviderMetadataRequestDevicesUltraloqMetadata_model")] +public class ReportProviderMetadataRequestDevicesUltraloqMetadata +{ +[JsonConstructorAttribute] +protected ReportProviderMetadataRequestDevicesUltraloqMetadata() { } - [EnumMember(Value = "America/Boise")] - AmericaBoise = 75, +public ReportProviderMetadataRequestDevicesUltraloqMetadata(ReportProviderMetadataRequestDevicesUltraloqMetadata.TimeZoneEnum? timeZone = default) +{ +TimeZone = timeZone; +} - [EnumMember(Value = "America/Buenos_Aires")] - AmericaBuenosAires = 76, +/// +/// IANA timezone for the Ultraloq device +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TimeZoneEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "America/Cambridge_Bay")] - AmericaCambridgeBay = 77, +[EnumMember(Value = "Africa/Abidjan")] +AfricaAbidjan = 1, - [EnumMember(Value = "America/Campo_Grande")] - AmericaCampoGrande = 78, +[EnumMember(Value = "Africa/Accra")] +AfricaAccra = 2, - [EnumMember(Value = "America/Cancun")] - AmericaCancun = 79, +[EnumMember(Value = "Africa/Addis_Ababa")] +AfricaAddisAbaba = 3, - [EnumMember(Value = "America/Caracas")] - AmericaCaracas = 80, +[EnumMember(Value = "Africa/Algiers")] +AfricaAlgiers = 4, - [EnumMember(Value = "America/Catamarca")] - AmericaCatamarca = 81, +[EnumMember(Value = "Africa/Asmera")] +AfricaAsmera = 5, - [EnumMember(Value = "America/Cayenne")] - AmericaCayenne = 82, +[EnumMember(Value = "Africa/Bamako")] +AfricaBamako = 6, - [EnumMember(Value = "America/Cayman")] - AmericaCayman = 83, +[EnumMember(Value = "Africa/Bangui")] +AfricaBangui = 7, - [EnumMember(Value = "America/Chicago")] - AmericaChicago = 84, +[EnumMember(Value = "Africa/Banjul")] +AfricaBanjul = 8, - [EnumMember(Value = "America/Chihuahua")] - AmericaChihuahua = 85, +[EnumMember(Value = "Africa/Bissau")] +AfricaBissau = 9, - [EnumMember(Value = "America/Ciudad_Juarez")] - AmericaCiudadJuarez = 86, +[EnumMember(Value = "Africa/Blantyre")] +AfricaBlantyre = 10, - [EnumMember(Value = "America/Coral_Harbour")] - AmericaCoralHarbour = 87, +[EnumMember(Value = "Africa/Brazzaville")] +AfricaBrazzaville = 11, - [EnumMember(Value = "America/Cordoba")] - AmericaCordoba = 88, +[EnumMember(Value = "Africa/Bujumbura")] +AfricaBujumbura = 12, - [EnumMember(Value = "America/Costa_Rica")] - AmericaCostaRica = 89, +[EnumMember(Value = "Africa/Cairo")] +AfricaCairo = 13, - [EnumMember(Value = "America/Creston")] - AmericaCreston = 90, +[EnumMember(Value = "Africa/Casablanca")] +AfricaCasablanca = 14, - [EnumMember(Value = "America/Cuiaba")] - AmericaCuiaba = 91, +[EnumMember(Value = "Africa/Ceuta")] +AfricaCeuta = 15, - [EnumMember(Value = "America/Curacao")] - AmericaCuracao = 92, +[EnumMember(Value = "Africa/Conakry")] +AfricaConakry = 16, - [EnumMember(Value = "America/Danmarkshavn")] - AmericaDanmarkshavn = 93, +[EnumMember(Value = "Africa/Dakar")] +AfricaDakar = 17, - [EnumMember(Value = "America/Dawson")] - AmericaDawson = 94, +[EnumMember(Value = "Africa/Dar_es_Salaam")] +AfricaDarEsSalaam = 18, - [EnumMember(Value = "America/Dawson_Creek")] - AmericaDawsonCreek = 95, +[EnumMember(Value = "Africa/Djibouti")] +AfricaDjibouti = 19, - [EnumMember(Value = "America/Denver")] - AmericaDenver = 96, +[EnumMember(Value = "Africa/Douala")] +AfricaDouala = 20, - [EnumMember(Value = "America/Detroit")] - AmericaDetroit = 97, +[EnumMember(Value = "Africa/El_Aaiun")] +AfricaElAaiun = 21, - [EnumMember(Value = "America/Dominica")] - AmericaDominica = 98, +[EnumMember(Value = "Africa/Freetown")] +AfricaFreetown = 22, - [EnumMember(Value = "America/Edmonton")] - AmericaEdmonton = 99, +[EnumMember(Value = "Africa/Gaborone")] +AfricaGaborone = 23, - [EnumMember(Value = "America/Eirunepe")] - AmericaEirunepe = 100, +[EnumMember(Value = "Africa/Harare")] +AfricaHarare = 24, - [EnumMember(Value = "America/El_Salvador")] - AmericaElSalvador = 101, +[EnumMember(Value = "Africa/Johannesburg")] +AfricaJohannesburg = 25, - [EnumMember(Value = "America/Fort_Nelson")] - AmericaFortNelson = 102, +[EnumMember(Value = "Africa/Juba")] +AfricaJuba = 26, - [EnumMember(Value = "America/Fortaleza")] - AmericaFortaleza = 103, +[EnumMember(Value = "Africa/Kampala")] +AfricaKampala = 27, - [EnumMember(Value = "America/Glace_Bay")] - AmericaGlaceBay = 104, +[EnumMember(Value = "Africa/Khartoum")] +AfricaKhartoum = 28, - [EnumMember(Value = "America/Godthab")] - AmericaGodthab = 105, +[EnumMember(Value = "Africa/Kigali")] +AfricaKigali = 29, - [EnumMember(Value = "America/Goose_Bay")] - AmericaGooseBay = 106, +[EnumMember(Value = "Africa/Kinshasa")] +AfricaKinshasa = 30, - [EnumMember(Value = "America/Grand_Turk")] - AmericaGrandTurk = 107, +[EnumMember(Value = "Africa/Lagos")] +AfricaLagos = 31, - [EnumMember(Value = "America/Grenada")] - AmericaGrenada = 108, +[EnumMember(Value = "Africa/Libreville")] +AfricaLibreville = 32, - [EnumMember(Value = "America/Guadeloupe")] - AmericaGuadeloupe = 109, +[EnumMember(Value = "Africa/Lome")] +AfricaLome = 33, - [EnumMember(Value = "America/Guatemala")] - AmericaGuatemala = 110, +[EnumMember(Value = "Africa/Luanda")] +AfricaLuanda = 34, - [EnumMember(Value = "America/Guayaquil")] - AmericaGuayaquil = 111, +[EnumMember(Value = "Africa/Lubumbashi")] +AfricaLubumbashi = 35, - [EnumMember(Value = "America/Guyana")] - AmericaGuyana = 112, +[EnumMember(Value = "Africa/Lusaka")] +AfricaLusaka = 36, - [EnumMember(Value = "America/Halifax")] - AmericaHalifax = 113, +[EnumMember(Value = "Africa/Malabo")] +AfricaMalabo = 37, - [EnumMember(Value = "America/Havana")] - AmericaHavana = 114, +[EnumMember(Value = "Africa/Maputo")] +AfricaMaputo = 38, - [EnumMember(Value = "America/Hermosillo")] - AmericaHermosillo = 115, +[EnumMember(Value = "Africa/Maseru")] +AfricaMaseru = 39, - [EnumMember(Value = "America/Indiana/Knox")] - AmericaIndianaKnox = 116, +[EnumMember(Value = "Africa/Mbabane")] +AfricaMbabane = 40, - [EnumMember(Value = "America/Indiana/Marengo")] - AmericaIndianaMarengo = 117, +[EnumMember(Value = "Africa/Mogadishu")] +AfricaMogadishu = 41, - [EnumMember(Value = "America/Indiana/Petersburg")] - AmericaIndianaPetersburg = 118, +[EnumMember(Value = "Africa/Monrovia")] +AfricaMonrovia = 42, - [EnumMember(Value = "America/Indiana/Tell_City")] - AmericaIndianaTellCity = 119, +[EnumMember(Value = "Africa/Nairobi")] +AfricaNairobi = 43, - [EnumMember(Value = "America/Indiana/Vevay")] - AmericaIndianaVevay = 120, +[EnumMember(Value = "Africa/Ndjamena")] +AfricaNdjamena = 44, - [EnumMember(Value = "America/Indiana/Vincennes")] - AmericaIndianaVincennes = 121, +[EnumMember(Value = "Africa/Niamey")] +AfricaNiamey = 45, - [EnumMember(Value = "America/Indiana/Winamac")] - AmericaIndianaWinamac = 122, +[EnumMember(Value = "Africa/Nouakchott")] +AfricaNouakchott = 46, - [EnumMember(Value = "America/Indianapolis")] - AmericaIndianapolis = 123, +[EnumMember(Value = "Africa/Ouagadougou")] +AfricaOuagadougou = 47, - [EnumMember(Value = "America/Inuvik")] - AmericaInuvik = 124, +[EnumMember(Value = "Africa/Porto-Novo")] +AfricaPortoNovo = 48, - [EnumMember(Value = "America/Iqaluit")] - AmericaIqaluit = 125, +[EnumMember(Value = "Africa/Sao_Tome")] +AfricaSaoTome = 49, - [EnumMember(Value = "America/Jamaica")] - AmericaJamaica = 126, +[EnumMember(Value = "Africa/Tripoli")] +AfricaTripoli = 50, - [EnumMember(Value = "America/Jujuy")] - AmericaJujuy = 127, +[EnumMember(Value = "Africa/Tunis")] +AfricaTunis = 51, - [EnumMember(Value = "America/Juneau")] - AmericaJuneau = 128, +[EnumMember(Value = "Africa/Windhoek")] +AfricaWindhoek = 52, - [EnumMember(Value = "America/Kentucky/Monticello")] - AmericaKentuckyMonticello = 129, +[EnumMember(Value = "America/Adak")] +AmericaAdak = 53, - [EnumMember(Value = "America/Kralendijk")] - AmericaKralendijk = 130, +[EnumMember(Value = "America/Anchorage")] +AmericaAnchorage = 54, - [EnumMember(Value = "America/La_Paz")] - AmericaLaPaz = 131, +[EnumMember(Value = "America/Anguilla")] +AmericaAnguilla = 55, - [EnumMember(Value = "America/Lima")] - AmericaLima = 132, +[EnumMember(Value = "America/Antigua")] +AmericaAntigua = 56, - [EnumMember(Value = "America/Los_Angeles")] - AmericaLosAngeles = 133, +[EnumMember(Value = "America/Araguaina")] +AmericaAraguaina = 57, - [EnumMember(Value = "America/Louisville")] - AmericaLouisville = 134, +[EnumMember(Value = "America/Argentina/La_Rioja")] +AmericaArgentinaLaRioja = 58, - [EnumMember(Value = "America/Lower_Princes")] - AmericaLowerPrinces = 135, +[EnumMember(Value = "America/Argentina/Rio_Gallegos")] +AmericaArgentinaRioGallegos = 59, - [EnumMember(Value = "America/Maceio")] - AmericaMaceio = 136, +[EnumMember(Value = "America/Argentina/Salta")] +AmericaArgentinaSalta = 60, - [EnumMember(Value = "America/Managua")] - AmericaManagua = 137, +[EnumMember(Value = "America/Argentina/San_Juan")] +AmericaArgentinaSanJuan = 61, - [EnumMember(Value = "America/Manaus")] - AmericaManaus = 138, +[EnumMember(Value = "America/Argentina/San_Luis")] +AmericaArgentinaSanLuis = 62, - [EnumMember(Value = "America/Marigot")] - AmericaMarigot = 139, +[EnumMember(Value = "America/Argentina/Tucuman")] +AmericaArgentinaTucuman = 63, - [EnumMember(Value = "America/Martinique")] - AmericaMartinique = 140, +[EnumMember(Value = "America/Argentina/Ushuaia")] +AmericaArgentinaUshuaia = 64, - [EnumMember(Value = "America/Matamoros")] - AmericaMatamoros = 141, +[EnumMember(Value = "America/Aruba")] +AmericaAruba = 65, - [EnumMember(Value = "America/Mazatlan")] - AmericaMazatlan = 142, +[EnumMember(Value = "America/Asuncion")] +AmericaAsuncion = 66, - [EnumMember(Value = "America/Mendoza")] - AmericaMendoza = 143, +[EnumMember(Value = "America/Bahia")] +AmericaBahia = 67, - [EnumMember(Value = "America/Menominee")] - AmericaMenominee = 144, +[EnumMember(Value = "America/Bahia_Banderas")] +AmericaBahiaBanderas = 68, - [EnumMember(Value = "America/Merida")] - AmericaMerida = 145, +[EnumMember(Value = "America/Barbados")] +AmericaBarbados = 69, - [EnumMember(Value = "America/Metlakatla")] - AmericaMetlakatla = 146, +[EnumMember(Value = "America/Belem")] +AmericaBelem = 70, - [EnumMember(Value = "America/Mexico_City")] - AmericaMexicoCity = 147, +[EnumMember(Value = "America/Belize")] +AmericaBelize = 71, - [EnumMember(Value = "America/Miquelon")] - AmericaMiquelon = 148, +[EnumMember(Value = "America/Blanc-Sablon")] +AmericaBlancSablon = 72, - [EnumMember(Value = "America/Moncton")] - AmericaMoncton = 149, +[EnumMember(Value = "America/Boa_Vista")] +AmericaBoaVista = 73, - [EnumMember(Value = "America/Monterrey")] - AmericaMonterrey = 150, +[EnumMember(Value = "America/Bogota")] +AmericaBogota = 74, - [EnumMember(Value = "America/Montevideo")] - AmericaMontevideo = 151, +[EnumMember(Value = "America/Boise")] +AmericaBoise = 75, - [EnumMember(Value = "America/Montreal")] - AmericaMontreal = 152, +[EnumMember(Value = "America/Buenos_Aires")] +AmericaBuenosAires = 76, - [EnumMember(Value = "America/Montserrat")] - AmericaMontserrat = 153, +[EnumMember(Value = "America/Cambridge_Bay")] +AmericaCambridgeBay = 77, - [EnumMember(Value = "America/Nassau")] - AmericaNassau = 154, +[EnumMember(Value = "America/Campo_Grande")] +AmericaCampoGrande = 78, - [EnumMember(Value = "America/New_York")] - AmericaNewYork = 155, +[EnumMember(Value = "America/Cancun")] +AmericaCancun = 79, - [EnumMember(Value = "America/Nipigon")] - AmericaNipigon = 156, +[EnumMember(Value = "America/Caracas")] +AmericaCaracas = 80, - [EnumMember(Value = "America/Nome")] - AmericaNome = 157, +[EnumMember(Value = "America/Catamarca")] +AmericaCatamarca = 81, - [EnumMember(Value = "America/Noronha")] - AmericaNoronha = 158, +[EnumMember(Value = "America/Cayenne")] +AmericaCayenne = 82, - [EnumMember(Value = "America/North_Dakota/Beulah")] - AmericaNorthDakotaBeulah = 159, +[EnumMember(Value = "America/Cayman")] +AmericaCayman = 83, - [EnumMember(Value = "America/North_Dakota/Center")] - AmericaNorthDakotaCenter = 160, +[EnumMember(Value = "America/Chicago")] +AmericaChicago = 84, - [EnumMember(Value = "America/North_Dakota/New_Salem")] - AmericaNorthDakotaNewSalem = 161, +[EnumMember(Value = "America/Chihuahua")] +AmericaChihuahua = 85, - [EnumMember(Value = "America/Ojinaga")] - AmericaOjinaga = 162, +[EnumMember(Value = "America/Ciudad_Juarez")] +AmericaCiudadJuarez = 86, - [EnumMember(Value = "America/Panama")] - AmericaPanama = 163, +[EnumMember(Value = "America/Coral_Harbour")] +AmericaCoralHarbour = 87, - [EnumMember(Value = "America/Pangnirtung")] - AmericaPangnirtung = 164, +[EnumMember(Value = "America/Cordoba")] +AmericaCordoba = 88, - [EnumMember(Value = "America/Paramaribo")] - AmericaParamaribo = 165, +[EnumMember(Value = "America/Costa_Rica")] +AmericaCostaRica = 89, - [EnumMember(Value = "America/Phoenix")] - AmericaPhoenix = 166, +[EnumMember(Value = "America/Creston")] +AmericaCreston = 90, - [EnumMember(Value = "America/Port-au-Prince")] - AmericaPortAuPrince = 167, +[EnumMember(Value = "America/Cuiaba")] +AmericaCuiaba = 91, - [EnumMember(Value = "America/Port_of_Spain")] - AmericaPortOfSpain = 168, +[EnumMember(Value = "America/Curacao")] +AmericaCuracao = 92, - [EnumMember(Value = "America/Porto_Velho")] - AmericaPortoVelho = 169, +[EnumMember(Value = "America/Danmarkshavn")] +AmericaDanmarkshavn = 93, - [EnumMember(Value = "America/Puerto_Rico")] - AmericaPuertoRico = 170, +[EnumMember(Value = "America/Dawson")] +AmericaDawson = 94, - [EnumMember(Value = "America/Punta_Arenas")] - AmericaPuntaArenas = 171, +[EnumMember(Value = "America/Dawson_Creek")] +AmericaDawsonCreek = 95, - [EnumMember(Value = "America/Rainy_River")] - AmericaRainyRiver = 172, +[EnumMember(Value = "America/Denver")] +AmericaDenver = 96, - [EnumMember(Value = "America/Rankin_Inlet")] - AmericaRankinInlet = 173, +[EnumMember(Value = "America/Detroit")] +AmericaDetroit = 97, - [EnumMember(Value = "America/Recife")] - AmericaRecife = 174, +[EnumMember(Value = "America/Dominica")] +AmericaDominica = 98, - [EnumMember(Value = "America/Regina")] - AmericaRegina = 175, +[EnumMember(Value = "America/Edmonton")] +AmericaEdmonton = 99, - [EnumMember(Value = "America/Resolute")] - AmericaResolute = 176, +[EnumMember(Value = "America/Eirunepe")] +AmericaEirunepe = 100, - [EnumMember(Value = "America/Rio_Branco")] - AmericaRioBranco = 177, +[EnumMember(Value = "America/El_Salvador")] +AmericaElSalvador = 101, - [EnumMember(Value = "America/Santa_Isabel")] - AmericaSantaIsabel = 178, +[EnumMember(Value = "America/Fort_Nelson")] +AmericaFortNelson = 102, - [EnumMember(Value = "America/Santarem")] - AmericaSantarem = 179, +[EnumMember(Value = "America/Fortaleza")] +AmericaFortaleza = 103, - [EnumMember(Value = "America/Santiago")] - AmericaSantiago = 180, +[EnumMember(Value = "America/Glace_Bay")] +AmericaGlaceBay = 104, - [EnumMember(Value = "America/Santo_Domingo")] - AmericaSantoDomingo = 181, +[EnumMember(Value = "America/Godthab")] +AmericaGodthab = 105, - [EnumMember(Value = "America/Sao_Paulo")] - AmericaSaoPaulo = 182, +[EnumMember(Value = "America/Goose_Bay")] +AmericaGooseBay = 106, - [EnumMember(Value = "America/Scoresbysund")] - AmericaScoresbysund = 183, +[EnumMember(Value = "America/Grand_Turk")] +AmericaGrandTurk = 107, - [EnumMember(Value = "America/Sitka")] - AmericaSitka = 184, +[EnumMember(Value = "America/Grenada")] +AmericaGrenada = 108, - [EnumMember(Value = "America/St_Barthelemy")] - AmericaStBarthelemy = 185, +[EnumMember(Value = "America/Guadeloupe")] +AmericaGuadeloupe = 109, - [EnumMember(Value = "America/St_Johns")] - AmericaStJohns = 186, +[EnumMember(Value = "America/Guatemala")] +AmericaGuatemala = 110, - [EnumMember(Value = "America/St_Kitts")] - AmericaStKitts = 187, +[EnumMember(Value = "America/Guayaquil")] +AmericaGuayaquil = 111, - [EnumMember(Value = "America/St_Lucia")] - AmericaStLucia = 188, +[EnumMember(Value = "America/Guyana")] +AmericaGuyana = 112, - [EnumMember(Value = "America/St_Thomas")] - AmericaStThomas = 189, +[EnumMember(Value = "America/Halifax")] +AmericaHalifax = 113, - [EnumMember(Value = "America/St_Vincent")] - AmericaStVincent = 190, +[EnumMember(Value = "America/Havana")] +AmericaHavana = 114, - [EnumMember(Value = "America/Swift_Current")] - AmericaSwiftCurrent = 191, +[EnumMember(Value = "America/Hermosillo")] +AmericaHermosillo = 115, - [EnumMember(Value = "America/Tegucigalpa")] - AmericaTegucigalpa = 192, +[EnumMember(Value = "America/Indiana/Knox")] +AmericaIndianaKnox = 116, - [EnumMember(Value = "America/Thule")] - AmericaThule = 193, +[EnumMember(Value = "America/Indiana/Marengo")] +AmericaIndianaMarengo = 117, - [EnumMember(Value = "America/Thunder_Bay")] - AmericaThunderBay = 194, +[EnumMember(Value = "America/Indiana/Petersburg")] +AmericaIndianaPetersburg = 118, - [EnumMember(Value = "America/Tijuana")] - AmericaTijuana = 195, +[EnumMember(Value = "America/Indiana/Tell_City")] +AmericaIndianaTellCity = 119, - [EnumMember(Value = "America/Toronto")] - AmericaToronto = 196, +[EnumMember(Value = "America/Indiana/Vevay")] +AmericaIndianaVevay = 120, - [EnumMember(Value = "America/Tortola")] - AmericaTortola = 197, +[EnumMember(Value = "America/Indiana/Vincennes")] +AmericaIndianaVincennes = 121, - [EnumMember(Value = "America/Vancouver")] - AmericaVancouver = 198, +[EnumMember(Value = "America/Indiana/Winamac")] +AmericaIndianaWinamac = 122, - [EnumMember(Value = "America/Whitehorse")] - AmericaWhitehorse = 199, +[EnumMember(Value = "America/Indianapolis")] +AmericaIndianapolis = 123, - [EnumMember(Value = "America/Winnipeg")] - AmericaWinnipeg = 200, +[EnumMember(Value = "America/Inuvik")] +AmericaInuvik = 124, - [EnumMember(Value = "America/Yakutat")] - AmericaYakutat = 201, +[EnumMember(Value = "America/Iqaluit")] +AmericaIqaluit = 125, - [EnumMember(Value = "America/Yellowknife")] - AmericaYellowknife = 202, +[EnumMember(Value = "America/Jamaica")] +AmericaJamaica = 126, - [EnumMember(Value = "Antarctica/Casey")] - AntarcticaCasey = 203, +[EnumMember(Value = "America/Jujuy")] +AmericaJujuy = 127, - [EnumMember(Value = "Antarctica/Davis")] - AntarcticaDavis = 204, +[EnumMember(Value = "America/Juneau")] +AmericaJuneau = 128, - [EnumMember(Value = "Antarctica/DumontDUrville")] - AntarcticaDumontDUrville = 205, +[EnumMember(Value = "America/Kentucky/Monticello")] +AmericaKentuckyMonticello = 129, - [EnumMember(Value = "Antarctica/Macquarie")] - AntarcticaMacquarie = 206, +[EnumMember(Value = "America/Kralendijk")] +AmericaKralendijk = 130, - [EnumMember(Value = "Antarctica/Mawson")] - AntarcticaMawson = 207, +[EnumMember(Value = "America/La_Paz")] +AmericaLaPaz = 131, - [EnumMember(Value = "Antarctica/McMurdo")] - AntarcticaMcMurdo = 208, +[EnumMember(Value = "America/Lima")] +AmericaLima = 132, - [EnumMember(Value = "Antarctica/Palmer")] - AntarcticaPalmer = 209, +[EnumMember(Value = "America/Los_Angeles")] +AmericaLosAngeles = 133, - [EnumMember(Value = "Antarctica/Rothera")] - AntarcticaRothera = 210, +[EnumMember(Value = "America/Louisville")] +AmericaLouisville = 134, - [EnumMember(Value = "Antarctica/Syowa")] - AntarcticaSyowa = 211, +[EnumMember(Value = "America/Lower_Princes")] +AmericaLowerPrinces = 135, - [EnumMember(Value = "Antarctica/Troll")] - AntarcticaTroll = 212, +[EnumMember(Value = "America/Maceio")] +AmericaMaceio = 136, - [EnumMember(Value = "Antarctica/Vostok")] - AntarcticaVostok = 213, +[EnumMember(Value = "America/Managua")] +AmericaManagua = 137, - [EnumMember(Value = "Arctic/Longyearbyen")] - ArcticLongyearbyen = 214, +[EnumMember(Value = "America/Manaus")] +AmericaManaus = 138, - [EnumMember(Value = "Asia/Aden")] - AsiaAden = 215, +[EnumMember(Value = "America/Marigot")] +AmericaMarigot = 139, - [EnumMember(Value = "Asia/Almaty")] - AsiaAlmaty = 216, +[EnumMember(Value = "America/Martinique")] +AmericaMartinique = 140, - [EnumMember(Value = "Asia/Amman")] - AsiaAmman = 217, +[EnumMember(Value = "America/Matamoros")] +AmericaMatamoros = 141, - [EnumMember(Value = "Asia/Anadyr")] - AsiaAnadyr = 218, +[EnumMember(Value = "America/Mazatlan")] +AmericaMazatlan = 142, - [EnumMember(Value = "Asia/Aqtau")] - AsiaAqtau = 219, +[EnumMember(Value = "America/Mendoza")] +AmericaMendoza = 143, - [EnumMember(Value = "Asia/Aqtobe")] - AsiaAqtobe = 220, +[EnumMember(Value = "America/Menominee")] +AmericaMenominee = 144, - [EnumMember(Value = "Asia/Ashgabat")] - AsiaAshgabat = 221, +[EnumMember(Value = "America/Merida")] +AmericaMerida = 145, - [EnumMember(Value = "Asia/Atyrau")] - AsiaAtyrau = 222, +[EnumMember(Value = "America/Metlakatla")] +AmericaMetlakatla = 146, - [EnumMember(Value = "Asia/Baghdad")] - AsiaBaghdad = 223, +[EnumMember(Value = "America/Mexico_City")] +AmericaMexicoCity = 147, - [EnumMember(Value = "Asia/Bahrain")] - AsiaBahrain = 224, +[EnumMember(Value = "America/Miquelon")] +AmericaMiquelon = 148, - [EnumMember(Value = "Asia/Baku")] - AsiaBaku = 225, +[EnumMember(Value = "America/Moncton")] +AmericaMoncton = 149, - [EnumMember(Value = "Asia/Bangkok")] - AsiaBangkok = 226, +[EnumMember(Value = "America/Monterrey")] +AmericaMonterrey = 150, - [EnumMember(Value = "Asia/Barnaul")] - AsiaBarnaul = 227, +[EnumMember(Value = "America/Montevideo")] +AmericaMontevideo = 151, - [EnumMember(Value = "Asia/Beirut")] - AsiaBeirut = 228, +[EnumMember(Value = "America/Montreal")] +AmericaMontreal = 152, - [EnumMember(Value = "Asia/Bishkek")] - AsiaBishkek = 229, +[EnumMember(Value = "America/Montserrat")] +AmericaMontserrat = 153, - [EnumMember(Value = "Asia/Brunei")] - AsiaBrunei = 230, +[EnumMember(Value = "America/Nassau")] +AmericaNassau = 154, - [EnumMember(Value = "Asia/Calcutta")] - AsiaCalcutta = 231, +[EnumMember(Value = "America/New_York")] +AmericaNewYork = 155, - [EnumMember(Value = "Asia/Chita")] - AsiaChita = 232, +[EnumMember(Value = "America/Nipigon")] +AmericaNipigon = 156, - [EnumMember(Value = "Asia/Choibalsan")] - AsiaChoibalsan = 233, +[EnumMember(Value = "America/Nome")] +AmericaNome = 157, - [EnumMember(Value = "Asia/Colombo")] - AsiaColombo = 234, +[EnumMember(Value = "America/Noronha")] +AmericaNoronha = 158, - [EnumMember(Value = "Asia/Damascus")] - AsiaDamascus = 235, +[EnumMember(Value = "America/North_Dakota/Beulah")] +AmericaNorthDakotaBeulah = 159, - [EnumMember(Value = "Asia/Dhaka")] - AsiaDhaka = 236, +[EnumMember(Value = "America/North_Dakota/Center")] +AmericaNorthDakotaCenter = 160, - [EnumMember(Value = "Asia/Dili")] - AsiaDili = 237, +[EnumMember(Value = "America/North_Dakota/New_Salem")] +AmericaNorthDakotaNewSalem = 161, - [EnumMember(Value = "Asia/Dubai")] - AsiaDubai = 238, +[EnumMember(Value = "America/Ojinaga")] +AmericaOjinaga = 162, - [EnumMember(Value = "Asia/Dushanbe")] - AsiaDushanbe = 239, +[EnumMember(Value = "America/Panama")] +AmericaPanama = 163, - [EnumMember(Value = "Asia/Famagusta")] - AsiaFamagusta = 240, +[EnumMember(Value = "America/Pangnirtung")] +AmericaPangnirtung = 164, - [EnumMember(Value = "Asia/Gaza")] - AsiaGaza = 241, +[EnumMember(Value = "America/Paramaribo")] +AmericaParamaribo = 165, - [EnumMember(Value = "Asia/Hebron")] - AsiaHebron = 242, +[EnumMember(Value = "America/Phoenix")] +AmericaPhoenix = 166, - [EnumMember(Value = "Asia/Hong_Kong")] - AsiaHongKong = 243, +[EnumMember(Value = "America/Port-au-Prince")] +AmericaPortAuPrince = 167, - [EnumMember(Value = "Asia/Hovd")] - AsiaHovd = 244, +[EnumMember(Value = "America/Port_of_Spain")] +AmericaPortOfSpain = 168, - [EnumMember(Value = "Asia/Irkutsk")] - AsiaIrkutsk = 245, +[EnumMember(Value = "America/Porto_Velho")] +AmericaPortoVelho = 169, - [EnumMember(Value = "Asia/Jakarta")] - AsiaJakarta = 246, +[EnumMember(Value = "America/Puerto_Rico")] +AmericaPuertoRico = 170, - [EnumMember(Value = "Asia/Jayapura")] - AsiaJayapura = 247, +[EnumMember(Value = "America/Punta_Arenas")] +AmericaPuntaArenas = 171, - [EnumMember(Value = "Asia/Jerusalem")] - AsiaJerusalem = 248, +[EnumMember(Value = "America/Rainy_River")] +AmericaRainyRiver = 172, - [EnumMember(Value = "Asia/Kabul")] - AsiaKabul = 249, +[EnumMember(Value = "America/Rankin_Inlet")] +AmericaRankinInlet = 173, - [EnumMember(Value = "Asia/Kamchatka")] - AsiaKamchatka = 250, +[EnumMember(Value = "America/Recife")] +AmericaRecife = 174, - [EnumMember(Value = "Asia/Karachi")] - AsiaKarachi = 251, +[EnumMember(Value = "America/Regina")] +AmericaRegina = 175, - [EnumMember(Value = "Asia/Katmandu")] - AsiaKatmandu = 252, +[EnumMember(Value = "America/Resolute")] +AmericaResolute = 176, - [EnumMember(Value = "Asia/Khandyga")] - AsiaKhandyga = 253, +[EnumMember(Value = "America/Rio_Branco")] +AmericaRioBranco = 177, - [EnumMember(Value = "Asia/Krasnoyarsk")] - AsiaKrasnoyarsk = 254, +[EnumMember(Value = "America/Santa_Isabel")] +AmericaSantaIsabel = 178, - [EnumMember(Value = "Asia/Kuala_Lumpur")] - AsiaKualaLumpur = 255, +[EnumMember(Value = "America/Santarem")] +AmericaSantarem = 179, - [EnumMember(Value = "Asia/Kuching")] - AsiaKuching = 256, +[EnumMember(Value = "America/Santiago")] +AmericaSantiago = 180, - [EnumMember(Value = "Asia/Kuwait")] - AsiaKuwait = 257, +[EnumMember(Value = "America/Santo_Domingo")] +AmericaSantoDomingo = 181, - [EnumMember(Value = "Asia/Macau")] - AsiaMacau = 258, +[EnumMember(Value = "America/Sao_Paulo")] +AmericaSaoPaulo = 182, - [EnumMember(Value = "Asia/Magadan")] - AsiaMagadan = 259, +[EnumMember(Value = "America/Scoresbysund")] +AmericaScoresbysund = 183, - [EnumMember(Value = "Asia/Makassar")] - AsiaMakassar = 260, +[EnumMember(Value = "America/Sitka")] +AmericaSitka = 184, - [EnumMember(Value = "Asia/Manila")] - AsiaManila = 261, +[EnumMember(Value = "America/St_Barthelemy")] +AmericaStBarthelemy = 185, - [EnumMember(Value = "Asia/Muscat")] - AsiaMuscat = 262, +[EnumMember(Value = "America/St_Johns")] +AmericaStJohns = 186, - [EnumMember(Value = "Asia/Nicosia")] - AsiaNicosia = 263, +[EnumMember(Value = "America/St_Kitts")] +AmericaStKitts = 187, - [EnumMember(Value = "Asia/Novokuznetsk")] - AsiaNovokuznetsk = 264, +[EnumMember(Value = "America/St_Lucia")] +AmericaStLucia = 188, - [EnumMember(Value = "Asia/Novosibirsk")] - AsiaNovosibirsk = 265, +[EnumMember(Value = "America/St_Thomas")] +AmericaStThomas = 189, - [EnumMember(Value = "Asia/Omsk")] - AsiaOmsk = 266, +[EnumMember(Value = "America/St_Vincent")] +AmericaStVincent = 190, - [EnumMember(Value = "Asia/Oral")] - AsiaOral = 267, +[EnumMember(Value = "America/Swift_Current")] +AmericaSwiftCurrent = 191, - [EnumMember(Value = "Asia/Phnom_Penh")] - AsiaPhnomPenh = 268, +[EnumMember(Value = "America/Tegucigalpa")] +AmericaTegucigalpa = 192, - [EnumMember(Value = "Asia/Pontianak")] - AsiaPontianak = 269, +[EnumMember(Value = "America/Thule")] +AmericaThule = 193, - [EnumMember(Value = "Asia/Pyongyang")] - AsiaPyongyang = 270, +[EnumMember(Value = "America/Thunder_Bay")] +AmericaThunderBay = 194, - [EnumMember(Value = "Asia/Qatar")] - AsiaQatar = 271, +[EnumMember(Value = "America/Tijuana")] +AmericaTijuana = 195, - [EnumMember(Value = "Asia/Qostanay")] - AsiaQostanay = 272, +[EnumMember(Value = "America/Toronto")] +AmericaToronto = 196, - [EnumMember(Value = "Asia/Qyzylorda")] - AsiaQyzylorda = 273, +[EnumMember(Value = "America/Tortola")] +AmericaTortola = 197, - [EnumMember(Value = "Asia/Rangoon")] - AsiaRangoon = 274, +[EnumMember(Value = "America/Vancouver")] +AmericaVancouver = 198, - [EnumMember(Value = "Asia/Riyadh")] - AsiaRiyadh = 275, +[EnumMember(Value = "America/Whitehorse")] +AmericaWhitehorse = 199, - [EnumMember(Value = "Asia/Saigon")] - AsiaSaigon = 276, +[EnumMember(Value = "America/Winnipeg")] +AmericaWinnipeg = 200, - [EnumMember(Value = "Asia/Sakhalin")] - AsiaSakhalin = 277, +[EnumMember(Value = "America/Yakutat")] +AmericaYakutat = 201, - [EnumMember(Value = "Asia/Samarkand")] - AsiaSamarkand = 278, +[EnumMember(Value = "America/Yellowknife")] +AmericaYellowknife = 202, - [EnumMember(Value = "Asia/Seoul")] - AsiaSeoul = 279, +[EnumMember(Value = "Antarctica/Casey")] +AntarcticaCasey = 203, - [EnumMember(Value = "Asia/Shanghai")] - AsiaShanghai = 280, +[EnumMember(Value = "Antarctica/Davis")] +AntarcticaDavis = 204, - [EnumMember(Value = "Asia/Singapore")] - AsiaSingapore = 281, +[EnumMember(Value = "Antarctica/DumontDUrville")] +AntarcticaDumontDUrville = 205, - [EnumMember(Value = "Asia/Srednekolymsk")] - AsiaSrednekolymsk = 282, +[EnumMember(Value = "Antarctica/Macquarie")] +AntarcticaMacquarie = 206, - [EnumMember(Value = "Asia/Taipei")] - AsiaTaipei = 283, +[EnumMember(Value = "Antarctica/Mawson")] +AntarcticaMawson = 207, - [EnumMember(Value = "Asia/Tashkent")] - AsiaTashkent = 284, +[EnumMember(Value = "Antarctica/McMurdo")] +AntarcticaMcMurdo = 208, - [EnumMember(Value = "Asia/Tbilisi")] - AsiaTbilisi = 285, +[EnumMember(Value = "Antarctica/Palmer")] +AntarcticaPalmer = 209, - [EnumMember(Value = "Asia/Tehran")] - AsiaTehran = 286, +[EnumMember(Value = "Antarctica/Rothera")] +AntarcticaRothera = 210, - [EnumMember(Value = "Asia/Thimphu")] - AsiaThimphu = 287, +[EnumMember(Value = "Antarctica/Syowa")] +AntarcticaSyowa = 211, - [EnumMember(Value = "Asia/Tokyo")] - AsiaTokyo = 288, +[EnumMember(Value = "Antarctica/Troll")] +AntarcticaTroll = 212, - [EnumMember(Value = "Asia/Tomsk")] - AsiaTomsk = 289, +[EnumMember(Value = "Antarctica/Vostok")] +AntarcticaVostok = 213, - [EnumMember(Value = "Asia/Ulaanbaatar")] - AsiaUlaanbaatar = 290, +[EnumMember(Value = "Arctic/Longyearbyen")] +ArcticLongyearbyen = 214, - [EnumMember(Value = "Asia/Urumqi")] - AsiaUrumqi = 291, +[EnumMember(Value = "Asia/Aden")] +AsiaAden = 215, - [EnumMember(Value = "Asia/Ust-Nera")] - AsiaUstNera = 292, +[EnumMember(Value = "Asia/Almaty")] +AsiaAlmaty = 216, - [EnumMember(Value = "Asia/Vientiane")] - AsiaVientiane = 293, +[EnumMember(Value = "Asia/Amman")] +AsiaAmman = 217, - [EnumMember(Value = "Asia/Vladivostok")] - AsiaVladivostok = 294, +[EnumMember(Value = "Asia/Anadyr")] +AsiaAnadyr = 218, - [EnumMember(Value = "Asia/Yakutsk")] - AsiaYakutsk = 295, +[EnumMember(Value = "Asia/Aqtau")] +AsiaAqtau = 219, - [EnumMember(Value = "Asia/Yekaterinburg")] - AsiaYekaterinburg = 296, +[EnumMember(Value = "Asia/Aqtobe")] +AsiaAqtobe = 220, - [EnumMember(Value = "Asia/Yerevan")] - AsiaYerevan = 297, +[EnumMember(Value = "Asia/Ashgabat")] +AsiaAshgabat = 221, - [EnumMember(Value = "Atlantic/Azores")] - AtlanticAzores = 298, +[EnumMember(Value = "Asia/Atyrau")] +AsiaAtyrau = 222, - [EnumMember(Value = "Atlantic/Bermuda")] - AtlanticBermuda = 299, +[EnumMember(Value = "Asia/Baghdad")] +AsiaBaghdad = 223, - [EnumMember(Value = "Atlantic/Canary")] - AtlanticCanary = 300, +[EnumMember(Value = "Asia/Bahrain")] +AsiaBahrain = 224, - [EnumMember(Value = "Atlantic/Cape_Verde")] - AtlanticCapeVerde = 301, +[EnumMember(Value = "Asia/Baku")] +AsiaBaku = 225, - [EnumMember(Value = "Atlantic/Faeroe")] - AtlanticFaeroe = 302, +[EnumMember(Value = "Asia/Bangkok")] +AsiaBangkok = 226, - [EnumMember(Value = "Atlantic/Madeira")] - AtlanticMadeira = 303, +[EnumMember(Value = "Asia/Barnaul")] +AsiaBarnaul = 227, - [EnumMember(Value = "Atlantic/Reykjavik")] - AtlanticReykjavik = 304, +[EnumMember(Value = "Asia/Beirut")] +AsiaBeirut = 228, - [EnumMember(Value = "Atlantic/South_Georgia")] - AtlanticSouthGeorgia = 305, +[EnumMember(Value = "Asia/Bishkek")] +AsiaBishkek = 229, - [EnumMember(Value = "Atlantic/St_Helena")] - AtlanticStHelena = 306, +[EnumMember(Value = "Asia/Brunei")] +AsiaBrunei = 230, - [EnumMember(Value = "Atlantic/Stanley")] - AtlanticStanley = 307, +[EnumMember(Value = "Asia/Calcutta")] +AsiaCalcutta = 231, - [EnumMember(Value = "Australia/Adelaide")] - AustraliaAdelaide = 308, +[EnumMember(Value = "Asia/Chita")] +AsiaChita = 232, - [EnumMember(Value = "Australia/Brisbane")] - AustraliaBrisbane = 309, +[EnumMember(Value = "Asia/Choibalsan")] +AsiaChoibalsan = 233, - [EnumMember(Value = "Australia/Broken_Hill")] - AustraliaBrokenHill = 310, +[EnumMember(Value = "Asia/Colombo")] +AsiaColombo = 234, - [EnumMember(Value = "Australia/Currie")] - AustraliaCurrie = 311, +[EnumMember(Value = "Asia/Damascus")] +AsiaDamascus = 235, - [EnumMember(Value = "Australia/Darwin")] - AustraliaDarwin = 312, +[EnumMember(Value = "Asia/Dhaka")] +AsiaDhaka = 236, - [EnumMember(Value = "Australia/Eucla")] - AustraliaEucla = 313, +[EnumMember(Value = "Asia/Dili")] +AsiaDili = 237, - [EnumMember(Value = "Australia/Hobart")] - AustraliaHobart = 314, +[EnumMember(Value = "Asia/Dubai")] +AsiaDubai = 238, - [EnumMember(Value = "Australia/Lindeman")] - AustraliaLindeman = 315, +[EnumMember(Value = "Asia/Dushanbe")] +AsiaDushanbe = 239, - [EnumMember(Value = "Australia/Lord_Howe")] - AustraliaLordHowe = 316, +[EnumMember(Value = "Asia/Famagusta")] +AsiaFamagusta = 240, - [EnumMember(Value = "Australia/Melbourne")] - AustraliaMelbourne = 317, +[EnumMember(Value = "Asia/Gaza")] +AsiaGaza = 241, - [EnumMember(Value = "Australia/Perth")] - AustraliaPerth = 318, +[EnumMember(Value = "Asia/Hebron")] +AsiaHebron = 242, - [EnumMember(Value = "Australia/Sydney")] - AustraliaSydney = 319, +[EnumMember(Value = "Asia/Hong_Kong")] +AsiaHongKong = 243, - [EnumMember(Value = "Europe/Amsterdam")] - EuropeAmsterdam = 320, +[EnumMember(Value = "Asia/Hovd")] +AsiaHovd = 244, - [EnumMember(Value = "Europe/Andorra")] - EuropeAndorra = 321, +[EnumMember(Value = "Asia/Irkutsk")] +AsiaIrkutsk = 245, - [EnumMember(Value = "Europe/Astrakhan")] - EuropeAstrakhan = 322, +[EnumMember(Value = "Asia/Jakarta")] +AsiaJakarta = 246, - [EnumMember(Value = "Europe/Athens")] - EuropeAthens = 323, +[EnumMember(Value = "Asia/Jayapura")] +AsiaJayapura = 247, - [EnumMember(Value = "Europe/Belgrade")] - EuropeBelgrade = 324, +[EnumMember(Value = "Asia/Jerusalem")] +AsiaJerusalem = 248, - [EnumMember(Value = "Europe/Berlin")] - EuropeBerlin = 325, +[EnumMember(Value = "Asia/Kabul")] +AsiaKabul = 249, - [EnumMember(Value = "Europe/Bratislava")] - EuropeBratislava = 326, +[EnumMember(Value = "Asia/Kamchatka")] +AsiaKamchatka = 250, - [EnumMember(Value = "Europe/Brussels")] - EuropeBrussels = 327, +[EnumMember(Value = "Asia/Karachi")] +AsiaKarachi = 251, - [EnumMember(Value = "Europe/Bucharest")] - EuropeBucharest = 328, +[EnumMember(Value = "Asia/Katmandu")] +AsiaKatmandu = 252, - [EnumMember(Value = "Europe/Budapest")] - EuropeBudapest = 329, +[EnumMember(Value = "Asia/Khandyga")] +AsiaKhandyga = 253, - [EnumMember(Value = "Europe/Busingen")] - EuropeBusingen = 330, +[EnumMember(Value = "Asia/Krasnoyarsk")] +AsiaKrasnoyarsk = 254, - [EnumMember(Value = "Europe/Chisinau")] - EuropeChisinau = 331, +[EnumMember(Value = "Asia/Kuala_Lumpur")] +AsiaKualaLumpur = 255, - [EnumMember(Value = "Europe/Copenhagen")] - EuropeCopenhagen = 332, +[EnumMember(Value = "Asia/Kuching")] +AsiaKuching = 256, - [EnumMember(Value = "Europe/Dublin")] - EuropeDublin = 333, +[EnumMember(Value = "Asia/Kuwait")] +AsiaKuwait = 257, - [EnumMember(Value = "Europe/Gibraltar")] - EuropeGibraltar = 334, +[EnumMember(Value = "Asia/Macau")] +AsiaMacau = 258, - [EnumMember(Value = "Europe/Guernsey")] - EuropeGuernsey = 335, +[EnumMember(Value = "Asia/Magadan")] +AsiaMagadan = 259, - [EnumMember(Value = "Europe/Helsinki")] - EuropeHelsinki = 336, +[EnumMember(Value = "Asia/Makassar")] +AsiaMakassar = 260, - [EnumMember(Value = "Europe/Isle_of_Man")] - EuropeIsleOfMan = 337, +[EnumMember(Value = "Asia/Manila")] +AsiaManila = 261, - [EnumMember(Value = "Europe/Istanbul")] - EuropeIstanbul = 338, +[EnumMember(Value = "Asia/Muscat")] +AsiaMuscat = 262, - [EnumMember(Value = "Europe/Jersey")] - EuropeJersey = 339, +[EnumMember(Value = "Asia/Nicosia")] +AsiaNicosia = 263, - [EnumMember(Value = "Europe/Kaliningrad")] - EuropeKaliningrad = 340, +[EnumMember(Value = "Asia/Novokuznetsk")] +AsiaNovokuznetsk = 264, - [EnumMember(Value = "Europe/Kiev")] - EuropeKiev = 341, +[EnumMember(Value = "Asia/Novosibirsk")] +AsiaNovosibirsk = 265, - [EnumMember(Value = "Europe/Kirov")] - EuropeKirov = 342, +[EnumMember(Value = "Asia/Omsk")] +AsiaOmsk = 266, - [EnumMember(Value = "Europe/Lisbon")] - EuropeLisbon = 343, +[EnumMember(Value = "Asia/Oral")] +AsiaOral = 267, - [EnumMember(Value = "Europe/Ljubljana")] - EuropeLjubljana = 344, +[EnumMember(Value = "Asia/Phnom_Penh")] +AsiaPhnomPenh = 268, - [EnumMember(Value = "Europe/London")] - EuropeLondon = 345, +[EnumMember(Value = "Asia/Pontianak")] +AsiaPontianak = 269, - [EnumMember(Value = "Europe/Luxembourg")] - EuropeLuxembourg = 346, +[EnumMember(Value = "Asia/Pyongyang")] +AsiaPyongyang = 270, - [EnumMember(Value = "Europe/Madrid")] - EuropeMadrid = 347, +[EnumMember(Value = "Asia/Qatar")] +AsiaQatar = 271, - [EnumMember(Value = "Europe/Malta")] - EuropeMalta = 348, +[EnumMember(Value = "Asia/Qostanay")] +AsiaQostanay = 272, - [EnumMember(Value = "Europe/Mariehamn")] - EuropeMariehamn = 349, +[EnumMember(Value = "Asia/Qyzylorda")] +AsiaQyzylorda = 273, - [EnumMember(Value = "Europe/Minsk")] - EuropeMinsk = 350, +[EnumMember(Value = "Asia/Rangoon")] +AsiaRangoon = 274, - [EnumMember(Value = "Europe/Monaco")] - EuropeMonaco = 351, +[EnumMember(Value = "Asia/Riyadh")] +AsiaRiyadh = 275, - [EnumMember(Value = "Europe/Moscow")] - EuropeMoscow = 352, +[EnumMember(Value = "Asia/Saigon")] +AsiaSaigon = 276, - [EnumMember(Value = "Europe/Oslo")] - EuropeOslo = 353, +[EnumMember(Value = "Asia/Sakhalin")] +AsiaSakhalin = 277, - [EnumMember(Value = "Europe/Paris")] - EuropeParis = 354, +[EnumMember(Value = "Asia/Samarkand")] +AsiaSamarkand = 278, - [EnumMember(Value = "Europe/Podgorica")] - EuropePodgorica = 355, +[EnumMember(Value = "Asia/Seoul")] +AsiaSeoul = 279, - [EnumMember(Value = "Europe/Prague")] - EuropePrague = 356, +[EnumMember(Value = "Asia/Shanghai")] +AsiaShanghai = 280, - [EnumMember(Value = "Europe/Riga")] - EuropeRiga = 357, +[EnumMember(Value = "Asia/Singapore")] +AsiaSingapore = 281, - [EnumMember(Value = "Europe/Rome")] - EuropeRome = 358, +[EnumMember(Value = "Asia/Srednekolymsk")] +AsiaSrednekolymsk = 282, - [EnumMember(Value = "Europe/Samara")] - EuropeSamara = 359, +[EnumMember(Value = "Asia/Taipei")] +AsiaTaipei = 283, - [EnumMember(Value = "Europe/San_Marino")] - EuropeSanMarino = 360, +[EnumMember(Value = "Asia/Tashkent")] +AsiaTashkent = 284, - [EnumMember(Value = "Europe/Sarajevo")] - EuropeSarajevo = 361, +[EnumMember(Value = "Asia/Tbilisi")] +AsiaTbilisi = 285, - [EnumMember(Value = "Europe/Saratov")] - EuropeSaratov = 362, +[EnumMember(Value = "Asia/Tehran")] +AsiaTehran = 286, - [EnumMember(Value = "Europe/Simferopol")] - EuropeSimferopol = 363, +[EnumMember(Value = "Asia/Thimphu")] +AsiaThimphu = 287, - [EnumMember(Value = "Europe/Skopje")] - EuropeSkopje = 364, +[EnumMember(Value = "Asia/Tokyo")] +AsiaTokyo = 288, - [EnumMember(Value = "Europe/Sofia")] - EuropeSofia = 365, +[EnumMember(Value = "Asia/Tomsk")] +AsiaTomsk = 289, - [EnumMember(Value = "Europe/Stockholm")] - EuropeStockholm = 366, +[EnumMember(Value = "Asia/Ulaanbaatar")] +AsiaUlaanbaatar = 290, - [EnumMember(Value = "Europe/Tallinn")] - EuropeTallinn = 367, +[EnumMember(Value = "Asia/Urumqi")] +AsiaUrumqi = 291, - [EnumMember(Value = "Europe/Tirane")] - EuropeTirane = 368, +[EnumMember(Value = "Asia/Ust-Nera")] +AsiaUstNera = 292, - [EnumMember(Value = "Europe/Ulyanovsk")] - EuropeUlyanovsk = 369, +[EnumMember(Value = "Asia/Vientiane")] +AsiaVientiane = 293, - [EnumMember(Value = "Europe/Uzhgorod")] - EuropeUzhgorod = 370, +[EnumMember(Value = "Asia/Vladivostok")] +AsiaVladivostok = 294, - [EnumMember(Value = "Europe/Vaduz")] - EuropeVaduz = 371, +[EnumMember(Value = "Asia/Yakutsk")] +AsiaYakutsk = 295, - [EnumMember(Value = "Europe/Vatican")] - EuropeVatican = 372, +[EnumMember(Value = "Asia/Yekaterinburg")] +AsiaYekaterinburg = 296, - [EnumMember(Value = "Europe/Vienna")] - EuropeVienna = 373, +[EnumMember(Value = "Asia/Yerevan")] +AsiaYerevan = 297, - [EnumMember(Value = "Europe/Vilnius")] - EuropeVilnius = 374, +[EnumMember(Value = "Atlantic/Azores")] +AtlanticAzores = 298, - [EnumMember(Value = "Europe/Volgograd")] - EuropeVolgograd = 375, +[EnumMember(Value = "Atlantic/Bermuda")] +AtlanticBermuda = 299, - [EnumMember(Value = "Europe/Warsaw")] - EuropeWarsaw = 376, +[EnumMember(Value = "Atlantic/Canary")] +AtlanticCanary = 300, - [EnumMember(Value = "Europe/Zagreb")] - EuropeZagreb = 377, +[EnumMember(Value = "Atlantic/Cape_Verde")] +AtlanticCapeVerde = 301, - [EnumMember(Value = "Europe/Zaporozhye")] - EuropeZaporozhye = 378, +[EnumMember(Value = "Atlantic/Faeroe")] +AtlanticFaeroe = 302, - [EnumMember(Value = "Europe/Zurich")] - EuropeZurich = 379, +[EnumMember(Value = "Atlantic/Madeira")] +AtlanticMadeira = 303, - [EnumMember(Value = "Indian/Antananarivo")] - IndianAntananarivo = 380, +[EnumMember(Value = "Atlantic/Reykjavik")] +AtlanticReykjavik = 304, - [EnumMember(Value = "Indian/Chagos")] - IndianChagos = 381, +[EnumMember(Value = "Atlantic/South_Georgia")] +AtlanticSouthGeorgia = 305, - [EnumMember(Value = "Indian/Christmas")] - IndianChristmas = 382, +[EnumMember(Value = "Atlantic/St_Helena")] +AtlanticStHelena = 306, - [EnumMember(Value = "Indian/Cocos")] - IndianCocos = 383, +[EnumMember(Value = "Atlantic/Stanley")] +AtlanticStanley = 307, - [EnumMember(Value = "Indian/Comoro")] - IndianComoro = 384, +[EnumMember(Value = "Australia/Adelaide")] +AustraliaAdelaide = 308, - [EnumMember(Value = "Indian/Kerguelen")] - IndianKerguelen = 385, +[EnumMember(Value = "Australia/Brisbane")] +AustraliaBrisbane = 309, - [EnumMember(Value = "Indian/Mahe")] - IndianMahe = 386, +[EnumMember(Value = "Australia/Broken_Hill")] +AustraliaBrokenHill = 310, - [EnumMember(Value = "Indian/Maldives")] - IndianMaldives = 387, +[EnumMember(Value = "Australia/Currie")] +AustraliaCurrie = 311, - [EnumMember(Value = "Indian/Mauritius")] - IndianMauritius = 388, +[EnumMember(Value = "Australia/Darwin")] +AustraliaDarwin = 312, - [EnumMember(Value = "Indian/Mayotte")] - IndianMayotte = 389, +[EnumMember(Value = "Australia/Eucla")] +AustraliaEucla = 313, - [EnumMember(Value = "Indian/Reunion")] - IndianReunion = 390, +[EnumMember(Value = "Australia/Hobart")] +AustraliaHobart = 314, - [EnumMember(Value = "Pacific/Apia")] - PacificApia = 391, +[EnumMember(Value = "Australia/Lindeman")] +AustraliaLindeman = 315, - [EnumMember(Value = "Pacific/Auckland")] - PacificAuckland = 392, +[EnumMember(Value = "Australia/Lord_Howe")] +AustraliaLordHowe = 316, - [EnumMember(Value = "Pacific/Bougainville")] - PacificBougainville = 393, +[EnumMember(Value = "Australia/Melbourne")] +AustraliaMelbourne = 317, - [EnumMember(Value = "Pacific/Chatham")] - PacificChatham = 394, +[EnumMember(Value = "Australia/Perth")] +AustraliaPerth = 318, - [EnumMember(Value = "Pacific/Easter")] - PacificEaster = 395, +[EnumMember(Value = "Australia/Sydney")] +AustraliaSydney = 319, - [EnumMember(Value = "Pacific/Efate")] - PacificEfate = 396, +[EnumMember(Value = "Europe/Amsterdam")] +EuropeAmsterdam = 320, - [EnumMember(Value = "Pacific/Enderbury")] - PacificEnderbury = 397, +[EnumMember(Value = "Europe/Andorra")] +EuropeAndorra = 321, - [EnumMember(Value = "Pacific/Fakaofo")] - PacificFakaofo = 398, +[EnumMember(Value = "Europe/Astrakhan")] +EuropeAstrakhan = 322, - [EnumMember(Value = "Pacific/Fiji")] - PacificFiji = 399, +[EnumMember(Value = "Europe/Athens")] +EuropeAthens = 323, - [EnumMember(Value = "Pacific/Funafuti")] - PacificFunafuti = 400, +[EnumMember(Value = "Europe/Belgrade")] +EuropeBelgrade = 324, - [EnumMember(Value = "Pacific/Galapagos")] - PacificGalapagos = 401, +[EnumMember(Value = "Europe/Berlin")] +EuropeBerlin = 325, - [EnumMember(Value = "Pacific/Gambier")] - PacificGambier = 402, +[EnumMember(Value = "Europe/Bratislava")] +EuropeBratislava = 326, - [EnumMember(Value = "Pacific/Guadalcanal")] - PacificGuadalcanal = 403, +[EnumMember(Value = "Europe/Brussels")] +EuropeBrussels = 327, - [EnumMember(Value = "Pacific/Guam")] - PacificGuam = 404, +[EnumMember(Value = "Europe/Bucharest")] +EuropeBucharest = 328, - [EnumMember(Value = "Pacific/Honolulu")] - PacificHonolulu = 405, +[EnumMember(Value = "Europe/Budapest")] +EuropeBudapest = 329, - [EnumMember(Value = "Pacific/Johnston")] - PacificJohnston = 406, +[EnumMember(Value = "Europe/Busingen")] +EuropeBusingen = 330, - [EnumMember(Value = "Pacific/Kiritimati")] - PacificKiritimati = 407, +[EnumMember(Value = "Europe/Chisinau")] +EuropeChisinau = 331, - [EnumMember(Value = "Pacific/Kosrae")] - PacificKosrae = 408, +[EnumMember(Value = "Europe/Copenhagen")] +EuropeCopenhagen = 332, - [EnumMember(Value = "Pacific/Kwajalein")] - PacificKwajalein = 409, +[EnumMember(Value = "Europe/Dublin")] +EuropeDublin = 333, - [EnumMember(Value = "Pacific/Majuro")] - PacificMajuro = 410, +[EnumMember(Value = "Europe/Gibraltar")] +EuropeGibraltar = 334, - [EnumMember(Value = "Pacific/Marquesas")] - PacificMarquesas = 411, +[EnumMember(Value = "Europe/Guernsey")] +EuropeGuernsey = 335, - [EnumMember(Value = "Pacific/Midway")] - PacificMidway = 412, +[EnumMember(Value = "Europe/Helsinki")] +EuropeHelsinki = 336, - [EnumMember(Value = "Pacific/Nauru")] - PacificNauru = 413, +[EnumMember(Value = "Europe/Isle_of_Man")] +EuropeIsleOfMan = 337, - [EnumMember(Value = "Pacific/Niue")] - PacificNiue = 414, +[EnumMember(Value = "Europe/Istanbul")] +EuropeIstanbul = 338, - [EnumMember(Value = "Pacific/Norfolk")] - PacificNorfolk = 415, +[EnumMember(Value = "Europe/Jersey")] +EuropeJersey = 339, - [EnumMember(Value = "Pacific/Noumea")] - PacificNoumea = 416, +[EnumMember(Value = "Europe/Kaliningrad")] +EuropeKaliningrad = 340, - [EnumMember(Value = "Pacific/Pago_Pago")] - PacificPagoPago = 417, +[EnumMember(Value = "Europe/Kiev")] +EuropeKiev = 341, - [EnumMember(Value = "Pacific/Palau")] - PacificPalau = 418, +[EnumMember(Value = "Europe/Kirov")] +EuropeKirov = 342, - [EnumMember(Value = "Pacific/Pitcairn")] - PacificPitcairn = 419, +[EnumMember(Value = "Europe/Lisbon")] +EuropeLisbon = 343, - [EnumMember(Value = "Pacific/Ponape")] - PacificPonape = 420, +[EnumMember(Value = "Europe/Ljubljana")] +EuropeLjubljana = 344, - [EnumMember(Value = "Pacific/Port_Moresby")] - PacificPortMoresby = 421, +[EnumMember(Value = "Europe/London")] +EuropeLondon = 345, - [EnumMember(Value = "Pacific/Rarotonga")] - PacificRarotonga = 422, +[EnumMember(Value = "Europe/Luxembourg")] +EuropeLuxembourg = 346, - [EnumMember(Value = "Pacific/Saipan")] - PacificSaipan = 423, - - [EnumMember(Value = "Pacific/Tahiti")] - PacificTahiti = 424, - - [EnumMember(Value = "Pacific/Tarawa")] - PacificTarawa = 425, - - [EnumMember(Value = "Pacific/Tongatapu")] - PacificTongatapu = 426, - - [EnumMember(Value = "Pacific/Truk")] - PacificTruk = 427, - - [EnumMember(Value = "Pacific/Wake")] - PacificWake = 428, - - [EnumMember(Value = "Pacific/Wallis")] - PacificWallis = 429, - } - - /// - /// IANA timezone for the Ultraloq device - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public ReportProviderMetadataRequestDevicesUltraloqMetadata.TimeZoneEnum? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates provider-specific metadata for devices. - /// - public void ReportProviderMetadata(ReportProviderMetadataRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/devices/report_provider_metadata", requestOptions); - } - - /// - /// Updates provider-specific metadata for devices. - /// - public void ReportProviderMetadata( - List devices = default - ) - { - ReportProviderMetadata(new ReportProviderMetadataRequest(devices: devices)); - } - - /// - /// Updates provider-specific metadata for devices. - /// - public async Task ReportProviderMetadataAsync(ReportProviderMetadataRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/devices/report_provider_metadata", requestOptions); - } - - /// - /// Updates provider-specific metadata for devices. - /// - public async Task ReportProviderMetadataAsync( - List devices = default - ) - { - await ReportProviderMetadataAsync(new ReportProviderMetadataRequest(devices: devices)); - } - - /// - /// Request parameters for Update a Device. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - bool? backupAccessCodePoolEnabled = default, - object? customMetadata = default, - string deviceId = default, - bool? isManaged = default, - string? name = default, - UpdateRequestProperties? properties = default - ) - { - BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; - CustomMetadata = customMetadata; - DeviceId = deviceId; - IsManaged = isManaged; - Name = name; - Properties = properties; - } - - /// - /// Indicates whether the device's [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is enabled. Set to `false` to disable the pool: Seam stops refilling it and removes any backup codes that have not yet been pulled into active use. - /// - [DataMember( - Name = "backup_access_code_pool_enabled", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? BackupAccessCodePoolEnabled { get; set; } - - /// - /// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://docs.seam.co/core-concepts/devices/filtering-devices-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadata { get; set; } - - /// - /// ID of the device that you want to update. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Indicates whether the device is managed. To unmanage a device, set `is_managed` to `false`. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsManaged { get; set; } - - /// - /// Name for the device. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] - public UpdateRequestProperties? Properties { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateRequestProperties_model")] - public class UpdateRequestProperties - { - [JsonConstructorAttribute] - protected UpdateRequestProperties() { } - - public UpdateRequestProperties(string? name = default) - { - Name = name; - } - - /// - /// Name for the device. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified [device](https://docs.seam.co/core-concepts/devices). - /// - /// You can add or change [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/devices/update", requestOptions); - } - - /// - /// Updates a specified [device](https://docs.seam.co/core-concepts/devices). - /// - /// You can add or change [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - public void Update( - bool? backupAccessCodePoolEnabled = default, - object? customMetadata = default, - string deviceId = default, - bool? isManaged = default, - string? name = default, - UpdateRequestProperties? properties = default - ) - { - Update( - new UpdateRequest( - backupAccessCodePoolEnabled: backupAccessCodePoolEnabled, - customMetadata: customMetadata, - deviceId: deviceId, - isManaged: isManaged, - name: name, - properties: properties - ) - ); - } - - /// - /// Updates a specified [device](https://docs.seam.co/core-concepts/devices). - /// - /// You can add or change [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/devices/update", requestOptions); - } - - /// - /// Updates a specified [device](https://docs.seam.co/core-concepts/devices). - /// - /// You can add or change [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - public async Task UpdateAsync( - bool? backupAccessCodePoolEnabled = default, - object? customMetadata = default, - string deviceId = default, - bool? isManaged = default, - string? name = default, - UpdateRequestProperties? properties = default - ) - { - await UpdateAsync( - new UpdateRequest( - backupAccessCodePoolEnabled: backupAccessCodePoolEnabled, - customMetadata: customMetadata, - deviceId: deviceId, - isManaged: isManaged, - name: name, - properties: properties - ) - ); - } - } +[EnumMember(Value = "Europe/Madrid")] +EuropeMadrid = 347, + +[EnumMember(Value = "Europe/Malta")] +EuropeMalta = 348, + +[EnumMember(Value = "Europe/Mariehamn")] +EuropeMariehamn = 349, + +[EnumMember(Value = "Europe/Minsk")] +EuropeMinsk = 350, + +[EnumMember(Value = "Europe/Monaco")] +EuropeMonaco = 351, + +[EnumMember(Value = "Europe/Moscow")] +EuropeMoscow = 352, + +[EnumMember(Value = "Europe/Oslo")] +EuropeOslo = 353, + +[EnumMember(Value = "Europe/Paris")] +EuropeParis = 354, + +[EnumMember(Value = "Europe/Podgorica")] +EuropePodgorica = 355, + +[EnumMember(Value = "Europe/Prague")] +EuropePrague = 356, + +[EnumMember(Value = "Europe/Riga")] +EuropeRiga = 357, + +[EnumMember(Value = "Europe/Rome")] +EuropeRome = 358, + +[EnumMember(Value = "Europe/Samara")] +EuropeSamara = 359, + +[EnumMember(Value = "Europe/San_Marino")] +EuropeSanMarino = 360, + +[EnumMember(Value = "Europe/Sarajevo")] +EuropeSarajevo = 361, + +[EnumMember(Value = "Europe/Saratov")] +EuropeSaratov = 362, + +[EnumMember(Value = "Europe/Simferopol")] +EuropeSimferopol = 363, + +[EnumMember(Value = "Europe/Skopje")] +EuropeSkopje = 364, + +[EnumMember(Value = "Europe/Sofia")] +EuropeSofia = 365, + +[EnumMember(Value = "Europe/Stockholm")] +EuropeStockholm = 366, + +[EnumMember(Value = "Europe/Tallinn")] +EuropeTallinn = 367, + +[EnumMember(Value = "Europe/Tirane")] +EuropeTirane = 368, + +[EnumMember(Value = "Europe/Ulyanovsk")] +EuropeUlyanovsk = 369, + +[EnumMember(Value = "Europe/Uzhgorod")] +EuropeUzhgorod = 370, + +[EnumMember(Value = "Europe/Vaduz")] +EuropeVaduz = 371, + +[EnumMember(Value = "Europe/Vatican")] +EuropeVatican = 372, + +[EnumMember(Value = "Europe/Vienna")] +EuropeVienna = 373, + +[EnumMember(Value = "Europe/Vilnius")] +EuropeVilnius = 374, + +[EnumMember(Value = "Europe/Volgograd")] +EuropeVolgograd = 375, + +[EnumMember(Value = "Europe/Warsaw")] +EuropeWarsaw = 376, + +[EnumMember(Value = "Europe/Zagreb")] +EuropeZagreb = 377, + +[EnumMember(Value = "Europe/Zaporozhye")] +EuropeZaporozhye = 378, + +[EnumMember(Value = "Europe/Zurich")] +EuropeZurich = 379, + +[EnumMember(Value = "Indian/Antananarivo")] +IndianAntananarivo = 380, + +[EnumMember(Value = "Indian/Chagos")] +IndianChagos = 381, + +[EnumMember(Value = "Indian/Christmas")] +IndianChristmas = 382, + +[EnumMember(Value = "Indian/Cocos")] +IndianCocos = 383, + +[EnumMember(Value = "Indian/Comoro")] +IndianComoro = 384, + +[EnumMember(Value = "Indian/Kerguelen")] +IndianKerguelen = 385, + +[EnumMember(Value = "Indian/Mahe")] +IndianMahe = 386, + +[EnumMember(Value = "Indian/Maldives")] +IndianMaldives = 387, + +[EnumMember(Value = "Indian/Mauritius")] +IndianMauritius = 388, + +[EnumMember(Value = "Indian/Mayotte")] +IndianMayotte = 389, + +[EnumMember(Value = "Indian/Reunion")] +IndianReunion = 390, + +[EnumMember(Value = "Pacific/Apia")] +PacificApia = 391, + +[EnumMember(Value = "Pacific/Auckland")] +PacificAuckland = 392, + +[EnumMember(Value = "Pacific/Bougainville")] +PacificBougainville = 393, + +[EnumMember(Value = "Pacific/Chatham")] +PacificChatham = 394, + +[EnumMember(Value = "Pacific/Easter")] +PacificEaster = 395, + +[EnumMember(Value = "Pacific/Efate")] +PacificEfate = 396, + +[EnumMember(Value = "Pacific/Enderbury")] +PacificEnderbury = 397, + +[EnumMember(Value = "Pacific/Fakaofo")] +PacificFakaofo = 398, + +[EnumMember(Value = "Pacific/Fiji")] +PacificFiji = 399, + +[EnumMember(Value = "Pacific/Funafuti")] +PacificFunafuti = 400, + +[EnumMember(Value = "Pacific/Galapagos")] +PacificGalapagos = 401, + +[EnumMember(Value = "Pacific/Gambier")] +PacificGambier = 402, + +[EnumMember(Value = "Pacific/Guadalcanal")] +PacificGuadalcanal = 403, + +[EnumMember(Value = "Pacific/Guam")] +PacificGuam = 404, + +[EnumMember(Value = "Pacific/Honolulu")] +PacificHonolulu = 405, + +[EnumMember(Value = "Pacific/Johnston")] +PacificJohnston = 406, + +[EnumMember(Value = "Pacific/Kiritimati")] +PacificKiritimati = 407, + +[EnumMember(Value = "Pacific/Kosrae")] +PacificKosrae = 408, + +[EnumMember(Value = "Pacific/Kwajalein")] +PacificKwajalein = 409, + +[EnumMember(Value = "Pacific/Majuro")] +PacificMajuro = 410, + +[EnumMember(Value = "Pacific/Marquesas")] +PacificMarquesas = 411, + +[EnumMember(Value = "Pacific/Midway")] +PacificMidway = 412, + +[EnumMember(Value = "Pacific/Nauru")] +PacificNauru = 413, + +[EnumMember(Value = "Pacific/Niue")] +PacificNiue = 414, + +[EnumMember(Value = "Pacific/Norfolk")] +PacificNorfolk = 415, + +[EnumMember(Value = "Pacific/Noumea")] +PacificNoumea = 416, + +[EnumMember(Value = "Pacific/Pago_Pago")] +PacificPagoPago = 417, + +[EnumMember(Value = "Pacific/Palau")] +PacificPalau = 418, + +[EnumMember(Value = "Pacific/Pitcairn")] +PacificPitcairn = 419, + +[EnumMember(Value = "Pacific/Ponape")] +PacificPonape = 420, + +[EnumMember(Value = "Pacific/Port_Moresby")] +PacificPortMoresby = 421, + +[EnumMember(Value = "Pacific/Rarotonga")] +PacificRarotonga = 422, + +[EnumMember(Value = "Pacific/Saipan")] +PacificSaipan = 423, + +[EnumMember(Value = "Pacific/Tahiti")] +PacificTahiti = 424, + +[EnumMember(Value = "Pacific/Tarawa")] +PacificTarawa = 425, + +[EnumMember(Value = "Pacific/Tongatapu")] +PacificTongatapu = 426, + +[EnumMember(Value = "Pacific/Truk")] +PacificTruk = 427, + +[EnumMember(Value = "Pacific/Wake")] +PacificWake = 428, + +[EnumMember(Value = "Pacific/Wallis")] +PacificWallis = 429, +} + +/// +/// IANA timezone for the Ultraloq device +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public ReportProviderMetadataRequestDevicesUltraloqMetadata.TimeZoneEnum? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates provider-specific metadata for devices. +/// +public void ReportProviderMetadata(ReportProviderMetadataRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/devices/report_provider_metadata", requestOptions); +} + +/// +/// Updates provider-specific metadata for devices. +/// +public void ReportProviderMetadata(List devices = default) +{ +ReportProviderMetadata(new ReportProviderMetadataRequest(devices: devices)); +} + +/// +/// Updates provider-specific metadata for devices. +/// +public async Task ReportProviderMetadataAsync(ReportProviderMetadataRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/devices/report_provider_metadata", requestOptions); +} + +/// +/// Updates provider-specific metadata for devices. +/// +public async Task ReportProviderMetadataAsync(List devices = default) +{ +await ReportProviderMetadataAsync(new ReportProviderMetadataRequest(devices: devices)); +} + +/// +/// Request parameters for Update a Device. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(bool? backupAccessCodePoolEnabled = default, object? customMetadata = default, string deviceId = default, bool? isManaged = default, string? name = default, UpdateRequestProperties? properties = default) +{ +BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; +CustomMetadata = customMetadata; +DeviceId = deviceId; +IsManaged = isManaged; +Name = name; +Properties = properties; +} + +/// +/// Indicates whether the device's [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) is enabled. Set to `false` to disable the pool: Seam stops refilling it and removes any backup codes that have not yet been pulled into active use. +/// +[DataMember(Name = "backup_access_code_pool_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? BackupAccessCodePoolEnabled { get; set; } + +/// +/// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://www.seam.co/docs/core-concepts/devices/filtering-devices-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadata { get; set; } + +/// +/// ID of the device that you want to update. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Indicates whether the device is managed. To unmanage a device, set `is_managed` to `false`. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsManaged { get; set; } + +/// +/// Name for the device. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] +public UpdateRequestProperties? Properties { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateRequestProperties_model")] +public class UpdateRequestProperties +{ +[JsonConstructorAttribute] +protected UpdateRequestProperties() { } + +public UpdateRequestProperties(string? name = default) +{ +Name = name; +} + +/// +/// Name for the device. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +/// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/devices/update", requestOptions); +} + +/// +/// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +/// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +public void Update(bool? backupAccessCodePoolEnabled = default, object? customMetadata = default, string deviceId = default, bool? isManaged = default, string? name = default, UpdateRequestProperties? properties = default) +{ +Update(new UpdateRequest(backupAccessCodePoolEnabled: backupAccessCodePoolEnabled, customMetadata: customMetadata, deviceId: deviceId, isManaged: isManaged, name: name, properties: properties)); +} + +/// +/// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +/// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/devices/update", requestOptions); +} + +/// +/// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +/// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +public async Task UpdateAsync(bool? backupAccessCodePoolEnabled = default, object? customMetadata = default, string deviceId = default, bool? isManaged = default, string? name = default, UpdateRequestProperties? properties = default) +{ +await UpdateAsync(new UpdateRequest(backupAccessCodePoolEnabled: backupAccessCodePoolEnabled, customMetadata: customMetadata, deviceId: deviceId, isManaged: isManaged, name: name, properties: properties)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Devices Devices => new(this); - } - - public partial interface ISeamClient - { - public Api.Devices Devices { get; } - } +public partial class SeamClient +{ +public Api.Devices Devices => new(this); +} + +public partial interface ISeamClient +{ +public Api.Devices Devices { get; } +} } diff --git a/src/Seam/Api/EncodersAcs.cs b/src/Seam/Api/EncodersAcs.cs index 59bfb74f..cfe74fe0 100644 --- a/src/Seam/Api/EncodersAcs.cs +++ b/src/Seam/Api/EncodersAcs.cs @@ -9,894 +9,735 @@ namespace Seam.Api { - public class EncodersAcs - { - private ISeamClient _seam; - - public EncodersAcs(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Encode a Credential. - /// - [DataContract(Name = "encodeCredentialRequest_request")] - public class EncodeCredentialRequest - { - [JsonConstructorAttribute] - protected EncodeCredentialRequest() { } - - public EncodeCredentialRequest( - string? accessMethodId = default, - string? acsCredentialId = default, - string acsEncoderId = default - ) - { - AccessMethodId = accessMethodId; - AcsCredentialId = acsCredentialId; - AcsEncoderId = acsEncoderId; - } - - /// - /// ID of the `access_method` to encode onto a card. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessMethodId { get; set; } - - /// - /// ID of the `acs_credential` to encode onto a card. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialId { get; set; } - - /// - /// ID of the `acs_encoder` to use to encode the `acs_credential`. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "encodeCredentialResponse_response")] - public class EncodeCredentialResponse - { - [JsonConstructorAttribute] - protected EncodeCredentialResponse() { } - - public EncodeCredentialResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Encodes an existing [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` - /// - public ActionAttempt EncodeCredential(EncodeCredentialRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/acs/encoders/encode_credential", requestOptions) - .EnsureData("/acs/encoders/encode_credential") - .ActionAttempt; - } - - /// - /// Encodes an existing [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` - /// - public ActionAttempt EncodeCredential( - string? accessMethodId = default, - string? acsCredentialId = default, - string acsEncoderId = default - ) - { - return EncodeCredential( - new EncodeCredentialRequest( - accessMethodId: accessMethodId, - acsCredentialId: acsCredentialId, - acsEncoderId: acsEncoderId - ) - ); - } - - /// - /// Encodes an existing [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` - /// - public async Task EncodeCredentialAsync(EncodeCredentialRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/acs/encoders/encode_credential", - requestOptions - ) - ) - .EnsureData("/acs/encoders/encode_credential") - .ActionAttempt; - } - - /// - /// Encodes an existing [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` - /// - public async Task EncodeCredentialAsync( - string? accessMethodId = default, - string? acsCredentialId = default, - string acsEncoderId = default - ) - { - return ( - await EncodeCredentialAsync( - new EncodeCredentialRequest( - accessMethodId: accessMethodId, - acsCredentialId: acsCredentialId, - acsEncoderId: acsEncoderId - ) - ) - ); - } - - /// - /// Request parameters for Get an Encoder. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string acsEncoderId = default) - { - AcsEncoderId = acsEncoderId; - } - - /// - /// ID of the encoder that you want to get. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AcsEncoder acsEncoder = default) - { - AcsEncoder = acsEncoder; - } - - /// - /// OK - /// - [DataMember(Name = "acs_encoder", IsRequired = false, EmitDefaultValue = false)] - public AcsEncoder AcsEncoder { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public AcsEncoder Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/encoders/get", requestOptions) - .EnsureData("/acs/encoders/get") - .AcsEncoder; - } - - /// - /// Returns a specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public AcsEncoder Get(string acsEncoderId = default) - { - return Get(new GetRequest(acsEncoderId: acsEncoderId)); - } - - /// - /// Returns a specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/encoders/get", requestOptions)) - .EnsureData("/acs/encoders/get") - .AcsEncoder; - } - - /// - /// Returns a specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public async Task GetAsync(string acsEncoderId = default) - { - return (await GetAsync(new GetRequest(acsEncoderId: acsEncoderId))); - } - - /// - /// Request parameters for List Encoders. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - List? acsEncoderIds = default, - string? acsSystemId = default, - List? acsSystemIds = default, - float? limit = default, - string? pageCursor = default - ) - { - AcsEncoderIds = acsEncoderIds; - AcsSystemId = acsSystemId; - AcsSystemIds = acsSystemIds; - Limit = limit; - PageCursor = pageCursor; - } - - /// - /// IDs of the encoders that you want to retrieve. - /// - [DataMember(Name = "acs_encoder_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEncoderIds { get; set; } - - /// - /// ID of the access system for which you want to retrieve all encoders. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// IDs of the access systems for which you want to retrieve all encoders. - /// - [DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsSystemIds { get; set; } - - /// - /// Number of encoders to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List acsEncoders = default) - { - AcsEncoders = acsEncoders; - } - - /// - /// OK - /// - [DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] - public List AcsEncoders { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/encoders/list", requestOptions) - .EnsureData("/acs/encoders/list") - .AcsEncoders; - } - - /// - /// Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public List List( - List? acsEncoderIds = default, - string? acsSystemId = default, - List? acsSystemIds = default, - float? limit = default, - string? pageCursor = default - ) - { - return List( - new ListRequest( - acsEncoderIds: acsEncoderIds, - acsSystemId: acsSystemId, - acsSystemIds: acsSystemIds, - limit: limit, - pageCursor: pageCursor - ) - ); - } - - /// - /// Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/encoders/list", requestOptions)) - .EnsureData("/acs/encoders/list") - .AcsEncoders; - } - - /// - /// Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public async Task> ListAsync( - List? acsEncoderIds = default, - string? acsSystemId = default, - List? acsSystemIds = default, - float? limit = default, - string? pageCursor = default - ) - { - return ( - await ListAsync( - new ListRequest( - acsEncoderIds: acsEncoderIds, - acsSystemId: acsSystemId, - acsSystemIds: acsSystemIds, - limit: limit, - pageCursor: pageCursor - ) - ) - ); - } - - /// - /// Request parameters for Scan a Credential. - /// - [DataContract(Name = "scanCredentialRequest_request")] - public class ScanCredentialRequest - { - [JsonConstructorAttribute] - protected ScanCredentialRequest() { } - - public ScanCredentialRequest( - string acsEncoderId = default, - ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default - ) - { - AcsEncoderId = acsEncoderId; - SaltoKsMetadata = saltoKsMetadata; - } - - /// - /// ID of the encoder to use for the scan. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - /// - /// Salto KS-specific metadata for the scan action. - /// - [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] - public ScanCredentialRequestSaltoKsMetadata? SaltoKsMetadata { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "scanCredentialRequestSaltoKsMetadata_model")] - public class ScanCredentialRequestSaltoKsMetadata - { - [JsonConstructorAttribute] - protected ScanCredentialRequestSaltoKsMetadata() { } - - public ScanCredentialRequestSaltoKsMetadata(bool? detectNewTags = default) - { - DetectNewTags = detectNewTags; - } - - /// - /// When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. - /// - [DataMember(Name = "detect_new_tags", IsRequired = false, EmitDefaultValue = false)] - public bool? DetectNewTags { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "scanCredentialResponse_response")] - public class ScanCredentialResponse - { - [JsonConstructorAttribute] - protected ScanCredentialResponse() { } - - public ScanCredentialResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Scans an encoded [acs_credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public ActionAttempt ScanCredential(ScanCredentialRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/acs/encoders/scan_credential", requestOptions) - .EnsureData("/acs/encoders/scan_credential") - .ActionAttempt; - } - - /// - /// Scans an encoded [acs_credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public ActionAttempt ScanCredential( - string acsEncoderId = default, - ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default - ) - { - return ScanCredential( - new ScanCredentialRequest( - acsEncoderId: acsEncoderId, - saltoKsMetadata: saltoKsMetadata - ) - ); - } - - /// - /// Scans an encoded [acs_credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public async Task ScanCredentialAsync(ScanCredentialRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/acs/encoders/scan_credential", - requestOptions - ) - ) - .EnsureData("/acs/encoders/scan_credential") - .ActionAttempt; - } - - /// - /// Scans an encoded [acs_credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - public async Task ScanCredentialAsync( - string acsEncoderId = default, - ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default - ) - { - return ( - await ScanCredentialAsync( - new ScanCredentialRequest( - acsEncoderId: acsEncoderId, - saltoKsMetadata: saltoKsMetadata - ) - ) - ); - } - - /// - /// Request parameters for Scan to Assign a Credential. - /// - [DataContract(Name = "scanToAssignCredentialRequest_request")] - public class ScanToAssignCredentialRequest - { - [JsonConstructorAttribute] - protected ScanToAssignCredentialRequest() { } - - public ScanToAssignCredentialRequest( - string acsEncoderId = default, - string? acsUserId = default, - ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, - string? userIdentityId = default - ) - { - AcsEncoderId = acsEncoderId; - AcsUserId = acsUserId; - SaltoKsMetadata = saltoKsMetadata; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the `acs_encoder` to use to scan the credential. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - /// - /// ID of the `acs_user` to assign the scanned credential to. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// Salto KS-specific metadata for the scan action. - /// - [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] - public ScanToAssignCredentialRequestSaltoKsMetadata? SaltoKsMetadata { get; set; } - - /// - /// ID of the `user_identity` to assign the scanned credential to. If the ACS system contains an ACS user linked to this user identity, it is used. Otherwise, one is created. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "scanToAssignCredentialRequestSaltoKsMetadata_model")] - public class ScanToAssignCredentialRequestSaltoKsMetadata - { - [JsonConstructorAttribute] - protected ScanToAssignCredentialRequestSaltoKsMetadata() { } - - public ScanToAssignCredentialRequestSaltoKsMetadata(bool? detectNewTags = default) - { - DetectNewTags = detectNewTags; - } - - /// - /// When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. - /// - [DataMember(Name = "detect_new_tags", IsRequired = false, EmitDefaultValue = false)] - public bool? DetectNewTags { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "scanToAssignCredentialResponse_response")] - public class ScanToAssignCredentialResponse - { - [JsonConstructorAttribute] - protected ScanToAssignCredentialResponse() { } - - public ScanToAssignCredentialResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Scans a physical card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. - /// - public ActionAttempt ScanToAssignCredential(ScanToAssignCredentialRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/acs/encoders/scan_to_assign_credential", - requestOptions - ) - .EnsureData("/acs/encoders/scan_to_assign_credential") - .ActionAttempt; - } - - /// - /// Scans a physical card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. - /// - public ActionAttempt ScanToAssignCredential( - string acsEncoderId = default, - string? acsUserId = default, - ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, - string? userIdentityId = default - ) - { - return ScanToAssignCredential( - new ScanToAssignCredentialRequest( - acsEncoderId: acsEncoderId, - acsUserId: acsUserId, - saltoKsMetadata: saltoKsMetadata, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Scans a physical card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. - /// - public async Task ScanToAssignCredentialAsync( - ScanToAssignCredentialRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/acs/encoders/scan_to_assign_credential", - requestOptions - ) - ) - .EnsureData("/acs/encoders/scan_to_assign_credential") - .ActionAttempt; - } - - /// - /// Scans a physical card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. - /// - public async Task ScanToAssignCredentialAsync( - string acsEncoderId = default, - string? acsUserId = default, - ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, - string? userIdentityId = default - ) - { - return ( - await ScanToAssignCredentialAsync( - new ScanToAssignCredentialRequest( - acsEncoderId: acsEncoderId, - acsUserId: acsUserId, - saltoKsMetadata: saltoKsMetadata, - userIdentityId: userIdentityId - ) - ) - ); - } - } +public class EncodersAcs +{ +private ISeamClient _seam; + +public EncodersAcs(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Encode a Credential. +/// +[DataContract(Name = "encodeCredentialRequest_request")] +public class EncodeCredentialRequest +{ +[JsonConstructorAttribute] +protected EncodeCredentialRequest() { } + +public EncodeCredentialRequest(string? accessMethodId = default, string? acsCredentialId = default, string acsEncoderId = default) +{ +AccessMethodId = accessMethodId; +AcsCredentialId = acsCredentialId; +AcsEncoderId = acsEncoderId; +} + +/// +/// ID of the `access_method` to encode onto a card. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessMethodId { get; set; } + +/// +/// ID of the `acs_credential` to encode onto a card. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialId { get; set; } + +/// +/// ID of the `acs_encoder` to use to encode the `acs_credential`. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "encodeCredentialResponse_response")] +public class EncodeCredentialResponse +{ +[JsonConstructorAttribute] +protected EncodeCredentialResponse() { } + +public EncodeCredentialResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` +/// +public ActionAttempt EncodeCredential(EncodeCredentialRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/acs/encoders/encode_credential", requestOptions).EnsureData("/acs/encoders/encode_credential").ActionAttempt; +} + +/// +/// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` +/// +public ActionAttempt EncodeCredential(string? accessMethodId = default, string? acsCredentialId = default, string acsEncoderId = default) +{ +return EncodeCredential(new EncodeCredentialRequest(accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId)); +} + +/// +/// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` +/// +public async Task EncodeCredentialAsync(EncodeCredentialRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/acs/encoders/encode_credential", requestOptions)).EnsureData("/acs/encoders/encode_credential").ActionAttempt; +} + +/// +/// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` +/// +public async Task EncodeCredentialAsync(string? accessMethodId = default, string? acsCredentialId = default, string acsEncoderId = default) +{ +return (await EncodeCredentialAsync(new EncodeCredentialRequest(accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId))); +} + +/// +/// Request parameters for Get an Encoder. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string acsEncoderId = default) +{ +AcsEncoderId = acsEncoderId; +} + +/// +/// ID of the encoder that you want to get. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AcsEncoder acsEncoder = default) +{ +AcsEncoder = acsEncoder; +} + +/// +/// OK +/// +[DataMember(Name = "acs_encoder", IsRequired = false, EmitDefaultValue = false)] +public AcsEncoder AcsEncoder { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public AcsEncoder Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/encoders/get", requestOptions).EnsureData("/acs/encoders/get").AcsEncoder; +} + +/// +/// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public AcsEncoder Get(string acsEncoderId = default) +{ +return Get(new GetRequest(acsEncoderId: acsEncoderId)); +} + +/// +/// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/encoders/get", requestOptions)).EnsureData("/acs/encoders/get").AcsEncoder; +} + +/// +/// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public async Task GetAsync(string acsEncoderId = default) +{ +return (await GetAsync(new GetRequest(acsEncoderId: acsEncoderId))); +} + +/// +/// Request parameters for List Encoders. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, float? limit = default, string? pageCursor = default) +{ +AcsEncoderIds = acsEncoderIds; +AcsSystemId = acsSystemId; +AcsSystemIds = acsSystemIds; +Limit = limit; +PageCursor = pageCursor; +} + +/// +/// IDs of the encoders that you want to retrieve. +/// +[DataMember(Name = "acs_encoder_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsEncoderIds { get; set; } + +/// +/// ID of the access system for which you want to retrieve all encoders. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// IDs of the access systems for which you want to retrieve all encoders. +/// +[DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsSystemIds { get; set; } + +/// +/// Number of encoders to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List acsEncoders = default) +{ +AcsEncoders = acsEncoders; +} + +/// +/// OK +/// +[DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] +public List AcsEncoders { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/encoders/list", requestOptions).EnsureData("/acs/encoders/list").AcsEncoders; +} + +/// +/// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public List List(List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, float? limit = default, string? pageCursor = default) +{ +return List(new ListRequest(acsEncoderIds: acsEncoderIds, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, limit: limit, pageCursor: pageCursor)); +} + +/// +/// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/encoders/list", requestOptions)).EnsureData("/acs/encoders/list").AcsEncoders; +} + +/// +/// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public async Task> ListAsync(List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, float? limit = default, string? pageCursor = default) +{ +return (await ListAsync(new ListRequest(acsEncoderIds: acsEncoderIds, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, limit: limit, pageCursor: pageCursor))); +} + +/// +/// Request parameters for Scan a Credential. +/// +[DataContract(Name = "scanCredentialRequest_request")] +public class ScanCredentialRequest +{ +[JsonConstructorAttribute] +protected ScanCredentialRequest() { } + +public ScanCredentialRequest(string acsEncoderId = default, ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default) +{ +AcsEncoderId = acsEncoderId; +SaltoKsMetadata = saltoKsMetadata; +} + +/// +/// ID of the encoder to use for the scan. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +/// +/// Salto KS-specific metadata for the scan action. +/// +[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] +public ScanCredentialRequestSaltoKsMetadata? SaltoKsMetadata { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "scanCredentialRequestSaltoKsMetadata_model")] +public class ScanCredentialRequestSaltoKsMetadata +{ +[JsonConstructorAttribute] +protected ScanCredentialRequestSaltoKsMetadata() { } + +public ScanCredentialRequestSaltoKsMetadata(bool? detectNewTags = default) +{ +DetectNewTags = detectNewTags; +} + +/// +/// When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. +/// +[DataMember(Name = "detect_new_tags", IsRequired = false, EmitDefaultValue = false)] +public bool? DetectNewTags { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "scanCredentialResponse_response")] +public class ScanCredentialResponse +{ +[JsonConstructorAttribute] +protected ScanCredentialResponse() { } + +public ScanCredentialResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public ActionAttempt ScanCredential(ScanCredentialRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/acs/encoders/scan_credential", requestOptions).EnsureData("/acs/encoders/scan_credential").ActionAttempt; +} + +/// +/// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public ActionAttempt ScanCredential(string acsEncoderId = default, ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default) +{ +return ScanCredential(new ScanCredentialRequest(acsEncoderId: acsEncoderId, saltoKsMetadata: saltoKsMetadata)); +} + +/// +/// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public async Task ScanCredentialAsync(ScanCredentialRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/acs/encoders/scan_credential", requestOptions)).EnsureData("/acs/encoders/scan_credential").ActionAttempt; +} + +/// +/// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +public async Task ScanCredentialAsync(string acsEncoderId = default, ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default) +{ +return (await ScanCredentialAsync(new ScanCredentialRequest(acsEncoderId: acsEncoderId, saltoKsMetadata: saltoKsMetadata))); +} + +/// +/// Request parameters for Scan to Assign a Credential. +/// +[DataContract(Name = "scanToAssignCredentialRequest_request")] +public class ScanToAssignCredentialRequest +{ +[JsonConstructorAttribute] +protected ScanToAssignCredentialRequest() { } + +public ScanToAssignCredentialRequest(string acsEncoderId = default, string? acsUserId = default, ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, string? userIdentityId = default) +{ +AcsEncoderId = acsEncoderId; +AcsUserId = acsUserId; +SaltoKsMetadata = saltoKsMetadata; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the `acs_encoder` to use to scan the credential. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +/// +/// ID of the `acs_user` to assign the scanned credential to. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// Salto KS-specific metadata for the scan action. +/// +[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] +public ScanToAssignCredentialRequestSaltoKsMetadata? SaltoKsMetadata { get; set; } + +/// +/// ID of the `user_identity` to assign the scanned credential to. If the ACS system contains an ACS user linked to this user identity, it is used. Otherwise, one is created. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "scanToAssignCredentialRequestSaltoKsMetadata_model")] +public class ScanToAssignCredentialRequestSaltoKsMetadata +{ +[JsonConstructorAttribute] +protected ScanToAssignCredentialRequestSaltoKsMetadata() { } + +public ScanToAssignCredentialRequestSaltoKsMetadata(bool? detectNewTags = default) +{ +DetectNewTags = detectNewTags; +} + +/// +/// When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. +/// +[DataMember(Name = "detect_new_tags", IsRequired = false, EmitDefaultValue = false)] +public bool? DetectNewTags { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "scanToAssignCredentialResponse_response")] +public class ScanToAssignCredentialResponse +{ +[JsonConstructorAttribute] +protected ScanToAssignCredentialResponse() { } + +public ScanToAssignCredentialResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. +/// +public ActionAttempt ScanToAssignCredential(ScanToAssignCredentialRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/acs/encoders/scan_to_assign_credential", requestOptions).EnsureData("/acs/encoders/scan_to_assign_credential").ActionAttempt; +} + +/// +/// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. +/// +public ActionAttempt ScanToAssignCredential(string acsEncoderId = default, string? acsUserId = default, ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, string? userIdentityId = default) +{ +return ScanToAssignCredential(new ScanToAssignCredentialRequest(acsEncoderId: acsEncoderId, acsUserId: acsUserId, saltoKsMetadata: saltoKsMetadata, userIdentityId: userIdentityId)); +} + +/// +/// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. +/// +public async Task ScanToAssignCredentialAsync(ScanToAssignCredentialRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/acs/encoders/scan_to_assign_credential", requestOptions)).EnsureData("/acs/encoders/scan_to_assign_credential").ActionAttempt; +} + +/// +/// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. +/// +public async Task ScanToAssignCredentialAsync(string acsEncoderId = default, string? acsUserId = default, ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, string? userIdentityId = default) +{ +return (await ScanToAssignCredentialAsync(new ScanToAssignCredentialRequest(acsEncoderId: acsEncoderId, acsUserId: acsUserId, saltoKsMetadata: saltoKsMetadata, userIdentityId: userIdentityId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.EncodersAcs EncodersAcs => new(this); - } +public partial class SeamClient +{ +public Api.EncodersAcs EncodersAcs => new(this); +} - public partial interface ISeamClient - { - public Api.EncodersAcs EncodersAcs { get; } - } +public partial interface ISeamClient +{ +public Api.EncodersAcs EncodersAcs { get; } +} } diff --git a/src/Seam/Api/EntrancesAcs.cs b/src/Seam/Api/EntrancesAcs.cs index 1f9bac64..9bf9f409 100644 --- a/src/Seam/Api/EntrancesAcs.cs +++ b/src/Seam/Api/EntrancesAcs.cs @@ -9,825 +9,663 @@ namespace Seam.Api { - public class EntrancesAcs - { - private ISeamClient _seam; - - public EntrancesAcs(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get an Entrance. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string acsEntranceId = default) - { - AcsEntranceId = acsEntranceId; - } - - /// - /// ID of the entrance that you want to get. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AcsEntrance acsEntrance = default) - { - AcsEntrance = acsEntrance; - } - - /// - /// OK - /// - [DataMember(Name = "acs_entrance", IsRequired = false, EmitDefaultValue = false)] - public AcsEntrance AcsEntrance { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public AcsEntrance Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/entrances/get", requestOptions) - .EnsureData("/acs/entrances/get") - .AcsEntrance; - } - - /// - /// Returns a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public AcsEntrance Get(string acsEntranceId = default) - { - return Get(new GetRequest(acsEntranceId: acsEntranceId)); - } - - /// - /// Returns a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/entrances/get", requestOptions)) - .EnsureData("/acs/entrances/get") - .AcsEntrance; - } - - /// - /// Returns a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public async Task GetAsync(string acsEntranceId = default) - { - return (await GetAsync(new GetRequest(acsEntranceId: acsEntranceId))); - } - - /// - /// Request parameters for Grant an ACS User Access to an Entrance. - /// - [DataContract(Name = "grantAccessRequest_request")] - public class GrantAccessRequest - { - [JsonConstructorAttribute] - protected GrantAccessRequest() { } - - public GrantAccessRequest( - string acsEntranceId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsEntranceId = acsEntranceId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the entrance to which you want to grant an access system user access. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - /// - /// ID of the access system user to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Grants a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public void GrantAccess(GrantAccessRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/acs/entrances/grant_access", requestOptions); - } - - /// - /// Grants a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public void GrantAccess( - string acsEntranceId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - GrantAccess( - new GrantAccessRequest( - acsEntranceId: acsEntranceId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Grants a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public async Task GrantAccessAsync(GrantAccessRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/acs/entrances/grant_access", requestOptions); - } - - /// - /// Grants a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public async Task GrantAccessAsync( - string acsEntranceId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await GrantAccessAsync( - new GrantAccessRequest( - acsEntranceId: acsEntranceId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for List Entrances. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? accessMethodId = default, - string? acsCredentialId = default, - List? acsEntranceIds = default, - string? acsSystemId = default, - string? connectedAccountId = default, - string? customerKey = default, - int? limit = default, - string? locationId = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default - ) - { - AccessMethodId = accessMethodId; - AcsCredentialId = acsCredentialId; - AcsEntranceIds = acsEntranceIds; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CustomerKey = customerKey; - Limit = limit; - LocationId = locationId; - PageCursor = pageCursor; - Search = search; - SpaceId = spaceId; - } - - /// - /// ID of the access method for which you want to retrieve all entrances to which it grants access. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessMethodId { get; set; } - - /// - /// ID of the credential for which you want to retrieve all entrances. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialId { get; set; } - - /// - /// IDs of the entrances for which you want to retrieve all entrances. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEntranceIds { get; set; } - - /// - /// ID of the access system for which you want to retrieve all entrances. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the connected account for which you want to retrieve all entrances. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Customer key for which you want to list entrances. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public int? Limit { get; set; } - - [Obsolete("Use `space_id`.")] - [DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] - public string? LocationId { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned entrances to include all records that satisfy a partial match using `display_name`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// ID of the space for which you want to list entrances. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List acsEntrances = default) - { - AcsEntrances = acsEntrances; - } - - /// - /// OK - /// - [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] - public List AcsEntrances { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/entrances/list", requestOptions) - .EnsureData("/acs/entrances/list") - .AcsEntrances; - } - - /// - /// Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public List List( - string? accessMethodId = default, - string? acsCredentialId = default, - List? acsEntranceIds = default, - string? acsSystemId = default, - string? connectedAccountId = default, - string? customerKey = default, - int? limit = default, - string? locationId = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default - ) - { - return List( - new ListRequest( - accessMethodId: accessMethodId, - acsCredentialId: acsCredentialId, - acsEntranceIds: acsEntranceIds, - acsSystemId: acsSystemId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - limit: limit, - locationId: locationId, - pageCursor: pageCursor, - search: search, - spaceId: spaceId - ) - ); - } - - /// - /// Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/entrances/list", requestOptions)) - .EnsureData("/acs/entrances/list") - .AcsEntrances; - } - - /// - /// Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public async Task> ListAsync( - string? accessMethodId = default, - string? acsCredentialId = default, - List? acsEntranceIds = default, - string? acsSystemId = default, - string? connectedAccountId = default, - string? customerKey = default, - int? limit = default, - string? locationId = default, - string? pageCursor = default, - string? search = default, - string? spaceId = default - ) - { - return ( - await ListAsync( - new ListRequest( - accessMethodId: accessMethodId, - acsCredentialId: acsCredentialId, - acsEntranceIds: acsEntranceIds, - acsSystemId: acsSystemId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - limit: limit, - locationId: locationId, - pageCursor: pageCursor, - search: search, - spaceId: spaceId - ) - ) - ); - } - - /// - /// Request parameters for List Credentials with Access to an Entrance. - /// - [DataContract(Name = "listCredentialsWithAccessRequest_request")] - public class ListCredentialsWithAccessRequest - { - [JsonConstructorAttribute] - protected ListCredentialsWithAccessRequest() { } - - public ListCredentialsWithAccessRequest( - string acsEntranceId = default, - List? includeIf = default - ) - { - AcsEntranceId = acsEntranceId; - IncludeIf = includeIf; - } - - /// - /// Conditions that credentials must meet to be included in the returned list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum IncludeIfEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "visionline_metadata.is_valid")] - VisionlineMetadataIsValid = 1, - } - - /// - /// ID of the entrance for which you want to list all credentials that grant access. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - /// - /// Conditions that credentials must meet to be included in the returned list. - /// - [DataMember(Name = "include_if", IsRequired = false, EmitDefaultValue = false)] - public List? IncludeIf { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listCredentialsWithAccessResponse_response")] - public class ListCredentialsWithAccessResponse - { - [JsonConstructorAttribute] - protected ListCredentialsWithAccessResponse() { } - - public ListCredentialsWithAccessResponse(List acsCredentials = default) - { - AcsCredentials = acsCredentials; - } - - /// - /// OK - /// - [DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] - public List AcsCredentials { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public List ListCredentialsWithAccess( - ListCredentialsWithAccessRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get( - "/acs/entrances/list_credentials_with_access", - requestOptions - ) - .EnsureData("/acs/entrances/list_credentials_with_access") - .AcsCredentials; - } - - /// - /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public List ListCredentialsWithAccess( - string acsEntranceId = default, - List? includeIf = default - ) - { - return ListCredentialsWithAccess( - new ListCredentialsWithAccessRequest( - acsEntranceId: acsEntranceId, - includeIf: includeIf - ) - ); - } - - /// - /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public async Task> ListCredentialsWithAccessAsync( - ListCredentialsWithAccessRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/acs/entrances/list_credentials_with_access", - requestOptions - ) - ) - .EnsureData("/acs/entrances/list_credentials_with_access") - .AcsCredentials; - } - - /// - /// Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - public async Task> ListCredentialsWithAccessAsync( - string acsEntranceId = default, - List? includeIf = default - ) - { - return ( - await ListCredentialsWithAccessAsync( - new ListCredentialsWithAccessRequest( - acsEntranceId: acsEntranceId, - includeIf: includeIf - ) - ) - ); - } - - /// - /// Request parameters for Unlock an Entrance. - /// - [DataContract(Name = "unlockRequest_request")] - public class UnlockRequest - { - [JsonConstructorAttribute] - protected UnlockRequest() { } - - public UnlockRequest(string acsCredentialId = default, string acsEntranceId = default) - { - AcsCredentialId = acsCredentialId; - AcsEntranceId = acsEntranceId; - } - - /// - /// ID of the cloud_key credential to use for the unlock operation. - /// - [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the entrance to unlock. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "unlockResponse_response")] - public class UnlockResponse - { - [JsonConstructorAttribute] - protected UnlockResponse() { } - - public UnlockResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. - /// - public ActionAttempt Unlock(UnlockRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/acs/entrances/unlock", requestOptions) - .EnsureData("/acs/entrances/unlock") - .ActionAttempt; - } - - /// - /// Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. - /// - public ActionAttempt Unlock( - string acsCredentialId = default, - string acsEntranceId = default - ) - { - return Unlock( - new UnlockRequest(acsCredentialId: acsCredentialId, acsEntranceId: acsEntranceId) - ); - } - - /// - /// Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. - /// - public async Task UnlockAsync(UnlockRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/acs/entrances/unlock", requestOptions)) - .EnsureData("/acs/entrances/unlock") - .ActionAttempt; - } - - /// - /// Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. - /// - public async Task UnlockAsync( - string acsCredentialId = default, - string acsEntranceId = default - ) - { - return ( - await UnlockAsync( - new UnlockRequest( - acsCredentialId: acsCredentialId, - acsEntranceId: acsEntranceId - ) - ) - ); - } - } +public class EntrancesAcs +{ +private ISeamClient _seam; + +public EntrancesAcs(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get an Entrance. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string acsEntranceId = default) +{ +AcsEntranceId = acsEntranceId; +} + +/// +/// ID of the entrance that you want to get. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AcsEntrance acsEntrance = default) +{ +AcsEntrance = acsEntrance; +} + +/// +/// OK +/// +[DataMember(Name = "acs_entrance", IsRequired = false, EmitDefaultValue = false)] +public AcsEntrance AcsEntrance { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public AcsEntrance Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/entrances/get", requestOptions).EnsureData("/acs/entrances/get").AcsEntrance; +} + +/// +/// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public AcsEntrance Get(string acsEntranceId = default) +{ +return Get(new GetRequest(acsEntranceId: acsEntranceId)); +} + +/// +/// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/entrances/get", requestOptions)).EnsureData("/acs/entrances/get").AcsEntrance; +} + +/// +/// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public async Task GetAsync(string acsEntranceId = default) +{ +return (await GetAsync(new GetRequest(acsEntranceId: acsEntranceId))); +} + +/// +/// Request parameters for Grant an ACS User Access to an Entrance. +/// +[DataContract(Name = "grantAccessRequest_request")] +public class GrantAccessRequest +{ +[JsonConstructorAttribute] +protected GrantAccessRequest() { } + +public GrantAccessRequest(string acsEntranceId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsEntranceId = acsEntranceId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the entrance to which you want to grant an access system user access. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +/// +/// ID of the access system user to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public void GrantAccess(GrantAccessRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/entrances/grant_access", requestOptions); +} + +/// +/// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public void GrantAccess(string acsEntranceId = default, string? acsUserId = default, string? userIdentityId = default) +{ +GrantAccess(new GrantAccessRequest(acsEntranceId: acsEntranceId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public async Task GrantAccessAsync(GrantAccessRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/entrances/grant_access", requestOptions); +} + +/// +/// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public async Task GrantAccessAsync(string acsEntranceId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await GrantAccessAsync(new GrantAccessRequest(acsEntranceId: acsEntranceId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for List Entrances. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, string? connectedAccountId = default, string? customerKey = default, int? limit = default, string? locationId = default, string? pageCursor = default, string? search = default, string? spaceId = default) +{ +AccessMethodId = accessMethodId; +AcsCredentialId = acsCredentialId; +AcsEntranceIds = acsEntranceIds; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CustomerKey = customerKey; +Limit = limit; +LocationId = locationId; +PageCursor = pageCursor; +Search = search; +SpaceId = spaceId; +} + +/// +/// ID of the access method for which you want to retrieve all entrances to which it grants access. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessMethodId { get; set; } + +/// +/// ID of the credential for which you want to retrieve all entrances. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialId { get; set; } + +/// +/// IDs of the entrances for which you want to retrieve all entrances. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsEntranceIds { get; set; } + +/// +/// ID of the access system for which you want to retrieve all entrances. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the connected account for which you want to retrieve all entrances. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Customer key for which you want to list entrances. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public int? Limit { get; set; } + +[Obsolete("Use `space_id`.")] +[DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] +public string? LocationId { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned entrances to include all records that satisfy a partial match using `display_name`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// ID of the space for which you want to list entrances. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List acsEntrances = default) +{ +AcsEntrances = acsEntrances; +} + +/// +/// OK +/// +[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public List AcsEntrances { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/entrances/list", requestOptions).EnsureData("/acs/entrances/list").AcsEntrances; +} + +/// +/// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public List List(string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, string? connectedAccountId = default, string? customerKey = default, int? limit = default, string? locationId = default, string? pageCursor = default, string? search = default, string? spaceId = default) +{ +return List(new ListRequest(accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEntranceIds: acsEntranceIds, acsSystemId: acsSystemId, connectedAccountId: connectedAccountId, customerKey: customerKey, limit: limit, locationId: locationId, pageCursor: pageCursor, search: search, spaceId: spaceId)); +} + +/// +/// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/entrances/list", requestOptions)).EnsureData("/acs/entrances/list").AcsEntrances; +} + +/// +/// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public async Task> ListAsync(string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, string? connectedAccountId = default, string? customerKey = default, int? limit = default, string? locationId = default, string? pageCursor = default, string? search = default, string? spaceId = default) +{ +return (await ListAsync(new ListRequest(accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEntranceIds: acsEntranceIds, acsSystemId: acsSystemId, connectedAccountId: connectedAccountId, customerKey: customerKey, limit: limit, locationId: locationId, pageCursor: pageCursor, search: search, spaceId: spaceId))); +} + +/// +/// Request parameters for List Credentials with Access to an Entrance. +/// +[DataContract(Name = "listCredentialsWithAccessRequest_request")] +public class ListCredentialsWithAccessRequest +{ +[JsonConstructorAttribute] +protected ListCredentialsWithAccessRequest() { } + +public ListCredentialsWithAccessRequest(string acsEntranceId = default, List? includeIf = default) +{ +AcsEntranceId = acsEntranceId; +IncludeIf = includeIf; +} + +/// +/// Conditions that credentials must meet to be included in the returned list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum IncludeIfEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "visionline_metadata.is_valid")] +VisionlineMetadataIsValid = 1, +} + +/// +/// ID of the entrance for which you want to list all credentials that grant access. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +/// +/// Conditions that credentials must meet to be included in the returned list. +/// +[DataMember(Name = "include_if", IsRequired = false, EmitDefaultValue = false)] +public List? IncludeIf { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listCredentialsWithAccessResponse_response")] +public class ListCredentialsWithAccessResponse +{ +[JsonConstructorAttribute] +protected ListCredentialsWithAccessResponse() { } + +public ListCredentialsWithAccessResponse(List acsCredentials = default) +{ +AcsCredentials = acsCredentials; +} + +/// +/// OK +/// +[DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] +public List AcsCredentials { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public List ListCredentialsWithAccess(ListCredentialsWithAccessRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/entrances/list_credentials_with_access", requestOptions).EnsureData("/acs/entrances/list_credentials_with_access").AcsCredentials; +} + +/// +/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public List ListCredentialsWithAccess(string acsEntranceId = default, List? includeIf = default) +{ +return ListCredentialsWithAccess(new ListCredentialsWithAccessRequest(acsEntranceId: acsEntranceId, includeIf: includeIf)); +} + +/// +/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public async Task> ListCredentialsWithAccessAsync(ListCredentialsWithAccessRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/entrances/list_credentials_with_access", requestOptions)).EnsureData("/acs/entrances/list_credentials_with_access").AcsCredentials; +} + +/// +/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +public async Task> ListCredentialsWithAccessAsync(string acsEntranceId = default, List? includeIf = default) +{ +return (await ListCredentialsWithAccessAsync(new ListCredentialsWithAccessRequest(acsEntranceId: acsEntranceId, includeIf: includeIf))); +} + +/// +/// Request parameters for Unlock an Entrance. +/// +[DataContract(Name = "unlockRequest_request")] +public class UnlockRequest +{ +[JsonConstructorAttribute] +protected UnlockRequest() { } + +public UnlockRequest(string acsCredentialId = default, string acsEntranceId = default) +{ +AcsCredentialId = acsCredentialId; +AcsEntranceId = acsEntranceId; +} + +/// +/// ID of the cloud_key credential to use for the unlock operation. +/// +[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the entrance to unlock. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "unlockResponse_response")] +public class UnlockResponse +{ +[JsonConstructorAttribute] +protected UnlockResponse() { } + +public UnlockResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. +/// +public ActionAttempt Unlock(UnlockRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/acs/entrances/unlock", requestOptions).EnsureData("/acs/entrances/unlock").ActionAttempt; +} + +/// +/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. +/// +public ActionAttempt Unlock(string acsCredentialId = default, string acsEntranceId = default) +{ +return Unlock(new UnlockRequest(acsCredentialId: acsCredentialId, acsEntranceId: acsEntranceId)); +} + +/// +/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. +/// +public async Task UnlockAsync(UnlockRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/acs/entrances/unlock", requestOptions)).EnsureData("/acs/entrances/unlock").ActionAttempt; +} + +/// +/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. +/// +public async Task UnlockAsync(string acsCredentialId = default, string acsEntranceId = default) +{ +return (await UnlockAsync(new UnlockRequest(acsCredentialId: acsCredentialId, acsEntranceId: acsEntranceId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.EntrancesAcs EntrancesAcs => new(this); - } +public partial class SeamClient +{ +public Api.EntrancesAcs EntrancesAcs => new(this); +} - public partial interface ISeamClient - { - public Api.EntrancesAcs EntrancesAcs { get; } - } +public partial interface ISeamClient +{ +public Api.EntrancesAcs EntrancesAcs { get; } +} } diff --git a/src/Seam/Api/Events.cs b/src/Seam/Api/Events.cs index 25eda9fb..96be59e7 100644 --- a/src/Seam/Api/Events.cs +++ b/src/Seam/Api/Events.cs @@ -9,1340 +9,1159 @@ namespace Seam.Api { - public class Events - { - private ISeamClient _seam; - - public Events(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get an Event. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest( - string? deviceId = default, - string? eventId = default, - string? eventType = default - ) - { - DeviceId = deviceId; - EventId = eventId; - EventType = eventType; - } - - /// - /// Unique identifier for the device that triggered the event that you want to get. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Unique identifier for the event that you want to get. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public string? EventId { get; set; } - - /// - /// Type of the event that you want to get. - /// - [DataMember(Name = "event_type", IsRequired = false, EmitDefaultValue = false)] - public string? EventType { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(Event event_ = default) - { - Event = event_; - } - - /// - /// OK - /// - [DataMember(Name = "event", IsRequired = false, EmitDefaultValue = false)] - public Event Event { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place. - /// - public Event Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/events/get", requestOptions) - .EnsureData("/events/get") - .Event; - } - - /// - /// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place. - /// - public Event Get( - string? deviceId = default, - string? eventId = default, - string? eventType = default - ) - { - return Get(new GetRequest(deviceId: deviceId, eventId: eventId, eventType: eventType)); - } - - /// - /// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/events/get", requestOptions)) - .EnsureData("/events/get") - .Event; - } - - /// - /// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place. - /// - public async Task GetAsync( - string? deviceId = default, - string? eventId = default, - string? eventType = default - ) - { - return ( - await GetAsync( - new GetRequest(deviceId: deviceId, eventId: eventId, eventType: eventType) - ) - ); - } - - /// - /// Request parameters for List Events. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? accessCodeId = default, - List? accessCodeIds = default, - string? accessGrantId = default, - List? accessGrantIds = default, - string? accessMethodId = default, - List? accessMethodIds = default, - string? acsAccessGroupId = default, - string? acsCredentialId = default, - string? acsEncoderId = default, - string? acsEntranceId = default, - string? acsSystemId = default, - List? acsSystemIds = default, - string? acsUserId = default, - List? between = default, - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - string? deviceId = default, - List? deviceIds = default, - List? eventIds = default, - ListRequest.EventTypeEnum? eventType = default, - List? eventTypes = default, - float? limit = default, - string? since = default, - string? spaceId = default, - List? spaceIds = default, - float? unstableOffset = default, - string? userIdentityId = default - ) - { - AccessCodeId = accessCodeId; - AccessCodeIds = accessCodeIds; - AccessGrantId = accessGrantId; - AccessGrantIds = accessGrantIds; - AccessMethodId = accessMethodId; - AccessMethodIds = accessMethodIds; - AcsAccessGroupId = acsAccessGroupId; - AcsCredentialId = acsCredentialId; - AcsEncoderId = acsEncoderId; - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - AcsSystemIds = acsSystemIds; - AcsUserId = acsUserId; - Between = between; - ConnectWebviewId = connectWebviewId; - ConnectedAccountId = connectedAccountId; - CustomerKey = customerKey; - DeviceId = deviceId; - DeviceIds = deviceIds; - EventIds = eventIds; - EventType = eventType; - EventTypes = eventTypes; - Limit = limit; - Since = since; - SpaceId = spaceId; - SpaceIds = spaceIds; - UnstableOffset = unstableOffset; - UserIdentityId = userIdentityId; - } - - /// - /// Type of the events that you want to list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum EventTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "access_code.created")] - AccessCodeCreated = 1, - - [EnumMember(Value = "access_code.changed")] - AccessCodeChanged = 2, - - [EnumMember(Value = "access_code.name_changed")] - AccessCodeNameChanged = 3, - - [EnumMember(Value = "access_code.code_changed")] - AccessCodeCodeChanged = 4, - - [EnumMember(Value = "access_code.time_frame_changed")] - AccessCodeTimeFrameChanged = 5, - - [EnumMember(Value = "access_code.mutations_requested")] - AccessCodeMutationsRequested = 6, - - [EnumMember(Value = "access_code.scheduled_on_device")] - AccessCodeScheduledOnDevice = 7, - - [EnumMember(Value = "access_code.set_on_device")] - AccessCodeSetOnDevice = 8, - - [EnumMember(Value = "access_code.removed_from_device")] - AccessCodeRemovedFromDevice = 9, - - [EnumMember(Value = "access_code.delay_in_setting_on_device")] - AccessCodeDelayInSettingOnDevice = 10, - - [EnumMember(Value = "access_code.failed_to_set_on_device")] - AccessCodeFailedToSetOnDevice = 11, - - [EnumMember(Value = "access_code.issued")] - AccessCodeIssued = 12, - - [EnumMember(Value = "access_code.delay_in_issuing")] - AccessCodeDelayInIssuing = 13, - - [EnumMember(Value = "access_code.failed_to_issue")] - AccessCodeFailedToIssue = 14, - - [EnumMember(Value = "access_code.failed_to_update")] - AccessCodeFailedToUpdate = 15, +public class Events +{ +private ISeamClient _seam; + +public Events(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get an Event. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? deviceId = default, string? eventId = default, string? eventType = default) +{ +DeviceId = deviceId; +EventId = eventId; +EventType = eventType; +} + +/// +/// Unique identifier for the device that triggered the event that you want to get. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Unique identifier for the event that you want to get. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public string? EventId { get; set; } + +/// +/// Type of the event that you want to get. +/// +[DataMember(Name = "event_type", IsRequired = false, EmitDefaultValue = false)] +public string? EventType { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(Event event_ = default) +{ +Event = event_; +} + +/// +/// OK +/// +[DataMember(Name = "event", IsRequired = false, EmitDefaultValue = false)] +public Event Event { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "access_code.failed_to_expire")] - AccessCodeFailedToExpire = 16, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "access_code.deleted")] - AccessCodeDeleted = 17, +/// +/// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. +/// +public Event Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/events/get", requestOptions).EnsureData("/events/get").Event; +} - [EnumMember(Value = "access_code.delay_in_removing_from_device")] - AccessCodeDelayInRemovingFromDevice = 18, +/// +/// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. +/// +public Event Get(string? deviceId = default, string? eventId = default, string? eventType = default) +{ +return Get(new GetRequest(deviceId: deviceId, eventId: eventId, eventType: eventType)); +} - [EnumMember(Value = "access_code.failed_to_remove_from_device")] - AccessCodeFailedToRemoveFromDevice = 19, +/// +/// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/events/get", requestOptions)).EnsureData("/events/get").Event; +} - [EnumMember(Value = "access_code.modified_external_to_seam")] - AccessCodeModifiedExternalToSeam = 20, +/// +/// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. +/// +public async Task GetAsync(string? deviceId = default, string? eventId = default, string? eventType = default) +{ +return (await GetAsync(new GetRequest(deviceId: deviceId, eventId: eventId, eventType: eventType))); +} - [EnumMember(Value = "access_code.deleted_external_to_seam")] - AccessCodeDeletedExternalToSeam = 21, +/// +/// Request parameters for List Events. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } - [EnumMember(Value = "access_code.backup_access_code_pulled")] - AccessCodeBackupAccessCodePulled = 22, +public ListRequest(string? accessCodeId = default, List? accessCodeIds = default, string? accessGrantId = default, List? accessGrantIds = default, string? accessMethodId = default, List? accessMethodIds = default, string? acsAccessGroupId = default, string? acsCredentialId = default, string? acsEncoderId = default, string? acsEntranceId = default, string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, string? deviceId = default, List? deviceIds = default, List? eventIds = default, ListRequest.EventTypeEnum? eventType = default, List? eventTypes = default, float? limit = default, string? since = default, string? spaceId = default, List? spaceIds = default, float? unstableOffset = default, string? userIdentityId = default) +{ +AccessCodeId = accessCodeId; +AccessCodeIds = accessCodeIds; +AccessGrantId = accessGrantId; +AccessGrantIds = accessGrantIds; +AccessMethodId = accessMethodId; +AccessMethodIds = accessMethodIds; +AcsAccessGroupId = acsAccessGroupId; +AcsCredentialId = acsCredentialId; +AcsEncoderId = acsEncoderId; +AcsEntranceId = acsEntranceId; +AcsSystemId = acsSystemId; +AcsSystemIds = acsSystemIds; +AcsUserId = acsUserId; +Between = between; +ConnectWebviewId = connectWebviewId; +ConnectedAccountId = connectedAccountId; +CustomerKey = customerKey; +DeviceId = deviceId; +DeviceIds = deviceIds; +EventIds = eventIds; +EventType = eventType; +EventTypes = eventTypes; +Limit = limit; +Since = since; +SpaceId = spaceId; +SpaceIds = spaceIds; +UnstableOffset = unstableOffset; +UserIdentityId = userIdentityId; +} - [EnumMember(Value = "access_code.unmanaged.converted_to_managed")] - AccessCodeUnmanagedConvertedToManaged = 23, +/// +/// Type of the events that you want to list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum EventTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "access_code.created")] +AccessCodeCreated = 1, + +[EnumMember(Value = "access_code.changed")] +AccessCodeChanged = 2, + +[EnumMember(Value = "access_code.name_changed")] +AccessCodeNameChanged = 3, + +[EnumMember(Value = "access_code.code_changed")] +AccessCodeCodeChanged = 4, + +[EnumMember(Value = "access_code.time_frame_changed")] +AccessCodeTimeFrameChanged = 5, + +[EnumMember(Value = "access_code.mutations_requested")] +AccessCodeMutationsRequested = 6, - [EnumMember(Value = "access_code.unmanaged.failed_to_convert_to_managed")] - AccessCodeUnmanagedFailedToConvertToManaged = 24, +[EnumMember(Value = "access_code.scheduled_on_device")] +AccessCodeScheduledOnDevice = 7, - [EnumMember(Value = "access_code.unmanaged.created")] - AccessCodeUnmanagedCreated = 25, +[EnumMember(Value = "access_code.set_on_device")] +AccessCodeSetOnDevice = 8, - [EnumMember(Value = "access_code.unmanaged.removed")] - AccessCodeUnmanagedRemoved = 26, +[EnumMember(Value = "access_code.removed_from_device")] +AccessCodeRemovedFromDevice = 9, - [EnumMember(Value = "access_grant.created")] - AccessGrantCreated = 27, +[EnumMember(Value = "access_code.delay_in_setting_on_device")] +AccessCodeDelayInSettingOnDevice = 10, - [EnumMember(Value = "access_grant.deleted")] - AccessGrantDeleted = 28, +[EnumMember(Value = "access_code.failed_to_set_on_device")] +AccessCodeFailedToSetOnDevice = 11, - [EnumMember(Value = "access_grant.access_granted_to_all_doors")] - AccessGrantAccessGrantedToAllDoors = 29, +[EnumMember(Value = "access_code.issued")] +AccessCodeIssued = 12, - [EnumMember(Value = "access_grant.access_granted_to_door")] - AccessGrantAccessGrantedToDoor = 30, +[EnumMember(Value = "access_code.delay_in_issuing")] +AccessCodeDelayInIssuing = 13, - [EnumMember(Value = "access_grant.access_to_door_lost")] - AccessGrantAccessToDoorLost = 31, +[EnumMember(Value = "access_code.failed_to_issue")] +AccessCodeFailedToIssue = 14, - [EnumMember(Value = "access_grant.access_times_changed")] - AccessGrantAccessTimesChanged = 32, +[EnumMember(Value = "access_code.failed_to_update")] +AccessCodeFailedToUpdate = 15, - [EnumMember(Value = "access_grant.could_not_create_requested_access_methods")] - AccessGrantCouldNotCreateRequestedAccessMethods = 33, +[EnumMember(Value = "access_code.failed_to_delete")] +AccessCodeFailedToDelete = 16, - [EnumMember(Value = "access_method.issued")] - AccessMethodIssued = 34, +[EnumMember(Value = "access_code.deleted")] +AccessCodeDeleted = 17, - [EnumMember(Value = "access_method.revoked")] - AccessMethodRevoked = 35, +[EnumMember(Value = "access_code.delay_in_removing_from_device")] +AccessCodeDelayInRemovingFromDevice = 18, - [EnumMember(Value = "access_method.card_encoding_required")] - AccessMethodCardEncodingRequired = 36, +[EnumMember(Value = "access_code.failed_to_remove_from_device")] +AccessCodeFailedToRemoveFromDevice = 19, - [EnumMember(Value = "access_method.deleted")] - AccessMethodDeleted = 37, +[EnumMember(Value = "access_code.modified_external_to_seam")] +AccessCodeModifiedExternalToSeam = 20, - [EnumMember(Value = "access_method.reissued")] - AccessMethodReissued = 38, +[EnumMember(Value = "access_code.deleted_external_to_seam")] +AccessCodeDeletedExternalToSeam = 21, - [EnumMember(Value = "access_method.created")] - AccessMethodCreated = 39, +[EnumMember(Value = "access_code.backup_access_code_pulled")] +AccessCodeBackupAccessCodePulled = 22, - [EnumMember(Value = "access_method.delay_in_issuing")] - AccessMethodDelayInIssuing = 40, +[EnumMember(Value = "access_code.unmanaged.converted_to_managed")] +AccessCodeUnmanagedConvertedToManaged = 23, - [EnumMember(Value = "access_method.failed_to_issue")] - AccessMethodFailedToIssue = 41, +[EnumMember(Value = "access_code.unmanaged.failed_to_convert_to_managed")] +AccessCodeUnmanagedFailedToConvertToManaged = 24, - [EnumMember(Value = "acs_system.connected")] - AcsSystemConnected = 42, +[EnumMember(Value = "access_code.unmanaged.created")] +AccessCodeUnmanagedCreated = 25, - [EnumMember(Value = "acs_system.added")] - AcsSystemAdded = 43, +[EnumMember(Value = "access_code.unmanaged.removed")] +AccessCodeUnmanagedRemoved = 26, - [EnumMember(Value = "acs_system.disconnected")] - AcsSystemDisconnected = 44, +[EnumMember(Value = "access_grant.created")] +AccessGrantCreated = 27, - [EnumMember(Value = "acs_credential.deleted")] - AcsCredentialDeleted = 45, +[EnumMember(Value = "access_grant.deleted")] +AccessGrantDeleted = 28, - [EnumMember(Value = "acs_credential.issued")] - AcsCredentialIssued = 46, +[EnumMember(Value = "access_grant.access_granted_to_all_doors")] +AccessGrantAccessGrantedToAllDoors = 29, - [EnumMember(Value = "acs_credential.reissued")] - AcsCredentialReissued = 47, +[EnumMember(Value = "access_grant.access_granted_to_door")] +AccessGrantAccessGrantedToDoor = 30, - [EnumMember(Value = "acs_credential.invalidated")] - AcsCredentialInvalidated = 48, +[EnumMember(Value = "access_grant.access_to_door_lost")] +AccessGrantAccessToDoorLost = 31, - [EnumMember(Value = "acs_user.created")] - AcsUserCreated = 49, +[EnumMember(Value = "access_grant.access_times_changed")] +AccessGrantAccessTimesChanged = 32, - [EnumMember(Value = "acs_user.deleted")] - AcsUserDeleted = 50, +[EnumMember(Value = "access_grant.could_not_create_requested_access_methods")] +AccessGrantCouldNotCreateRequestedAccessMethods = 33, - [EnumMember(Value = "acs_encoder.added")] - AcsEncoderAdded = 51, +[EnumMember(Value = "access_method.issued")] +AccessMethodIssued = 34, - [EnumMember(Value = "acs_encoder.removed")] - AcsEncoderRemoved = 52, +[EnumMember(Value = "access_method.revoked")] +AccessMethodRevoked = 35, - [EnumMember(Value = "acs_access_group.deleted")] - AcsAccessGroupDeleted = 53, +[EnumMember(Value = "access_method.card_encoding_required")] +AccessMethodCardEncodingRequired = 36, - [EnumMember(Value = "acs_entrance.added")] - AcsEntranceAdded = 54, +[EnumMember(Value = "access_method.deleted")] +AccessMethodDeleted = 37, - [EnumMember(Value = "acs_entrance.removed")] - AcsEntranceRemoved = 55, +[EnumMember(Value = "access_method.reissued")] +AccessMethodReissued = 38, - [EnumMember(Value = "client_session.deleted")] - ClientSessionDeleted = 56, +[EnumMember(Value = "access_method.created")] +AccessMethodCreated = 39, - [EnumMember(Value = "connected_account.connected")] - ConnectedAccountConnected = 57, +[EnumMember(Value = "access_method.delay_in_issuing")] +AccessMethodDelayInIssuing = 40, - [EnumMember(Value = "connected_account.created")] - ConnectedAccountCreated = 58, +[EnumMember(Value = "access_method.failed_to_issue")] +AccessMethodFailedToIssue = 41, - [EnumMember(Value = "connected_account.successful_login")] - ConnectedAccountSuccessfulLogin = 59, +[EnumMember(Value = "acs_system.connected")] +AcsSystemConnected = 42, - [EnumMember(Value = "connected_account.disconnected")] - ConnectedAccountDisconnected = 60, +[EnumMember(Value = "acs_system.added")] +AcsSystemAdded = 43, - [EnumMember(Value = "connected_account.completed_first_sync")] - ConnectedAccountCompletedFirstSync = 61, +[EnumMember(Value = "acs_system.disconnected")] +AcsSystemDisconnected = 44, - [EnumMember(Value = "connected_account.deleted")] - ConnectedAccountDeleted = 62, +[EnumMember(Value = "acs_credential.deleted")] +AcsCredentialDeleted = 45, - [EnumMember(Value = "connected_account.completed_first_sync_after_reconnection")] - ConnectedAccountCompletedFirstSyncAfterReconnection = 63, +[EnumMember(Value = "acs_credential.issued")] +AcsCredentialIssued = 46, - [EnumMember(Value = "connected_account.reauthorization_requested")] - ConnectedAccountReauthorizationRequested = 64, +[EnumMember(Value = "acs_credential.reissued")] +AcsCredentialReissued = 47, - [EnumMember(Value = "action_attempt.lock_door.succeeded")] - ActionAttemptLockDoorSucceeded = 65, +[EnumMember(Value = "acs_credential.invalidated")] +AcsCredentialInvalidated = 48, - [EnumMember(Value = "action_attempt.lock_door.failed")] - ActionAttemptLockDoorFailed = 66, +[EnumMember(Value = "acs_user.created")] +AcsUserCreated = 49, - [EnumMember(Value = "action_attempt.unlock_door.succeeded")] - ActionAttemptUnlockDoorSucceeded = 67, +[EnumMember(Value = "acs_user.deleted")] +AcsUserDeleted = 50, - [EnumMember(Value = "action_attempt.unlock_door.failed")] - ActionAttemptUnlockDoorFailed = 68, +[EnumMember(Value = "acs_encoder.added")] +AcsEncoderAdded = 51, - [EnumMember(Value = "action_attempt.simulate_keypad_code_entry.succeeded")] - ActionAttemptSimulateKeypadCodeEntrySucceeded = 69, +[EnumMember(Value = "acs_encoder.removed")] +AcsEncoderRemoved = 52, - [EnumMember(Value = "action_attempt.simulate_keypad_code_entry.failed")] - ActionAttemptSimulateKeypadCodeEntryFailed = 70, +[EnumMember(Value = "acs_access_group.deleted")] +AcsAccessGroupDeleted = 53, - [EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.succeeded")] - ActionAttemptSimulateManualLockViaKeypadSucceeded = 71, +[EnumMember(Value = "acs_entrance.added")] +AcsEntranceAdded = 54, - [EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.failed")] - ActionAttemptSimulateManualLockViaKeypadFailed = 72, +[EnumMember(Value = "acs_entrance.removed")] +AcsEntranceRemoved = 55, - [EnumMember(Value = "connect_webview.login_succeeded")] - ConnectWebviewLoginSucceeded = 73, +[EnumMember(Value = "client_session.deleted")] +ClientSessionDeleted = 56, - [EnumMember(Value = "connect_webview.login_failed")] - ConnectWebviewLoginFailed = 74, +[EnumMember(Value = "connected_account.connected")] +ConnectedAccountConnected = 57, - [EnumMember(Value = "device.connected")] - DeviceConnected = 75, +[EnumMember(Value = "connected_account.created")] +ConnectedAccountCreated = 58, - [EnumMember(Value = "device.added")] - DeviceAdded = 76, +[EnumMember(Value = "connected_account.successful_login")] +ConnectedAccountSuccessfulLogin = 59, - [EnumMember(Value = "device.converted_to_unmanaged")] - DeviceConvertedToUnmanaged = 77, +[EnumMember(Value = "connected_account.disconnected")] +ConnectedAccountDisconnected = 60, - [EnumMember(Value = "device.unmanaged.converted_to_managed")] - DeviceUnmanagedConvertedToManaged = 78, +[EnumMember(Value = "connected_account.completed_first_sync")] +ConnectedAccountCompletedFirstSync = 61, - [EnumMember(Value = "device.unmanaged.connected")] - DeviceUnmanagedConnected = 79, +[EnumMember(Value = "connected_account.deleted")] +ConnectedAccountDeleted = 62, - [EnumMember(Value = "device.disconnected")] - DeviceDisconnected = 80, +[EnumMember(Value = "connected_account.completed_first_sync_after_reconnection")] +ConnectedAccountCompletedFirstSyncAfterReconnection = 63, - [EnumMember(Value = "device.unmanaged.disconnected")] - DeviceUnmanagedDisconnected = 81, +[EnumMember(Value = "connected_account.reauthorization_requested")] +ConnectedAccountReauthorizationRequested = 64, - [EnumMember(Value = "device.tampered")] - DeviceTampered = 82, +[EnumMember(Value = "action_attempt.lock_door.succeeded")] +ActionAttemptLockDoorSucceeded = 65, - [EnumMember(Value = "device.low_battery")] - DeviceLowBattery = 83, +[EnumMember(Value = "action_attempt.lock_door.failed")] +ActionAttemptLockDoorFailed = 66, - [EnumMember(Value = "device.battery_status_changed")] - DeviceBatteryStatusChanged = 84, +[EnumMember(Value = "action_attempt.unlock_door.succeeded")] +ActionAttemptUnlockDoorSucceeded = 67, - [EnumMember(Value = "device.removed")] - DeviceRemoved = 85, +[EnumMember(Value = "action_attempt.unlock_door.failed")] +ActionAttemptUnlockDoorFailed = 68, - [EnumMember(Value = "device.deleted")] - DeviceDeleted = 86, +[EnumMember(Value = "action_attempt.simulate_keypad_code_entry.succeeded")] +ActionAttemptSimulateKeypadCodeEntrySucceeded = 69, - [EnumMember(Value = "device.third_party_integration_detected")] - DeviceThirdPartyIntegrationDetected = 87, +[EnumMember(Value = "action_attempt.simulate_keypad_code_entry.failed")] +ActionAttemptSimulateKeypadCodeEntryFailed = 70, - [EnumMember(Value = "device.third_party_integration_no_longer_detected")] - DeviceThirdPartyIntegrationNoLongerDetected = 88, +[EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.succeeded")] +ActionAttemptSimulateManualLockViaKeypadSucceeded = 71, - [EnumMember(Value = "device.salto.privacy_mode_activated")] - DeviceSaltoPrivacyModeActivated = 89, +[EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.failed")] +ActionAttemptSimulateManualLockViaKeypadFailed = 72, - [EnumMember(Value = "device.salto.privacy_mode_deactivated")] - DeviceSaltoPrivacyModeDeactivated = 90, +[EnumMember(Value = "connect_webview.login_succeeded")] +ConnectWebviewLoginSucceeded = 73, - [EnumMember(Value = "device.connection_became_flaky")] - DeviceConnectionBecameFlaky = 91, +[EnumMember(Value = "connect_webview.login_failed")] +ConnectWebviewLoginFailed = 74, - [EnumMember(Value = "device.connection_stabilized")] - DeviceConnectionStabilized = 92, +[EnumMember(Value = "device.connected")] +DeviceConnected = 75, - [EnumMember(Value = "device.error.subscription_required")] - DeviceErrorSubscriptionRequired = 93, +[EnumMember(Value = "device.added")] +DeviceAdded = 76, - [EnumMember(Value = "device.error.subscription_required.resolved")] - DeviceErrorSubscriptionRequiredResolved = 94, +[EnumMember(Value = "device.converted_to_unmanaged")] +DeviceConvertedToUnmanaged = 77, - [EnumMember(Value = "device.accessory_keypad_connected")] - DeviceAccessoryKeypadConnected = 95, +[EnumMember(Value = "device.unmanaged.converted_to_managed")] +DeviceUnmanagedConvertedToManaged = 78, - [EnumMember(Value = "device.accessory_keypad_disconnected")] - DeviceAccessoryKeypadDisconnected = 96, +[EnumMember(Value = "device.unmanaged.connected")] +DeviceUnmanagedConnected = 79, - [EnumMember(Value = "noise_sensor.noise_threshold_triggered")] - NoiseSensorNoiseThresholdTriggered = 97, +[EnumMember(Value = "device.disconnected")] +DeviceDisconnected = 80, - [EnumMember(Value = "lock.locked")] - LockLocked = 98, +[EnumMember(Value = "device.unmanaged.disconnected")] +DeviceUnmanagedDisconnected = 81, - [EnumMember(Value = "lock.unlocked")] - LockUnlocked = 99, +[EnumMember(Value = "device.tampered")] +DeviceTampered = 82, - [EnumMember(Value = "lock.access_denied")] - LockAccessDenied = 100, +[EnumMember(Value = "device.low_battery")] +DeviceLowBattery = 83, - [EnumMember(Value = "thermostat.climate_preset_activated")] - ThermostatClimatePresetActivated = 101, +[EnumMember(Value = "device.battery_status_changed")] +DeviceBatteryStatusChanged = 84, - [EnumMember(Value = "thermostat.manually_adjusted")] - ThermostatManuallyAdjusted = 102, +[EnumMember(Value = "device.removed")] +DeviceRemoved = 85, - [EnumMember(Value = "thermostat.temperature_threshold_exceeded")] - ThermostatTemperatureThresholdExceeded = 103, +[EnumMember(Value = "device.deleted")] +DeviceDeleted = 86, - [EnumMember(Value = "thermostat.temperature_threshold_no_longer_exceeded")] - ThermostatTemperatureThresholdNoLongerExceeded = 104, +[EnumMember(Value = "device.third_party_integration_detected")] +DeviceThirdPartyIntegrationDetected = 87, - [EnumMember(Value = "thermostat.temperature_reached_set_point")] - ThermostatTemperatureReachedSetPoint = 105, +[EnumMember(Value = "device.third_party_integration_no_longer_detected")] +DeviceThirdPartyIntegrationNoLongerDetected = 88, - [EnumMember(Value = "thermostat.temperature_changed")] - ThermostatTemperatureChanged = 106, +[EnumMember(Value = "device.salto.privacy_mode_activated")] +DeviceSaltoPrivacyModeActivated = 89, - [EnumMember(Value = "device.name_changed")] - DeviceNameChanged = 107, +[EnumMember(Value = "device.salto.privacy_mode_deactivated")] +DeviceSaltoPrivacyModeDeactivated = 90, - [EnumMember(Value = "camera.activated")] - CameraActivated = 108, +[EnumMember(Value = "device.connection_became_flaky")] +DeviceConnectionBecameFlaky = 91, - [EnumMember(Value = "device.doorbell_rang")] - DeviceDoorbellRang = 109, +[EnumMember(Value = "device.connection_stabilized")] +DeviceConnectionStabilized = 92, - [EnumMember(Value = "enrollment_automation.deleted")] - EnrollmentAutomationDeleted = 110, +[EnumMember(Value = "device.error.subscription_required")] +DeviceErrorSubscriptionRequired = 93, - [EnumMember(Value = "phone.deactivated")] - PhoneDeactivated = 111, +[EnumMember(Value = "device.error.subscription_required.resolved")] +DeviceErrorSubscriptionRequiredResolved = 94, - [EnumMember(Value = "space.device_membership_changed")] - SpaceDeviceMembershipChanged = 112, +[EnumMember(Value = "device.accessory_keypad_connected")] +DeviceAccessoryKeypadConnected = 95, - [EnumMember(Value = "space.created")] - SpaceCreated = 113, +[EnumMember(Value = "device.accessory_keypad_disconnected")] +DeviceAccessoryKeypadDisconnected = 96, - [EnumMember(Value = "space.deleted")] - SpaceDeleted = 114, - } +[EnumMember(Value = "noise_sensor.noise_threshold_triggered")] +NoiseSensorNoiseThresholdTriggered = 97, - /// - /// Types of the events that you want to list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum EventTypesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "lock.locked")] +LockLocked = 98, - [EnumMember(Value = "access_code.created")] - AccessCodeCreated = 1, +[EnumMember(Value = "lock.unlocked")] +LockUnlocked = 99, - [EnumMember(Value = "access_code.changed")] - AccessCodeChanged = 2, +[EnumMember(Value = "lock.access_denied")] +LockAccessDenied = 100, - [EnumMember(Value = "access_code.name_changed")] - AccessCodeNameChanged = 3, +[EnumMember(Value = "thermostat.climate_preset_activated")] +ThermostatClimatePresetActivated = 101, - [EnumMember(Value = "access_code.code_changed")] - AccessCodeCodeChanged = 4, +[EnumMember(Value = "thermostat.manually_adjusted")] +ThermostatManuallyAdjusted = 102, - [EnumMember(Value = "access_code.time_frame_changed")] - AccessCodeTimeFrameChanged = 5, +[EnumMember(Value = "thermostat.temperature_threshold_exceeded")] +ThermostatTemperatureThresholdExceeded = 103, - [EnumMember(Value = "access_code.mutations_requested")] - AccessCodeMutationsRequested = 6, +[EnumMember(Value = "thermostat.temperature_threshold_no_longer_exceeded")] +ThermostatTemperatureThresholdNoLongerExceeded = 104, - [EnumMember(Value = "access_code.scheduled_on_device")] - AccessCodeScheduledOnDevice = 7, +[EnumMember(Value = "thermostat.temperature_reached_set_point")] +ThermostatTemperatureReachedSetPoint = 105, - [EnumMember(Value = "access_code.set_on_device")] - AccessCodeSetOnDevice = 8, +[EnumMember(Value = "thermostat.temperature_changed")] +ThermostatTemperatureChanged = 106, - [EnumMember(Value = "access_code.removed_from_device")] - AccessCodeRemovedFromDevice = 9, +[EnumMember(Value = "device.name_changed")] +DeviceNameChanged = 107, - [EnumMember(Value = "access_code.delay_in_setting_on_device")] - AccessCodeDelayInSettingOnDevice = 10, +[EnumMember(Value = "camera.activated")] +CameraActivated = 108, - [EnumMember(Value = "access_code.failed_to_set_on_device")] - AccessCodeFailedToSetOnDevice = 11, +[EnumMember(Value = "device.doorbell_rang")] +DeviceDoorbellRang = 109, - [EnumMember(Value = "access_code.issued")] - AccessCodeIssued = 12, +[EnumMember(Value = "enrollment_automation.deleted")] +EnrollmentAutomationDeleted = 110, - [EnumMember(Value = "access_code.delay_in_issuing")] - AccessCodeDelayInIssuing = 13, +[EnumMember(Value = "phone.deactivated")] +PhoneDeactivated = 111, + +[EnumMember(Value = "space.device_membership_changed")] +SpaceDeviceMembershipChanged = 112, + +[EnumMember(Value = "space.created")] +SpaceCreated = 113, + +[EnumMember(Value = "space.deleted")] +SpaceDeleted = 114, +} + +/// +/// Types of the events that you want to list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum EventTypesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "access_code.failed_to_issue")] - AccessCodeFailedToIssue = 14, +[EnumMember(Value = "access_code.created")] +AccessCodeCreated = 1, - [EnumMember(Value = "access_code.failed_to_update")] - AccessCodeFailedToUpdate = 15, +[EnumMember(Value = "access_code.changed")] +AccessCodeChanged = 2, - [EnumMember(Value = "access_code.failed_to_expire")] - AccessCodeFailedToExpire = 16, +[EnumMember(Value = "access_code.name_changed")] +AccessCodeNameChanged = 3, - [EnumMember(Value = "access_code.deleted")] - AccessCodeDeleted = 17, +[EnumMember(Value = "access_code.code_changed")] +AccessCodeCodeChanged = 4, - [EnumMember(Value = "access_code.delay_in_removing_from_device")] - AccessCodeDelayInRemovingFromDevice = 18, +[EnumMember(Value = "access_code.time_frame_changed")] +AccessCodeTimeFrameChanged = 5, - [EnumMember(Value = "access_code.failed_to_remove_from_device")] - AccessCodeFailedToRemoveFromDevice = 19, +[EnumMember(Value = "access_code.mutations_requested")] +AccessCodeMutationsRequested = 6, - [EnumMember(Value = "access_code.modified_external_to_seam")] - AccessCodeModifiedExternalToSeam = 20, +[EnumMember(Value = "access_code.scheduled_on_device")] +AccessCodeScheduledOnDevice = 7, - [EnumMember(Value = "access_code.deleted_external_to_seam")] - AccessCodeDeletedExternalToSeam = 21, +[EnumMember(Value = "access_code.set_on_device")] +AccessCodeSetOnDevice = 8, - [EnumMember(Value = "access_code.backup_access_code_pulled")] - AccessCodeBackupAccessCodePulled = 22, +[EnumMember(Value = "access_code.removed_from_device")] +AccessCodeRemovedFromDevice = 9, - [EnumMember(Value = "access_code.unmanaged.converted_to_managed")] - AccessCodeUnmanagedConvertedToManaged = 23, +[EnumMember(Value = "access_code.delay_in_setting_on_device")] +AccessCodeDelayInSettingOnDevice = 10, - [EnumMember(Value = "access_code.unmanaged.failed_to_convert_to_managed")] - AccessCodeUnmanagedFailedToConvertToManaged = 24, +[EnumMember(Value = "access_code.failed_to_set_on_device")] +AccessCodeFailedToSetOnDevice = 11, - [EnumMember(Value = "access_code.unmanaged.created")] - AccessCodeUnmanagedCreated = 25, +[EnumMember(Value = "access_code.issued")] +AccessCodeIssued = 12, - [EnumMember(Value = "access_code.unmanaged.removed")] - AccessCodeUnmanagedRemoved = 26, +[EnumMember(Value = "access_code.delay_in_issuing")] +AccessCodeDelayInIssuing = 13, - [EnumMember(Value = "access_grant.created")] - AccessGrantCreated = 27, +[EnumMember(Value = "access_code.failed_to_issue")] +AccessCodeFailedToIssue = 14, - [EnumMember(Value = "access_grant.deleted")] - AccessGrantDeleted = 28, +[EnumMember(Value = "access_code.failed_to_update")] +AccessCodeFailedToUpdate = 15, - [EnumMember(Value = "access_grant.access_granted_to_all_doors")] - AccessGrantAccessGrantedToAllDoors = 29, +[EnumMember(Value = "access_code.failed_to_delete")] +AccessCodeFailedToDelete = 16, - [EnumMember(Value = "access_grant.access_granted_to_door")] - AccessGrantAccessGrantedToDoor = 30, +[EnumMember(Value = "access_code.deleted")] +AccessCodeDeleted = 17, - [EnumMember(Value = "access_grant.access_to_door_lost")] - AccessGrantAccessToDoorLost = 31, +[EnumMember(Value = "access_code.delay_in_removing_from_device")] +AccessCodeDelayInRemovingFromDevice = 18, - [EnumMember(Value = "access_grant.access_times_changed")] - AccessGrantAccessTimesChanged = 32, +[EnumMember(Value = "access_code.failed_to_remove_from_device")] +AccessCodeFailedToRemoveFromDevice = 19, - [EnumMember(Value = "access_grant.could_not_create_requested_access_methods")] - AccessGrantCouldNotCreateRequestedAccessMethods = 33, +[EnumMember(Value = "access_code.modified_external_to_seam")] +AccessCodeModifiedExternalToSeam = 20, - [EnumMember(Value = "access_method.issued")] - AccessMethodIssued = 34, +[EnumMember(Value = "access_code.deleted_external_to_seam")] +AccessCodeDeletedExternalToSeam = 21, - [EnumMember(Value = "access_method.revoked")] - AccessMethodRevoked = 35, +[EnumMember(Value = "access_code.backup_access_code_pulled")] +AccessCodeBackupAccessCodePulled = 22, - [EnumMember(Value = "access_method.card_encoding_required")] - AccessMethodCardEncodingRequired = 36, +[EnumMember(Value = "access_code.unmanaged.converted_to_managed")] +AccessCodeUnmanagedConvertedToManaged = 23, - [EnumMember(Value = "access_method.deleted")] - AccessMethodDeleted = 37, +[EnumMember(Value = "access_code.unmanaged.failed_to_convert_to_managed")] +AccessCodeUnmanagedFailedToConvertToManaged = 24, - [EnumMember(Value = "access_method.reissued")] - AccessMethodReissued = 38, +[EnumMember(Value = "access_code.unmanaged.created")] +AccessCodeUnmanagedCreated = 25, - [EnumMember(Value = "access_method.created")] - AccessMethodCreated = 39, +[EnumMember(Value = "access_code.unmanaged.removed")] +AccessCodeUnmanagedRemoved = 26, - [EnumMember(Value = "access_method.delay_in_issuing")] - AccessMethodDelayInIssuing = 40, +[EnumMember(Value = "access_grant.created")] +AccessGrantCreated = 27, - [EnumMember(Value = "access_method.failed_to_issue")] - AccessMethodFailedToIssue = 41, +[EnumMember(Value = "access_grant.deleted")] +AccessGrantDeleted = 28, - [EnumMember(Value = "acs_system.connected")] - AcsSystemConnected = 42, +[EnumMember(Value = "access_grant.access_granted_to_all_doors")] +AccessGrantAccessGrantedToAllDoors = 29, - [EnumMember(Value = "acs_system.added")] - AcsSystemAdded = 43, +[EnumMember(Value = "access_grant.access_granted_to_door")] +AccessGrantAccessGrantedToDoor = 30, - [EnumMember(Value = "acs_system.disconnected")] - AcsSystemDisconnected = 44, +[EnumMember(Value = "access_grant.access_to_door_lost")] +AccessGrantAccessToDoorLost = 31, - [EnumMember(Value = "acs_credential.deleted")] - AcsCredentialDeleted = 45, +[EnumMember(Value = "access_grant.access_times_changed")] +AccessGrantAccessTimesChanged = 32, - [EnumMember(Value = "acs_credential.issued")] - AcsCredentialIssued = 46, +[EnumMember(Value = "access_grant.could_not_create_requested_access_methods")] +AccessGrantCouldNotCreateRequestedAccessMethods = 33, - [EnumMember(Value = "acs_credential.reissued")] - AcsCredentialReissued = 47, +[EnumMember(Value = "access_method.issued")] +AccessMethodIssued = 34, - [EnumMember(Value = "acs_credential.invalidated")] - AcsCredentialInvalidated = 48, +[EnumMember(Value = "access_method.revoked")] +AccessMethodRevoked = 35, - [EnumMember(Value = "acs_user.created")] - AcsUserCreated = 49, +[EnumMember(Value = "access_method.card_encoding_required")] +AccessMethodCardEncodingRequired = 36, - [EnumMember(Value = "acs_user.deleted")] - AcsUserDeleted = 50, +[EnumMember(Value = "access_method.deleted")] +AccessMethodDeleted = 37, - [EnumMember(Value = "acs_encoder.added")] - AcsEncoderAdded = 51, +[EnumMember(Value = "access_method.reissued")] +AccessMethodReissued = 38, - [EnumMember(Value = "acs_encoder.removed")] - AcsEncoderRemoved = 52, +[EnumMember(Value = "access_method.created")] +AccessMethodCreated = 39, - [EnumMember(Value = "acs_access_group.deleted")] - AcsAccessGroupDeleted = 53, +[EnumMember(Value = "access_method.delay_in_issuing")] +AccessMethodDelayInIssuing = 40, - [EnumMember(Value = "acs_entrance.added")] - AcsEntranceAdded = 54, +[EnumMember(Value = "access_method.failed_to_issue")] +AccessMethodFailedToIssue = 41, - [EnumMember(Value = "acs_entrance.removed")] - AcsEntranceRemoved = 55, +[EnumMember(Value = "acs_system.connected")] +AcsSystemConnected = 42, - [EnumMember(Value = "client_session.deleted")] - ClientSessionDeleted = 56, +[EnumMember(Value = "acs_system.added")] +AcsSystemAdded = 43, - [EnumMember(Value = "connected_account.connected")] - ConnectedAccountConnected = 57, +[EnumMember(Value = "acs_system.disconnected")] +AcsSystemDisconnected = 44, - [EnumMember(Value = "connected_account.created")] - ConnectedAccountCreated = 58, +[EnumMember(Value = "acs_credential.deleted")] +AcsCredentialDeleted = 45, - [EnumMember(Value = "connected_account.successful_login")] - ConnectedAccountSuccessfulLogin = 59, +[EnumMember(Value = "acs_credential.issued")] +AcsCredentialIssued = 46, - [EnumMember(Value = "connected_account.disconnected")] - ConnectedAccountDisconnected = 60, +[EnumMember(Value = "acs_credential.reissued")] +AcsCredentialReissued = 47, - [EnumMember(Value = "connected_account.completed_first_sync")] - ConnectedAccountCompletedFirstSync = 61, +[EnumMember(Value = "acs_credential.invalidated")] +AcsCredentialInvalidated = 48, - [EnumMember(Value = "connected_account.deleted")] - ConnectedAccountDeleted = 62, +[EnumMember(Value = "acs_user.created")] +AcsUserCreated = 49, - [EnumMember(Value = "connected_account.completed_first_sync_after_reconnection")] - ConnectedAccountCompletedFirstSyncAfterReconnection = 63, +[EnumMember(Value = "acs_user.deleted")] +AcsUserDeleted = 50, - [EnumMember(Value = "connected_account.reauthorization_requested")] - ConnectedAccountReauthorizationRequested = 64, +[EnumMember(Value = "acs_encoder.added")] +AcsEncoderAdded = 51, - [EnumMember(Value = "action_attempt.lock_door.succeeded")] - ActionAttemptLockDoorSucceeded = 65, +[EnumMember(Value = "acs_encoder.removed")] +AcsEncoderRemoved = 52, - [EnumMember(Value = "action_attempt.lock_door.failed")] - ActionAttemptLockDoorFailed = 66, +[EnumMember(Value = "acs_access_group.deleted")] +AcsAccessGroupDeleted = 53, - [EnumMember(Value = "action_attempt.unlock_door.succeeded")] - ActionAttemptUnlockDoorSucceeded = 67, +[EnumMember(Value = "acs_entrance.added")] +AcsEntranceAdded = 54, - [EnumMember(Value = "action_attempt.unlock_door.failed")] - ActionAttemptUnlockDoorFailed = 68, +[EnumMember(Value = "acs_entrance.removed")] +AcsEntranceRemoved = 55, - [EnumMember(Value = "action_attempt.simulate_keypad_code_entry.succeeded")] - ActionAttemptSimulateKeypadCodeEntrySucceeded = 69, +[EnumMember(Value = "client_session.deleted")] +ClientSessionDeleted = 56, - [EnumMember(Value = "action_attempt.simulate_keypad_code_entry.failed")] - ActionAttemptSimulateKeypadCodeEntryFailed = 70, +[EnumMember(Value = "connected_account.connected")] +ConnectedAccountConnected = 57, - [EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.succeeded")] - ActionAttemptSimulateManualLockViaKeypadSucceeded = 71, +[EnumMember(Value = "connected_account.created")] +ConnectedAccountCreated = 58, - [EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.failed")] - ActionAttemptSimulateManualLockViaKeypadFailed = 72, +[EnumMember(Value = "connected_account.successful_login")] +ConnectedAccountSuccessfulLogin = 59, - [EnumMember(Value = "connect_webview.login_succeeded")] - ConnectWebviewLoginSucceeded = 73, +[EnumMember(Value = "connected_account.disconnected")] +ConnectedAccountDisconnected = 60, - [EnumMember(Value = "connect_webview.login_failed")] - ConnectWebviewLoginFailed = 74, +[EnumMember(Value = "connected_account.completed_first_sync")] +ConnectedAccountCompletedFirstSync = 61, - [EnumMember(Value = "device.connected")] - DeviceConnected = 75, +[EnumMember(Value = "connected_account.deleted")] +ConnectedAccountDeleted = 62, - [EnumMember(Value = "device.added")] - DeviceAdded = 76, +[EnumMember(Value = "connected_account.completed_first_sync_after_reconnection")] +ConnectedAccountCompletedFirstSyncAfterReconnection = 63, - [EnumMember(Value = "device.converted_to_unmanaged")] - DeviceConvertedToUnmanaged = 77, +[EnumMember(Value = "connected_account.reauthorization_requested")] +ConnectedAccountReauthorizationRequested = 64, - [EnumMember(Value = "device.unmanaged.converted_to_managed")] - DeviceUnmanagedConvertedToManaged = 78, +[EnumMember(Value = "action_attempt.lock_door.succeeded")] +ActionAttemptLockDoorSucceeded = 65, - [EnumMember(Value = "device.unmanaged.connected")] - DeviceUnmanagedConnected = 79, +[EnumMember(Value = "action_attempt.lock_door.failed")] +ActionAttemptLockDoorFailed = 66, - [EnumMember(Value = "device.disconnected")] - DeviceDisconnected = 80, +[EnumMember(Value = "action_attempt.unlock_door.succeeded")] +ActionAttemptUnlockDoorSucceeded = 67, - [EnumMember(Value = "device.unmanaged.disconnected")] - DeviceUnmanagedDisconnected = 81, +[EnumMember(Value = "action_attempt.unlock_door.failed")] +ActionAttemptUnlockDoorFailed = 68, - [EnumMember(Value = "device.tampered")] - DeviceTampered = 82, +[EnumMember(Value = "action_attempt.simulate_keypad_code_entry.succeeded")] +ActionAttemptSimulateKeypadCodeEntrySucceeded = 69, - [EnumMember(Value = "device.low_battery")] - DeviceLowBattery = 83, +[EnumMember(Value = "action_attempt.simulate_keypad_code_entry.failed")] +ActionAttemptSimulateKeypadCodeEntryFailed = 70, - [EnumMember(Value = "device.battery_status_changed")] - DeviceBatteryStatusChanged = 84, +[EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.succeeded")] +ActionAttemptSimulateManualLockViaKeypadSucceeded = 71, - [EnumMember(Value = "device.removed")] - DeviceRemoved = 85, +[EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.failed")] +ActionAttemptSimulateManualLockViaKeypadFailed = 72, - [EnumMember(Value = "device.deleted")] - DeviceDeleted = 86, +[EnumMember(Value = "connect_webview.login_succeeded")] +ConnectWebviewLoginSucceeded = 73, - [EnumMember(Value = "device.third_party_integration_detected")] - DeviceThirdPartyIntegrationDetected = 87, +[EnumMember(Value = "connect_webview.login_failed")] +ConnectWebviewLoginFailed = 74, - [EnumMember(Value = "device.third_party_integration_no_longer_detected")] - DeviceThirdPartyIntegrationNoLongerDetected = 88, +[EnumMember(Value = "device.connected")] +DeviceConnected = 75, - [EnumMember(Value = "device.salto.privacy_mode_activated")] - DeviceSaltoPrivacyModeActivated = 89, +[EnumMember(Value = "device.added")] +DeviceAdded = 76, - [EnumMember(Value = "device.salto.privacy_mode_deactivated")] - DeviceSaltoPrivacyModeDeactivated = 90, +[EnumMember(Value = "device.converted_to_unmanaged")] +DeviceConvertedToUnmanaged = 77, - [EnumMember(Value = "device.connection_became_flaky")] - DeviceConnectionBecameFlaky = 91, +[EnumMember(Value = "device.unmanaged.converted_to_managed")] +DeviceUnmanagedConvertedToManaged = 78, - [EnumMember(Value = "device.connection_stabilized")] - DeviceConnectionStabilized = 92, +[EnumMember(Value = "device.unmanaged.connected")] +DeviceUnmanagedConnected = 79, - [EnumMember(Value = "device.error.subscription_required")] - DeviceErrorSubscriptionRequired = 93, +[EnumMember(Value = "device.disconnected")] +DeviceDisconnected = 80, - [EnumMember(Value = "device.error.subscription_required.resolved")] - DeviceErrorSubscriptionRequiredResolved = 94, +[EnumMember(Value = "device.unmanaged.disconnected")] +DeviceUnmanagedDisconnected = 81, - [EnumMember(Value = "device.accessory_keypad_connected")] - DeviceAccessoryKeypadConnected = 95, +[EnumMember(Value = "device.tampered")] +DeviceTampered = 82, - [EnumMember(Value = "device.accessory_keypad_disconnected")] - DeviceAccessoryKeypadDisconnected = 96, +[EnumMember(Value = "device.low_battery")] +DeviceLowBattery = 83, - [EnumMember(Value = "noise_sensor.noise_threshold_triggered")] - NoiseSensorNoiseThresholdTriggered = 97, +[EnumMember(Value = "device.battery_status_changed")] +DeviceBatteryStatusChanged = 84, - [EnumMember(Value = "lock.locked")] - LockLocked = 98, +[EnumMember(Value = "device.removed")] +DeviceRemoved = 85, - [EnumMember(Value = "lock.unlocked")] - LockUnlocked = 99, +[EnumMember(Value = "device.deleted")] +DeviceDeleted = 86, - [EnumMember(Value = "lock.access_denied")] - LockAccessDenied = 100, +[EnumMember(Value = "device.third_party_integration_detected")] +DeviceThirdPartyIntegrationDetected = 87, - [EnumMember(Value = "thermostat.climate_preset_activated")] - ThermostatClimatePresetActivated = 101, +[EnumMember(Value = "device.third_party_integration_no_longer_detected")] +DeviceThirdPartyIntegrationNoLongerDetected = 88, - [EnumMember(Value = "thermostat.manually_adjusted")] - ThermostatManuallyAdjusted = 102, +[EnumMember(Value = "device.salto.privacy_mode_activated")] +DeviceSaltoPrivacyModeActivated = 89, - [EnumMember(Value = "thermostat.temperature_threshold_exceeded")] - ThermostatTemperatureThresholdExceeded = 103, +[EnumMember(Value = "device.salto.privacy_mode_deactivated")] +DeviceSaltoPrivacyModeDeactivated = 90, - [EnumMember(Value = "thermostat.temperature_threshold_no_longer_exceeded")] - ThermostatTemperatureThresholdNoLongerExceeded = 104, +[EnumMember(Value = "device.connection_became_flaky")] +DeviceConnectionBecameFlaky = 91, - [EnumMember(Value = "thermostat.temperature_reached_set_point")] - ThermostatTemperatureReachedSetPoint = 105, +[EnumMember(Value = "device.connection_stabilized")] +DeviceConnectionStabilized = 92, - [EnumMember(Value = "thermostat.temperature_changed")] - ThermostatTemperatureChanged = 106, +[EnumMember(Value = "device.error.subscription_required")] +DeviceErrorSubscriptionRequired = 93, - [EnumMember(Value = "device.name_changed")] - DeviceNameChanged = 107, +[EnumMember(Value = "device.error.subscription_required.resolved")] +DeviceErrorSubscriptionRequiredResolved = 94, - [EnumMember(Value = "camera.activated")] - CameraActivated = 108, +[EnumMember(Value = "device.accessory_keypad_connected")] +DeviceAccessoryKeypadConnected = 95, - [EnumMember(Value = "device.doorbell_rang")] - DeviceDoorbellRang = 109, +[EnumMember(Value = "device.accessory_keypad_disconnected")] +DeviceAccessoryKeypadDisconnected = 96, - [EnumMember(Value = "enrollment_automation.deleted")] - EnrollmentAutomationDeleted = 110, +[EnumMember(Value = "noise_sensor.noise_threshold_triggered")] +NoiseSensorNoiseThresholdTriggered = 97, - [EnumMember(Value = "phone.deactivated")] - PhoneDeactivated = 111, +[EnumMember(Value = "lock.locked")] +LockLocked = 98, - [EnumMember(Value = "space.device_membership_changed")] - SpaceDeviceMembershipChanged = 112, +[EnumMember(Value = "lock.unlocked")] +LockUnlocked = 99, - [EnumMember(Value = "space.created")] - SpaceCreated = 113, +[EnumMember(Value = "lock.access_denied")] +LockAccessDenied = 100, - [EnumMember(Value = "space.deleted")] - SpaceDeleted = 114, - } +[EnumMember(Value = "thermostat.climate_preset_activated")] +ThermostatClimatePresetActivated = 101, - /// - /// ID of the access code for which you want to list events. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessCodeId { get; set; } - - /// - /// IDs of the access codes for which you want to list events. - /// - [DataMember(Name = "access_code_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AccessCodeIds { get; set; } - - /// - /// ID of the access grant for which you want to list events. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantId { get; set; } - - /// - /// IDs of the access grants for which you want to list events. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantIds { get; set; } - - /// - /// ID of the access method for which you want to list events. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessMethodId { get; set; } - - /// - /// IDs of the access methods for which you want to list events. - /// - [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AccessMethodIds { get; set; } - - /// - /// ID of the ACS access group for which you want to list events. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsAccessGroupId { get; set; } - - /// - /// ID of the ACS credential for which you want to list events. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialId { get; set; } - - /// - /// ID of the ACS encoder for which you want to list events. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEncoderId { get; set; } - - /// - /// ID of the ACS entrance for which you want to list events. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - /// - /// ID of the access system for which you want to list events. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// IDs of the access systems for which you want to list events. - /// - [DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsSystemIds { get; set; } - - /// - /// ID of the ACS user for which you want to list events. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`. - /// - [DataMember(Name = "between", IsRequired = false, EmitDefaultValue = false)] - public List? Between { get; set; } - - /// - /// ID of the Connect Webview for which you want to list events. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectWebviewId { get; set; } - - /// - /// ID of the connected account for which you want to list events. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Customer key for which you want to list events. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// ID of the device for which you want to list events. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// IDs of the devices for which you want to list events. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - - /// - /// IDs of the events that you want to list. - /// - [DataMember(Name = "event_ids", IsRequired = false, EmitDefaultValue = false)] - public List? EventIds { get; set; } - - /// - /// Type of the events that you want to list. - /// - [DataMember(Name = "event_type", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.EventTypeEnum? EventType { get; set; } - - /// - /// Types of the events that you want to list. - /// - [DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] - public List? EventTypes { get; set; } - - /// - /// Numerical limit on the number of events to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`. - /// - [DataMember(Name = "since", IsRequired = false, EmitDefaultValue = false)] - public string? Since { get; set; } - - /// - /// ID of the space for which you want to list events. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - /// - /// IDs of the spaces for which you want to list events. - /// - [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceIds { get; set; } - - /// - /// Offset for the events that you want to list. - /// - [DataMember(Name = "unstable_offset", IsRequired = false, EmitDefaultValue = false)] - public float? UnstableOffset { get; set; } - - /// - /// ID of the user identity for which you want to list events. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List events = default) - { - Events = events; - } - - /// - /// OK - /// - [DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] - public List Events { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/events/list", requestOptions) - .EnsureData("/events/list") - .Events; - } - - /// - /// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place. - /// - public List List( - string? accessCodeId = default, - List? accessCodeIds = default, - string? accessGrantId = default, - List? accessGrantIds = default, - string? accessMethodId = default, - List? accessMethodIds = default, - string? acsAccessGroupId = default, - string? acsCredentialId = default, - string? acsEncoderId = default, - string? acsEntranceId = default, - string? acsSystemId = default, - List? acsSystemIds = default, - string? acsUserId = default, - List? between = default, - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - string? deviceId = default, - List? deviceIds = default, - List? eventIds = default, - ListRequest.EventTypeEnum? eventType = default, - List? eventTypes = default, - float? limit = default, - string? since = default, - string? spaceId = default, - List? spaceIds = default, - float? unstableOffset = default, - string? userIdentityId = default - ) - { - return List( - new ListRequest( - accessCodeId: accessCodeId, - accessCodeIds: accessCodeIds, - accessGrantId: accessGrantId, - accessGrantIds: accessGrantIds, - accessMethodId: accessMethodId, - accessMethodIds: accessMethodIds, - acsAccessGroupId: acsAccessGroupId, - acsCredentialId: acsCredentialId, - acsEncoderId: acsEncoderId, - acsEntranceId: acsEntranceId, - acsSystemId: acsSystemId, - acsSystemIds: acsSystemIds, - acsUserId: acsUserId, - between: between, - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - deviceId: deviceId, - deviceIds: deviceIds, - eventIds: eventIds, - eventType: eventType, - eventTypes: eventTypes, - limit: limit, - since: since, - spaceId: spaceId, - spaceIds: spaceIds, - unstableOffset: unstableOffset, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/events/list", requestOptions)) - .EnsureData("/events/list") - .Events; - } - - /// - /// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place. - /// - public async Task> ListAsync( - string? accessCodeId = default, - List? accessCodeIds = default, - string? accessGrantId = default, - List? accessGrantIds = default, - string? accessMethodId = default, - List? accessMethodIds = default, - string? acsAccessGroupId = default, - string? acsCredentialId = default, - string? acsEncoderId = default, - string? acsEntranceId = default, - string? acsSystemId = default, - List? acsSystemIds = default, - string? acsUserId = default, - List? between = default, - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - string? deviceId = default, - List? deviceIds = default, - List? eventIds = default, - ListRequest.EventTypeEnum? eventType = default, - List? eventTypes = default, - float? limit = default, - string? since = default, - string? spaceId = default, - List? spaceIds = default, - float? unstableOffset = default, - string? userIdentityId = default - ) - { - return ( - await ListAsync( - new ListRequest( - accessCodeId: accessCodeId, - accessCodeIds: accessCodeIds, - accessGrantId: accessGrantId, - accessGrantIds: accessGrantIds, - accessMethodId: accessMethodId, - accessMethodIds: accessMethodIds, - acsAccessGroupId: acsAccessGroupId, - acsCredentialId: acsCredentialId, - acsEncoderId: acsEncoderId, - acsEntranceId: acsEntranceId, - acsSystemId: acsSystemId, - acsSystemIds: acsSystemIds, - acsUserId: acsUserId, - between: between, - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - deviceId: deviceId, - deviceIds: deviceIds, - eventIds: eventIds, - eventType: eventType, - eventTypes: eventTypes, - limit: limit, - since: since, - spaceId: spaceId, - spaceIds: spaceIds, - unstableOffset: unstableOffset, - userIdentityId: userIdentityId - ) - ) - ); - } - } +[EnumMember(Value = "thermostat.manually_adjusted")] +ThermostatManuallyAdjusted = 102, + +[EnumMember(Value = "thermostat.temperature_threshold_exceeded")] +ThermostatTemperatureThresholdExceeded = 103, + +[EnumMember(Value = "thermostat.temperature_threshold_no_longer_exceeded")] +ThermostatTemperatureThresholdNoLongerExceeded = 104, + +[EnumMember(Value = "thermostat.temperature_reached_set_point")] +ThermostatTemperatureReachedSetPoint = 105, + +[EnumMember(Value = "thermostat.temperature_changed")] +ThermostatTemperatureChanged = 106, + +[EnumMember(Value = "device.name_changed")] +DeviceNameChanged = 107, + +[EnumMember(Value = "camera.activated")] +CameraActivated = 108, + +[EnumMember(Value = "device.doorbell_rang")] +DeviceDoorbellRang = 109, + +[EnumMember(Value = "enrollment_automation.deleted")] +EnrollmentAutomationDeleted = 110, + +[EnumMember(Value = "phone.deactivated")] +PhoneDeactivated = 111, + +[EnumMember(Value = "space.device_membership_changed")] +SpaceDeviceMembershipChanged = 112, + +[EnumMember(Value = "space.created")] +SpaceCreated = 113, + +[EnumMember(Value = "space.deleted")] +SpaceDeleted = 114, +} + +/// +/// ID of the access code for which you want to list events. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessCodeId { get; set; } + +/// +/// IDs of the access codes for which you want to list events. +/// +[DataMember(Name = "access_code_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AccessCodeIds { get; set; } + +/// +/// ID of the access grant for which you want to list events. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantId { get; set; } + +/// +/// IDs of the access grants for which you want to list events. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantIds { get; set; } + +/// +/// ID of the access method for which you want to list events. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessMethodId { get; set; } + +/// +/// IDs of the access methods for which you want to list events. +/// +[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AccessMethodIds { get; set; } + +/// +/// ID of the ACS access group for which you want to list events. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsAccessGroupId { get; set; } + +/// +/// ID of the ACS credential for which you want to list events. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialId { get; set; } + +/// +/// ID of the ACS encoder for which you want to list events. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsEncoderId { get; set; } + +/// +/// ID of the ACS entrance for which you want to list events. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsEntranceId { get; set; } + +/// +/// ID of the access system for which you want to list events. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// IDs of the access systems for which you want to list events. +/// +[DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsSystemIds { get; set; } + +/// +/// ID of the ACS user for which you want to list events. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`. +/// +[DataMember(Name = "between", IsRequired = false, EmitDefaultValue = false)] +public List? Between { get; set; } + +/// +/// ID of the Connect Webview for which you want to list events. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectWebviewId { get; set; } + +/// +/// ID of the connected account for which you want to list events. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Customer key for which you want to list events. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// ID of the device for which you want to list events. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// IDs of the devices for which you want to list events. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceIds { get; set; } + +/// +/// IDs of the events that you want to list. +/// +[DataMember(Name = "event_ids", IsRequired = false, EmitDefaultValue = false)] +public List? EventIds { get; set; } + +/// +/// Type of the events that you want to list. +/// +[DataMember(Name = "event_type", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.EventTypeEnum? EventType { get; set; } + +/// +/// Types of the events that you want to list. +/// +[DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] +public List? EventTypes { get; set; } + +/// +/// Numerical limit on the number of events to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`. +/// +[DataMember(Name = "since", IsRequired = false, EmitDefaultValue = false)] +public string? Since { get; set; } + +/// +/// ID of the space for which you want to list events. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +/// +/// IDs of the spaces for which you want to list events. +/// +[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceIds { get; set; } + +/// +/// Offset for the events that you want to list. +/// +[DataMember(Name = "unstable_offset", IsRequired = false, EmitDefaultValue = false)] +public float? UnstableOffset { get; set; } + +/// +/// ID of the user identity for which you want to list events. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List events = default) +{ +Events = events; +} + +/// +/// OK +/// +[DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] +public List Events { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/events/list", requestOptions).EnsureData("/events/list").Events; +} + +/// +/// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. +/// +public List List(string? accessCodeId = default, List? accessCodeIds = default, string? accessGrantId = default, List? accessGrantIds = default, string? accessMethodId = default, List? accessMethodIds = default, string? acsAccessGroupId = default, string? acsCredentialId = default, string? acsEncoderId = default, string? acsEntranceId = default, string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, string? deviceId = default, List? deviceIds = default, List? eventIds = default, ListRequest.EventTypeEnum? eventType = default, List? eventTypes = default, float? limit = default, string? since = default, string? spaceId = default, List? spaceIds = default, float? unstableOffset = default, string? userIdentityId = default) +{ +return List(new ListRequest(accessCodeId: accessCodeId, accessCodeIds: accessCodeIds, accessGrantId: accessGrantId, accessGrantIds: accessGrantIds, accessMethodId: accessMethodId, accessMethodIds: accessMethodIds, acsAccessGroupId: acsAccessGroupId, acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId, acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, acsUserId: acsUserId, between: between, connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceId: deviceId, deviceIds: deviceIds, eventIds: eventIds, eventType: eventType, eventTypes: eventTypes, limit: limit, since: since, spaceId: spaceId, spaceIds: spaceIds, unstableOffset: unstableOffset, userIdentityId: userIdentityId)); +} + +/// +/// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/events/list", requestOptions)).EnsureData("/events/list").Events; +} + +/// +/// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. +/// +public async Task> ListAsync(string? accessCodeId = default, List? accessCodeIds = default, string? accessGrantId = default, List? accessGrantIds = default, string? accessMethodId = default, List? accessMethodIds = default, string? acsAccessGroupId = default, string? acsCredentialId = default, string? acsEncoderId = default, string? acsEntranceId = default, string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, string? deviceId = default, List? deviceIds = default, List? eventIds = default, ListRequest.EventTypeEnum? eventType = default, List? eventTypes = default, float? limit = default, string? since = default, string? spaceId = default, List? spaceIds = default, float? unstableOffset = default, string? userIdentityId = default) +{ +return (await ListAsync(new ListRequest(accessCodeId: accessCodeId, accessCodeIds: accessCodeIds, accessGrantId: accessGrantId, accessGrantIds: accessGrantIds, accessMethodId: accessMethodId, accessMethodIds: accessMethodIds, acsAccessGroupId: acsAccessGroupId, acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId, acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, acsUserId: acsUserId, between: between, connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceId: deviceId, deviceIds: deviceIds, eventIds: eventIds, eventType: eventType, eventTypes: eventTypes, limit: limit, since: since, spaceId: spaceId, spaceIds: spaceIds, unstableOffset: unstableOffset, userIdentityId: userIdentityId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Events Events => new(this); - } - - public partial interface ISeamClient - { - public Api.Events Events { get; } - } +public partial class SeamClient +{ +public Api.Events Events => new(this); +} + +public partial interface ISeamClient +{ +public Api.Events Events { get; } +} } diff --git a/src/Seam/Api/InstantKeys.cs b/src/Seam/Api/InstantKeys.cs index c64a564e..9a83c43a 100644 --- a/src/Seam/Api/InstantKeys.cs +++ b/src/Seam/Api/InstantKeys.cs @@ -9,352 +9,335 @@ namespace Seam.Api { - public class InstantKeys - { - private ISeamClient _seam; - - public InstantKeys(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Delete an Instant Key. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string instantKeyId = default) - { - InstantKeyId = instantKeyId; - } - - /// - /// ID of the Instant Key that you want to delete. - /// - [DataMember(Name = "instant_key_id", IsRequired = true, EmitDefaultValue = false)] - public string InstantKeyId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a specified [Instant Key](https://docs.seam.co/capability-guides/instant-keys). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/instant_keys/delete", requestOptions); - } - - /// - /// Deletes a specified [Instant Key](https://docs.seam.co/capability-guides/instant-keys). - /// - public void Delete(string instantKeyId = default) - { - Delete(new DeleteRequest(instantKeyId: instantKeyId)); - } - - /// - /// Deletes a specified [Instant Key](https://docs.seam.co/capability-guides/instant-keys). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/instant_keys/delete", requestOptions); - } - - /// - /// Deletes a specified [Instant Key](https://docs.seam.co/capability-guides/instant-keys). - /// - public async Task DeleteAsync(string instantKeyId = default) - { - await DeleteAsync(new DeleteRequest(instantKeyId: instantKeyId)); - } - - /// - /// Request parameters for Get an Instant Key. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string? instantKeyId = default, string? instantKeyUrl = default) - { - InstantKeyId = instantKeyId; - InstantKeyUrl = instantKeyUrl; - } - - /// - /// ID of the instant key to get. - /// - [DataMember(Name = "instant_key_id", IsRequired = false, EmitDefaultValue = false)] - public string? InstantKeyId { get; set; } - - /// - /// URL of the instant key to get. - /// - [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] - public string? InstantKeyUrl { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(InstantKey instantKey = default) - { - InstantKey = instantKey; - } - - /// - /// OK - /// - [DataMember(Name = "instant_key", IsRequired = false, EmitDefaultValue = false)] - public InstantKey InstantKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys). - /// - public InstantKey Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/instant_keys/get", requestOptions) - .EnsureData("/instant_keys/get") - .InstantKey; - } - - /// - /// Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys). - /// - public InstantKey Get(string? instantKeyId = default, string? instantKeyUrl = default) - { - return Get(new GetRequest(instantKeyId: instantKeyId, instantKeyUrl: instantKeyUrl)); - } - - /// - /// Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/instant_keys/get", requestOptions)) - .EnsureData("/instant_keys/get") - .InstantKey; - } - - /// - /// Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys). - /// - public async Task GetAsync( - string? instantKeyId = default, - string? instantKeyUrl = default - ) - { - return ( - await GetAsync( - new GetRequest(instantKeyId: instantKeyId, instantKeyUrl: instantKeyUrl) - ) - ); - } - - /// - /// Request parameters for List Instant Keys. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest(string? userIdentityId = default) - { - UserIdentityId = userIdentityId; - } - - /// - /// ID of the user identity by which you want to filter the list of Instant Keys. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List instantKeys = default) - { - InstantKeys = instantKeys; - } - - /// - /// OK - /// - [DataMember(Name = "instant_keys", IsRequired = false, EmitDefaultValue = false)] - public List InstantKeys { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [instant keys](https://docs.seam.co/capability-guides/instant-keys). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/instant_keys/list", requestOptions) - .EnsureData("/instant_keys/list") - .InstantKeys; - } - - /// - /// Returns a list of all [instant keys](https://docs.seam.co/capability-guides/instant-keys). - /// - public List List(string? userIdentityId = default) - { - return List(new ListRequest(userIdentityId: userIdentityId)); - } - - /// - /// Returns a list of all [instant keys](https://docs.seam.co/capability-guides/instant-keys). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/instant_keys/list", requestOptions)) - .EnsureData("/instant_keys/list") - .InstantKeys; - } - - /// - /// Returns a list of all [instant keys](https://docs.seam.co/capability-guides/instant-keys). - /// - public async Task> ListAsync(string? userIdentityId = default) - { - return (await ListAsync(new ListRequest(userIdentityId: userIdentityId))); - } - } +public class InstantKeys +{ +private ISeamClient _seam; + +public InstantKeys(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Delete an Instant Key. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string instantKeyId = default) +{ +InstantKeyId = instantKeyId; +} + +/// +/// ID of the Instant Key that you want to delete. +/// +[DataMember(Name = "instant_key_id", IsRequired = true, EmitDefaultValue = false)] +public string InstantKeyId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/instant_keys/delete", requestOptions); +} + +/// +/// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public void Delete(string instantKeyId = default) +{ +Delete(new DeleteRequest(instantKeyId: instantKeyId)); +} + +/// +/// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/instant_keys/delete", requestOptions); +} + +/// +/// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public async Task DeleteAsync(string instantKeyId = default) +{ +await DeleteAsync(new DeleteRequest(instantKeyId: instantKeyId)); +} + +/// +/// Request parameters for Get an Instant Key. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? instantKeyId = default, string? instantKeyUrl = default) +{ +InstantKeyId = instantKeyId; +InstantKeyUrl = instantKeyUrl; +} + +/// +/// ID of the instant key to get. +/// +[DataMember(Name = "instant_key_id", IsRequired = false, EmitDefaultValue = false)] +public string? InstantKeyId { get; set; } + +/// +/// URL of the instant key to get. +/// +[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] +public string? InstantKeyUrl { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(InstantKey instantKey = default) +{ +InstantKey = instantKey; +} + +/// +/// OK +/// +[DataMember(Name = "instant_key", IsRequired = false, EmitDefaultValue = false)] +public InstantKey InstantKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public InstantKey Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/instant_keys/get", requestOptions).EnsureData("/instant_keys/get").InstantKey; +} + +/// +/// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public InstantKey Get(string? instantKeyId = default, string? instantKeyUrl = default) +{ +return Get(new GetRequest(instantKeyId: instantKeyId, instantKeyUrl: instantKeyUrl)); +} + +/// +/// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/instant_keys/get", requestOptions)).EnsureData("/instant_keys/get").InstantKey; +} + +/// +/// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public async Task GetAsync(string? instantKeyId = default, string? instantKeyUrl = default) +{ +return (await GetAsync(new GetRequest(instantKeyId: instantKeyId, instantKeyUrl: instantKeyUrl))); +} + +/// +/// Request parameters for List Instant Keys. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? userIdentityId = default) +{ +UserIdentityId = userIdentityId; +} + +/// +/// ID of the user identity by which you want to filter the list of Instant Keys. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List instantKeys = default) +{ +InstantKeys = instantKeys; +} + +/// +/// OK +/// +[DataMember(Name = "instant_keys", IsRequired = false, EmitDefaultValue = false)] +public List InstantKeys { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/instant_keys/list", requestOptions).EnsureData("/instant_keys/list").InstantKeys; +} + +/// +/// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public List List(string? userIdentityId = default) +{ +return List(new ListRequest(userIdentityId: userIdentityId)); +} + +/// +/// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/instant_keys/list", requestOptions)).EnsureData("/instant_keys/list").InstantKeys; +} + +/// +/// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). +/// +public async Task> ListAsync(string? userIdentityId = default) +{ +return (await ListAsync(new ListRequest(userIdentityId: userIdentityId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.InstantKeys InstantKeys => new(this); - } +public partial class SeamClient +{ +public Api.InstantKeys InstantKeys => new(this); +} - public partial interface ISeamClient - { - public Api.InstantKeys InstantKeys { get; } - } +public partial interface ISeamClient +{ +public Api.InstantKeys InstantKeys { get; } +} } diff --git a/src/Seam/Api/LiveViewsCameras.cs b/src/Seam/Api/LiveViewsCameras.cs new file mode 100644 index 00000000..388f1c54 --- /dev/null +++ b/src/Seam/Api/LiveViewsCameras.cs @@ -0,0 +1,395 @@ +using System.Runtime.Serialization; +using System.Text; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Seam.Client; +using Seam.Model; + +namespace Seam.Api +{ +public class LiveViewsCameras +{ +private ISeamClient _seam; + +public LiveViewsCameras(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Camera Live View Session. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(string deviceId = default, int? durationSeconds = default, bool? includeAudio = default) +{ +DeviceId = deviceId; +DurationSeconds = durationSeconds; +IncludeAudio = includeAudio; +} + +/// +/// ID of the camera to view. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Number of seconds for which the live view session is valid, up to 600. +/// +[DataMember(Name = "duration_seconds", IsRequired = false, EmitDefaultValue = false)] +public int? DurationSeconds { get; set; } + +/// +/// Indicates whether to include the camera's audio. +/// +[DataMember(Name = "include_audio", IsRequired = false, EmitDefaultValue = false)] +public bool? IncludeAudio { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(CameraLiveViewSession cameraLiveViewSession = default) +{ +CameraLiveViewSession = cameraLiveViewSession; +} + +/// +/// OK +/// +[DataMember(Name = "camera_live_view_session", IsRequired = false, EmitDefaultValue = false)] +public CameraLiveViewSession CameraLiveViewSession { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. +/// +public CameraLiveViewSession Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/cameras/live_views/create", requestOptions).EnsureData("/cameras/live_views/create").CameraLiveViewSession; +} + +/// +/// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. +/// +public CameraLiveViewSession Create(string deviceId = default, int? durationSeconds = default, bool? includeAudio = default) +{ +return Create(new CreateRequest(deviceId: deviceId, durationSeconds: durationSeconds, includeAudio: includeAudio)); +} + +/// +/// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/cameras/live_views/create", requestOptions)).EnsureData("/cameras/live_views/create").CameraLiveViewSession; +} + +/// +/// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. +/// +public async Task CreateAsync(string deviceId = default, int? durationSeconds = default, bool? includeAudio = default) +{ +return (await CreateAsync(new CreateRequest(deviceId: deviceId, durationSeconds: durationSeconds, includeAudio: includeAudio))); +} + +/// +/// Request parameters for Negotiate a Camera Live View. +/// +[DataContract(Name = "offerRequest_request")] +public class OfferRequest +{ +[JsonConstructorAttribute] +protected OfferRequest() { } + +public OfferRequest(string cameraLiveViewSessionId = default, string sdpOffer = default, string token = default) +{ +CameraLiveViewSessionId = cameraLiveViewSessionId; +SdpOffer = sdpOffer; +Token = token; +} + +/// +/// ID of the camera live view session. +/// +[DataMember(Name = "camera_live_view_session_id", IsRequired = true, EmitDefaultValue = false)] +public string CameraLiveViewSessionId { get; set; } + +/// +/// WebRTC SDP offer from the viewer, limited to 64 KiB of UTF-8 data. +/// +[DataMember(Name = "sdp_offer", IsRequired = true, EmitDefaultValue = false)] +public string SdpOffer { get; set; } + +/// +/// Token returned when the camera live view session was created. +/// +[DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] +public string Token { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "offerResponse_response")] +public class OfferResponse +{ +[JsonConstructorAttribute] +protected OfferResponse() { } + +public OfferResponse(CameraLiveViewAnswer cameraLiveViewAnswer = default) +{ +CameraLiveViewAnswer = cameraLiveViewAnswer; +} + +/// +/// OK +/// +[DataMember(Name = "camera_live_view_answer", IsRequired = false, EmitDefaultValue = false)] +public CameraLiveViewAnswer CameraLiveViewAnswer { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. +/// +public CameraLiveViewAnswer Offer(OfferRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/cameras/live_views/offer", requestOptions).EnsureData("/cameras/live_views/offer").CameraLiveViewAnswer; +} + +/// +/// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. +/// +public CameraLiveViewAnswer Offer(string cameraLiveViewSessionId = default, string sdpOffer = default, string token = default) +{ +return Offer(new OfferRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, sdpOffer: sdpOffer, token: token)); +} + +/// +/// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. +/// +public async Task OfferAsync(OfferRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/cameras/live_views/offer", requestOptions)).EnsureData("/cameras/live_views/offer").CameraLiveViewAnswer; +} + +/// +/// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. +/// +public async Task OfferAsync(string cameraLiveViewSessionId = default, string sdpOffer = default, string token = default) +{ +return (await OfferAsync(new OfferRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, sdpOffer: sdpOffer, token: token))); +} + +/// +/// Request parameters for Stop a Camera Live View Session. +/// +[DataContract(Name = "stopRequest_request")] +public class StopRequest +{ +[JsonConstructorAttribute] +protected StopRequest() { } + +public StopRequest(string cameraLiveViewSessionId = default, string token = default) +{ +CameraLiveViewSessionId = cameraLiveViewSessionId; +Token = token; +} + +/// +/// ID of the camera live view session. +/// +[DataMember(Name = "camera_live_view_session_id", IsRequired = true, EmitDefaultValue = false)] +public string CameraLiveViewSessionId { get; set; } + +/// +/// Token returned when the camera live view session was created. +/// +[DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] +public string Token { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Stops a camera live view session that the current client session owns. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. +/// +public void Stop(StopRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/cameras/live_views/stop", requestOptions); +} + +/// +/// Stops a camera live view session that the current client session owns. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. +/// +public void Stop(string cameraLiveViewSessionId = default, string token = default) +{ +Stop(new StopRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, token: token)); +} + +/// +/// Stops a camera live view session that the current client session owns. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. +/// +public async Task StopAsync(StopRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/cameras/live_views/stop", requestOptions); +} + +/// +/// Stops a camera live view session that the current client session owns. +/// +/// Camera live view is in beta. To enable it for your workspace, contact Seam support. +/// +public async Task StopAsync(string cameraLiveViewSessionId = default, string token = default) +{ +await StopAsync(new StopRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, token: token)); +} +} +} + +namespace Seam.Client +{ +public partial class SeamClient +{ +public Api.LiveViewsCameras LiveViewsCameras => new(this); +} + +public partial interface ISeamClient +{ +public Api.LiveViewsCameras LiveViewsCameras { get; } +} +} diff --git a/src/Seam/Api/Locks.cs b/src/Seam/Api/Locks.cs index 5f5e8a5f..b332e04c 100644 --- a/src/Seam/Api/Locks.cs +++ b/src/Seam/Api/Locks.cs @@ -9,1072 +9,973 @@ namespace Seam.Api { - public class Locks - { - private ISeamClient _seam; - - public Locks(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Configure Auto-Lock. - /// - [DataContract(Name = "configureAutoLockRequest_request")] - public class ConfigureAutoLockRequest - { - [JsonConstructorAttribute] - protected ConfigureAutoLockRequest() { } - - public ConfigureAutoLockRequest( - float? autoLockDelaySeconds = default, - bool autoLockEnabled = default, - string deviceId = default - ) - { - AutoLockDelaySeconds = autoLockDelaySeconds; - AutoLockEnabled = autoLockEnabled; - DeviceId = deviceId; - } - - /// - /// Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60. - /// - [DataMember( - Name = "auto_lock_delay_seconds", - IsRequired = false, - EmitDefaultValue = false - )] - public float? AutoLockDelaySeconds { get; set; } - - /// - /// Whether to enable or disable auto-lock. - /// - [DataMember(Name = "auto_lock_enabled", IsRequired = true, EmitDefaultValue = false)] - public bool AutoLockEnabled { get; set; } - - /// - /// ID of the lock for which you want to configure the auto-lock. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "configureAutoLockResponse_response")] - public class ConfigureAutoLockResponse - { - [JsonConstructorAttribute] - protected ConfigureAutoLockResponse() { } - - public ConfigureAutoLockResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Configures the auto-lock setting for a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). - /// - public ActionAttempt ConfigureAutoLock(ConfigureAutoLockRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/locks/configure_auto_lock", requestOptions) - .EnsureData("/locks/configure_auto_lock") - .ActionAttempt; - } - - /// - /// Configures the auto-lock setting for a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). - /// - public ActionAttempt ConfigureAutoLock( - float? autoLockDelaySeconds = default, - bool autoLockEnabled = default, - string deviceId = default - ) - { - return ConfigureAutoLock( - new ConfigureAutoLockRequest( - autoLockDelaySeconds: autoLockDelaySeconds, - autoLockEnabled: autoLockEnabled, - deviceId: deviceId - ) - ); - } - - /// - /// Configures the auto-lock setting for a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). - /// - public async Task ConfigureAutoLockAsync(ConfigureAutoLockRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/locks/configure_auto_lock", - requestOptions - ) - ) - .EnsureData("/locks/configure_auto_lock") - .ActionAttempt; - } - - /// - /// Configures the auto-lock setting for a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). - /// - public async Task ConfigureAutoLockAsync( - float? autoLockDelaySeconds = default, - bool autoLockEnabled = default, - string deviceId = default - ) - { - return ( - await ConfigureAutoLockAsync( - new ConfigureAutoLockRequest( - autoLockDelaySeconds: autoLockDelaySeconds, - autoLockEnabled: autoLockEnabled, - deviceId: deviceId - ) - ) - ); - } - - /// - /// Request parameters for Get a Lock. - /// - [Obsolete("Use `/devices/get` instead.")] - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string? deviceId = default, string? name = default) - { - DeviceId = deviceId; - Name = name; - } - - /// - /// ID of the lock that you want to get. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Name of the lock that you want to get. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(Device device = default) - { - Device = device; - } - - /// - /// OK - /// - [DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] - public Device Device { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). - /// - [Obsolete("Use `/devices/get` instead.")] - public Device Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/locks/get", requestOptions) - .EnsureData("/locks/get") - .Device; - } - - /// - /// Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). - /// - [Obsolete("Use `/devices/get` instead.")] - public Device Get(string? deviceId = default, string? name = default) - { - return Get(new GetRequest(deviceId: deviceId, name: name)); - } - - /// - /// Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). - /// - [Obsolete("Use `/devices/get` instead.")] - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/locks/get", requestOptions)) - .EnsureData("/locks/get") - .Device; - } - - /// - /// Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). - /// - [Obsolete("Use `/devices/get` instead.")] - public async Task GetAsync(string? deviceId = default, string? name = default) - { - return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); - } - - /// - /// Request parameters for List Locks. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountId = connectedAccountId; - CustomerKey = customerKey; - DeviceType = deviceType; - DeviceTypes = deviceTypes; - Manufacturer = manufacturer; - } - - /// - /// Device type of the locks that you want to list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "akuvox_lock")] - AkuvoxLock = 1, - - [EnumMember(Value = "august_lock")] - AugustLock = 2, - - [EnumMember(Value = "brivo_access_point")] - BrivoAccessPoint = 3, - - [EnumMember(Value = "butterflymx_panel")] - ButterflymxPanel = 4, - - [EnumMember(Value = "avigilon_alta_entry")] - AvigilonAltaEntry = 5, - - [EnumMember(Value = "doorking_lock")] - DoorkingLock = 6, - - [EnumMember(Value = "genie_door")] - GenieDoor = 7, - - [EnumMember(Value = "igloo_lock")] - IglooLock = 8, - - [EnumMember(Value = "linear_lock")] - LinearLock = 9, - - [EnumMember(Value = "lockly_lock")] - LocklyLock = 10, - - [EnumMember(Value = "kwikset_lock")] - KwiksetLock = 11, - - [EnumMember(Value = "nuki_lock")] - NukiLock = 12, - - [EnumMember(Value = "salto_lock")] - SaltoLock = 13, +public class Locks +{ +private ISeamClient _seam; + +public Locks(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Configure Auto-Lock. +/// +[DataContract(Name = "configureAutoLockRequest_request")] +public class ConfigureAutoLockRequest +{ +[JsonConstructorAttribute] +protected ConfigureAutoLockRequest() { } + +public ConfigureAutoLockRequest(float? autoLockDelaySeconds = default, bool autoLockEnabled = default, string deviceId = default) +{ +AutoLockDelaySeconds = autoLockDelaySeconds; +AutoLockEnabled = autoLockEnabled; +DeviceId = deviceId; +} + +/// +/// Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60. +/// +[DataMember(Name = "auto_lock_delay_seconds", IsRequired = false, EmitDefaultValue = false)] +public float? AutoLockDelaySeconds { get; set; } + +/// +/// Whether to enable or disable auto-lock. +/// +[DataMember(Name = "auto_lock_enabled", IsRequired = true, EmitDefaultValue = false)] +public bool AutoLockEnabled { get; set; } + +/// +/// ID of the lock for which you want to configure the auto-lock. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "configureAutoLockResponse_response")] +public class ConfigureAutoLockResponse +{ +[JsonConstructorAttribute] +protected ConfigureAutoLockResponse() { } + +public ConfigureAutoLockResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +public ActionAttempt ConfigureAutoLock(ConfigureAutoLockRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/locks/configure_auto_lock", requestOptions).EnsureData("/locks/configure_auto_lock").ActionAttempt; +} + +/// +/// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +public ActionAttempt ConfigureAutoLock(float? autoLockDelaySeconds = default, bool autoLockEnabled = default, string deviceId = default) +{ +return ConfigureAutoLock(new ConfigureAutoLockRequest(autoLockDelaySeconds: autoLockDelaySeconds, autoLockEnabled: autoLockEnabled, deviceId: deviceId)); +} + +/// +/// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +public async Task ConfigureAutoLockAsync(ConfigureAutoLockRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/locks/configure_auto_lock", requestOptions)).EnsureData("/locks/configure_auto_lock").ActionAttempt; +} + +/// +/// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +public async Task ConfigureAutoLockAsync(float? autoLockDelaySeconds = default, bool autoLockEnabled = default, string deviceId = default) +{ +return (await ConfigureAutoLockAsync(new ConfigureAutoLockRequest(autoLockDelaySeconds: autoLockDelaySeconds, autoLockEnabled: autoLockEnabled, deviceId: deviceId))); +} + +/// +/// Request parameters for Get a Lock. +/// +[Obsolete("Use `/devices/get` instead.")] +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? deviceId = default, string? name = default) +{ +DeviceId = deviceId; +Name = name; +} + +/// +/// ID of the lock that you want to get. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Name of the lock that you want to get. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(Device device = default) +{ +Device = device; +} + +/// +/// OK +/// +[DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] +public Device Device { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +[Obsolete("Use `/devices/get` instead.")] +public Device Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/locks/get", requestOptions).EnsureData("/locks/get").Device; +} + +/// +/// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +[Obsolete("Use `/devices/get` instead.")] +public Device Get(string? deviceId = default, string? name = default) +{ +return Get(new GetRequest(deviceId: deviceId, name: name)); +} + +/// +/// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +[Obsolete("Use `/devices/get` instead.")] +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/locks/get", requestOptions)).EnsureData("/locks/get").Device; +} + +/// +/// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +[Obsolete("Use `/devices/get` instead.")] +public async Task GetAsync(string? deviceId = default, string? name = default) +{ +return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); +} + +/// +/// Request parameters for List Locks. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountId = connectedAccountId; +CustomerKey = customerKey; +DeviceType = deviceType; +DeviceTypes = deviceTypes; +Manufacturer = manufacturer; +} + +/// +/// Device type of the locks that you want to list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "akuvox_lock")] +AkuvoxLock = 1, + +[EnumMember(Value = "august_lock")] +AugustLock = 2, + +[EnumMember(Value = "brivo_access_point")] +BrivoAccessPoint = 3, + +[EnumMember(Value = "butterflymx_panel")] +ButterflymxPanel = 4, + +[EnumMember(Value = "avigilon_alta_entry")] +AvigilonAltaEntry = 5, + +[EnumMember(Value = "doorking_lock")] +DoorkingLock = 6, + +[EnumMember(Value = "genie_door")] +GenieDoor = 7, + +[EnumMember(Value = "igloo_lock")] +IglooLock = 8, + +[EnumMember(Value = "linear_lock")] +LinearLock = 9, + +[EnumMember(Value = "lockly_lock")] +LocklyLock = 10, + +[EnumMember(Value = "kwikset_lock")] +KwiksetLock = 11, + +[EnumMember(Value = "nuki_lock")] +NukiLock = 12, + +[EnumMember(Value = "salto_lock")] +SaltoLock = 13, + +[EnumMember(Value = "schlage_lock")] +SchlageLock = 14, + +[EnumMember(Value = "smartthings_lock")] +SmartthingsLock = 15, + +[EnumMember(Value = "wyze_lock")] +WyzeLock = 16, + +[EnumMember(Value = "yale_lock")] +YaleLock = 17, + +[EnumMember(Value = "two_n_intercom")] +TwoNIntercom = 18, + +[EnumMember(Value = "controlbyweb_device")] +ControlbywebDevice = 19, + +[EnumMember(Value = "ttlock_lock")] +TtlockLock = 20, + +[EnumMember(Value = "igloohome_lock")] +IgloohomeLock = 21, + +[EnumMember(Value = "four_suites_door")] +FourSuitesDoor = 22, + +[EnumMember(Value = "dormakaba_oracode_door")] +DormakabaOracodeDoor = 23, + +[EnumMember(Value = "tedee_lock")] +TedeeLock = 24, + +[EnumMember(Value = "akiles_lock")] +AkilesLock = 25, + +[EnumMember(Value = "ultraloq_lock")] +UltraloqLock = 26, - [EnumMember(Value = "schlage_lock")] - SchlageLock = 14, +[EnumMember(Value = "yacan_lock")] +YacanLock = 27, - [EnumMember(Value = "smartthings_lock")] - SmartthingsLock = 15, +[EnumMember(Value = "keyincode_lock")] +KeyincodeLock = 28, - [EnumMember(Value = "wyze_lock")] - WyzeLock = 16, +[EnumMember(Value = "omnitec_lock")] +OmnitecLock = 29, - [EnumMember(Value = "yale_lock")] - YaleLock = 17, +[EnumMember(Value = "kisi_lock")] +KisiLock = 30, - [EnumMember(Value = "two_n_intercom")] - TwoNIntercom = 18, +[EnumMember(Value = "aqara_lock")] +AqaraLock = 31, +} + +/// +/// Device types of the locks that you want to list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "akuvox_lock")] +AkuvoxLock = 1, - [EnumMember(Value = "controlbyweb_device")] - ControlbywebDevice = 19, +[EnumMember(Value = "august_lock")] +AugustLock = 2, - [EnumMember(Value = "ttlock_lock")] - TtlockLock = 20, +[EnumMember(Value = "brivo_access_point")] +BrivoAccessPoint = 3, - [EnumMember(Value = "igloohome_lock")] - IgloohomeLock = 21, +[EnumMember(Value = "butterflymx_panel")] +ButterflymxPanel = 4, - [EnumMember(Value = "four_suites_door")] - FourSuitesDoor = 22, +[EnumMember(Value = "avigilon_alta_entry")] +AvigilonAltaEntry = 5, - [EnumMember(Value = "dormakaba_oracode_door")] - DormakabaOracodeDoor = 23, +[EnumMember(Value = "doorking_lock")] +DoorkingLock = 6, - [EnumMember(Value = "tedee_lock")] - TedeeLock = 24, +[EnumMember(Value = "genie_door")] +GenieDoor = 7, - [EnumMember(Value = "akiles_lock")] - AkilesLock = 25, +[EnumMember(Value = "igloo_lock")] +IglooLock = 8, - [EnumMember(Value = "ultraloq_lock")] - UltraloqLock = 26, +[EnumMember(Value = "linear_lock")] +LinearLock = 9, - [EnumMember(Value = "yacan_lock")] - YacanLock = 27, +[EnumMember(Value = "lockly_lock")] +LocklyLock = 10, - [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 28, +[EnumMember(Value = "kwikset_lock")] +KwiksetLock = 11, - [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 29, +[EnumMember(Value = "nuki_lock")] +NukiLock = 12, - [EnumMember(Value = "kisi_lock")] - KisiLock = 30, +[EnumMember(Value = "salto_lock")] +SaltoLock = 13, - [EnumMember(Value = "aqara_lock")] - AqaraLock = 31, - } +[EnumMember(Value = "schlage_lock")] +SchlageLock = 14, - /// - /// Device types of the locks that you want to list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "smartthings_lock")] +SmartthingsLock = 15, - [EnumMember(Value = "akuvox_lock")] - AkuvoxLock = 1, +[EnumMember(Value = "wyze_lock")] +WyzeLock = 16, - [EnumMember(Value = "august_lock")] - AugustLock = 2, +[EnumMember(Value = "yale_lock")] +YaleLock = 17, - [EnumMember(Value = "brivo_access_point")] - BrivoAccessPoint = 3, +[EnumMember(Value = "two_n_intercom")] +TwoNIntercom = 18, - [EnumMember(Value = "butterflymx_panel")] - ButterflymxPanel = 4, +[EnumMember(Value = "controlbyweb_device")] +ControlbywebDevice = 19, - [EnumMember(Value = "avigilon_alta_entry")] - AvigilonAltaEntry = 5, +[EnumMember(Value = "ttlock_lock")] +TtlockLock = 20, - [EnumMember(Value = "doorking_lock")] - DoorkingLock = 6, +[EnumMember(Value = "igloohome_lock")] +IgloohomeLock = 21, - [EnumMember(Value = "genie_door")] - GenieDoor = 7, +[EnumMember(Value = "four_suites_door")] +FourSuitesDoor = 22, - [EnumMember(Value = "igloo_lock")] - IglooLock = 8, +[EnumMember(Value = "dormakaba_oracode_door")] +DormakabaOracodeDoor = 23, - [EnumMember(Value = "linear_lock")] - LinearLock = 9, +[EnumMember(Value = "tedee_lock")] +TedeeLock = 24, - [EnumMember(Value = "lockly_lock")] - LocklyLock = 10, +[EnumMember(Value = "akiles_lock")] +AkilesLock = 25, - [EnumMember(Value = "kwikset_lock")] - KwiksetLock = 11, +[EnumMember(Value = "ultraloq_lock")] +UltraloqLock = 26, - [EnumMember(Value = "nuki_lock")] - NukiLock = 12, +[EnumMember(Value = "yacan_lock")] +YacanLock = 27, - [EnumMember(Value = "salto_lock")] - SaltoLock = 13, +[EnumMember(Value = "keyincode_lock")] +KeyincodeLock = 28, - [EnumMember(Value = "schlage_lock")] - SchlageLock = 14, +[EnumMember(Value = "omnitec_lock")] +OmnitecLock = 29, - [EnumMember(Value = "smartthings_lock")] - SmartthingsLock = 15, +[EnumMember(Value = "kisi_lock")] +KisiLock = 30, - [EnumMember(Value = "wyze_lock")] - WyzeLock = 16, +[EnumMember(Value = "aqara_lock")] +AqaraLock = 31, +} + +/// +/// Manufacturer of the locks that you want to list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ManufacturerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "yale_lock")] - YaleLock = 17, +[EnumMember(Value = "akuvox")] +Akuvox = 1, - [EnumMember(Value = "two_n_intercom")] - TwoNIntercom = 18, +[EnumMember(Value = "august")] +August = 2, - [EnumMember(Value = "controlbyweb_device")] - ControlbywebDevice = 19, +[EnumMember(Value = "brivo")] +Brivo = 3, - [EnumMember(Value = "ttlock_lock")] - TtlockLock = 20, +[EnumMember(Value = "butterflymx")] +Butterflymx = 4, - [EnumMember(Value = "igloohome_lock")] - IgloohomeLock = 21, +[EnumMember(Value = "avigilon_alta")] +AvigilonAlta = 5, - [EnumMember(Value = "four_suites_door")] - FourSuitesDoor = 22, +[EnumMember(Value = "doorking")] +Doorking = 6, - [EnumMember(Value = "dormakaba_oracode_door")] - DormakabaOracodeDoor = 23, +[EnumMember(Value = "genie")] +Genie = 7, - [EnumMember(Value = "tedee_lock")] - TedeeLock = 24, +[EnumMember(Value = "igloo")] +Igloo = 8, - [EnumMember(Value = "akiles_lock")] - AkilesLock = 25, +[EnumMember(Value = "linear")] +Linear = 9, - [EnumMember(Value = "ultraloq_lock")] - UltraloqLock = 26, +[EnumMember(Value = "kwikset")] +Kwikset = 10, - [EnumMember(Value = "yacan_lock")] - YacanLock = 27, +[EnumMember(Value = "nuki")] +Nuki = 11, - [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 28, +[EnumMember(Value = "salto")] +Salto = 12, - [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 29, +[EnumMember(Value = "schlage")] +Schlage = 13, - [EnumMember(Value = "kisi_lock")] - KisiLock = 30, +[EnumMember(Value = "seam")] +Seam = 14, - [EnumMember(Value = "aqara_lock")] - AqaraLock = 31, - } +[EnumMember(Value = "wyze")] +Wyze = 15, - /// - /// Manufacturer of the locks that you want to list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ManufacturerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "yale")] +Yale = 16, - [EnumMember(Value = "akuvox")] - Akuvox = 1, +[EnumMember(Value = "two_n")] +TwoN = 17, - [EnumMember(Value = "august")] - August = 2, +[EnumMember(Value = "controlbyweb")] +Controlbyweb = 18, - [EnumMember(Value = "brivo")] - Brivo = 3, +[EnumMember(Value = "ttlock")] +Ttlock = 19, - [EnumMember(Value = "butterflymx")] - Butterflymx = 4, +[EnumMember(Value = "igloohome")] +Igloohome = 20, - [EnumMember(Value = "avigilon_alta")] - AvigilonAlta = 5, +[EnumMember(Value = "four_suites")] +FourSuites = 21, - [EnumMember(Value = "doorking")] - Doorking = 6, +[EnumMember(Value = "tedee")] +Tedee = 22, - [EnumMember(Value = "genie")] - Genie = 7, +[EnumMember(Value = "keyincode")] +Keyincode = 23, - [EnumMember(Value = "igloo")] - Igloo = 8, +[EnumMember(Value = "akiles")] +Akiles = 24, - [EnumMember(Value = "linear")] - Linear = 9, +[EnumMember(Value = "aqara")] +Aqara = 25, - [EnumMember(Value = "kwikset")] - Kwikset = 10, +[EnumMember(Value = "eufy")] +Eufy = 26, - [EnumMember(Value = "nuki")] - Nuki = 11, +[EnumMember(Value = "dormakaba_oracode")] +DormakabaOracode = 27, - [EnumMember(Value = "salto")] - Salto = 12, +[EnumMember(Value = "dormakaba_oracode_iho")] +DormakabaOracodeIho = 28, - [EnumMember(Value = "schlage")] - Schlage = 13, +[EnumMember(Value = "korelock")] +Korelock = 29, - [EnumMember(Value = "seam")] - Seam = 14, +[EnumMember(Value = "lockly")] +Lockly = 30, - [EnumMember(Value = "wyze")] - Wyze = 15, +[EnumMember(Value = "smartthings")] +Smartthings = 31, - [EnumMember(Value = "yale")] - Yale = 16, +[EnumMember(Value = "ultraloq")] +Ultraloq = 32, - [EnumMember(Value = "two_n")] - TwoN = 17, +[EnumMember(Value = "omnitec")] +Omnitec = 33, - [EnumMember(Value = "controlbyweb")] - Controlbyweb = 18, +[EnumMember(Value = "kisi")] +Kisi = 34, - [EnumMember(Value = "ttlock")] - Ttlock = 19, +[EnumMember(Value = "yacan")] +Yacan = 35, +} + +/// +/// ID of the Connect Webview for which you want to list devices. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectWebviewId { get; set; } + +/// +/// ID of the connected account for which you want to list devices. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Customer key for which you want to list devices. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Device type of the locks that you want to list. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + +/// +/// Device types of the locks that you want to list. +/// +[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceTypes { get; set; } + +/// +/// Manufacturer of the locks that you want to list. +/// +[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} - [EnumMember(Value = "igloohome")] - Igloohome = 20, +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } - [EnumMember(Value = "four_suites")] - FourSuites = 21, +public ListResponse(List devices = default) +{ +Devices = devices; +} - [EnumMember(Value = "dormakaba_oracode")] - DormakabaOracode = 22, +/// +/// OK +/// +[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] +public List Devices { get; set; } - [EnumMember(Value = "tedee")] - Tedee = 23, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "keyincode")] - Keyincode = 24, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "akiles")] - Akiles = 25, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "aqara")] - Aqara = 26, +/// +/// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/locks/list", requestOptions).EnsureData("/locks/list").Devices; +} - [EnumMember(Value = "korelock")] - Korelock = 27, +/// +/// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +public List List(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer)); +} - [EnumMember(Value = "lockly")] - Lockly = 28, +/// +/// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/locks/list", requestOptions)).EnsureData("/locks/list").Devices; +} - [EnumMember(Value = "smartthings")] - Smartthings = 29, - - [EnumMember(Value = "ultraloq")] - Ultraloq = 30, - - [EnumMember(Value = "omnitec")] - Omnitec = 31, - - [EnumMember(Value = "kisi")] - Kisi = 32, - - [EnumMember(Value = "yacan")] - Yacan = 33, - } - - /// - /// ID of the Connect Webview for which you want to list devices. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectWebviewId { get; set; } - - /// - /// ID of the connected account for which you want to list devices. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Customer key for which you want to list devices. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Device type of the locks that you want to list. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - - /// - /// Device types of the locks that you want to list. - /// - [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceTypes { get; set; } - - /// - /// Manufacturer of the locks that you want to list. - /// - [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List devices = default) - { - Devices = devices; - } - - /// - /// OK - /// - [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] - public List Devices { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [locks](https://docs.seam.co/low-level-apis/smart-locks). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/locks/list", requestOptions) - .EnsureData("/locks/list") - .Devices; - } - - /// - /// Returns a list of all [locks](https://docs.seam.co/low-level-apis/smart-locks). - /// - public List List( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - return List( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - deviceType: deviceType, - deviceTypes: deviceTypes, - manufacturer: manufacturer - ) - ); - } - - /// - /// Returns a list of all [locks](https://docs.seam.co/low-level-apis/smart-locks). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/locks/list", requestOptions)) - .EnsureData("/locks/list") - .Devices; - } - - /// - /// Returns a list of all [locks](https://docs.seam.co/low-level-apis/smart-locks). - /// - public async Task> ListAsync( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - return ( - await ListAsync( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - deviceType: deviceType, - deviceTypes: deviceTypes, - manufacturer: manufacturer - ) - ) - ); - } - - /// - /// Request parameters for Lock a Lock. - /// - [DataContract(Name = "lockDoorRequest_request")] - public class LockDoorRequest - { - [JsonConstructorAttribute] - protected LockDoorRequest() { } - - public LockDoorRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the lock that you want to lock. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "lockDoorResponse_response")] - public class LockDoorResponse - { - [JsonConstructorAttribute] - protected LockDoorResponse() { } - - public LockDoorResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Locks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). - /// - public ActionAttempt LockDoor(LockDoorRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/locks/lock_door", requestOptions) - .EnsureData("/locks/lock_door") - .ActionAttempt; - } - - /// - /// Locks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). - /// - public ActionAttempt LockDoor(string deviceId = default) - { - return LockDoor(new LockDoorRequest(deviceId: deviceId)); - } - - /// - /// Locks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). - /// - public async Task LockDoorAsync(LockDoorRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/locks/lock_door", requestOptions)) - .EnsureData("/locks/lock_door") - .ActionAttempt; - } - - /// - /// Locks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). - /// - public async Task LockDoorAsync(string deviceId = default) - { - return (await LockDoorAsync(new LockDoorRequest(deviceId: deviceId))); - } - - /// - /// Request parameters for Unlock a Lock. - /// - [DataContract(Name = "unlockDoorRequest_request")] - public class UnlockDoorRequest - { - [JsonConstructorAttribute] - protected UnlockDoorRequest() { } - - public UnlockDoorRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the lock that you want to unlock. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "unlockDoorResponse_response")] - public class UnlockDoorResponse - { - [JsonConstructorAttribute] - protected UnlockDoorResponse() { } - - public UnlockDoorResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Unlocks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). - /// - public ActionAttempt UnlockDoor(UnlockDoorRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/locks/unlock_door", requestOptions) - .EnsureData("/locks/unlock_door") - .ActionAttempt; - } - - /// - /// Unlocks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). - /// - public ActionAttempt UnlockDoor(string deviceId = default) - { - return UnlockDoor(new UnlockDoorRequest(deviceId: deviceId)); - } - - /// - /// Unlocks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). - /// - public async Task UnlockDoorAsync(UnlockDoorRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/locks/unlock_door", requestOptions)) - .EnsureData("/locks/unlock_door") - .ActionAttempt; - } - - /// - /// Unlocks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). - /// - public async Task UnlockDoorAsync(string deviceId = default) - { - return (await UnlockDoorAsync(new UnlockDoorRequest(deviceId: deviceId))); - } - } +/// +/// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). +/// +public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer))); +} + +/// +/// Request parameters for Lock a Lock. +/// +[DataContract(Name = "lockDoorRequest_request")] +public class LockDoorRequest +{ +[JsonConstructorAttribute] +protected LockDoorRequest() { } + +public LockDoorRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the lock that you want to lock. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "lockDoorResponse_response")] +public class LockDoorResponse +{ +[JsonConstructorAttribute] +protected LockDoorResponse() { } + +public LockDoorResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). +/// +public ActionAttempt LockDoor(LockDoorRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/locks/lock_door", requestOptions).EnsureData("/locks/lock_door").ActionAttempt; +} + +/// +/// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). +/// +public ActionAttempt LockDoor(string deviceId = default) +{ +return LockDoor(new LockDoorRequest(deviceId: deviceId)); +} + +/// +/// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). +/// +public async Task LockDoorAsync(LockDoorRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/locks/lock_door", requestOptions)).EnsureData("/locks/lock_door").ActionAttempt; +} + +/// +/// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). +/// +public async Task LockDoorAsync(string deviceId = default) +{ +return (await LockDoorAsync(new LockDoorRequest(deviceId: deviceId))); +} + +/// +/// Request parameters for Unlock a Lock. +/// +[DataContract(Name = "unlockDoorRequest_request")] +public class UnlockDoorRequest +{ +[JsonConstructorAttribute] +protected UnlockDoorRequest() { } + +public UnlockDoorRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the lock that you want to unlock. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "unlockDoorResponse_response")] +public class UnlockDoorResponse +{ +[JsonConstructorAttribute] +protected UnlockDoorResponse() { } + +public UnlockDoorResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). +/// +public ActionAttempt UnlockDoor(UnlockDoorRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/locks/unlock_door", requestOptions).EnsureData("/locks/unlock_door").ActionAttempt; +} + +/// +/// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). +/// +public ActionAttempt UnlockDoor(string deviceId = default) +{ +return UnlockDoor(new UnlockDoorRequest(deviceId: deviceId)); +} + +/// +/// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). +/// +public async Task UnlockDoorAsync(UnlockDoorRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/locks/unlock_door", requestOptions)).EnsureData("/locks/unlock_door").ActionAttempt; +} + +/// +/// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). +/// +public async Task UnlockDoorAsync(string deviceId = default) +{ +return (await UnlockDoorAsync(new UnlockDoorRequest(deviceId: deviceId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Locks Locks => new(this); - } +public partial class SeamClient +{ +public Api.Locks Locks => new(this); +} - public partial interface ISeamClient - { - public Api.Locks Locks { get; } - } +public partial interface ISeamClient +{ +public Api.Locks Locks { get; } +} } diff --git a/src/Seam/Api/Media.cs b/src/Seam/Api/Media.cs new file mode 100644 index 00000000..cb4546fe --- /dev/null +++ b/src/Seam/Api/Media.cs @@ -0,0 +1,170 @@ +using System.Runtime.Serialization; +using System.Text; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Seam.Client; +using Seam.Model; + +namespace Seam.Api +{ +public class Media +{ +private ISeamClient _seam; + +public Media(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get Media. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(GetRequest.FormatEnum? format = default, string mediaId = default) +{ +Format = format; +MediaId = mediaId; +} + +/// +/// Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FormatEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "json")] +Json = 1, + +[EnumMember(Value = "redirect")] +Redirect = 2, +} + +/// +/// Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video. +/// +[DataMember(Name = "format", IsRequired = false, EmitDefaultValue = false)] +public GetRequest.FormatEnum? Format { get; set; } + +/// +/// ID of the media that you want to get. +/// +[DataMember(Name = "media_id", IsRequired = true, EmitDefaultValue = false)] +public string MediaId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(Seam.Model.Media media = default) +{ +Media = media; +} + +/// +/// OK +/// +[DataMember(Name = "media", IsRequired = false, EmitDefaultValue = false)] +public Seam.Model.Media Media { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. +/// +public Seam.Model.Media Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/media/get", requestOptions).EnsureData("/media/get").Media; +} + +/// +/// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. +/// +public Seam.Model.Media Get(GetRequest.FormatEnum? format = default, string mediaId = default) +{ +return Get(new GetRequest(format: format, mediaId: mediaId)); +} + +/// +/// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/media/get", requestOptions)).EnsureData("/media/get").Media; +} + +/// +/// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. +/// +public async Task GetAsync(GetRequest.FormatEnum? format = default, string mediaId = default) +{ +return (await GetAsync(new GetRequest(format: format, mediaId: mediaId))); +} +} +} + +namespace Seam.Client +{ +public partial class SeamClient +{ +public Api.Media Media => new(this); +} + +public partial interface ISeamClient +{ +public Api.Media Media { get; } +} +} diff --git a/src/Seam/Api/NoiseSensors.cs b/src/Seam/Api/NoiseSensors.cs index ce85bf8e..2d0072d6 100644 --- a/src/Seam/Api/NoiseSensors.cs +++ b/src/Seam/Api/NoiseSensors.cs @@ -9,272 +9,222 @@ namespace Seam.Api { - public class NoiseSensors - { - private ISeamClient _seam; - - public NoiseSensors(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for List Noise Sensors. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountId = connectedAccountId; - CustomerKey = customerKey; - DeviceType = deviceType; - DeviceTypes = deviceTypes; - Manufacturer = manufacturer; - } - - /// - /// Device type of the noise sensors that you want to list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 1, - - [EnumMember(Value = "minut_sensor")] - MinutSensor = 2, - } - - /// - /// Device types of the noise sensors that you want to list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 1, - - [EnumMember(Value = "minut_sensor")] - MinutSensor = 2, - } - - /// - /// Manufacturers of the noise sensors that you want to list. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ManufacturerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "minut")] - Minut = 1, - - [EnumMember(Value = "noiseaware")] - Noiseaware = 2, - } - - /// - /// ID of the Connect Webview for which you want to list devices. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectWebviewId { get; set; } - - /// - /// ID of the connected account for which you want to list devices. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Customer key for which you want to list devices. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Device type of the noise sensors that you want to list. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - - /// - /// Device types of the noise sensors that you want to list. - /// - [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceTypes { get; set; } - - /// - /// Manufacturers of the noise sensors that you want to list. - /// - [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List devices = default) - { - Devices = devices; - } - - /// - /// OK - /// - [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] - public List Devices { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [noise sensors](https://docs.seam.co/capability-guides/noise-sensors). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/noise_sensors/list", requestOptions) - .EnsureData("/noise_sensors/list") - .Devices; - } - - /// - /// Returns a list of all [noise sensors](https://docs.seam.co/capability-guides/noise-sensors). - /// - public List List( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - return List( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - deviceType: deviceType, - deviceTypes: deviceTypes, - manufacturer: manufacturer - ) - ); - } - - /// - /// Returns a list of all [noise sensors](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/noise_sensors/list", requestOptions)) - .EnsureData("/noise_sensors/list") - .Devices; - } - - /// - /// Returns a list of all [noise sensors](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task> ListAsync( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - return ( - await ListAsync( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - deviceType: deviceType, - deviceTypes: deviceTypes, - manufacturer: manufacturer - ) - ) - ); - } - } +public class NoiseSensors +{ +private ISeamClient _seam; + +public NoiseSensors(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for List Noise Sensors. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountId = connectedAccountId; +CustomerKey = customerKey; +DeviceType = deviceType; +DeviceTypes = deviceTypes; +Manufacturer = manufacturer; +} + +/// +/// Device type of the noise sensors that you want to list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "noiseaware_activity_zone")] +NoiseawareActivityZone = 1, + +[EnumMember(Value = "minut_sensor")] +MinutSensor = 2, +} + +/// +/// Device types of the noise sensors that you want to list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "noiseaware_activity_zone")] +NoiseawareActivityZone = 1, + +[EnumMember(Value = "minut_sensor")] +MinutSensor = 2, +} + +/// +/// Manufacturers of the noise sensors that you want to list. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ManufacturerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "minut")] +Minut = 1, + +[EnumMember(Value = "noiseaware")] +Noiseaware = 2, +} + +/// +/// ID of the Connect Webview for which you want to list devices. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectWebviewId { get; set; } + +/// +/// ID of the connected account for which you want to list devices. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Customer key for which you want to list devices. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Device type of the noise sensors that you want to list. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + +/// +/// Device types of the noise sensors that you want to list. +/// +[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceTypes { get; set; } + +/// +/// Manufacturers of the noise sensors that you want to list. +/// +[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List devices = default) +{ +Devices = devices; +} + +/// +/// OK +/// +[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] +public List Devices { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/noise_sensors/list", requestOptions).EnsureData("/noise_sensors/list").Devices; +} + +/// +/// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public List List(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer)); +} + +/// +/// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/noise_sensors/list", requestOptions)).EnsureData("/noise_sensors/list").Devices; +} + +/// +/// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.NoiseSensors NoiseSensors => new(this); - } - - public partial interface ISeamClient - { - public Api.NoiseSensors NoiseSensors { get; } - } +public partial class SeamClient +{ +public Api.NoiseSensors NoiseSensors => new(this); +} + +public partial interface ISeamClient +{ +public Api.NoiseSensors NoiseSensors { get; } +} } diff --git a/src/Seam/Api/NoiseThresholdsNoiseSensors.cs b/src/Seam/Api/NoiseThresholdsNoiseSensors.cs index 5d60d24d..1dda94f2 100644 --- a/src/Seam/Api/NoiseThresholdsNoiseSensors.cs +++ b/src/Seam/Api/NoiseThresholdsNoiseSensors.cs @@ -9,732 +9,601 @@ namespace Seam.Api { - public class NoiseThresholdsNoiseSensors - { - private ISeamClient _seam; - - public NoiseThresholdsNoiseSensors(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create a Noise Threshold. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - string deviceId = default, - string endsDailyAt = default, - string? name = default, - float? noiseThresholdDecibels = default, - float? noiseThresholdNrs = default, - string startsDailyAt = default - ) - { - DeviceId = deviceId; - EndsDailyAt = endsDailyAt; - Name = name; - NoiseThresholdDecibels = noiseThresholdDecibels; - NoiseThresholdNrs = noiseThresholdNrs; - StartsDailyAt = startsDailyAt; - } - - /// - /// ID of the device for which you want to create a noise threshold. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Time at which the new noise threshold should become inactive daily. - /// - [DataMember(Name = "ends_daily_at", IsRequired = true, EmitDefaultValue = false)] - public string EndsDailyAt { get; set; } - - /// - /// Name of the new noise threshold. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Noise level in decibels for the new noise threshold. - /// - [DataMember( - Name = "noise_threshold_decibels", - IsRequired = false, - EmitDefaultValue = false - )] - public float? NoiseThresholdDecibels { get; set; } - - /// - /// Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors). - /// - [DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] - public float? NoiseThresholdNrs { get; set; } - - /// - /// Time at which the new noise threshold should become active daily. - /// - [DataMember(Name = "starts_daily_at", IsRequired = true, EmitDefaultValue = false)] - public string StartsDailyAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(NoiseThreshold noiseThreshold = default) - { - NoiseThreshold = noiseThreshold; - } - - /// - /// OK - /// - [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] - public NoiseThreshold NoiseThreshold { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. - /// - public NoiseThreshold Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/noise_sensors/noise_thresholds/create", requestOptions) - .EnsureData("/noise_sensors/noise_thresholds/create") - .NoiseThreshold; - } - - /// - /// Creates a new [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. - /// - public NoiseThreshold Create( - string deviceId = default, - string endsDailyAt = default, - string? name = default, - float? noiseThresholdDecibels = default, - float? noiseThresholdNrs = default, - string startsDailyAt = default - ) - { - return Create( - new CreateRequest( - deviceId: deviceId, - endsDailyAt: endsDailyAt, - name: name, - noiseThresholdDecibels: noiseThresholdDecibels, - noiseThresholdNrs: noiseThresholdNrs, - startsDailyAt: startsDailyAt - ) - ); - } - - /// - /// Creates a new [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/noise_sensors/noise_thresholds/create", - requestOptions - ) - ) - .EnsureData("/noise_sensors/noise_thresholds/create") - .NoiseThreshold; - } - - /// - /// Creates a new [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. - /// - public async Task CreateAsync( - string deviceId = default, - string endsDailyAt = default, - string? name = default, - float? noiseThresholdDecibels = default, - float? noiseThresholdNrs = default, - string startsDailyAt = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - deviceId: deviceId, - endsDailyAt: endsDailyAt, - name: name, - noiseThresholdDecibels: noiseThresholdDecibels, - noiseThresholdNrs: noiseThresholdNrs, - startsDailyAt: startsDailyAt - ) - ) - ); - } - - /// - /// Request parameters for Delete a Noise Threshold. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string deviceId = default, string noiseThresholdId = default) - { - DeviceId = deviceId; - NoiseThresholdId = noiseThresholdId; - } - - /// - /// ID of the device that contains the noise threshold that you want to delete. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// ID of the noise threshold that you want to delete. - /// - [DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] - public string NoiseThresholdId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/noise_sensors/noise_thresholds/delete", requestOptions); - } - - /// - /// Deletes a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public void Delete(string deviceId = default, string noiseThresholdId = default) - { - Delete(new DeleteRequest(deviceId: deviceId, noiseThresholdId: noiseThresholdId)); - } - - /// - /// Deletes a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync( - "/noise_sensors/noise_thresholds/delete", - requestOptions - ); - } - - /// - /// Deletes a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task DeleteAsync(string deviceId = default, string noiseThresholdId = default) - { - await DeleteAsync( - new DeleteRequest(deviceId: deviceId, noiseThresholdId: noiseThresholdId) - ); - } - - /// - /// Request parameters for Get a Noise Threshold. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string noiseThresholdId = default) - { - NoiseThresholdId = noiseThresholdId; - } - - /// - /// ID of the noise threshold that you want to get. - /// - [DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] - public string NoiseThresholdId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(NoiseThreshold noiseThreshold = default) - { - NoiseThreshold = noiseThreshold; - } - - /// - /// OK - /// - [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] - public NoiseThreshold NoiseThreshold { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public NoiseThreshold Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/noise_sensors/noise_thresholds/get", requestOptions) - .EnsureData("/noise_sensors/noise_thresholds/get") - .NoiseThreshold; - } - - /// - /// Returns a specified [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public NoiseThreshold Get(string noiseThresholdId = default) - { - return Get(new GetRequest(noiseThresholdId: noiseThresholdId)); - } - - /// - /// Returns a specified [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/noise_sensors/noise_thresholds/get", - requestOptions - ) - ) - .EnsureData("/noise_sensors/noise_thresholds/get") - .NoiseThreshold; - } - - /// - /// Returns a specified [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task GetAsync(string noiseThresholdId = default) - { - return (await GetAsync(new GetRequest(noiseThresholdId: noiseThresholdId))); - } - - /// - /// Request parameters for List Noise Thresholds. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the device for which you want to list noise thresholds. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List noiseThresholds = default) - { - NoiseThresholds = noiseThresholds; - } - - /// - /// OK - /// - [DataMember(Name = "noise_thresholds", IsRequired = false, EmitDefaultValue = false)] - public List NoiseThresholds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [noise thresholds](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/noise_sensors/noise_thresholds/list", requestOptions) - .EnsureData("/noise_sensors/noise_thresholds/list") - .NoiseThresholds; - } - - /// - /// Returns a list of all [noise thresholds](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public List List(string deviceId = default) - { - return List(new ListRequest(deviceId: deviceId)); - } - - /// - /// Returns a list of all [noise thresholds](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/noise_sensors/noise_thresholds/list", - requestOptions - ) - ) - .EnsureData("/noise_sensors/noise_thresholds/list") - .NoiseThresholds; - } - - /// - /// Returns a list of all [noise thresholds](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task> ListAsync(string deviceId = default) - { - return (await ListAsync(new ListRequest(deviceId: deviceId))); - } - - /// - /// Request parameters for Update a Noise Threshold. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string deviceId = default, - string? endsDailyAt = default, - string? name = default, - float? noiseThresholdDecibels = default, - string noiseThresholdId = default, - float? noiseThresholdNrs = default, - string? startsDailyAt = default - ) - { - DeviceId = deviceId; - EndsDailyAt = endsDailyAt; - Name = name; - NoiseThresholdDecibels = noiseThresholdDecibels; - NoiseThresholdId = noiseThresholdId; - NoiseThresholdNrs = noiseThresholdNrs; - StartsDailyAt = startsDailyAt; - } - - /// - /// ID of the device that contains the noise threshold that you want to update. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Time at which the noise threshold should become inactive daily. - /// - [DataMember(Name = "ends_daily_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsDailyAt { get; set; } - - /// - /// Name of the noise threshold that you want to update. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Noise level in decibels for the noise threshold. - /// - [DataMember( - Name = "noise_threshold_decibels", - IsRequired = false, - EmitDefaultValue = false - )] - public float? NoiseThresholdDecibels { get; set; } - - /// - /// ID of the noise threshold that you want to update. - /// - [DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] - public string NoiseThresholdId { get; set; } - - /// - /// Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors). - /// - [DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] - public float? NoiseThresholdNrs { get; set; } - - /// - /// Time at which the noise threshold should become active daily. - /// - [DataMember(Name = "starts_daily_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsDailyAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/noise_sensors/noise_thresholds/update", requestOptions); - } - - /// - /// Updates a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public void Update( - string deviceId = default, - string? endsDailyAt = default, - string? name = default, - float? noiseThresholdDecibels = default, - string noiseThresholdId = default, - float? noiseThresholdNrs = default, - string? startsDailyAt = default - ) - { - Update( - new UpdateRequest( - deviceId: deviceId, - endsDailyAt: endsDailyAt, - name: name, - noiseThresholdDecibels: noiseThresholdDecibels, - noiseThresholdId: noiseThresholdId, - noiseThresholdNrs: noiseThresholdNrs, - startsDailyAt: startsDailyAt - ) - ); - } - - /// - /// Updates a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync( - "/noise_sensors/noise_thresholds/update", - requestOptions - ); - } - - /// - /// Updates a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). - /// - public async Task UpdateAsync( - string deviceId = default, - string? endsDailyAt = default, - string? name = default, - float? noiseThresholdDecibels = default, - string noiseThresholdId = default, - float? noiseThresholdNrs = default, - string? startsDailyAt = default - ) - { - await UpdateAsync( - new UpdateRequest( - deviceId: deviceId, - endsDailyAt: endsDailyAt, - name: name, - noiseThresholdDecibels: noiseThresholdDecibels, - noiseThresholdId: noiseThresholdId, - noiseThresholdNrs: noiseThresholdNrs, - startsDailyAt: startsDailyAt - ) - ); - } - } +public class NoiseThresholdsNoiseSensors +{ +private ISeamClient _seam; + +public NoiseThresholdsNoiseSensors(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Noise Threshold. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(string deviceId = default, string endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, float? noiseThresholdNrs = default, string startsDailyAt = default) +{ +DeviceId = deviceId; +EndsDailyAt = endsDailyAt; +Name = name; +NoiseThresholdDecibels = noiseThresholdDecibels; +NoiseThresholdNrs = noiseThresholdNrs; +StartsDailyAt = startsDailyAt; +} + +/// +/// ID of the device for which you want to create a noise threshold. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Time at which the new noise threshold should become inactive daily. +/// +[DataMember(Name = "ends_daily_at", IsRequired = true, EmitDefaultValue = false)] +public string EndsDailyAt { get; set; } + +/// +/// Name of the new noise threshold. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Noise level in decibels for the new noise threshold. +/// +[DataMember(Name = "noise_threshold_decibels", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseThresholdDecibels { get; set; } + +/// +/// Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). +/// +[DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseThresholdNrs { get; set; } + +/// +/// Time at which the new noise threshold should become active daily. +/// +[DataMember(Name = "starts_daily_at", IsRequired = true, EmitDefaultValue = false)] +public string StartsDailyAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(NoiseThreshold noiseThreshold = default) +{ +NoiseThreshold = noiseThreshold; +} + +/// +/// OK +/// +[DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] +public NoiseThreshold NoiseThreshold { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. +/// +public NoiseThreshold Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/noise_sensors/noise_thresholds/create", requestOptions).EnsureData("/noise_sensors/noise_thresholds/create").NoiseThreshold; +} + +/// +/// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. +/// +public NoiseThreshold Create(string deviceId = default, string endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, float? noiseThresholdNrs = default, string startsDailyAt = default) +{ +return Create(new CreateRequest(deviceId: deviceId, endsDailyAt: endsDailyAt, name: name, noiseThresholdDecibels: noiseThresholdDecibels, noiseThresholdNrs: noiseThresholdNrs, startsDailyAt: startsDailyAt)); +} + +/// +/// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/noise_sensors/noise_thresholds/create", requestOptions)).EnsureData("/noise_sensors/noise_thresholds/create").NoiseThreshold; +} + +/// +/// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. +/// +public async Task CreateAsync(string deviceId = default, string endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, float? noiseThresholdNrs = default, string startsDailyAt = default) +{ +return (await CreateAsync(new CreateRequest(deviceId: deviceId, endsDailyAt: endsDailyAt, name: name, noiseThresholdDecibels: noiseThresholdDecibels, noiseThresholdNrs: noiseThresholdNrs, startsDailyAt: startsDailyAt))); +} + +/// +/// Request parameters for Delete a Noise Threshold. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string deviceId = default, string noiseThresholdId = default) +{ +DeviceId = deviceId; +NoiseThresholdId = noiseThresholdId; +} + +/// +/// ID of the device that contains the noise threshold that you want to delete. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// ID of the noise threshold that you want to delete. +/// +[DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] +public string NoiseThresholdId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/noise_sensors/noise_thresholds/delete", requestOptions); +} + +/// +/// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public void Delete(string deviceId = default, string noiseThresholdId = default) +{ +Delete(new DeleteRequest(deviceId: deviceId, noiseThresholdId: noiseThresholdId)); +} + +/// +/// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/noise_sensors/noise_thresholds/delete", requestOptions); +} + +/// +/// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task DeleteAsync(string deviceId = default, string noiseThresholdId = default) +{ +await DeleteAsync(new DeleteRequest(deviceId: deviceId, noiseThresholdId: noiseThresholdId)); +} + +/// +/// Request parameters for Get a Noise Threshold. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string noiseThresholdId = default) +{ +NoiseThresholdId = noiseThresholdId; +} + +/// +/// ID of the noise threshold that you want to get. +/// +[DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] +public string NoiseThresholdId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(NoiseThreshold noiseThreshold = default) +{ +NoiseThreshold = noiseThreshold; +} + +/// +/// OK +/// +[DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] +public NoiseThreshold NoiseThreshold { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public NoiseThreshold Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/noise_sensors/noise_thresholds/get", requestOptions).EnsureData("/noise_sensors/noise_thresholds/get").NoiseThreshold; +} + +/// +/// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public NoiseThreshold Get(string noiseThresholdId = default) +{ +return Get(new GetRequest(noiseThresholdId: noiseThresholdId)); +} + +/// +/// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/noise_sensors/noise_thresholds/get", requestOptions)).EnsureData("/noise_sensors/noise_thresholds/get").NoiseThreshold; +} + +/// +/// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task GetAsync(string noiseThresholdId = default) +{ +return (await GetAsync(new GetRequest(noiseThresholdId: noiseThresholdId))); +} + +/// +/// Request parameters for List Noise Thresholds. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the device for which you want to list noise thresholds. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List noiseThresholds = default) +{ +NoiseThresholds = noiseThresholds; +} + +/// +/// OK +/// +[DataMember(Name = "noise_thresholds", IsRequired = false, EmitDefaultValue = false)] +public List NoiseThresholds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/noise_sensors/noise_thresholds/list", requestOptions).EnsureData("/noise_sensors/noise_thresholds/list").NoiseThresholds; +} + +/// +/// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public List List(string deviceId = default) +{ +return List(new ListRequest(deviceId: deviceId)); +} + +/// +/// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/noise_sensors/noise_thresholds/list", requestOptions)).EnsureData("/noise_sensors/noise_thresholds/list").NoiseThresholds; +} + +/// +/// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task> ListAsync(string deviceId = default) +{ +return (await ListAsync(new ListRequest(deviceId: deviceId))); +} + +/// +/// Request parameters for Update a Noise Threshold. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string deviceId = default, string? endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, string noiseThresholdId = default, float? noiseThresholdNrs = default, string? startsDailyAt = default) +{ +DeviceId = deviceId; +EndsDailyAt = endsDailyAt; +Name = name; +NoiseThresholdDecibels = noiseThresholdDecibels; +NoiseThresholdId = noiseThresholdId; +NoiseThresholdNrs = noiseThresholdNrs; +StartsDailyAt = startsDailyAt; +} + +/// +/// ID of the device that contains the noise threshold that you want to update. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Time at which the noise threshold should become inactive daily. +/// +[DataMember(Name = "ends_daily_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsDailyAt { get; set; } + +/// +/// Name of the noise threshold that you want to update. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Noise level in decibels for the noise threshold. +/// +[DataMember(Name = "noise_threshold_decibels", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseThresholdDecibels { get; set; } + +/// +/// ID of the noise threshold that you want to update. +/// +[DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] +public string NoiseThresholdId { get; set; } + +/// +/// Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). +/// +[DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseThresholdNrs { get; set; } + +/// +/// Time at which the noise threshold should become active daily. +/// +[DataMember(Name = "starts_daily_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsDailyAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/noise_sensors/noise_thresholds/update", requestOptions); +} + +/// +/// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public void Update(string deviceId = default, string? endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, string noiseThresholdId = default, float? noiseThresholdNrs = default, string? startsDailyAt = default) +{ +Update(new UpdateRequest(deviceId: deviceId, endsDailyAt: endsDailyAt, name: name, noiseThresholdDecibels: noiseThresholdDecibels, noiseThresholdId: noiseThresholdId, noiseThresholdNrs: noiseThresholdNrs, startsDailyAt: startsDailyAt)); +} + +/// +/// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/noise_sensors/noise_thresholds/update", requestOptions); +} + +/// +/// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). +/// +public async Task UpdateAsync(string deviceId = default, string? endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, string noiseThresholdId = default, float? noiseThresholdNrs = default, string? startsDailyAt = default) +{ +await UpdateAsync(new UpdateRequest(deviceId: deviceId, endsDailyAt: endsDailyAt, name: name, noiseThresholdDecibels: noiseThresholdDecibels, noiseThresholdId: noiseThresholdId, noiseThresholdNrs: noiseThresholdNrs, startsDailyAt: startsDailyAt)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.NoiseThresholdsNoiseSensors NoiseThresholdsNoiseSensors => new(this); - } +public partial class SeamClient +{ +public Api.NoiseThresholdsNoiseSensors NoiseThresholdsNoiseSensors => new(this); +} - public partial interface ISeamClient - { - public Api.NoiseThresholdsNoiseSensors NoiseThresholdsNoiseSensors { get; } - } +public partial interface ISeamClient +{ +public Api.NoiseThresholdsNoiseSensors NoiseThresholdsNoiseSensors { get; } +} } diff --git a/src/Seam/Api/Phones.cs b/src/Seam/Api/Phones.cs index 215784be..f8867822 100644 --- a/src/Seam/Api/Phones.cs +++ b/src/Seam/Api/Phones.cs @@ -9,370 +9,335 @@ namespace Seam.Api { - public class Phones - { - private ISeamClient _seam; - - public Phones(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Deactivate a Phone. - /// - [DataContract(Name = "deactivateRequest_request")] - public class DeactivateRequest - { - [JsonConstructorAttribute] - protected DeactivateRequest() { } - - public DeactivateRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// Device ID of the phone that you want to deactivate. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). - /// - public void Deactivate(DeactivateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/phones/deactivate", requestOptions); - } - - /// - /// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). - /// - public void Deactivate(string deviceId = default) - { - Deactivate(new DeactivateRequest(deviceId: deviceId)); - } - - /// - /// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). - /// - public async Task DeactivateAsync(DeactivateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/phones/deactivate", requestOptions); - } - - /// - /// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). - /// - public async Task DeactivateAsync(string deviceId = default) - { - await DeactivateAsync(new DeactivateRequest(deviceId: deviceId)); - } - - /// - /// Request parameters for Get a Phone. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// Device ID of the phone that you want to get. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(Phone phone = default) - { - Phone = phone; - } - - /// - /// OK - /// - [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] - public Phone Phone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [phone](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). - /// - public Phone Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/phones/get", requestOptions) - .EnsureData("/phones/get") - .Phone; - } - - /// - /// Returns a specified [phone](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). - /// - public Phone Get(string deviceId = default) - { - return Get(new GetRequest(deviceId: deviceId)); - } - - /// - /// Returns a specified [phone](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/phones/get", requestOptions)) - .EnsureData("/phones/get") - .Phone; - } - - /// - /// Returns a specified [phone](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). - /// - public async Task GetAsync(string deviceId = default) - { - return (await GetAsync(new GetRequest(deviceId: deviceId))); - } - - /// - /// Request parameters for List Phones. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? acsCredentialId = default, - string? ownerUserIdentityId = default - ) - { - AcsCredentialId = acsCredentialId; - OwnerUserIdentityId = ownerUserIdentityId; - } - - /// - /// ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialId { get; set; } - - /// - /// ID of the user identity that represents the owner by which you want to filter the list of returned phones. - /// - [DataMember( - Name = "owner_user_identity_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? OwnerUserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List phones = default) - { - Phones = phones; - } - - /// - /// OK - /// - [DataMember(Name = "phones", IsRequired = false, EmitDefaultValue = false)] - public List Phones { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [phones](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/phones/list", requestOptions) - .EnsureData("/phones/list") - .Phones; - } - - /// - /// Returns a list of all [phones](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. - /// - public List List( - string? acsCredentialId = default, - string? ownerUserIdentityId = default - ) - { - return List( - new ListRequest( - acsCredentialId: acsCredentialId, - ownerUserIdentityId: ownerUserIdentityId - ) - ); - } - - /// - /// Returns a list of all [phones](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/phones/list", requestOptions)) - .EnsureData("/phones/list") - .Phones; - } - - /// - /// Returns a list of all [phones](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. - /// - public async Task> ListAsync( - string? acsCredentialId = default, - string? ownerUserIdentityId = default - ) - { - return ( - await ListAsync( - new ListRequest( - acsCredentialId: acsCredentialId, - ownerUserIdentityId: ownerUserIdentityId - ) - ) - ); - } - } +public class Phones +{ +private ISeamClient _seam; + +public Phones(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Deactivate a Phone. +/// +[DataContract(Name = "deactivateRequest_request")] +public class DeactivateRequest +{ +[JsonConstructorAttribute] +protected DeactivateRequest() { } + +public DeactivateRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// Device ID of the phone that you want to deactivate. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). +/// +public void Deactivate(DeactivateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/phones/deactivate", requestOptions); +} + +/// +/// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). +/// +public void Deactivate(string deviceId = default) +{ +Deactivate(new DeactivateRequest(deviceId: deviceId)); +} + +/// +/// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). +/// +public async Task DeactivateAsync(DeactivateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/phones/deactivate", requestOptions); +} + +/// +/// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). +/// +public async Task DeactivateAsync(string deviceId = default) +{ +await DeactivateAsync(new DeactivateRequest(deviceId: deviceId)); +} + +/// +/// Request parameters for Get a Phone. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// Device ID of the phone that you want to get. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(Phone phone = default) +{ +Phone = phone; +} + +/// +/// OK +/// +[DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] +public Phone Phone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). +/// +public Phone Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/phones/get", requestOptions).EnsureData("/phones/get").Phone; +} + +/// +/// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). +/// +public Phone Get(string deviceId = default) +{ +return Get(new GetRequest(deviceId: deviceId)); +} + +/// +/// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/phones/get", requestOptions)).EnsureData("/phones/get").Phone; +} + +/// +/// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). +/// +public async Task GetAsync(string deviceId = default) +{ +return (await GetAsync(new GetRequest(deviceId: deviceId))); +} + +/// +/// Request parameters for List Phones. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? acsCredentialId = default, string? ownerUserIdentityId = default) +{ +AcsCredentialId = acsCredentialId; +OwnerUserIdentityId = ownerUserIdentityId; +} + +/// +/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialId { get; set; } + +/// +/// ID of the user identity that represents the owner by which you want to filter the list of returned phones. +/// +[DataMember(Name = "owner_user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? OwnerUserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List phones = default) +{ +Phones = phones; +} + +/// +/// OK +/// +[DataMember(Name = "phones", IsRequired = false, EmitDefaultValue = false)] +public List Phones { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/phones/list", requestOptions).EnsureData("/phones/list").Phones; +} + +/// +/// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. +/// +public List List(string? acsCredentialId = default, string? ownerUserIdentityId = default) +{ +return List(new ListRequest(acsCredentialId: acsCredentialId, ownerUserIdentityId: ownerUserIdentityId)); +} + +/// +/// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/phones/list", requestOptions)).EnsureData("/phones/list").Phones; +} + +/// +/// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. +/// +public async Task> ListAsync(string? acsCredentialId = default, string? ownerUserIdentityId = default) +{ +return (await ListAsync(new ListRequest(acsCredentialId: acsCredentialId, ownerUserIdentityId: ownerUserIdentityId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Phones Phones => new(this); - } +public partial class SeamClient +{ +public Api.Phones Phones => new(this); +} - public partial interface ISeamClient - { - public Api.Phones Phones { get; } - } +public partial interface ISeamClient +{ +public Api.Phones Phones { get; } +} } diff --git a/src/Seam/Api/SchedulesThermostats.cs b/src/Seam/Api/SchedulesThermostats.cs index b16702ab..d005aa9a 100644 --- a/src/Seam/Api/SchedulesThermostats.cs +++ b/src/Seam/Api/SchedulesThermostats.cs @@ -9,754 +9,608 @@ namespace Seam.Api { - public class SchedulesThermostats - { - private ISeamClient _seam; - - public SchedulesThermostats(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create a Thermostat Schedule. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - string climatePresetKey = default, - string deviceId = default, - string endsAt = default, - bool? isOverrideAllowed = default, - int? maxOverridePeriodMinutes = default, - string? name = default, - string startsAt = default - ) - { - ClimatePresetKey = climatePresetKey; - DeviceId = deviceId; - EndsAt = endsAt; - IsOverrideAllowed = isOverrideAllowed; - MaxOverridePeriodMinutes = maxOverridePeriodMinutes; - Name = name; - StartsAt = startsAt; - } - - /// - /// Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the new thermostat schedule. - /// - [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// ID of the thermostat device for which you want to create a schedule. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Date and time at which the new thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "ends_at", IsRequired = true, EmitDefaultValue = false)] - public string EndsAt { get; set; } - - /// - /// Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the new schedule is active. See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOverrideAllowed { get; set; } - - /// - /// Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [DataMember( - Name = "max_override_period_minutes", - IsRequired = false, - EmitDefaultValue = false - )] - public int? MaxOverridePeriodMinutes { get; set; } - - /// - /// Name of the thermostat schedule. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Date and time at which the new thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = true, EmitDefaultValue = false)] - public string StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(ThermostatSchedule thermostatSchedule = default) - { - ThermostatSchedule = thermostatSchedule; - } - - /// - /// OK - /// - [DataMember(Name = "thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] - public ThermostatSchedule ThermostatSchedule { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public ThermostatSchedule Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/thermostats/schedules/create", requestOptions) - .EnsureData("/thermostats/schedules/create") - .ThermostatSchedule; - } - - /// - /// Creates a new [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public ThermostatSchedule Create( - string climatePresetKey = default, - string deviceId = default, - string endsAt = default, - bool? isOverrideAllowed = default, - int? maxOverridePeriodMinutes = default, - string? name = default, - string startsAt = default - ) - { - return Create( - new CreateRequest( - climatePresetKey: climatePresetKey, - deviceId: deviceId, - endsAt: endsAt, - isOverrideAllowed: isOverrideAllowed, - maxOverridePeriodMinutes: maxOverridePeriodMinutes, - name: name, - startsAt: startsAt - ) - ); - } - - /// - /// Creates a new [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/thermostats/schedules/create", - requestOptions - ) - ) - .EnsureData("/thermostats/schedules/create") - .ThermostatSchedule; - } - - /// - /// Creates a new [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task CreateAsync( - string climatePresetKey = default, - string deviceId = default, - string endsAt = default, - bool? isOverrideAllowed = default, - int? maxOverridePeriodMinutes = default, - string? name = default, - string startsAt = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - climatePresetKey: climatePresetKey, - deviceId: deviceId, - endsAt: endsAt, - isOverrideAllowed: isOverrideAllowed, - maxOverridePeriodMinutes: maxOverridePeriodMinutes, - name: name, - startsAt: startsAt - ) - ) - ); - } - - /// - /// Request parameters for Delete a Thermostat Schedule. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string thermostatScheduleId = default) - { - ThermostatScheduleId = thermostatScheduleId; - } - - /// - /// ID of the thermostat schedule that you want to delete. - /// - [DataMember( - Name = "thermostat_schedule_id", - IsRequired = true, - EmitDefaultValue = false - )] - public string ThermostatScheduleId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/thermostats/schedules/delete", requestOptions); - } - - /// - /// Deletes a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void Delete(string thermostatScheduleId = default) - { - Delete(new DeleteRequest(thermostatScheduleId: thermostatScheduleId)); - } - - /// - /// Deletes a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/thermostats/schedules/delete", requestOptions); - } - - /// - /// Deletes a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task DeleteAsync(string thermostatScheduleId = default) - { - await DeleteAsync(new DeleteRequest(thermostatScheduleId: thermostatScheduleId)); - } - - /// - /// Request parameters for Get a Thermostat Schedule. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string thermostatScheduleId = default) - { - ThermostatScheduleId = thermostatScheduleId; - } - - /// - /// ID of the thermostat schedule that you want to get. - /// - [DataMember( - Name = "thermostat_schedule_id", - IsRequired = true, - EmitDefaultValue = false - )] - public string ThermostatScheduleId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(ThermostatSchedule thermostatSchedule = default) - { - ThermostatSchedule = thermostatSchedule; - } - - /// - /// OK - /// - [DataMember(Name = "thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] - public ThermostatSchedule ThermostatSchedule { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - public ThermostatSchedule Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/thermostats/schedules/get", requestOptions) - .EnsureData("/thermostats/schedules/get") - .ThermostatSchedule; - } - - /// - /// Returns a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - public ThermostatSchedule Get(string thermostatScheduleId = default) - { - return Get(new GetRequest(thermostatScheduleId: thermostatScheduleId)); - } - - /// - /// Returns a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/thermostats/schedules/get", requestOptions)) - .EnsureData("/thermostats/schedules/get") - .ThermostatSchedule; - } - - /// - /// Returns a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - public async Task GetAsync(string thermostatScheduleId = default) - { - return (await GetAsync(new GetRequest(thermostatScheduleId: thermostatScheduleId))); - } - - /// - /// Request parameters for List Thermostat Schedules. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest(string deviceId = default, string? userIdentifierKey = default) - { - DeviceId = deviceId; - UserIdentifierKey = userIdentifierKey; - } - - /// - /// ID of the thermostat device for which you want to list schedules. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// User identifier key by which to filter the list of returned thermostat schedules. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List thermostatSchedules = default) - { - ThermostatSchedules = thermostatSchedules; - } - - /// - /// OK - /// - [DataMember( - Name = "thermostat_schedules", - IsRequired = false, - EmitDefaultValue = false - )] - public List ThermostatSchedules { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [thermostat schedules](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/thermostats/schedules/list", requestOptions) - .EnsureData("/thermostats/schedules/list") - .ThermostatSchedules; - } - - /// - /// Returns a list of all [thermostat schedules](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public List List( - string deviceId = default, - string? userIdentifierKey = default - ) - { - return List(new ListRequest(deviceId: deviceId, userIdentifierKey: userIdentifierKey)); - } - - /// - /// Returns a list of all [thermostat schedules](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync("/thermostats/schedules/list", requestOptions) - ) - .EnsureData("/thermostats/schedules/list") - .ThermostatSchedules; - } - - /// - /// Returns a list of all [thermostat schedules](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task> ListAsync( - string deviceId = default, - string? userIdentifierKey = default - ) - { - return ( - await ListAsync( - new ListRequest(deviceId: deviceId, userIdentifierKey: userIdentifierKey) - ) - ); - } - - /// - /// Request parameters for Update a Thermostat Schedule. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string? climatePresetKey = default, - string? endsAt = default, - bool? isOverrideAllowed = default, - int? maxOverridePeriodMinutes = default, - string? name = default, - string? startsAt = default, - string thermostatScheduleId = default - ) - { - ClimatePresetKey = climatePresetKey; - EndsAt = endsAt; - IsOverrideAllowed = isOverrideAllowed; - MaxOverridePeriodMinutes = maxOverridePeriodMinutes; - Name = name; - StartsAt = startsAt; - ThermostatScheduleId = thermostatScheduleId; - } - - /// - /// Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the thermostat schedule. - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string? ClimatePresetKey { get; set; } - - /// - /// Date and time at which the thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the schedule is active. See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOverrideAllowed { get; set; } - - /// - /// Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [DataMember( - Name = "max_override_period_minutes", - IsRequired = false, - EmitDefaultValue = false - )] - public int? MaxOverridePeriodMinutes { get; set; } - - /// - /// Name of the thermostat schedule. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Date and time at which the thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// ID of the thermostat schedule that you want to update. - /// - [DataMember( - Name = "thermostat_schedule_id", - IsRequired = true, - EmitDefaultValue = false - )] - public string ThermostatScheduleId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/thermostats/schedules/update", requestOptions); - } - - /// - /// Updates a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - public void Update( - string? climatePresetKey = default, - string? endsAt = default, - bool? isOverrideAllowed = default, - int? maxOverridePeriodMinutes = default, - string? name = default, - string? startsAt = default, - string thermostatScheduleId = default - ) - { - Update( - new UpdateRequest( - climatePresetKey: climatePresetKey, - endsAt: endsAt, - isOverrideAllowed: isOverrideAllowed, - maxOverridePeriodMinutes: maxOverridePeriodMinutes, - name: name, - startsAt: startsAt, - thermostatScheduleId: thermostatScheduleId - ) - ); - } - - /// - /// Updates a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/thermostats/schedules/update", requestOptions); - } - - /// - /// Updates a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - public async Task UpdateAsync( - string? climatePresetKey = default, - string? endsAt = default, - bool? isOverrideAllowed = default, - int? maxOverridePeriodMinutes = default, - string? name = default, - string? startsAt = default, - string thermostatScheduleId = default - ) - { - await UpdateAsync( - new UpdateRequest( - climatePresetKey: climatePresetKey, - endsAt: endsAt, - isOverrideAllowed: isOverrideAllowed, - maxOverridePeriodMinutes: maxOverridePeriodMinutes, - name: name, - startsAt: startsAt, - thermostatScheduleId: thermostatScheduleId - ) - ); - } - } +public class SchedulesThermostats +{ +private ISeamClient _seam; + +public SchedulesThermostats(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Thermostat Schedule. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(string climatePresetKey = default, string deviceId = default, string endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default) +{ +ClimatePresetKey = climatePresetKey; +DeviceId = deviceId; +EndsAt = endsAt; +IsOverrideAllowed = isOverrideAllowed; +MaxOverridePeriodMinutes = maxOverridePeriodMinutes; +Name = name; +StartsAt = startsAt; +} + +/// +/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the new thermostat schedule. +/// +[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// ID of the thermostat device for which you want to create a schedule. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Date and time at which the new thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "ends_at", IsRequired = true, EmitDefaultValue = false)] +public string EndsAt { get; set; } + +/// +/// Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the new schedule is active. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOverrideAllowed { get; set; } + +/// +/// Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[DataMember(Name = "max_override_period_minutes", IsRequired = false, EmitDefaultValue = false)] +public int? MaxOverridePeriodMinutes { get; set; } + +/// +/// Name of the thermostat schedule. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Date and time at which the new thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = true, EmitDefaultValue = false)] +public string StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(ThermostatSchedule thermostatSchedule = default) +{ +ThermostatSchedule = thermostatSchedule; +} + +/// +/// OK +/// +[DataMember(Name = "thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] +public ThermostatSchedule ThermostatSchedule { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public ThermostatSchedule Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/schedules/create", requestOptions).EnsureData("/thermostats/schedules/create").ThermostatSchedule; +} + +/// +/// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public ThermostatSchedule Create(string climatePresetKey = default, string deviceId = default, string endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default) +{ +return Create(new CreateRequest(climatePresetKey: climatePresetKey, deviceId: deviceId, endsAt: endsAt, isOverrideAllowed: isOverrideAllowed, maxOverridePeriodMinutes: maxOverridePeriodMinutes, name: name, startsAt: startsAt)); +} + +/// +/// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/schedules/create", requestOptions)).EnsureData("/thermostats/schedules/create").ThermostatSchedule; +} + +/// +/// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task CreateAsync(string climatePresetKey = default, string deviceId = default, string endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default) +{ +return (await CreateAsync(new CreateRequest(climatePresetKey: climatePresetKey, deviceId: deviceId, endsAt: endsAt, isOverrideAllowed: isOverrideAllowed, maxOverridePeriodMinutes: maxOverridePeriodMinutes, name: name, startsAt: startsAt))); +} + +/// +/// Request parameters for Delete a Thermostat Schedule. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string thermostatScheduleId = default) +{ +ThermostatScheduleId = thermostatScheduleId; +} + +/// +/// ID of the thermostat schedule that you want to delete. +/// +[DataMember(Name = "thermostat_schedule_id", IsRequired = true, EmitDefaultValue = false)] +public string ThermostatScheduleId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/thermostats/schedules/delete", requestOptions); +} + +/// +/// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void Delete(string thermostatScheduleId = default) +{ +Delete(new DeleteRequest(thermostatScheduleId: thermostatScheduleId)); +} + +/// +/// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/thermostats/schedules/delete", requestOptions); +} + +/// +/// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task DeleteAsync(string thermostatScheduleId = default) +{ +await DeleteAsync(new DeleteRequest(thermostatScheduleId: thermostatScheduleId)); +} + +/// +/// Request parameters for Get a Thermostat Schedule. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string thermostatScheduleId = default) +{ +ThermostatScheduleId = thermostatScheduleId; +} + +/// +/// ID of the thermostat schedule that you want to get. +/// +[DataMember(Name = "thermostat_schedule_id", IsRequired = true, EmitDefaultValue = false)] +public string ThermostatScheduleId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(ThermostatSchedule thermostatSchedule = default) +{ +ThermostatSchedule = thermostatSchedule; +} + +/// +/// OK +/// +[DataMember(Name = "thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] +public ThermostatSchedule ThermostatSchedule { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +public ThermostatSchedule Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/thermostats/schedules/get", requestOptions).EnsureData("/thermostats/schedules/get").ThermostatSchedule; +} + +/// +/// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +public ThermostatSchedule Get(string thermostatScheduleId = default) +{ +return Get(new GetRequest(thermostatScheduleId: thermostatScheduleId)); +} + +/// +/// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/thermostats/schedules/get", requestOptions)).EnsureData("/thermostats/schedules/get").ThermostatSchedule; +} + +/// +/// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +public async Task GetAsync(string thermostatScheduleId = default) +{ +return (await GetAsync(new GetRequest(thermostatScheduleId: thermostatScheduleId))); +} + +/// +/// Request parameters for List Thermostat Schedules. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string deviceId = default, string? userIdentifierKey = default) +{ +DeviceId = deviceId; +UserIdentifierKey = userIdentifierKey; +} + +/// +/// ID of the thermostat device for which you want to list schedules. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// User identifier key by which to filter the list of returned thermostat schedules. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List thermostatSchedules = default) +{ +ThermostatSchedules = thermostatSchedules; +} + +/// +/// OK +/// +[DataMember(Name = "thermostat_schedules", IsRequired = false, EmitDefaultValue = false)] +public List ThermostatSchedules { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/thermostats/schedules/list", requestOptions).EnsureData("/thermostats/schedules/list").ThermostatSchedules; +} + +/// +/// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public List List(string deviceId = default, string? userIdentifierKey = default) +{ +return List(new ListRequest(deviceId: deviceId, userIdentifierKey: userIdentifierKey)); +} + +/// +/// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/thermostats/schedules/list", requestOptions)).EnsureData("/thermostats/schedules/list").ThermostatSchedules; +} + +/// +/// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task> ListAsync(string deviceId = default, string? userIdentifierKey = default) +{ +return (await ListAsync(new ListRequest(deviceId: deviceId, userIdentifierKey: userIdentifierKey))); +} + +/// +/// Request parameters for Update a Thermostat Schedule. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string? climatePresetKey = default, string? endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string? startsAt = default, string thermostatScheduleId = default) +{ +ClimatePresetKey = climatePresetKey; +EndsAt = endsAt; +IsOverrideAllowed = isOverrideAllowed; +MaxOverridePeriodMinutes = maxOverridePeriodMinutes; +Name = name; +StartsAt = startsAt; +ThermostatScheduleId = thermostatScheduleId; +} + +/// +/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the thermostat schedule. +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string? ClimatePresetKey { get; set; } + +/// +/// Date and time at which the thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the schedule is active. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOverrideAllowed { get; set; } + +/// +/// Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[DataMember(Name = "max_override_period_minutes", IsRequired = false, EmitDefaultValue = false)] +public int? MaxOverridePeriodMinutes { get; set; } + +/// +/// Name of the thermostat schedule. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Date and time at which the thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// ID of the thermostat schedule that you want to update. +/// +[DataMember(Name = "thermostat_schedule_id", IsRequired = true, EmitDefaultValue = false)] +public string ThermostatScheduleId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/thermostats/schedules/update", requestOptions); +} + +/// +/// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +public void Update(string? climatePresetKey = default, string? endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string? startsAt = default, string thermostatScheduleId = default) +{ +Update(new UpdateRequest(climatePresetKey: climatePresetKey, endsAt: endsAt, isOverrideAllowed: isOverrideAllowed, maxOverridePeriodMinutes: maxOverridePeriodMinutes, name: name, startsAt: startsAt, thermostatScheduleId: thermostatScheduleId)); +} + +/// +/// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/thermostats/schedules/update", requestOptions); +} + +/// +/// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +public async Task UpdateAsync(string? climatePresetKey = default, string? endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string? startsAt = default, string thermostatScheduleId = default) +{ +await UpdateAsync(new UpdateRequest(climatePresetKey: climatePresetKey, endsAt: endsAt, isOverrideAllowed: isOverrideAllowed, maxOverridePeriodMinutes: maxOverridePeriodMinutes, name: name, startsAt: startsAt, thermostatScheduleId: thermostatScheduleId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SchedulesThermostats SchedulesThermostats => new(this); - } +public partial class SeamClient +{ +public Api.SchedulesThermostats SchedulesThermostats => new(this); +} - public partial interface ISeamClient - { - public Api.SchedulesThermostats SchedulesThermostats { get; } - } +public partial interface ISeamClient +{ +public Api.SchedulesThermostats SchedulesThermostats { get; } +} } diff --git a/src/Seam/Api/SimulateAccessCodes.cs b/src/Seam/Api/SimulateAccessCodes.cs index 69e82178..dfb4d671 100644 --- a/src/Seam/Api/SimulateAccessCodes.cs +++ b/src/Seam/Api/SimulateAccessCodes.cs @@ -9,188 +9,153 @@ namespace Seam.Api { - public class SimulateAccessCodes - { - private ISeamClient _seam; - - public SimulateAccessCodes(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Simulate Creating an Unmanaged Access Code. - /// - [DataContract(Name = "createUnmanagedAccessCodeRequest_request")] - public class CreateUnmanagedAccessCodeRequest - { - [JsonConstructorAttribute] - protected CreateUnmanagedAccessCodeRequest() { } - - public CreateUnmanagedAccessCodeRequest( - string code = default, - string deviceId = default, - string name = default - ) - { - Code = code; - DeviceId = deviceId; - Name = name; - } - - /// - /// Code of the simulated unmanaged access code. - /// - [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// ID of the device for which you want to simulate the creation of an unmanaged access code. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Name of the simulated unmanaged access code. - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createUnmanagedAccessCodeResponse_response")] - public class CreateUnmanagedAccessCodeResponse - { - [JsonConstructorAttribute] - protected CreateUnmanagedAccessCodeResponse() { } - - public CreateUnmanagedAccessCodeResponse(UnmanagedAccessCode accessCode = default) - { - AccessCode = accessCode; - } - - /// - /// OK - /// - [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessCode AccessCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates the creation of an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public UnmanagedAccessCode CreateUnmanagedAccessCode( - CreateUnmanagedAccessCodeRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/access_codes/simulate/create_unmanaged_access_code", - requestOptions - ) - .EnsureData("/access_codes/simulate/create_unmanaged_access_code") - .AccessCode; - } - - /// - /// Simulates the creation of an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public UnmanagedAccessCode CreateUnmanagedAccessCode( - string code = default, - string deviceId = default, - string name = default - ) - { - return CreateUnmanagedAccessCode( - new CreateUnmanagedAccessCodeRequest(code: code, deviceId: deviceId, name: name) - ); - } - - /// - /// Simulates the creation of an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task CreateUnmanagedAccessCodeAsync( - CreateUnmanagedAccessCodeRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/access_codes/simulate/create_unmanaged_access_code", - requestOptions - ) - ) - .EnsureData("/access_codes/simulate/create_unmanaged_access_code") - .AccessCode; - } - - /// - /// Simulates the creation of an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task CreateUnmanagedAccessCodeAsync( - string code = default, - string deviceId = default, - string name = default - ) - { - return ( - await CreateUnmanagedAccessCodeAsync( - new CreateUnmanagedAccessCodeRequest(code: code, deviceId: deviceId, name: name) - ) - ); - } - } +public class SimulateAccessCodes +{ +private ISeamClient _seam; + +public SimulateAccessCodes(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Simulate Creating an Unmanaged Access Code. +/// +[DataContract(Name = "createUnmanagedAccessCodeRequest_request")] +public class CreateUnmanagedAccessCodeRequest +{ +[JsonConstructorAttribute] +protected CreateUnmanagedAccessCodeRequest() { } + +public CreateUnmanagedAccessCodeRequest(string code = default, string deviceId = default, string name = default) +{ +Code = code; +DeviceId = deviceId; +Name = name; +} + +/// +/// Code of the simulated unmanaged access code. +/// +[DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] +public string Code { get; set; } + +/// +/// ID of the device for which you want to simulate the creation of an unmanaged access code. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Name of the simulated unmanaged access code. +/// +[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] +public string Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createUnmanagedAccessCodeResponse_response")] +public class CreateUnmanagedAccessCodeResponse +{ +[JsonConstructorAttribute] +protected CreateUnmanagedAccessCodeResponse() { } + +public CreateUnmanagedAccessCodeResponse(UnmanagedAccessCode accessCode = default) +{ +AccessCode = accessCode; +} + +/// +/// OK +/// +[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessCode AccessCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public UnmanagedAccessCode CreateUnmanagedAccessCode(CreateUnmanagedAccessCodeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/access_codes/simulate/create_unmanaged_access_code", requestOptions).EnsureData("/access_codes/simulate/create_unmanaged_access_code").AccessCode; +} + +/// +/// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public UnmanagedAccessCode CreateUnmanagedAccessCode(string code = default, string deviceId = default, string name = default) +{ +return CreateUnmanagedAccessCode(new CreateUnmanagedAccessCodeRequest(code: code, deviceId: deviceId, name: name)); +} + +/// +/// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task CreateUnmanagedAccessCodeAsync(CreateUnmanagedAccessCodeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/access_codes/simulate/create_unmanaged_access_code", requestOptions)).EnsureData("/access_codes/simulate/create_unmanaged_access_code").AccessCode; +} + +/// +/// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task CreateUnmanagedAccessCodeAsync(string code = default, string deviceId = default, string name = default) +{ +return (await CreateUnmanagedAccessCodeAsync(new CreateUnmanagedAccessCodeRequest(code: code, deviceId: deviceId, name: name))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SimulateAccessCodes SimulateAccessCodes => new(this); - } +public partial class SeamClient +{ +public Api.SimulateAccessCodes SimulateAccessCodes => new(this); +} - public partial interface ISeamClient - { - public Api.SimulateAccessCodes SimulateAccessCodes { get; } - } +public partial interface ISeamClient +{ +public Api.SimulateAccessCodes SimulateAccessCodes { get; } +} } diff --git a/src/Seam/Api/SimulateConnectedAccounts.cs b/src/Seam/Api/SimulateConnectedAccounts.cs index 6c562cfb..52b72deb 100644 --- a/src/Seam/Api/SimulateConnectedAccounts.cs +++ b/src/Seam/Api/SimulateConnectedAccounts.cs @@ -9,105 +9,102 @@ namespace Seam.Api { - public class SimulateConnectedAccounts - { - private ISeamClient _seam; +public class SimulateConnectedAccounts +{ +private ISeamClient _seam; - public SimulateConnectedAccounts(ISeamClient seam) - { - _seam = seam; - } +public SimulateConnectedAccounts(ISeamClient seam) +{ +_seam = seam; +} - /// - /// Request parameters for Simulate Connected Account Disconnection. - /// - [DataContract(Name = "disconnectRequest_request")] - public class DisconnectRequest - { - [JsonConstructorAttribute] - protected DisconnectRequest() { } +/// +/// Request parameters for Simulate Connected Account Disconnection. +/// +[DataContract(Name = "disconnectRequest_request")] +public class DisconnectRequest +{ +[JsonConstructorAttribute] +protected DisconnectRequest() { } - public DisconnectRequest(string connectedAccountId = default) - { - ConnectedAccountId = connectedAccountId; - } +public DisconnectRequest(string connectedAccountId = default) +{ +ConnectedAccountId = connectedAccountId; +} - /// - /// ID of the connected account you want to simulate as disconnected. - /// - [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } +/// +/// ID of the connected account you want to simulate as disconnected. +/// +[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - return stringWriter.ToString(); - } - } +return stringWriter.ToString(); +} +} - /// - /// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void Disconnect(DisconnectRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/connected_accounts/simulate/disconnect", requestOptions); - } +/// +/// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void Disconnect(DisconnectRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/connected_accounts/simulate/disconnect", requestOptions); +} - /// - /// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void Disconnect(string connectedAccountId = default) - { - Disconnect(new DisconnectRequest(connectedAccountId: connectedAccountId)); - } +/// +/// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void Disconnect(string connectedAccountId = default) +{ +Disconnect(new DisconnectRequest(connectedAccountId: connectedAccountId)); +} - /// - /// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task DisconnectAsync(DisconnectRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/connected_accounts/simulate/disconnect", - requestOptions - ); - } +/// +/// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task DisconnectAsync(DisconnectRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/connected_accounts/simulate/disconnect", requestOptions); +} - /// - /// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task DisconnectAsync(string connectedAccountId = default) - { - await DisconnectAsync(new DisconnectRequest(connectedAccountId: connectedAccountId)); - } - } +/// +/// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task DisconnectAsync(string connectedAccountId = default) +{ +await DisconnectAsync(new DisconnectRequest(connectedAccountId: connectedAccountId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SimulateConnectedAccounts SimulateConnectedAccounts => new(this); - } +public partial class SeamClient +{ +public Api.SimulateConnectedAccounts SimulateConnectedAccounts => new(this); +} - public partial interface ISeamClient - { - public Api.SimulateConnectedAccounts SimulateConnectedAccounts { get; } - } +public partial interface ISeamClient +{ +public Api.SimulateConnectedAccounts SimulateConnectedAccounts { get; } +} } diff --git a/src/Seam/Api/SimulateDevices.cs b/src/Seam/Api/SimulateDevices.cs index 7fd87cf4..336cf8ea 100644 --- a/src/Seam/Api/SimulateDevices.cs +++ b/src/Seam/Api/SimulateDevices.cs @@ -9,521 +9,519 @@ namespace Seam.Api { - public class SimulateDevices - { - private ISeamClient _seam; - - public SimulateDevices(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Simulate Device Connection. - /// - [DataContract(Name = "connectRequest_request")] - public class ConnectRequest - { - [JsonConstructorAttribute] - protected ConnectRequest() { } - - public ConnectRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the device that you want to simulate connecting to Seam. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public void Connect(ConnectRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/devices/simulate/connect", requestOptions); - } - - /// - /// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public void Connect(string deviceId = default) - { - Connect(new ConnectRequest(deviceId: deviceId)); - } - - /// - /// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public async Task ConnectAsync(ConnectRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/devices/simulate/connect", requestOptions); - } - - /// - /// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public async Task ConnectAsync(string deviceId = default) - { - await ConnectAsync(new ConnectRequest(deviceId: deviceId)); - } - - /// - /// Request parameters for Simulate Hub Connection. - /// - [DataContract(Name = "connectToHubRequest_request")] - public class ConnectToHubRequest - { - [JsonConstructorAttribute] - protected ConnectToHubRequest() { } - - public ConnectToHubRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the device whose hub you want to reconnect. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. - /// Only applicable for sandbox workspaces and currently - /// implemented for August and TTLock locks. - /// This will clear the `hub_disconnected` error on the device. - /// - public void ConnectToHub(ConnectToHubRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/devices/simulate/connect_to_hub", requestOptions); - } - - /// - /// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. - /// Only applicable for sandbox workspaces and currently - /// implemented for August and TTLock locks. - /// This will clear the `hub_disconnected` error on the device. - /// - public void ConnectToHub(string deviceId = default) - { - ConnectToHub(new ConnectToHubRequest(deviceId: deviceId)); - } - - /// - /// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. - /// Only applicable for sandbox workspaces and currently - /// implemented for August and TTLock locks. - /// This will clear the `hub_disconnected` error on the device. - /// - public async Task ConnectToHubAsync(ConnectToHubRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/devices/simulate/connect_to_hub", requestOptions); - } - - /// - /// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. - /// Only applicable for sandbox workspaces and currently - /// implemented for August and TTLock locks. - /// This will clear the `hub_disconnected` error on the device. - /// - public async Task ConnectToHubAsync(string deviceId = default) - { - await ConnectToHubAsync(new ConnectToHubRequest(deviceId: deviceId)); - } - - /// - /// Request parameters for Simulate Device Disconnection. - /// - [DataContract(Name = "disconnectRequest_request")] - public class DisconnectRequest - { - [JsonConstructorAttribute] - protected DisconnectRequest() { } - - public DisconnectRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the device that you want to simulate disconnecting from Seam. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public void Disconnect(DisconnectRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/devices/simulate/disconnect", requestOptions); - } - - /// - /// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public void Disconnect(string deviceId = default) - { - Disconnect(new DisconnectRequest(deviceId: deviceId)); - } - - /// - /// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public async Task DisconnectAsync(DisconnectRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/devices/simulate/disconnect", requestOptions); - } - - /// - /// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public async Task DisconnectAsync(string deviceId = default) - { - await DisconnectAsync(new DisconnectRequest(deviceId: deviceId)); - } - - /// - /// Request parameters for Simulate Hub Disconnection. - /// - [DataContract(Name = "disconnectFromHubRequest_request")] - public class DisconnectFromHubRequest - { - [JsonConstructorAttribute] - protected DisconnectFromHubRequest() { } - - public DisconnectFromHubRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the device whose hub you want to disconnect. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates taking the Wi‑Fi hub (bridge) offline for a device. - /// Only applicable for sandbox workspaces and currently - /// implemented for August, TTLock, and IglooHome devices. - /// This will set the `hub_disconnected` error on the device, or mark the - /// IglooHome bridge offline in sandbox. - /// - public void DisconnectFromHub(DisconnectFromHubRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/devices/simulate/disconnect_from_hub", requestOptions); - } - - /// - /// Simulates taking the Wi‑Fi hub (bridge) offline for a device. - /// Only applicable for sandbox workspaces and currently - /// implemented for August, TTLock, and IglooHome devices. - /// This will set the `hub_disconnected` error on the device, or mark the - /// IglooHome bridge offline in sandbox. - /// - public void DisconnectFromHub(string deviceId = default) - { - DisconnectFromHub(new DisconnectFromHubRequest(deviceId: deviceId)); - } - - /// - /// Simulates taking the Wi‑Fi hub (bridge) offline for a device. - /// Only applicable for sandbox workspaces and currently - /// implemented for August, TTLock, and IglooHome devices. - /// This will set the `hub_disconnected` error on the device, or mark the - /// IglooHome bridge offline in sandbox. - /// - public async Task DisconnectFromHubAsync(DisconnectFromHubRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/devices/simulate/disconnect_from_hub", requestOptions); - } - - /// - /// Simulates taking the Wi‑Fi hub (bridge) offline for a device. - /// Only applicable for sandbox workspaces and currently - /// implemented for August, TTLock, and IglooHome devices. - /// This will set the `hub_disconnected` error on the device, or mark the - /// IglooHome bridge offline in sandbox. - /// - public async Task DisconnectFromHubAsync(string deviceId = default) - { - await DisconnectFromHubAsync(new DisconnectFromHubRequest(deviceId: deviceId)); - } - - /// - /// Request parameters for Simulate Paid Subscription. - /// - [DataContract(Name = "paidSubscriptionRequest_request")] - public class PaidSubscriptionRequest - { - [JsonConstructorAttribute] - protected PaidSubscriptionRequest() { } - - public PaidSubscriptionRequest(string deviceId = default, bool isExpired = default) - { - DeviceId = deviceId; - IsExpired = isExpired; - } - - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - [DataMember(Name = "is_expired", IsRequired = true, EmitDefaultValue = false)] - public bool IsExpired { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). - /// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. - /// The actual device error is created/cleared by the poller after this state change. - /// - public void PaidSubscription(PaidSubscriptionRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/devices/simulate/paid_subscription", requestOptions); - } - - /// - /// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). - /// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. - /// The actual device error is created/cleared by the poller after this state change. - /// - public void PaidSubscription(string deviceId = default, bool isExpired = default) - { - PaidSubscription(new PaidSubscriptionRequest(deviceId: deviceId, isExpired: isExpired)); - } - - /// - /// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). - /// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. - /// The actual device error is created/cleared by the poller after this state change. - /// - public async Task PaidSubscriptionAsync(PaidSubscriptionRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/devices/simulate/paid_subscription", requestOptions); - } - - /// - /// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). - /// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. - /// The actual device error is created/cleared by the poller after this state change. - /// - public async Task PaidSubscriptionAsync(string deviceId = default, bool isExpired = default) - { - await PaidSubscriptionAsync( - new PaidSubscriptionRequest(deviceId: deviceId, isExpired: isExpired) - ); - } - - /// - /// Request parameters for Simulate Device Removal. - /// - [DataContract(Name = "removeRequest_request")] - public class RemoveRequest - { - [JsonConstructorAttribute] - protected RemoveRequest() { } - - public RemoveRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the device that you want to simulate removing from Seam. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public void Remove(RemoveRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/devices/simulate/remove", requestOptions); - } - - /// - /// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public void Remove(string deviceId = default) - { - Remove(new RemoveRequest(deviceId: deviceId)); - } - - /// - /// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public async Task RemoveAsync(RemoveRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/devices/simulate/remove", requestOptions); - } - - /// - /// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). - /// - public async Task RemoveAsync(string deviceId = default) - { - await RemoveAsync(new RemoveRequest(deviceId: deviceId)); - } - } +public class SimulateDevices +{ +private ISeamClient _seam; + +public SimulateDevices(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Simulate Device Connection. +/// +[DataContract(Name = "connectRequest_request")] +public class ConnectRequest +{ +[JsonConstructorAttribute] +protected ConnectRequest() { } + +public ConnectRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the device that you want to simulate connecting to Seam. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public void Connect(ConnectRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/devices/simulate/connect", requestOptions); +} + +/// +/// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public void Connect(string deviceId = default) +{ +Connect(new ConnectRequest(deviceId: deviceId)); +} + +/// +/// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public async Task ConnectAsync(ConnectRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/devices/simulate/connect", requestOptions); +} + +/// +/// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public async Task ConnectAsync(string deviceId = default) +{ +await ConnectAsync(new ConnectRequest(deviceId: deviceId)); +} + +/// +/// Request parameters for Simulate Hub Connection. +/// +[DataContract(Name = "connectToHubRequest_request")] +public class ConnectToHubRequest +{ +[JsonConstructorAttribute] +protected ConnectToHubRequest() { } + +public ConnectToHubRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the device whose hub you want to reconnect. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. +/// Only applicable for sandbox workspaces and currently +/// implemented for August and TTLock locks. +/// This will clear the `hub_disconnected` error on the device. +/// +public void ConnectToHub(ConnectToHubRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/devices/simulate/connect_to_hub", requestOptions); +} + +/// +/// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. +/// Only applicable for sandbox workspaces and currently +/// implemented for August and TTLock locks. +/// This will clear the `hub_disconnected` error on the device. +/// +public void ConnectToHub(string deviceId = default) +{ +ConnectToHub(new ConnectToHubRequest(deviceId: deviceId)); +} + +/// +/// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. +/// Only applicable for sandbox workspaces and currently +/// implemented for August and TTLock locks. +/// This will clear the `hub_disconnected` error on the device. +/// +public async Task ConnectToHubAsync(ConnectToHubRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/devices/simulate/connect_to_hub", requestOptions); +} + +/// +/// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. +/// Only applicable for sandbox workspaces and currently +/// implemented for August and TTLock locks. +/// This will clear the `hub_disconnected` error on the device. +/// +public async Task ConnectToHubAsync(string deviceId = default) +{ +await ConnectToHubAsync(new ConnectToHubRequest(deviceId: deviceId)); +} + +/// +/// Request parameters for Simulate Device Disconnection. +/// +[DataContract(Name = "disconnectRequest_request")] +public class DisconnectRequest +{ +[JsonConstructorAttribute] +protected DisconnectRequest() { } + +public DisconnectRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the device that you want to simulate disconnecting from Seam. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public void Disconnect(DisconnectRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/devices/simulate/disconnect", requestOptions); +} + +/// +/// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public void Disconnect(string deviceId = default) +{ +Disconnect(new DisconnectRequest(deviceId: deviceId)); +} + +/// +/// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public async Task DisconnectAsync(DisconnectRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/devices/simulate/disconnect", requestOptions); +} + +/// +/// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public async Task DisconnectAsync(string deviceId = default) +{ +await DisconnectAsync(new DisconnectRequest(deviceId: deviceId)); +} + +/// +/// Request parameters for Simulate Hub Disconnection. +/// +[DataContract(Name = "disconnectFromHubRequest_request")] +public class DisconnectFromHubRequest +{ +[JsonConstructorAttribute] +protected DisconnectFromHubRequest() { } + +public DisconnectFromHubRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the device whose hub you want to disconnect. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates taking the Wi‑Fi hub (bridge) offline for a device. +/// Only applicable for sandbox workspaces and currently +/// implemented for August, TTLock, and IglooHome devices. +/// This will set the `hub_disconnected` error on the device, or mark the +/// IglooHome bridge offline in sandbox. +/// +public void DisconnectFromHub(DisconnectFromHubRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/devices/simulate/disconnect_from_hub", requestOptions); +} + +/// +/// Simulates taking the Wi‑Fi hub (bridge) offline for a device. +/// Only applicable for sandbox workspaces and currently +/// implemented for August, TTLock, and IglooHome devices. +/// This will set the `hub_disconnected` error on the device, or mark the +/// IglooHome bridge offline in sandbox. +/// +public void DisconnectFromHub(string deviceId = default) +{ +DisconnectFromHub(new DisconnectFromHubRequest(deviceId: deviceId)); +} + +/// +/// Simulates taking the Wi‑Fi hub (bridge) offline for a device. +/// Only applicable for sandbox workspaces and currently +/// implemented for August, TTLock, and IglooHome devices. +/// This will set the `hub_disconnected` error on the device, or mark the +/// IglooHome bridge offline in sandbox. +/// +public async Task DisconnectFromHubAsync(DisconnectFromHubRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/devices/simulate/disconnect_from_hub", requestOptions); +} + +/// +/// Simulates taking the Wi‑Fi hub (bridge) offline for a device. +/// Only applicable for sandbox workspaces and currently +/// implemented for August, TTLock, and IglooHome devices. +/// This will set the `hub_disconnected` error on the device, or mark the +/// IglooHome bridge offline in sandbox. +/// +public async Task DisconnectFromHubAsync(string deviceId = default) +{ +await DisconnectFromHubAsync(new DisconnectFromHubRequest(deviceId: deviceId)); +} + +/// +/// Request parameters for Simulate Paid Subscription. +/// +[DataContract(Name = "paidSubscriptionRequest_request")] +public class PaidSubscriptionRequest +{ +[JsonConstructorAttribute] +protected PaidSubscriptionRequest() { } + +public PaidSubscriptionRequest(string deviceId = default, bool isExpired = default) +{ +DeviceId = deviceId; +IsExpired = isExpired; +} + +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +[DataMember(Name = "is_expired", IsRequired = true, EmitDefaultValue = false)] +public bool IsExpired { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). +/// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. +/// The actual device error is created/cleared by the poller after this state change. +/// +public void PaidSubscription(PaidSubscriptionRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/devices/simulate/paid_subscription", requestOptions); +} + +/// +/// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). +/// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. +/// The actual device error is created/cleared by the poller after this state change. +/// +public void PaidSubscription(string deviceId = default, bool isExpired = default) +{ +PaidSubscription(new PaidSubscriptionRequest(deviceId: deviceId, isExpired: isExpired)); +} + +/// +/// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). +/// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. +/// The actual device error is created/cleared by the poller after this state change. +/// +public async Task PaidSubscriptionAsync(PaidSubscriptionRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/devices/simulate/paid_subscription", requestOptions); +} + +/// +/// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). +/// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. +/// The actual device error is created/cleared by the poller after this state change. +/// +public async Task PaidSubscriptionAsync(string deviceId = default, bool isExpired = default) +{ +await PaidSubscriptionAsync(new PaidSubscriptionRequest(deviceId: deviceId, isExpired: isExpired)); +} + +/// +/// Request parameters for Simulate Device Removal. +/// +[DataContract(Name = "removeRequest_request")] +public class RemoveRequest +{ +[JsonConstructorAttribute] +protected RemoveRequest() { } + +public RemoveRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the device that you want to simulate removing from Seam. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public void Remove(RemoveRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/devices/simulate/remove", requestOptions); +} + +/// +/// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public void Remove(string deviceId = default) +{ +Remove(new RemoveRequest(deviceId: deviceId)); +} + +/// +/// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public async Task RemoveAsync(RemoveRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/devices/simulate/remove", requestOptions); +} + +/// +/// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). +/// +public async Task RemoveAsync(string deviceId = default) +{ +await RemoveAsync(new RemoveRequest(deviceId: deviceId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SimulateDevices SimulateDevices => new(this); - } +public partial class SeamClient +{ +public Api.SimulateDevices SimulateDevices => new(this); +} - public partial interface ISeamClient - { - public Api.SimulateDevices SimulateDevices { get; } - } +public partial interface ISeamClient +{ +public Api.SimulateDevices SimulateDevices { get; } +} } diff --git a/src/Seam/Api/SimulateEncodersAcs.cs b/src/Seam/Api/SimulateEncodersAcs.cs index de394552..9b37286d 100644 --- a/src/Seam/Api/SimulateEncodersAcs.cs +++ b/src/Seam/Api/SimulateEncodersAcs.cs @@ -9,575 +9,446 @@ namespace Seam.Api { - public class SimulateEncodersAcs - { - private ISeamClient _seam; - - public SimulateEncodersAcs(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Simulate that the Next Credential Encoding Will Fail. - /// - [DataContract(Name = "nextCredentialEncodeWillFailRequest_request")] - public class NextCredentialEncodeWillFailRequest - { - [JsonConstructorAttribute] - protected NextCredentialEncodeWillFailRequest() { } - - public NextCredentialEncodeWillFailRequest( - string? acsCredentialId = default, - string acsEncoderId = default, - NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default - ) - { - AcsCredentialId = acsCredentialId; - AcsEncoderId = acsEncoderId; - ErrorCode = errorCode; - } - - /// - /// Code of the error to simulate. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ErrorCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "no_credential_on_encoder")] - NoCredentialOnEncoder = 1, - - [EnumMember(Value = "encoding_interrupted")] - EncodingInterrupted = 2, - - [EnumMember(Value = "uncategorized_error")] - UncategorizedError = 3, - - [EnumMember(Value = "action_attempt_expired")] - ActionAttemptExpired = 4, - } - - /// - /// ID of the `acs_credential` that will fail to be encoded onto a card in the next request. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialId { get; set; } - - /// - /// ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - /// - /// Code of the error to simulate. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public NextCredentialEncodeWillFailRequest.ErrorCodeEnum? ErrorCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void NextCredentialEncodeWillFail(NextCredentialEncodeWillFailRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post( - "/acs/encoders/simulate/next_credential_encode_will_fail", - requestOptions - ); - } - - /// - /// Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void NextCredentialEncodeWillFail( - string? acsCredentialId = default, - string acsEncoderId = default, - NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default - ) - { - NextCredentialEncodeWillFail( - new NextCredentialEncodeWillFailRequest( - acsCredentialId: acsCredentialId, - acsEncoderId: acsEncoderId, - errorCode: errorCode - ) - ); - } - - /// - /// Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task NextCredentialEncodeWillFailAsync( - NextCredentialEncodeWillFailRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/acs/encoders/simulate/next_credential_encode_will_fail", - requestOptions - ); - } - - /// - /// Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task NextCredentialEncodeWillFailAsync( - string? acsCredentialId = default, - string acsEncoderId = default, - NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default - ) - { - await NextCredentialEncodeWillFailAsync( - new NextCredentialEncodeWillFailRequest( - acsCredentialId: acsCredentialId, - acsEncoderId: acsEncoderId, - errorCode: errorCode - ) - ); - } - - /// - /// Request parameters for Simulate that the Next Credential Encoding Will Succeed. - /// - [DataContract(Name = "nextCredentialEncodeWillSucceedRequest_request")] - public class NextCredentialEncodeWillSucceedRequest - { - [JsonConstructorAttribute] - protected NextCredentialEncodeWillSucceedRequest() { } - - public NextCredentialEncodeWillSucceedRequest( - string acsEncoderId = default, - NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default - ) - { - AcsEncoderId = acsEncoderId; - Scenario = scenario; - } - - /// - /// Scenario to simulate. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ScenarioEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "credential_is_issued")] - CredentialIsIssued = 1, - } - - /// - /// ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - /// - /// Scenario to simulate. - /// - [DataMember(Name = "scenario", IsRequired = false, EmitDefaultValue = false)] - public NextCredentialEncodeWillSucceedRequest.ScenarioEnum? Scenario { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void NextCredentialEncodeWillSucceed(NextCredentialEncodeWillSucceedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post( - "/acs/encoders/simulate/next_credential_encode_will_succeed", - requestOptions - ); - } - - /// - /// Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void NextCredentialEncodeWillSucceed( - string acsEncoderId = default, - NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default - ) - { - NextCredentialEncodeWillSucceed( - new NextCredentialEncodeWillSucceedRequest( - acsEncoderId: acsEncoderId, - scenario: scenario - ) - ); - } - - /// - /// Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task NextCredentialEncodeWillSucceedAsync( - NextCredentialEncodeWillSucceedRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/acs/encoders/simulate/next_credential_encode_will_succeed", - requestOptions - ); - } - - /// - /// Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task NextCredentialEncodeWillSucceedAsync( - string acsEncoderId = default, - NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default - ) - { - await NextCredentialEncodeWillSucceedAsync( - new NextCredentialEncodeWillSucceedRequest( - acsEncoderId: acsEncoderId, - scenario: scenario - ) - ); - } - - /// - /// Request parameters for Simulate that the Next Credential Scan Will Fail. - /// - [DataContract(Name = "nextCredentialScanWillFailRequest_request")] - public class NextCredentialScanWillFailRequest - { - [JsonConstructorAttribute] - protected NextCredentialScanWillFailRequest() { } - - public NextCredentialScanWillFailRequest( - string? acsCredentialIdOnSeam = default, - string acsEncoderId = default, - NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default - ) - { - AcsCredentialIdOnSeam = acsCredentialIdOnSeam; - AcsEncoderId = acsEncoderId; - ErrorCode = errorCode; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ErrorCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "no_credential_on_encoder")] - NoCredentialOnEncoder = 1, - - [EnumMember(Value = "uncategorized_error")] - UncategorizedError = 2, - - [EnumMember(Value = "action_attempt_expired")] - ActionAttemptExpired = 3, - } - - [DataMember( - Name = "acs_credential_id_on_seam", - IsRequired = false, - EmitDefaultValue = false - )] - public string? AcsCredentialIdOnSeam { get; set; } - - /// - /// ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public NextCredentialScanWillFailRequest.ErrorCodeEnum? ErrorCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void NextCredentialScanWillFail(NextCredentialScanWillFailRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post( - "/acs/encoders/simulate/next_credential_scan_will_fail", - requestOptions - ); - } - - /// - /// Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void NextCredentialScanWillFail( - string? acsCredentialIdOnSeam = default, - string acsEncoderId = default, - NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default - ) - { - NextCredentialScanWillFail( - new NextCredentialScanWillFailRequest( - acsCredentialIdOnSeam: acsCredentialIdOnSeam, - acsEncoderId: acsEncoderId, - errorCode: errorCode - ) - ); - } - - /// - /// Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task NextCredentialScanWillFailAsync(NextCredentialScanWillFailRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/acs/encoders/simulate/next_credential_scan_will_fail", - requestOptions - ); - } - - /// - /// Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task NextCredentialScanWillFailAsync( - string? acsCredentialIdOnSeam = default, - string acsEncoderId = default, - NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default - ) - { - await NextCredentialScanWillFailAsync( - new NextCredentialScanWillFailRequest( - acsCredentialIdOnSeam: acsCredentialIdOnSeam, - acsEncoderId: acsEncoderId, - errorCode: errorCode - ) - ); - } - - /// - /// Request parameters for Simulate that the Next Credential Scan Will Succeed. - /// - [DataContract(Name = "nextCredentialScanWillSucceedRequest_request")] - public class NextCredentialScanWillSucceedRequest - { - [JsonConstructorAttribute] - protected NextCredentialScanWillSucceedRequest() { } - - public NextCredentialScanWillSucceedRequest( - string? acsCredentialIdOnSeam = default, - string acsEncoderId = default, - NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default - ) - { - AcsCredentialIdOnSeam = acsCredentialIdOnSeam; - AcsEncoderId = acsEncoderId; - Scenario = scenario; - } - - /// - /// Scenario to simulate. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ScenarioEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "credential_exists_on_seam")] - CredentialExistsOnSeam = 1, - - [EnumMember(Value = "credential_on_encoder_needs_update")] - CredentialOnEncoderNeedsUpdate = 2, - - [EnumMember(Value = "credential_does_not_exist_on_seam")] - CredentialDoesNotExistOnSeam = 3, - - [EnumMember(Value = "credential_on_encoder_is_empty")] - CredentialOnEncoderIsEmpty = 4, - } - - /// - /// ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation. - /// - [DataMember( - Name = "acs_credential_id_on_seam", - IsRequired = false, - EmitDefaultValue = false - )] - public string? AcsCredentialIdOnSeam { get; set; } - - /// - /// ID of the `acs_encoder` that will be used in the next request to scan the `acs_credential`. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - /// - /// Scenario to simulate. - /// - [DataMember(Name = "scenario", IsRequired = false, EmitDefaultValue = false)] - public NextCredentialScanWillSucceedRequest.ScenarioEnum? Scenario { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void NextCredentialScanWillSucceed(NextCredentialScanWillSucceedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post( - "/acs/encoders/simulate/next_credential_scan_will_succeed", - requestOptions - ); - } - - /// - /// Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void NextCredentialScanWillSucceed( - string? acsCredentialIdOnSeam = default, - string acsEncoderId = default, - NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default - ) - { - NextCredentialScanWillSucceed( - new NextCredentialScanWillSucceedRequest( - acsCredentialIdOnSeam: acsCredentialIdOnSeam, - acsEncoderId: acsEncoderId, - scenario: scenario - ) - ); - } - - /// - /// Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task NextCredentialScanWillSucceedAsync( - NextCredentialScanWillSucceedRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/acs/encoders/simulate/next_credential_scan_will_succeed", - requestOptions - ); - } - - /// - /// Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task NextCredentialScanWillSucceedAsync( - string? acsCredentialIdOnSeam = default, - string acsEncoderId = default, - NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default - ) - { - await NextCredentialScanWillSucceedAsync( - new NextCredentialScanWillSucceedRequest( - acsCredentialIdOnSeam: acsCredentialIdOnSeam, - acsEncoderId: acsEncoderId, - scenario: scenario - ) - ); - } - } +public class SimulateEncodersAcs +{ +private ISeamClient _seam; + +public SimulateEncodersAcs(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Simulate that the Next Credential Encoding Will Fail. +/// +[DataContract(Name = "nextCredentialEncodeWillFailRequest_request")] +public class NextCredentialEncodeWillFailRequest +{ +[JsonConstructorAttribute] +protected NextCredentialEncodeWillFailRequest() { } + +public NextCredentialEncodeWillFailRequest(string? acsCredentialId = default, string acsEncoderId = default, NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default) +{ +AcsCredentialId = acsCredentialId; +AcsEncoderId = acsEncoderId; +ErrorCode = errorCode; +} + +/// +/// Code of the error to simulate. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ErrorCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "no_credential_on_encoder")] +NoCredentialOnEncoder = 1, + +[EnumMember(Value = "encoding_interrupted")] +EncodingInterrupted = 2, + +[EnumMember(Value = "uncategorized_error")] +UncategorizedError = 3, + +[EnumMember(Value = "action_attempt_expired")] +ActionAttemptExpired = 4, +} + +/// +/// ID of the `acs_credential` that will fail to be encoded onto a card in the next request. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialId { get; set; } + +/// +/// ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +/// +/// Code of the error to simulate. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public NextCredentialEncodeWillFailRequest.ErrorCodeEnum? ErrorCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void NextCredentialEncodeWillFail(NextCredentialEncodeWillFailRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/encoders/simulate/next_credential_encode_will_fail", requestOptions); +} + +/// +/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void NextCredentialEncodeWillFail(string? acsCredentialId = default, string acsEncoderId = default, NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default) +{ +NextCredentialEncodeWillFail(new NextCredentialEncodeWillFailRequest(acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId, errorCode: errorCode)); +} + +/// +/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task NextCredentialEncodeWillFailAsync(NextCredentialEncodeWillFailRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/encoders/simulate/next_credential_encode_will_fail", requestOptions); +} + +/// +/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task NextCredentialEncodeWillFailAsync(string? acsCredentialId = default, string acsEncoderId = default, NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default) +{ +await NextCredentialEncodeWillFailAsync(new NextCredentialEncodeWillFailRequest(acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId, errorCode: errorCode)); +} + +/// +/// Request parameters for Simulate that the Next Credential Encoding Will Succeed. +/// +[DataContract(Name = "nextCredentialEncodeWillSucceedRequest_request")] +public class NextCredentialEncodeWillSucceedRequest +{ +[JsonConstructorAttribute] +protected NextCredentialEncodeWillSucceedRequest() { } + +public NextCredentialEncodeWillSucceedRequest(string acsEncoderId = default, NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default) +{ +AcsEncoderId = acsEncoderId; +Scenario = scenario; +} + +/// +/// Scenario to simulate. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ScenarioEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "credential_is_issued")] +CredentialIsIssued = 1, +} + +/// +/// ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +/// +/// Scenario to simulate. +/// +[DataMember(Name = "scenario", IsRequired = false, EmitDefaultValue = false)] +public NextCredentialEncodeWillSucceedRequest.ScenarioEnum? Scenario { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void NextCredentialEncodeWillSucceed(NextCredentialEncodeWillSucceedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/encoders/simulate/next_credential_encode_will_succeed", requestOptions); +} + +/// +/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void NextCredentialEncodeWillSucceed(string acsEncoderId = default, NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default) +{ +NextCredentialEncodeWillSucceed(new NextCredentialEncodeWillSucceedRequest(acsEncoderId: acsEncoderId, scenario: scenario)); +} + +/// +/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task NextCredentialEncodeWillSucceedAsync(NextCredentialEncodeWillSucceedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/encoders/simulate/next_credential_encode_will_succeed", requestOptions); +} + +/// +/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task NextCredentialEncodeWillSucceedAsync(string acsEncoderId = default, NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default) +{ +await NextCredentialEncodeWillSucceedAsync(new NextCredentialEncodeWillSucceedRequest(acsEncoderId: acsEncoderId, scenario: scenario)); +} + +/// +/// Request parameters for Simulate that the Next Credential Scan Will Fail. +/// +[DataContract(Name = "nextCredentialScanWillFailRequest_request")] +public class NextCredentialScanWillFailRequest +{ +[JsonConstructorAttribute] +protected NextCredentialScanWillFailRequest() { } + +public NextCredentialScanWillFailRequest(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default) +{ +AcsCredentialIdOnSeam = acsCredentialIdOnSeam; +AcsEncoderId = acsEncoderId; +ErrorCode = errorCode; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ErrorCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "no_credential_on_encoder")] +NoCredentialOnEncoder = 1, + +[EnumMember(Value = "uncategorized_error")] +UncategorizedError = 2, + +[EnumMember(Value = "action_attempt_expired")] +ActionAttemptExpired = 3, +} + +[DataMember(Name = "acs_credential_id_on_seam", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialIdOnSeam { get; set; } + +/// +/// ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public NextCredentialScanWillFailRequest.ErrorCodeEnum? ErrorCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void NextCredentialScanWillFail(NextCredentialScanWillFailRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/encoders/simulate/next_credential_scan_will_fail", requestOptions); +} + +/// +/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void NextCredentialScanWillFail(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default) +{ +NextCredentialScanWillFail(new NextCredentialScanWillFailRequest(acsCredentialIdOnSeam: acsCredentialIdOnSeam, acsEncoderId: acsEncoderId, errorCode: errorCode)); +} + +/// +/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task NextCredentialScanWillFailAsync(NextCredentialScanWillFailRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/encoders/simulate/next_credential_scan_will_fail", requestOptions); +} + +/// +/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task NextCredentialScanWillFailAsync(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default) +{ +await NextCredentialScanWillFailAsync(new NextCredentialScanWillFailRequest(acsCredentialIdOnSeam: acsCredentialIdOnSeam, acsEncoderId: acsEncoderId, errorCode: errorCode)); +} + +/// +/// Request parameters for Simulate that the Next Credential Scan Will Succeed. +/// +[DataContract(Name = "nextCredentialScanWillSucceedRequest_request")] +public class NextCredentialScanWillSucceedRequest +{ +[JsonConstructorAttribute] +protected NextCredentialScanWillSucceedRequest() { } + +public NextCredentialScanWillSucceedRequest(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default) +{ +AcsCredentialIdOnSeam = acsCredentialIdOnSeam; +AcsEncoderId = acsEncoderId; +Scenario = scenario; +} + +/// +/// Scenario to simulate. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ScenarioEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "credential_exists_on_seam")] +CredentialExistsOnSeam = 1, + +[EnumMember(Value = "credential_on_encoder_needs_update")] +CredentialOnEncoderNeedsUpdate = 2, + +[EnumMember(Value = "credential_does_not_exist_on_seam")] +CredentialDoesNotExistOnSeam = 3, + +[EnumMember(Value = "credential_on_encoder_is_empty")] +CredentialOnEncoderIsEmpty = 4, +} + +/// +/// ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation. +/// +[DataMember(Name = "acs_credential_id_on_seam", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialIdOnSeam { get; set; } + +/// +/// ID of the `acs_encoder` that will be used in the next request to scan the `acs_credential`. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +/// +/// Scenario to simulate. +/// +[DataMember(Name = "scenario", IsRequired = false, EmitDefaultValue = false)] +public NextCredentialScanWillSucceedRequest.ScenarioEnum? Scenario { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void NextCredentialScanWillSucceed(NextCredentialScanWillSucceedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/encoders/simulate/next_credential_scan_will_succeed", requestOptions); +} + +/// +/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void NextCredentialScanWillSucceed(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default) +{ +NextCredentialScanWillSucceed(new NextCredentialScanWillSucceedRequest(acsCredentialIdOnSeam: acsCredentialIdOnSeam, acsEncoderId: acsEncoderId, scenario: scenario)); +} + +/// +/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task NextCredentialScanWillSucceedAsync(NextCredentialScanWillSucceedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/encoders/simulate/next_credential_scan_will_succeed", requestOptions); +} + +/// +/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task NextCredentialScanWillSucceedAsync(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default) +{ +await NextCredentialScanWillSucceedAsync(new NextCredentialScanWillSucceedRequest(acsCredentialIdOnSeam: acsCredentialIdOnSeam, acsEncoderId: acsEncoderId, scenario: scenario)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SimulateEncodersAcs SimulateEncodersAcs => new(this); - } +public partial class SeamClient +{ +public Api.SimulateEncodersAcs SimulateEncodersAcs => new(this); +} - public partial interface ISeamClient - { - public Api.SimulateEncodersAcs SimulateEncodersAcs { get; } - } +public partial interface ISeamClient +{ +public Api.SimulateEncodersAcs SimulateEncodersAcs { get; } +} } diff --git a/src/Seam/Api/SimulateLocks.cs b/src/Seam/Api/SimulateLocks.cs index 6178d28c..82f333f2 100644 --- a/src/Seam/Api/SimulateLocks.cs +++ b/src/Seam/Api/SimulateLocks.cs @@ -9,293 +9,259 @@ namespace Seam.Api { - public class SimulateLocks - { - private ISeamClient _seam; - - public SimulateLocks(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Simulate a Keypad Code Entry. - /// - [DataContract(Name = "keypadCodeEntryRequest_request")] - public class KeypadCodeEntryRequest - { - [JsonConstructorAttribute] - protected KeypadCodeEntryRequest() { } - - public KeypadCodeEntryRequest(string code = default, string deviceId = default) - { - Code = code; - DeviceId = deviceId; - } - - /// - /// Code that you want to simulate entering on a keypad. - /// - [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// ID of the device for which you want to simulate a keypad code entry. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "keypadCodeEntryResponse_response")] - public class KeypadCodeEntryResponse - { - [JsonConstructorAttribute] - protected KeypadCodeEntryResponse() { } - - public KeypadCodeEntryResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public ActionAttempt KeypadCodeEntry(KeypadCodeEntryRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/locks/simulate/keypad_code_entry", requestOptions) - .EnsureData("/locks/simulate/keypad_code_entry") - .ActionAttempt; - } - - /// - /// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public ActionAttempt KeypadCodeEntry(string code = default, string deviceId = default) - { - return KeypadCodeEntry(new KeypadCodeEntryRequest(code: code, deviceId: deviceId)); - } - - /// - /// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task KeypadCodeEntryAsync(KeypadCodeEntryRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/locks/simulate/keypad_code_entry", - requestOptions - ) - ) - .EnsureData("/locks/simulate/keypad_code_entry") - .ActionAttempt; - } - - /// - /// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task KeypadCodeEntryAsync( - string code = default, - string deviceId = default - ) - { - return ( - await KeypadCodeEntryAsync( - new KeypadCodeEntryRequest(code: code, deviceId: deviceId) - ) - ); - } - - /// - /// Request parameters for Simulate a Manual Lock Action Using a Keypad. - /// - [DataContract(Name = "manualLockViaKeypadRequest_request")] - public class ManualLockViaKeypadRequest - { - [JsonConstructorAttribute] - protected ManualLockViaKeypadRequest() { } - - public ManualLockViaKeypadRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the device for which you want to simulate a manual lock action using a keypad. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "manualLockViaKeypadResponse_response")] - public class ManualLockViaKeypadResponse - { - [JsonConstructorAttribute] - protected ManualLockViaKeypadResponse() { } - - public ManualLockViaKeypadResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public ActionAttempt ManualLockViaKeypad(ManualLockViaKeypadRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/locks/simulate/manual_lock_via_keypad", - requestOptions - ) - .EnsureData("/locks/simulate/manual_lock_via_keypad") - .ActionAttempt; - } - - /// - /// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public ActionAttempt ManualLockViaKeypad(string deviceId = default) - { - return ManualLockViaKeypad(new ManualLockViaKeypadRequest(deviceId: deviceId)); - } - - /// - /// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task ManualLockViaKeypadAsync( - ManualLockViaKeypadRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/locks/simulate/manual_lock_via_keypad", - requestOptions - ) - ) - .EnsureData("/locks/simulate/manual_lock_via_keypad") - .ActionAttempt; - } - - /// - /// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task ManualLockViaKeypadAsync(string deviceId = default) - { - return ( - await ManualLockViaKeypadAsync(new ManualLockViaKeypadRequest(deviceId: deviceId)) - ); - } - } +public class SimulateLocks +{ +private ISeamClient _seam; + +public SimulateLocks(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Simulate a Keypad Code Entry. +/// +[DataContract(Name = "keypadCodeEntryRequest_request")] +public class KeypadCodeEntryRequest +{ +[JsonConstructorAttribute] +protected KeypadCodeEntryRequest() { } + +public KeypadCodeEntryRequest(string code = default, string deviceId = default) +{ +Code = code; +DeviceId = deviceId; +} + +/// +/// Code that you want to simulate entering on a keypad. +/// +[DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] +public string Code { get; set; } + +/// +/// ID of the device for which you want to simulate a keypad code entry. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "keypadCodeEntryResponse_response")] +public class KeypadCodeEntryResponse +{ +[JsonConstructorAttribute] +protected KeypadCodeEntryResponse() { } + +public KeypadCodeEntryResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public ActionAttempt KeypadCodeEntry(KeypadCodeEntryRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/locks/simulate/keypad_code_entry", requestOptions).EnsureData("/locks/simulate/keypad_code_entry").ActionAttempt; +} + +/// +/// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public ActionAttempt KeypadCodeEntry(string code = default, string deviceId = default) +{ +return KeypadCodeEntry(new KeypadCodeEntryRequest(code: code, deviceId: deviceId)); +} + +/// +/// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task KeypadCodeEntryAsync(KeypadCodeEntryRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/locks/simulate/keypad_code_entry", requestOptions)).EnsureData("/locks/simulate/keypad_code_entry").ActionAttempt; +} + +/// +/// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task KeypadCodeEntryAsync(string code = default, string deviceId = default) +{ +return (await KeypadCodeEntryAsync(new KeypadCodeEntryRequest(code: code, deviceId: deviceId))); +} + +/// +/// Request parameters for Simulate a Manual Lock Action Using a Keypad. +/// +[DataContract(Name = "manualLockViaKeypadRequest_request")] +public class ManualLockViaKeypadRequest +{ +[JsonConstructorAttribute] +protected ManualLockViaKeypadRequest() { } + +public ManualLockViaKeypadRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the device for which you want to simulate a manual lock action using a keypad. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "manualLockViaKeypadResponse_response")] +public class ManualLockViaKeypadResponse +{ +[JsonConstructorAttribute] +protected ManualLockViaKeypadResponse() { } + +public ManualLockViaKeypadResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public ActionAttempt ManualLockViaKeypad(ManualLockViaKeypadRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/locks/simulate/manual_lock_via_keypad", requestOptions).EnsureData("/locks/simulate/manual_lock_via_keypad").ActionAttempt; +} + +/// +/// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public ActionAttempt ManualLockViaKeypad(string deviceId = default) +{ +return ManualLockViaKeypad(new ManualLockViaKeypadRequest(deviceId: deviceId)); +} + +/// +/// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task ManualLockViaKeypadAsync(ManualLockViaKeypadRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/locks/simulate/manual_lock_via_keypad", requestOptions)).EnsureData("/locks/simulate/manual_lock_via_keypad").ActionAttempt; +} + +/// +/// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task ManualLockViaKeypadAsync(string deviceId = default) +{ +return (await ManualLockViaKeypadAsync(new ManualLockViaKeypadRequest(deviceId: deviceId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SimulateLocks SimulateLocks => new(this); - } - - public partial interface ISeamClient - { - public Api.SimulateLocks SimulateLocks { get; } - } +public partial class SeamClient +{ +public Api.SimulateLocks SimulateLocks => new(this); +} + +public partial interface ISeamClient +{ +public Api.SimulateLocks SimulateLocks { get; } +} } diff --git a/src/Seam/Api/SimulateNoiseSensors.cs b/src/Seam/Api/SimulateNoiseSensors.cs index 63303c99..33aaefc9 100644 --- a/src/Seam/Api/SimulateNoiseSensors.cs +++ b/src/Seam/Api/SimulateNoiseSensors.cs @@ -9,105 +9,102 @@ namespace Seam.Api { - public class SimulateNoiseSensors - { - private ISeamClient _seam; +public class SimulateNoiseSensors +{ +private ISeamClient _seam; - public SimulateNoiseSensors(ISeamClient seam) - { - _seam = seam; - } +public SimulateNoiseSensors(ISeamClient seam) +{ +_seam = seam; +} - /// - /// Request parameters for Simulate Triggering a Noise Threshold. - /// - [DataContract(Name = "triggerNoiseThresholdRequest_request")] - public class TriggerNoiseThresholdRequest - { - [JsonConstructorAttribute] - protected TriggerNoiseThresholdRequest() { } +/// +/// Request parameters for Simulate Triggering a Noise Threshold. +/// +[DataContract(Name = "triggerNoiseThresholdRequest_request")] +public class TriggerNoiseThresholdRequest +{ +[JsonConstructorAttribute] +protected TriggerNoiseThresholdRequest() { } - public TriggerNoiseThresholdRequest(string deviceId = default) - { - DeviceId = deviceId; - } +public TriggerNoiseThresholdRequest(string deviceId = default) +{ +DeviceId = deviceId; +} - /// - /// ID of the device for which you want to simulate the triggering of a noise threshold. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } +/// +/// ID of the device for which you want to simulate the triggering of a noise threshold. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - return stringWriter.ToString(); - } - } +return stringWriter.ToString(); +} +} - /// - /// Simulates the triggering of a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void TriggerNoiseThreshold(TriggerNoiseThresholdRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/noise_sensors/simulate/trigger_noise_threshold", requestOptions); - } +/// +/// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void TriggerNoiseThreshold(TriggerNoiseThresholdRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/noise_sensors/simulate/trigger_noise_threshold", requestOptions); +} - /// - /// Simulates the triggering of a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public void TriggerNoiseThreshold(string deviceId = default) - { - TriggerNoiseThreshold(new TriggerNoiseThresholdRequest(deviceId: deviceId)); - } +/// +/// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public void TriggerNoiseThreshold(string deviceId = default) +{ +TriggerNoiseThreshold(new TriggerNoiseThresholdRequest(deviceId: deviceId)); +} - /// - /// Simulates the triggering of a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task TriggerNoiseThresholdAsync(TriggerNoiseThresholdRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/noise_sensors/simulate/trigger_noise_threshold", - requestOptions - ); - } +/// +/// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task TriggerNoiseThresholdAsync(TriggerNoiseThresholdRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/noise_sensors/simulate/trigger_noise_threshold", requestOptions); +} - /// - /// Simulates the triggering of a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - public async Task TriggerNoiseThresholdAsync(string deviceId = default) - { - await TriggerNoiseThresholdAsync(new TriggerNoiseThresholdRequest(deviceId: deviceId)); - } - } +/// +/// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +public async Task TriggerNoiseThresholdAsync(string deviceId = default) +{ +await TriggerNoiseThresholdAsync(new TriggerNoiseThresholdRequest(deviceId: deviceId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SimulateNoiseSensors SimulateNoiseSensors => new(this); - } +public partial class SeamClient +{ +public Api.SimulateNoiseSensors SimulateNoiseSensors => new(this); +} - public partial interface ISeamClient - { - public Api.SimulateNoiseSensors SimulateNoiseSensors { get; } - } +public partial interface ISeamClient +{ +public Api.SimulateNoiseSensors SimulateNoiseSensors { get; } +} } diff --git a/src/Seam/Api/SimulatePhones.cs b/src/Seam/Api/SimulatePhones.cs index 3c19dba5..4d85ec32 100644 --- a/src/Seam/Api/SimulatePhones.cs +++ b/src/Seam/Api/SimulatePhones.cs @@ -9,371 +9,306 @@ namespace Seam.Api { - public class SimulatePhones - { - private ISeamClient _seam; - - public SimulatePhones(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create a Sandbox Phone. - /// - [DataContract(Name = "createSandboxPhoneRequest_request")] - public class CreateSandboxPhoneRequest - { - [JsonConstructorAttribute] - protected CreateSandboxPhoneRequest() { } - - public CreateSandboxPhoneRequest( - CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, - string? customSdkInstallationId = default, - CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, - string userIdentityId = default - ) - { - AssaAbloyMetadata = assaAbloyMetadata; - CustomSdkInstallationId = customSdkInstallationId; - PhoneMetadata = phoneMetadata; - UserIdentityId = userIdentityId; - } - - /// - /// ASSA ABLOY metadata that you want to associate with the simulated phone. - /// - [DataMember(Name = "assa_abloy_metadata", IsRequired = false, EmitDefaultValue = false)] - public CreateSandboxPhoneRequestAssaAbloyMetadata? AssaAbloyMetadata { get; set; } - - /// - /// ID of the custom SDK installation that you want to use for the simulated phone. - /// - [DataMember( - Name = "custom_sdk_installation_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomSdkInstallationId { get; set; } - - /// - /// Metadata that you want to associate with the simulated phone. - /// - [DataMember(Name = "phone_metadata", IsRequired = false, EmitDefaultValue = false)] - public CreateSandboxPhoneRequestPhoneMetadata? PhoneMetadata { get; set; } - - /// - /// ID of the user identity that you want to associate with the simulated phone. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createSandboxPhoneRequestAssaAbloyMetadata_model")] - public class CreateSandboxPhoneRequestAssaAbloyMetadata - { - [JsonConstructorAttribute] - protected CreateSandboxPhoneRequestAssaAbloyMetadata() { } - - public CreateSandboxPhoneRequestAssaAbloyMetadata( - string? applicationVersion = default, - bool? bleCapability = default, - bool? hceCapability = default, - bool? nfcCapability = default, - string? seosAppletVersion = default, - float? seosTsmEndpointId = default - ) - { - ApplicationVersion = applicationVersion; - BleCapability = bleCapability; - HceCapability = hceCapability; - NfcCapability = nfcCapability; - SeosAppletVersion = seosAppletVersion; - SeosTsmEndpointId = seosTsmEndpointId; - } - - /// - /// Application version that you want to use for the simulated phone. - /// - [DataMember(Name = "application_version", IsRequired = false, EmitDefaultValue = false)] - public string? ApplicationVersion { get; set; } - - /// - /// Indicates whether the simulated phone should have Bluetooth low energy (BLE) capability. - /// - [DataMember(Name = "ble_capability", IsRequired = false, EmitDefaultValue = false)] - public bool? BleCapability { get; set; } - - /// - /// Indicates whether the simulated phone should have host card emulation (HCE) capability. - /// - [DataMember(Name = "hce_capability", IsRequired = false, EmitDefaultValue = false)] - public bool? HceCapability { get; set; } - - /// - /// Indicates whether the simulated phone should have near-field communication (NFC) capability. - /// - [DataMember(Name = "nfc_capability", IsRequired = false, EmitDefaultValue = false)] - public bool? NfcCapability { get; set; } - - /// - /// SEOS applet version that you want to use for the simulated phone. - /// - [DataMember(Name = "seos_applet_version", IsRequired = false, EmitDefaultValue = false)] - public string? SeosAppletVersion { get; set; } - - /// - /// ID of the SEOS trusted service manager (TSM) endpoint that you want to use for the simulated phone. - /// - [DataMember( - Name = "seos_tsm_endpoint_id", - IsRequired = false, - EmitDefaultValue = false - )] - public float? SeosTsmEndpointId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createSandboxPhoneRequestPhoneMetadata_model")] - public class CreateSandboxPhoneRequestPhoneMetadata - { - [JsonConstructorAttribute] - protected CreateSandboxPhoneRequestPhoneMetadata() { } - - public CreateSandboxPhoneRequestPhoneMetadata( - string? deviceManufacturer = default, - string? deviceModel = default, - CreateSandboxPhoneRequestPhoneMetadata.OperatingSystemEnum? operatingSystem = - default, - string? osVersion = default - ) - { - DeviceManufacturer = deviceManufacturer; - DeviceModel = deviceModel; - OperatingSystem = operatingSystem; - OsVersion = osVersion; - } - - /// - /// Mobile operating system that you want to use for the simulated phone. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum OperatingSystemEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "android")] - Android = 1, - - [EnumMember(Value = "ios")] - Ios = 2, - } - - /// - /// Manufacturer that you want to use for the simulated phone. - /// - [DataMember(Name = "device_manufacturer", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceManufacturer { get; set; } - - /// - /// Device model that you want to use for the simulated phone. - /// - [DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceModel { get; set; } - - /// - /// Mobile operating system that you want to use for the simulated phone. - /// - [DataMember(Name = "operating_system", IsRequired = false, EmitDefaultValue = false)] - public CreateSandboxPhoneRequestPhoneMetadata.OperatingSystemEnum? OperatingSystem { get; set; } - - /// - /// Mobile operating system version that you want to use for the simulated phone. - /// - [DataMember(Name = "os_version", IsRequired = false, EmitDefaultValue = false)] - public string? OsVersion { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createSandboxPhoneResponse_response")] - public class CreateSandboxPhoneResponse - { - [JsonConstructorAttribute] - protected CreateSandboxPhoneResponse() { } - - public CreateSandboxPhoneResponse(Phone phone = default) - { - Phone = phone; - } - - /// - /// OK - /// - [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] - public Phone Phone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new simulated phone in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://docs.seam.co/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). - /// - public Phone CreateSandboxPhone(CreateSandboxPhoneRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/phones/simulate/create_sandbox_phone", - requestOptions - ) - .EnsureData("/phones/simulate/create_sandbox_phone") - .Phone; - } - - /// - /// Creates a new simulated phone in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://docs.seam.co/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). - /// - public Phone CreateSandboxPhone( - CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, - string? customSdkInstallationId = default, - CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, - string userIdentityId = default - ) - { - return CreateSandboxPhone( - new CreateSandboxPhoneRequest( - assaAbloyMetadata: assaAbloyMetadata, - customSdkInstallationId: customSdkInstallationId, - phoneMetadata: phoneMetadata, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Creates a new simulated phone in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://docs.seam.co/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). - /// - public async Task CreateSandboxPhoneAsync(CreateSandboxPhoneRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/phones/simulate/create_sandbox_phone", - requestOptions - ) - ) - .EnsureData("/phones/simulate/create_sandbox_phone") - .Phone; - } - - /// - /// Creates a new simulated phone in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://docs.seam.co/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). - /// - public async Task CreateSandboxPhoneAsync( - CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, - string? customSdkInstallationId = default, - CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, - string userIdentityId = default - ) - { - return ( - await CreateSandboxPhoneAsync( - new CreateSandboxPhoneRequest( - assaAbloyMetadata: assaAbloyMetadata, - customSdkInstallationId: customSdkInstallationId, - phoneMetadata: phoneMetadata, - userIdentityId: userIdentityId - ) - ) - ); - } - } +public class SimulatePhones +{ +private ISeamClient _seam; + +public SimulatePhones(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Sandbox Phone. +/// +[DataContract(Name = "createSandboxPhoneRequest_request")] +public class CreateSandboxPhoneRequest +{ +[JsonConstructorAttribute] +protected CreateSandboxPhoneRequest() { } + +public CreateSandboxPhoneRequest(CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, string? customSdkInstallationId = default, CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, string userIdentityId = default) +{ +AssaAbloyMetadata = assaAbloyMetadata; +CustomSdkInstallationId = customSdkInstallationId; +PhoneMetadata = phoneMetadata; +UserIdentityId = userIdentityId; +} + +/// +/// ASSA ABLOY metadata that you want to associate with the simulated phone. +/// +[DataMember(Name = "assa_abloy_metadata", IsRequired = false, EmitDefaultValue = false)] +public CreateSandboxPhoneRequestAssaAbloyMetadata? AssaAbloyMetadata { get; set; } + +/// +/// ID of the custom SDK installation that you want to use for the simulated phone. +/// +[DataMember(Name = "custom_sdk_installation_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomSdkInstallationId { get; set; } + +/// +/// Metadata that you want to associate with the simulated phone. +/// +[DataMember(Name = "phone_metadata", IsRequired = false, EmitDefaultValue = false)] +public CreateSandboxPhoneRequestPhoneMetadata? PhoneMetadata { get; set; } + +/// +/// ID of the user identity that you want to associate with the simulated phone. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createSandboxPhoneRequestAssaAbloyMetadata_model")] +public class CreateSandboxPhoneRequestAssaAbloyMetadata +{ +[JsonConstructorAttribute] +protected CreateSandboxPhoneRequestAssaAbloyMetadata() { } + +public CreateSandboxPhoneRequestAssaAbloyMetadata(string? applicationVersion = default, bool? bleCapability = default, bool? hceCapability = default, bool? nfcCapability = default, string? seosAppletVersion = default, float? seosTsmEndpointId = default) +{ +ApplicationVersion = applicationVersion; +BleCapability = bleCapability; +HceCapability = hceCapability; +NfcCapability = nfcCapability; +SeosAppletVersion = seosAppletVersion; +SeosTsmEndpointId = seosTsmEndpointId; +} + +/// +/// Application version that you want to use for the simulated phone. +/// +[DataMember(Name = "application_version", IsRequired = false, EmitDefaultValue = false)] +public string? ApplicationVersion { get; set; } + +/// +/// Indicates whether the simulated phone should have Bluetooth low energy (BLE) capability. +/// +[DataMember(Name = "ble_capability", IsRequired = false, EmitDefaultValue = false)] +public bool? BleCapability { get; set; } + +/// +/// Indicates whether the simulated phone should have host card emulation (HCE) capability. +/// +[DataMember(Name = "hce_capability", IsRequired = false, EmitDefaultValue = false)] +public bool? HceCapability { get; set; } + +/// +/// Indicates whether the simulated phone should have near-field communication (NFC) capability. +/// +[DataMember(Name = "nfc_capability", IsRequired = false, EmitDefaultValue = false)] +public bool? NfcCapability { get; set; } + +/// +/// SEOS applet version that you want to use for the simulated phone. +/// +[DataMember(Name = "seos_applet_version", IsRequired = false, EmitDefaultValue = false)] +public string? SeosAppletVersion { get; set; } + +/// +/// ID of the SEOS trusted service manager (TSM) endpoint that you want to use for the simulated phone. +/// +[DataMember(Name = "seos_tsm_endpoint_id", IsRequired = false, EmitDefaultValue = false)] +public float? SeosTsmEndpointId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createSandboxPhoneRequestPhoneMetadata_model")] +public class CreateSandboxPhoneRequestPhoneMetadata +{ +[JsonConstructorAttribute] +protected CreateSandboxPhoneRequestPhoneMetadata() { } + +public CreateSandboxPhoneRequestPhoneMetadata(string? deviceManufacturer = default, string? deviceModel = default, CreateSandboxPhoneRequestPhoneMetadata.OperatingSystemEnum? operatingSystem = default, string? osVersion = default) +{ +DeviceManufacturer = deviceManufacturer; +DeviceModel = deviceModel; +OperatingSystem = operatingSystem; +OsVersion = osVersion; +} + +/// +/// Mobile operating system that you want to use for the simulated phone. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum OperatingSystemEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "android")] +Android = 1, + +[EnumMember(Value = "ios")] +Ios = 2, +} + +/// +/// Manufacturer that you want to use for the simulated phone. +/// +[DataMember(Name = "device_manufacturer", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceManufacturer { get; set; } + +/// +/// Device model that you want to use for the simulated phone. +/// +[DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceModel { get; set; } + +/// +/// Mobile operating system that you want to use for the simulated phone. +/// +[DataMember(Name = "operating_system", IsRequired = false, EmitDefaultValue = false)] +public CreateSandboxPhoneRequestPhoneMetadata.OperatingSystemEnum? OperatingSystem { get; set; } + +/// +/// Mobile operating system version that you want to use for the simulated phone. +/// +[DataMember(Name = "os_version", IsRequired = false, EmitDefaultValue = false)] +public string? OsVersion { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createSandboxPhoneResponse_response")] +public class CreateSandboxPhoneResponse +{ +[JsonConstructorAttribute] +protected CreateSandboxPhoneResponse() { } + +public CreateSandboxPhoneResponse(Phone phone = default) +{ +Phone = phone; +} + +/// +/// OK +/// +[DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] +public Phone Phone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). +/// +public Phone CreateSandboxPhone(CreateSandboxPhoneRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/phones/simulate/create_sandbox_phone", requestOptions).EnsureData("/phones/simulate/create_sandbox_phone").Phone; +} + +/// +/// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). +/// +public Phone CreateSandboxPhone(CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, string? customSdkInstallationId = default, CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, string userIdentityId = default) +{ +return CreateSandboxPhone(new CreateSandboxPhoneRequest(assaAbloyMetadata: assaAbloyMetadata, customSdkInstallationId: customSdkInstallationId, phoneMetadata: phoneMetadata, userIdentityId: userIdentityId)); +} + +/// +/// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). +/// +public async Task CreateSandboxPhoneAsync(CreateSandboxPhoneRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/phones/simulate/create_sandbox_phone", requestOptions)).EnsureData("/phones/simulate/create_sandbox_phone").Phone; +} + +/// +/// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). +/// +public async Task CreateSandboxPhoneAsync(CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, string? customSdkInstallationId = default, CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, string userIdentityId = default) +{ +return (await CreateSandboxPhoneAsync(new CreateSandboxPhoneRequest(assaAbloyMetadata: assaAbloyMetadata, customSdkInstallationId: customSdkInstallationId, phoneMetadata: phoneMetadata, userIdentityId: userIdentityId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SimulatePhones SimulatePhones => new(this); - } - - public partial interface ISeamClient - { - public Api.SimulatePhones SimulatePhones { get; } - } +public partial class SeamClient +{ +public Api.SimulatePhones SimulatePhones => new(this); +} + +public partial interface ISeamClient +{ +public Api.SimulatePhones SimulatePhones { get; } +} } diff --git a/src/Seam/Api/SimulateThermostats.cs b/src/Seam/Api/SimulateThermostats.cs index 8b644a44..cd055ce7 100644 --- a/src/Seam/Api/SimulateThermostats.cs +++ b/src/Seam/Api/SimulateThermostats.cs @@ -9,338 +9,249 @@ namespace Seam.Api { - public class SimulateThermostats - { - private ISeamClient _seam; - - public SimulateThermostats(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for HVAC Mode Adjusted. - /// - [DataContract(Name = "hvacModeAdjustedRequest_request")] - public class HvacModeAdjustedRequest - { - [JsonConstructorAttribute] - protected HvacModeAdjustedRequest() { } - - public HvacModeAdjustedRequest( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - HvacModeAdjustedRequest.HvacModeEnum hvacMode = default - ) - { - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DeviceId = deviceId; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - HvacMode = hvacMode; - } - - /// - /// HVAC mode that you want to simulate. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum HvacModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "cool")] - Cool = 2, - - [EnumMember(Value = "heat")] - Heat = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - } - - /// - /// Cooling [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `cooling_set_point_celsius` or `cooling_set_point_fahrenheit`. - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// Cooling [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `cooling_set_point_fahrenheit` or `cooling_set_point_celsius`. - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// ID of the thermostat device for which you want to simulate having adjusted the HVAC mode. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Heating [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `heating_set_point_celsius` or `heating_set_point_fahrenheit`. - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// Heating [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `heating_set_point_fahrenheit` or `heating_set_point_celsius`. - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - /// - /// HVAC mode that you want to simulate. - /// - [DataMember(Name = "hvac_mode", IsRequired = true, EmitDefaultValue = false)] - public HvacModeAdjustedRequest.HvacModeEnum HvacMode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates having adjusted the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://docs.seam.co/capability-guides/thermostats). Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). - /// - public void HvacModeAdjusted(HvacModeAdjustedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/thermostats/simulate/hvac_mode_adjusted", requestOptions); - } - - /// - /// Simulates having adjusted the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://docs.seam.co/capability-guides/thermostats). Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). - /// - public void HvacModeAdjusted( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - HvacModeAdjustedRequest.HvacModeEnum hvacMode = default - ) - { - HvacModeAdjusted( - new HvacModeAdjustedRequest( - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit, - hvacMode: hvacMode - ) - ); - } - - /// - /// Simulates having adjusted the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://docs.seam.co/capability-guides/thermostats). Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). - /// - public async Task HvacModeAdjustedAsync(HvacModeAdjustedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/thermostats/simulate/hvac_mode_adjusted", - requestOptions - ); - } - - /// - /// Simulates having adjusted the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://docs.seam.co/capability-guides/thermostats). Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). - /// - public async Task HvacModeAdjustedAsync( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - HvacModeAdjustedRequest.HvacModeEnum hvacMode = default - ) - { - await HvacModeAdjustedAsync( - new HvacModeAdjustedRequest( - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit, - hvacMode: hvacMode - ) - ); - } - - /// - /// Request parameters for Temperature Reached. - /// - [DataContract(Name = "temperatureReachedRequest_request")] - public class TemperatureReachedRequest - { - [JsonConstructorAttribute] - protected TemperatureReachedRequest() { } - - public TemperatureReachedRequest( - string deviceId = default, - float? temperatureCelsius = default, - float? temperatureFahrenheit = default - ) - { - DeviceId = deviceId; - TemperatureCelsius = temperatureCelsius; - TemperatureFahrenheit = temperatureFahrenheit; - } - - /// - /// ID of the thermostat device that you want to simulate reaching a specified temperature. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Temperature in °C that you want simulate the thermostat reaching. You must set `temperature_celsius` or `temperature_fahrenheit`. - /// - [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? TemperatureCelsius { get; set; } - - /// - /// Temperature in °F that you want simulate the thermostat reaching. You must set `temperature_fahrenheit` or `temperature_celsius`. - /// - [DataMember( - Name = "temperature_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? TemperatureFahrenheit { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulates a [thermostat](https://docs.seam.co/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). - /// - public void TemperatureReached(TemperatureReachedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/thermostats/simulate/temperature_reached", requestOptions); - } - - /// - /// Simulates a [thermostat](https://docs.seam.co/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). - /// - public void TemperatureReached( - string deviceId = default, - float? temperatureCelsius = default, - float? temperatureFahrenheit = default - ) - { - TemperatureReached( - new TemperatureReachedRequest( - deviceId: deviceId, - temperatureCelsius: temperatureCelsius, - temperatureFahrenheit: temperatureFahrenheit - ) - ); - } - - /// - /// Simulates a [thermostat](https://docs.seam.co/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). - /// - public async Task TemperatureReachedAsync(TemperatureReachedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/thermostats/simulate/temperature_reached", - requestOptions - ); - } - - /// - /// Simulates a [thermostat](https://docs.seam.co/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). - /// - public async Task TemperatureReachedAsync( - string deviceId = default, - float? temperatureCelsius = default, - float? temperatureFahrenheit = default - ) - { - await TemperatureReachedAsync( - new TemperatureReachedRequest( - deviceId: deviceId, - temperatureCelsius: temperatureCelsius, - temperatureFahrenheit: temperatureFahrenheit - ) - ); - } - } +public class SimulateThermostats +{ +private ISeamClient _seam; + +public SimulateThermostats(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for HVAC Mode Adjusted. +/// +[DataContract(Name = "hvacModeAdjustedRequest_request")] +public class HvacModeAdjustedRequest +{ +[JsonConstructorAttribute] +protected HvacModeAdjustedRequest() { } + +public HvacModeAdjustedRequest(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, HvacModeAdjustedRequest.HvacModeEnum hvacMode = default) +{ +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DeviceId = deviceId; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +HvacMode = hvacMode; +} + +/// +/// HVAC mode that you want to simulate. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum HvacModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, + +[EnumMember(Value = "cool")] +Cool = 2, + +[EnumMember(Value = "heat")] +Heat = 3, + +[EnumMember(Value = "heat_cool")] +HeatCool = 4, +} + +/// +/// Cooling [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `cooling_set_point_celsius` or `cooling_set_point_fahrenheit`. +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// Cooling [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `cooling_set_point_fahrenheit` or `cooling_set_point_celsius`. +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// ID of the thermostat device for which you want to simulate having adjusted the HVAC mode. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `heating_set_point_celsius` or `heating_set_point_fahrenheit`. +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// Heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `heating_set_point_fahrenheit` or `heating_set_point_celsius`. +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +/// +/// HVAC mode that you want to simulate. +/// +[DataMember(Name = "hvac_mode", IsRequired = true, EmitDefaultValue = false)] +public HvacModeAdjustedRequest.HvacModeEnum HvacMode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). +/// +public void HvacModeAdjusted(HvacModeAdjustedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/thermostats/simulate/hvac_mode_adjusted", requestOptions); +} + +/// +/// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). +/// +public void HvacModeAdjusted(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, HvacModeAdjustedRequest.HvacModeEnum hvacMode = default) +{ +HvacModeAdjusted(new HvacModeAdjustedRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacMode: hvacMode)); +} + +/// +/// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). +/// +public async Task HvacModeAdjustedAsync(HvacModeAdjustedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/thermostats/simulate/hvac_mode_adjusted", requestOptions); +} + +/// +/// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). +/// +public async Task HvacModeAdjustedAsync(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, HvacModeAdjustedRequest.HvacModeEnum hvacMode = default) +{ +await HvacModeAdjustedAsync(new HvacModeAdjustedRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacMode: hvacMode)); +} + +/// +/// Request parameters for Temperature Reached. +/// +[DataContract(Name = "temperatureReachedRequest_request")] +public class TemperatureReachedRequest +{ +[JsonConstructorAttribute] +protected TemperatureReachedRequest() { } + +public TemperatureReachedRequest(string deviceId = default, float? temperatureCelsius = default, float? temperatureFahrenheit = default) +{ +DeviceId = deviceId; +TemperatureCelsius = temperatureCelsius; +TemperatureFahrenheit = temperatureFahrenheit; +} + +/// +/// ID of the thermostat device that you want to simulate reaching a specified temperature. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Temperature in °C that you want simulate the thermostat reaching. You must set `temperature_celsius` or `temperature_fahrenheit`. +/// +[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? TemperatureCelsius { get; set; } + +/// +/// Temperature in °F that you want simulate the thermostat reaching. You must set `temperature_fahrenheit` or `temperature_celsius`. +/// +[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? TemperatureFahrenheit { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). +/// +public void TemperatureReached(TemperatureReachedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/thermostats/simulate/temperature_reached", requestOptions); +} + +/// +/// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). +/// +public void TemperatureReached(string deviceId = default, float? temperatureCelsius = default, float? temperatureFahrenheit = default) +{ +TemperatureReached(new TemperatureReachedRequest(deviceId: deviceId, temperatureCelsius: temperatureCelsius, temperatureFahrenheit: temperatureFahrenheit)); +} + +/// +/// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). +/// +public async Task TemperatureReachedAsync(TemperatureReachedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/thermostats/simulate/temperature_reached", requestOptions); +} + +/// +/// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). +/// +public async Task TemperatureReachedAsync(string deviceId = default, float? temperatureCelsius = default, float? temperatureFahrenheit = default) +{ +await TemperatureReachedAsync(new TemperatureReachedRequest(deviceId: deviceId, temperatureCelsius: temperatureCelsius, temperatureFahrenheit: temperatureFahrenheit)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SimulateThermostats SimulateThermostats => new(this); - } - - public partial interface ISeamClient - { - public Api.SimulateThermostats SimulateThermostats { get; } - } +public partial class SeamClient +{ +public Api.SimulateThermostats SimulateThermostats => new(this); +} + +public partial interface ISeamClient +{ +public Api.SimulateThermostats SimulateThermostats { get; } +} } diff --git a/src/Seam/Api/Spaces.cs b/src/Seam/Api/Spaces.cs index 52ba4f79..8cc4868f 100644 --- a/src/Seam/Api/Spaces.cs +++ b/src/Seam/Api/Spaces.cs @@ -9,1736 +9,1458 @@ namespace Seam.Api { - public class Spaces - { - private ISeamClient _seam; - - public Spaces(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Add Entrances to a Space. - /// - [DataContract(Name = "addAcsEntrancesRequest_request")] - public class AddAcsEntrancesRequest - { - [JsonConstructorAttribute] - protected AddAcsEntrancesRequest() { } - - public AddAcsEntrancesRequest( - List acsEntranceIds = default, - string spaceId = default - ) - { - AcsEntranceIds = acsEntranceIds; - SpaceId = spaceId; - } - - /// - /// IDs of the entrances that you want to add to the space. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = true, EmitDefaultValue = false)] - public List AcsEntranceIds { get; set; } - - /// - /// ID of the space to which you want to add entrances. - /// - [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Adds [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. - /// - public void AddAcsEntrances(AddAcsEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Put("/spaces/add_acs_entrances", requestOptions); - } - - /// - /// Adds [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. - /// - public void AddAcsEntrances(List acsEntranceIds = default, string spaceId = default) - { - AddAcsEntrances( - new AddAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId) - ); - } - - /// - /// Adds [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. - /// - public async Task AddAcsEntrancesAsync(AddAcsEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PutAsync("/spaces/add_acs_entrances", requestOptions); - } - - /// - /// Adds [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. - /// - public async Task AddAcsEntrancesAsync( - List acsEntranceIds = default, - string spaceId = default - ) - { - await AddAcsEntrancesAsync( - new AddAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId) - ); - } - - /// - /// Request parameters for Add a Connected Account to a Space. - /// - [DataContract(Name = "addConnectedAccountRequest_request")] - public class AddConnectedAccountRequest - { - [JsonConstructorAttribute] - protected AddConnectedAccountRequest() { } - - public AddConnectedAccountRequest( - string connectedAccountId = default, - string spaceId = default - ) - { - ConnectedAccountId = connectedAccountId; - SpaceId = spaceId; - } - - /// - /// ID of the connected account that you want to add to the space. - /// - [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// ID of the space to which you want to add the connected account. - /// - [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Adds a [connected account](https://docs.seam.co/core-concepts/connected-accounts) to a specific space. - /// - public void AddConnectedAccount(AddConnectedAccountRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Put("/spaces/add_connected_account", requestOptions); - } - - /// - /// Adds a [connected account](https://docs.seam.co/core-concepts/connected-accounts) to a specific space. - /// - public void AddConnectedAccount( - string connectedAccountId = default, - string spaceId = default - ) - { - AddConnectedAccount( - new AddConnectedAccountRequest( - connectedAccountId: connectedAccountId, - spaceId: spaceId - ) - ); - } - - /// - /// Adds a [connected account](https://docs.seam.co/core-concepts/connected-accounts) to a specific space. - /// - public async Task AddConnectedAccountAsync(AddConnectedAccountRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PutAsync("/spaces/add_connected_account", requestOptions); - } - - /// - /// Adds a [connected account](https://docs.seam.co/core-concepts/connected-accounts) to a specific space. - /// - public async Task AddConnectedAccountAsync( - string connectedAccountId = default, - string spaceId = default - ) - { - await AddConnectedAccountAsync( - new AddConnectedAccountRequest( - connectedAccountId: connectedAccountId, - spaceId: spaceId - ) - ); - } - - /// - /// Request parameters for Add Devices to a Space. - /// - [DataContract(Name = "addDevicesRequest_request")] - public class AddDevicesRequest - { - [JsonConstructorAttribute] - protected AddDevicesRequest() { } - - public AddDevicesRequest(List deviceIds = default, string spaceId = default) - { - DeviceIds = deviceIds; - SpaceId = spaceId; - } - - /// - /// IDs of the devices that you want to add to the space. - /// - [DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - /// - /// ID of the space to which you want to add devices. - /// - [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Adds devices to a specific space. - /// - public void AddDevices(AddDevicesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Put("/spaces/add_devices", requestOptions); - } - - /// - /// Adds devices to a specific space. - /// - public void AddDevices(List deviceIds = default, string spaceId = default) - { - AddDevices(new AddDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); - } - - /// - /// Adds devices to a specific space. - /// - public async Task AddDevicesAsync(AddDevicesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PutAsync("/spaces/add_devices", requestOptions); - } - - /// - /// Adds devices to a specific space. - /// - public async Task AddDevicesAsync( - List deviceIds = default, - string spaceId = default - ) - { - await AddDevicesAsync(new AddDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); - } - - /// - /// Request parameters for Create a Space. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - List? acsEntranceIds = default, - List? connectedAccountIds = default, - CreateRequestCustomerData? customerData = default, - string? customerKey = default, - List? deviceIds = default, - string name = default, - string? spaceKey = default - ) - { - AcsEntranceIds = acsEntranceIds; - ConnectedAccountIds = connectedAccountIds; - CustomerData = customerData; - CustomerKey = customerKey; - DeviceIds = deviceIds; - Name = name; - SpaceKey = spaceKey; - } - - /// - /// IDs of the entrances that you want to add to the new space. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEntranceIds { get; set; } - - /// - /// IDs of connected accounts to associate with the new space. Persisted on seam.location_third_party_account so the UI can show which provider account(s) a space came from. - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Reservation/stay-related defaults for the space. - /// - [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestCustomerData? CustomerData { get; set; } - - /// - /// Customer key for which you want to create the space. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// IDs of the devices that you want to add to the new space. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - - /// - /// Name of the space that you want to create. - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Unique key for the space within the workspace. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestCustomerData_model")] - public class CreateRequestCustomerData - { - [JsonConstructorAttribute] - protected CreateRequestCustomerData() { } - - public CreateRequestCustomerData( - string? address = default, - string? defaultCheckinTime = default, - string? defaultCheckoutTime = default, - string? timeZone = default - ) - { - Address = address; - DefaultCheckinTime = defaultCheckinTime; - DefaultCheckoutTime = defaultCheckoutTime; - TimeZone = timeZone; - } - - /// - /// Postal address for the space. - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public string? Address { get; set; } - - /// - /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember( - Name = "default_checkin_time", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCheckinTime { get; set; } - - /// - /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember( - Name = "default_checkout_time", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCheckoutTime { get; set; } - - /// - /// IANA time zone for the space, e.g. America/Los_Angeles. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(Space space = default) - { - Space = space; - } - - /// - /// OK - /// - [DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] - public Space Space { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new space. - /// - public Space Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/spaces/create", requestOptions) - .EnsureData("/spaces/create") - .Space; - } - - /// - /// Creates a new space. - /// - public Space Create( - List? acsEntranceIds = default, - List? connectedAccountIds = default, - CreateRequestCustomerData? customerData = default, - string? customerKey = default, - List? deviceIds = default, - string name = default, - string? spaceKey = default - ) - { - return Create( - new CreateRequest( - acsEntranceIds: acsEntranceIds, - connectedAccountIds: connectedAccountIds, - customerData: customerData, - customerKey: customerKey, - deviceIds: deviceIds, - name: name, - spaceKey: spaceKey - ) - ); - } - - /// - /// Creates a new space. - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/spaces/create", requestOptions)) - .EnsureData("/spaces/create") - .Space; - } - - /// - /// Creates a new space. - /// - public async Task CreateAsync( - List? acsEntranceIds = default, - List? connectedAccountIds = default, - CreateRequestCustomerData? customerData = default, - string? customerKey = default, - List? deviceIds = default, - string name = default, - string? spaceKey = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - acsEntranceIds: acsEntranceIds, - connectedAccountIds: connectedAccountIds, - customerData: customerData, - customerKey: customerKey, - deviceIds: deviceIds, - name: name, - spaceKey: spaceKey - ) - ) - ); - } - - /// - /// Request parameters for Delete a Space. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string spaceId = default) - { - SpaceId = spaceId; - } - - /// - /// ID of the space that you want to delete. - /// - [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a space. - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/spaces/delete", requestOptions); - } - - /// - /// Deletes a space. - /// - public void Delete(string spaceId = default) - { - Delete(new DeleteRequest(spaceId: spaceId)); - } - - /// - /// Deletes a space. - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/spaces/delete", requestOptions); - } - - /// - /// Deletes a space. - /// - public async Task DeleteAsync(string spaceId = default) - { - await DeleteAsync(new DeleteRequest(spaceId: spaceId)); - } - - /// - /// Request parameters for Get a Space. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string? spaceId = default, string? spaceKey = default) - { - SpaceId = spaceId; - SpaceKey = spaceKey; - } - - /// - /// ID of the space that you want to get. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - /// - /// Unique key of the space that you want to get. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(Space space = default) - { - Space = space; - } - - /// - /// OK - /// - [DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] - public Space Space { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets a space. - /// - public Space Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/spaces/get", requestOptions) - .EnsureData("/spaces/get") - .Space; - } - - /// - /// Gets a space. - /// - public Space Get(string? spaceId = default, string? spaceKey = default) - { - return Get(new GetRequest(spaceId: spaceId, spaceKey: spaceKey)); - } - - /// - /// Gets a space. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/spaces/get", requestOptions)) - .EnsureData("/spaces/get") - .Space; - } - - /// - /// Gets a space. - /// - public async Task GetAsync(string? spaceId = default, string? spaceKey = default) - { - return (await GetAsync(new GetRequest(spaceId: spaceId, spaceKey: spaceKey))); - } - - /// - /// Request parameters for Get related Space resources. - /// - [DataContract(Name = "getRelatedRequest_request")] - public class GetRelatedRequest - { - [JsonConstructorAttribute] - protected GetRelatedRequest() { } - - public GetRelatedRequest( - List? exclude = default, - List? include = default, - List? spaceIds = default, - List? spaceKeys = default - ) - { - Exclude = exclude; - Include = include; - SpaceIds = spaceIds; - SpaceKeys = spaceKeys; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExcludeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "spaces")] - Spaces = 1, - - [EnumMember(Value = "devices")] - Devices = 2, - - [EnumMember(Value = "acs_entrances")] - AcsEntrances = 3, - - [EnumMember(Value = "connected_accounts")] - ConnectedAccounts = 4, - - [EnumMember(Value = "acs_systems")] - AcsSystems = 5, - - [EnumMember(Value = "access_methods")] - AccessMethods = 6, - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum IncludeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "spaces")] - Spaces = 1, - - [EnumMember(Value = "devices")] - Devices = 2, - - [EnumMember(Value = "acs_entrances")] - AcsEntrances = 3, - - [EnumMember(Value = "connected_accounts")] - ConnectedAccounts = 4, - - [EnumMember(Value = "acs_systems")] - AcsSystems = 5, - - [EnumMember(Value = "access_methods")] - AccessMethods = 6, - } - - [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] - public List? Exclude { get; set; } - - [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] - public List? Include { get; set; } - - /// - /// IDs of the spaces that you want to get along with their related resources. - /// - [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceIds { get; set; } - - /// - /// Keys of the spaces that you want to get along with their related resources. - /// - [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] - public List? SpaceKeys { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getRelatedResponse_response")] - public class GetRelatedResponse - { - [JsonConstructorAttribute] - protected GetRelatedResponse() { } - - public GetRelatedResponse(Batch batch = default) - { - Batch = batch; - } - - /// - /// OK - /// - [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] - public Batch Batch { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets all related resources for one or more Spaces. - /// - public Batch GetRelated(GetRelatedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/spaces/get_related", requestOptions) - .EnsureData("/spaces/get_related") - .Batch; - } - - /// - /// Gets all related resources for one or more Spaces. - /// - public Batch GetRelated( - List? exclude = default, - List? include = default, - List? spaceIds = default, - List? spaceKeys = default - ) - { - return GetRelated( - new GetRelatedRequest( - exclude: exclude, - include: include, - spaceIds: spaceIds, - spaceKeys: spaceKeys - ) - ); - } - - /// - /// Gets all related resources for one or more Spaces. - /// - public async Task GetRelatedAsync(GetRelatedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/spaces/get_related", requestOptions)) - .EnsureData("/spaces/get_related") - .Batch; - } - - /// - /// Gets all related resources for one or more Spaces. - /// - public async Task GetRelatedAsync( - List? exclude = default, - List? include = default, - List? spaceIds = default, - List? spaceKeys = default - ) - { - return ( - await GetRelatedAsync( - new GetRelatedRequest( - exclude: exclude, - include: include, - spaceIds: spaceIds, - spaceKeys: spaceKeys - ) - ) - ); - } - - /// - /// Request parameters for List Spaces. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? customerKey = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? spaceKey = default - ) - { - CustomerKey = customerKey; - Limit = limit; - PageCursor = pageCursor; - Search = search; - SpaceKey = spaceKey; - } - - /// - /// Customer key for which you want to list spaces. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned spaces to include all records that satisfy a partial match using `name`, `space_key`, or `customer_key`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// Filter spaces by space_key. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List spaces = default) - { - Spaces = spaces; - } - - /// - /// OK - /// - [DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] - public List Spaces { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all spaces. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/spaces/list", requestOptions) - .EnsureData("/spaces/list") - .Spaces; - } - - /// - /// Returns a list of all spaces. - /// - public List List( - string? customerKey = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? spaceKey = default - ) - { - return List( - new ListRequest( - customerKey: customerKey, - limit: limit, - pageCursor: pageCursor, - search: search, - spaceKey: spaceKey - ) - ); - } - - /// - /// Returns a list of all spaces. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/spaces/list", requestOptions)) - .EnsureData("/spaces/list") - .Spaces; - } - - /// - /// Returns a list of all spaces. - /// - public async Task> ListAsync( - string? customerKey = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? spaceKey = default - ) - { - return ( - await ListAsync( - new ListRequest( - customerKey: customerKey, - limit: limit, - pageCursor: pageCursor, - search: search, - spaceKey: spaceKey - ) - ) - ); - } - - /// - /// Request parameters for Remove Entrances from a Space. - /// - [DataContract(Name = "removeAcsEntrancesRequest_request")] - public class RemoveAcsEntrancesRequest - { - [JsonConstructorAttribute] - protected RemoveAcsEntrancesRequest() { } - - public RemoveAcsEntrancesRequest( - List acsEntranceIds = default, - string spaceId = default - ) - { - AcsEntranceIds = acsEntranceIds; - SpaceId = spaceId; - } - - /// - /// IDs of the entrances that you want to remove from the space. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = true, EmitDefaultValue = false)] - public List AcsEntranceIds { get; set; } - - /// - /// ID of the space from which you want to remove entrances. - /// - [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Removes [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. - /// - public void RemoveAcsEntrances(RemoveAcsEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/spaces/remove_acs_entrances", requestOptions); - } - - /// - /// Removes [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. - /// - public void RemoveAcsEntrances( - List acsEntranceIds = default, - string spaceId = default - ) - { - RemoveAcsEntrances( - new RemoveAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId) - ); - } - - /// - /// Removes [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. - /// - public async Task RemoveAcsEntrancesAsync(RemoveAcsEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/spaces/remove_acs_entrances", requestOptions); - } - - /// - /// Removes [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. - /// - public async Task RemoveAcsEntrancesAsync( - List acsEntranceIds = default, - string spaceId = default - ) - { - await RemoveAcsEntrancesAsync( - new RemoveAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId) - ); - } - - /// - /// Request parameters for Remove a Connected Account from a Space. - /// - [DataContract(Name = "removeConnectedAccountRequest_request")] - public class RemoveConnectedAccountRequest - { - [JsonConstructorAttribute] - protected RemoveConnectedAccountRequest() { } - - public RemoveConnectedAccountRequest( - string connectedAccountId = default, - string spaceId = default - ) - { - ConnectedAccountId = connectedAccountId; - SpaceId = spaceId; - } - - /// - /// ID of the connected account that you want to remove from the space. - /// - [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// ID of the space from which you want to remove the connected account. - /// - [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Removes a [connected account](https://docs.seam.co/core-concepts/connected-accounts) from a specific space. - /// - public void RemoveConnectedAccount(RemoveConnectedAccountRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/spaces/remove_connected_account", requestOptions); - } - - /// - /// Removes a [connected account](https://docs.seam.co/core-concepts/connected-accounts) from a specific space. - /// - public void RemoveConnectedAccount( - string connectedAccountId = default, - string spaceId = default - ) - { - RemoveConnectedAccount( - new RemoveConnectedAccountRequest( - connectedAccountId: connectedAccountId, - spaceId: spaceId - ) - ); - } - - /// - /// Removes a [connected account](https://docs.seam.co/core-concepts/connected-accounts) from a specific space. - /// - public async Task RemoveConnectedAccountAsync(RemoveConnectedAccountRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/spaces/remove_connected_account", requestOptions); - } - - /// - /// Removes a [connected account](https://docs.seam.co/core-concepts/connected-accounts) from a specific space. - /// - public async Task RemoveConnectedAccountAsync( - string connectedAccountId = default, - string spaceId = default - ) - { - await RemoveConnectedAccountAsync( - new RemoveConnectedAccountRequest( - connectedAccountId: connectedAccountId, - spaceId: spaceId - ) - ); - } - - /// - /// Request parameters for Remove Devices from a Space. - /// - [DataContract(Name = "removeDevicesRequest_request")] - public class RemoveDevicesRequest - { - [JsonConstructorAttribute] - protected RemoveDevicesRequest() { } - - public RemoveDevicesRequest(List deviceIds = default, string spaceId = default) - { - DeviceIds = deviceIds; - SpaceId = spaceId; - } - - /// - /// IDs of the devices that you want to remove from the space. - /// - [DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - /// - /// ID of the space from which you want to remove devices. - /// - [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Removes devices from a specific space. - /// - public void RemoveDevices(RemoveDevicesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/spaces/remove_devices", requestOptions); - } - - /// - /// Removes devices from a specific space. - /// - public void RemoveDevices(List deviceIds = default, string spaceId = default) - { - RemoveDevices(new RemoveDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); - } - - /// - /// Removes devices from a specific space. - /// - public async Task RemoveDevicesAsync(RemoveDevicesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/spaces/remove_devices", requestOptions); - } - - /// - /// Removes devices from a specific space. - /// - public async Task RemoveDevicesAsync( - List deviceIds = default, - string spaceId = default - ) - { - await RemoveDevicesAsync( - new RemoveDevicesRequest(deviceIds: deviceIds, spaceId: spaceId) - ); - } - - /// - /// Request parameters for Update a Space. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - List? acsEntranceIds = default, - UpdateRequestCustomerData? customerData = default, - List? deviceIds = default, - string? name = default, - string? spaceId = default, - string? spaceKey = default - ) - { - AcsEntranceIds = acsEntranceIds; - CustomerData = customerData; - DeviceIds = deviceIds; - Name = name; - SpaceId = spaceId; - SpaceKey = spaceKey; - } - - /// - /// IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEntranceIds { get; set; } - - /// - /// Reservation/stay-related defaults for the space. Only the keys you provide are updated; omit a key to leave it unchanged. Pass null on a key to clear it. - /// - [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] - public UpdateRequestCustomerData? CustomerData { get; set; } - - /// - /// IDs of the devices that you want to set for the space. If specified, this will replace all existing devices. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - - /// - /// Name of the space. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// ID of the space that you want to update. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - /// - /// Unique key of the space that you want to update. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateRequestCustomerData_model")] - public class UpdateRequestCustomerData - { - [JsonConstructorAttribute] - protected UpdateRequestCustomerData() { } - - public UpdateRequestCustomerData( - string? address = default, - string? defaultCheckinTime = default, - string? defaultCheckoutTime = default, - string? timeZone = default - ) - { - Address = address; - DefaultCheckinTime = defaultCheckinTime; - DefaultCheckoutTime = defaultCheckoutTime; - TimeZone = timeZone; - } - - /// - /// Postal address for the space. - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public string? Address { get; set; } - - /// - /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember( - Name = "default_checkin_time", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCheckinTime { get; set; } - - /// - /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember( - Name = "default_checkout_time", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCheckoutTime { get; set; } - - /// - /// IANA time zone for the space, e.g. America/Los_Angeles. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateResponse_response")] - public class UpdateResponse - { - [JsonConstructorAttribute] - protected UpdateResponse() { } - - public UpdateResponse(Space space = default) - { - Space = space; - } - - /// - /// OK - /// - [DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] - public Space Space { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates an existing space. - /// - public Space Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Patch("/spaces/update", requestOptions) - .EnsureData("/spaces/update") - .Space; - } - - /// - /// Updates an existing space. - /// - public Space Update( - List? acsEntranceIds = default, - UpdateRequestCustomerData? customerData = default, - List? deviceIds = default, - string? name = default, - string? spaceId = default, - string? spaceKey = default - ) - { - return Update( - new UpdateRequest( - acsEntranceIds: acsEntranceIds, - customerData: customerData, - deviceIds: deviceIds, - name: name, - spaceId: spaceId, - spaceKey: spaceKey - ) - ); - } - - /// - /// Updates an existing space. - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PatchAsync("/spaces/update", requestOptions)) - .EnsureData("/spaces/update") - .Space; - } - - /// - /// Updates an existing space. - /// - public async Task UpdateAsync( - List? acsEntranceIds = default, - UpdateRequestCustomerData? customerData = default, - List? deviceIds = default, - string? name = default, - string? spaceId = default, - string? spaceKey = default - ) - { - return ( - await UpdateAsync( - new UpdateRequest( - acsEntranceIds: acsEntranceIds, - customerData: customerData, - deviceIds: deviceIds, - name: name, - spaceId: spaceId, - spaceKey: spaceKey - ) - ) - ); - } - } +public class Spaces +{ +private ISeamClient _seam; + +public Spaces(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Add Entrances to a Space. +/// +[DataContract(Name = "addAcsEntrancesRequest_request")] +public class AddAcsEntrancesRequest +{ +[JsonConstructorAttribute] +protected AddAcsEntrancesRequest() { } + +public AddAcsEntrancesRequest(List acsEntranceIds = default, string spaceId = default) +{ +AcsEntranceIds = acsEntranceIds; +SpaceId = spaceId; +} + +/// +/// IDs of the entrances that you want to add to the space. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = true, EmitDefaultValue = false)] +public List AcsEntranceIds { get; set; } + +/// +/// ID of the space to which you want to add entrances. +/// +[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. +/// +public void AddAcsEntrances(AddAcsEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Put("/spaces/add_acs_entrances", requestOptions); +} + +/// +/// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. +/// +public void AddAcsEntrances(List acsEntranceIds = default, string spaceId = default) +{ +AddAcsEntrances(new AddAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId)); +} + +/// +/// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. +/// +public async Task AddAcsEntrancesAsync(AddAcsEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PutAsync("/spaces/add_acs_entrances", requestOptions); +} + +/// +/// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. +/// +public async Task AddAcsEntrancesAsync(List acsEntranceIds = default, string spaceId = default) +{ +await AddAcsEntrancesAsync(new AddAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId)); +} + +/// +/// Request parameters for Add a Connected Account to a Space. +/// +[DataContract(Name = "addConnectedAccountRequest_request")] +public class AddConnectedAccountRequest +{ +[JsonConstructorAttribute] +protected AddConnectedAccountRequest() { } + +public AddConnectedAccountRequest(string connectedAccountId = default, string spaceId = default) +{ +ConnectedAccountId = connectedAccountId; +SpaceId = spaceId; +} + +/// +/// ID of the connected account that you want to add to the space. +/// +[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// ID of the space to which you want to add the connected account. +/// +[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. +/// +public void AddConnectedAccount(AddConnectedAccountRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Put("/spaces/add_connected_account", requestOptions); +} + +/// +/// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. +/// +public void AddConnectedAccount(string connectedAccountId = default, string spaceId = default) +{ +AddConnectedAccount(new AddConnectedAccountRequest(connectedAccountId: connectedAccountId, spaceId: spaceId)); +} + +/// +/// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. +/// +public async Task AddConnectedAccountAsync(AddConnectedAccountRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PutAsync("/spaces/add_connected_account", requestOptions); +} + +/// +/// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. +/// +public async Task AddConnectedAccountAsync(string connectedAccountId = default, string spaceId = default) +{ +await AddConnectedAccountAsync(new AddConnectedAccountRequest(connectedAccountId: connectedAccountId, spaceId: spaceId)); +} + +/// +/// Request parameters for Add Devices to a Space. +/// +[DataContract(Name = "addDevicesRequest_request")] +public class AddDevicesRequest +{ +[JsonConstructorAttribute] +protected AddDevicesRequest() { } + +public AddDevicesRequest(List deviceIds = default, string spaceId = default) +{ +DeviceIds = deviceIds; +SpaceId = spaceId; +} + +/// +/// IDs of the devices that you want to add to the space. +/// +[DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +/// +/// ID of the space to which you want to add devices. +/// +[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Adds devices to a specific space. +/// +public void AddDevices(AddDevicesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Put("/spaces/add_devices", requestOptions); +} + +/// +/// Adds devices to a specific space. +/// +public void AddDevices(List deviceIds = default, string spaceId = default) +{ +AddDevices(new AddDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); +} + +/// +/// Adds devices to a specific space. +/// +public async Task AddDevicesAsync(AddDevicesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PutAsync("/spaces/add_devices", requestOptions); +} + +/// +/// Adds devices to a specific space. +/// +public async Task AddDevicesAsync(List deviceIds = default, string spaceId = default) +{ +await AddDevicesAsync(new AddDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); +} + +/// +/// Request parameters for Create a Space. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(List? acsEntranceIds = default, List? connectedAccountIds = default, CreateRequestCustomerData? customerData = default, string? customerKey = default, List? deviceIds = default, string name = default, string? spaceKey = default) +{ +AcsEntranceIds = acsEntranceIds; +ConnectedAccountIds = connectedAccountIds; +CustomerData = customerData; +CustomerKey = customerKey; +DeviceIds = deviceIds; +Name = name; +SpaceKey = spaceKey; +} + +/// +/// IDs of the entrances that you want to add to the new space. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsEntranceIds { get; set; } + +/// +/// IDs of connected accounts to associate with the new space. Persisted on seam.location_third_party_account so the UI can show which provider account(s) a space came from. +/// +[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectedAccountIds { get; set; } + +/// +/// Reservation/stay-related defaults for the space. +/// +[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestCustomerData? CustomerData { get; set; } + +/// +/// Customer key for which you want to create the space. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// IDs of the devices that you want to add to the new space. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceIds { get; set; } + +/// +/// Name of the space that you want to create. +/// +[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// Unique key for the space within the workspace. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestCustomerData_model")] +public class CreateRequestCustomerData +{ +[JsonConstructorAttribute] +protected CreateRequestCustomerData() { } + +public CreateRequestCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) +{ +Address = address; +DefaultCheckinTime = defaultCheckinTime; +DefaultCheckoutTime = defaultCheckoutTime; +TimeZone = timeZone; +} + +/// +/// Postal address for the space. +/// +[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] +public string? Address { get; set; } + +/// +/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckinTime { get; set; } + +/// +/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckoutTime { get; set; } + +/// +/// IANA time zone for the space, e.g. America/Los_Angeles. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(Space space = default) +{ +Space = space; +} + +/// +/// OK +/// +[DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] +public Space Space { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new space. +/// +public Space Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/spaces/create", requestOptions).EnsureData("/spaces/create").Space; +} + +/// +/// Creates a new space. +/// +public Space Create(List? acsEntranceIds = default, List? connectedAccountIds = default, CreateRequestCustomerData? customerData = default, string? customerKey = default, List? deviceIds = default, string name = default, string? spaceKey = default) +{ +return Create(new CreateRequest(acsEntranceIds: acsEntranceIds, connectedAccountIds: connectedAccountIds, customerData: customerData, customerKey: customerKey, deviceIds: deviceIds, name: name, spaceKey: spaceKey)); +} + +/// +/// Creates a new space. +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/spaces/create", requestOptions)).EnsureData("/spaces/create").Space; +} + +/// +/// Creates a new space. +/// +public async Task CreateAsync(List? acsEntranceIds = default, List? connectedAccountIds = default, CreateRequestCustomerData? customerData = default, string? customerKey = default, List? deviceIds = default, string name = default, string? spaceKey = default) +{ +return (await CreateAsync(new CreateRequest(acsEntranceIds: acsEntranceIds, connectedAccountIds: connectedAccountIds, customerData: customerData, customerKey: customerKey, deviceIds: deviceIds, name: name, spaceKey: spaceKey))); +} + +/// +/// Request parameters for Delete a Space. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string spaceId = default) +{ +SpaceId = spaceId; +} + +/// +/// ID of the space that you want to delete. +/// +[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a space. +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/spaces/delete", requestOptions); +} + +/// +/// Deletes a space. +/// +public void Delete(string spaceId = default) +{ +Delete(new DeleteRequest(spaceId: spaceId)); +} + +/// +/// Deletes a space. +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/spaces/delete", requestOptions); +} + +/// +/// Deletes a space. +/// +public async Task DeleteAsync(string spaceId = default) +{ +await DeleteAsync(new DeleteRequest(spaceId: spaceId)); +} + +/// +/// Request parameters for Get a Space. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? spaceId = default, string? spaceKey = default) +{ +SpaceId = spaceId; +SpaceKey = spaceKey; +} + +/// +/// ID of the space that you want to get. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +/// +/// Unique key of the space that you want to get. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(Space space = default) +{ +Space = space; +} + +/// +/// OK +/// +[DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] +public Space Space { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets a space. +/// +public Space Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/spaces/get", requestOptions).EnsureData("/spaces/get").Space; +} + +/// +/// Gets a space. +/// +public Space Get(string? spaceId = default, string? spaceKey = default) +{ +return Get(new GetRequest(spaceId: spaceId, spaceKey: spaceKey)); +} + +/// +/// Gets a space. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/spaces/get", requestOptions)).EnsureData("/spaces/get").Space; +} + +/// +/// Gets a space. +/// +public async Task GetAsync(string? spaceId = default, string? spaceKey = default) +{ +return (await GetAsync(new GetRequest(spaceId: spaceId, spaceKey: spaceKey))); +} + +/// +/// Request parameters for Get related Space resources. +/// +[DataContract(Name = "getRelatedRequest_request")] +public class GetRelatedRequest +{ +[JsonConstructorAttribute] +protected GetRelatedRequest() { } + +public GetRelatedRequest(List? exclude = default, List? include = default, List? spaceIds = default, List? spaceKeys = default) +{ +Exclude = exclude; +Include = include; +SpaceIds = spaceIds; +SpaceKeys = spaceKeys; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExcludeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "spaces")] +Spaces = 1, + +[EnumMember(Value = "devices")] +Devices = 2, + +[EnumMember(Value = "acs_entrances")] +AcsEntrances = 3, + +[EnumMember(Value = "connected_accounts")] +ConnectedAccounts = 4, + +[EnumMember(Value = "acs_systems")] +AcsSystems = 5, + +[EnumMember(Value = "access_methods")] +AccessMethods = 6, +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum IncludeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "spaces")] +Spaces = 1, + +[EnumMember(Value = "devices")] +Devices = 2, + +[EnumMember(Value = "acs_entrances")] +AcsEntrances = 3, + +[EnumMember(Value = "connected_accounts")] +ConnectedAccounts = 4, + +[EnumMember(Value = "acs_systems")] +AcsSystems = 5, + +[EnumMember(Value = "access_methods")] +AccessMethods = 6, +} + +[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] +public List? Exclude { get; set; } + +[DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] +public List? Include { get; set; } + +/// +/// IDs of the spaces that you want to get along with their related resources. +/// +[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceIds { get; set; } + +/// +/// Keys of the spaces that you want to get along with their related resources. +/// +[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] +public List? SpaceKeys { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getRelatedResponse_response")] +public class GetRelatedResponse +{ +[JsonConstructorAttribute] +protected GetRelatedResponse() { } + +public GetRelatedResponse(Batch batch = default) +{ +Batch = batch; +} + +/// +/// OK +/// +[DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] +public Batch Batch { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets all related resources for one or more Spaces. +/// +public Batch GetRelated(GetRelatedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/spaces/get_related", requestOptions).EnsureData("/spaces/get_related").Batch; +} + +/// +/// Gets all related resources for one or more Spaces. +/// +public Batch GetRelated(List? exclude = default, List? include = default, List? spaceIds = default, List? spaceKeys = default) +{ +return GetRelated(new GetRelatedRequest(exclude: exclude, include: include, spaceIds: spaceIds, spaceKeys: spaceKeys)); +} + +/// +/// Gets all related resources for one or more Spaces. +/// +public async Task GetRelatedAsync(GetRelatedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/spaces/get_related", requestOptions)).EnsureData("/spaces/get_related").Batch; +} + +/// +/// Gets all related resources for one or more Spaces. +/// +public async Task GetRelatedAsync(List? exclude = default, List? include = default, List? spaceIds = default, List? spaceKeys = default) +{ +return (await GetRelatedAsync(new GetRelatedRequest(exclude: exclude, include: include, spaceIds: spaceIds, spaceKeys: spaceKeys))); +} + +/// +/// Request parameters for List Spaces. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? spaceKey = default) +{ +CustomerKey = customerKey; +Limit = limit; +PageCursor = pageCursor; +Search = search; +SpaceKey = spaceKey; +} + +/// +/// Customer key for which you want to list spaces. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned spaces to include all records that satisfy a partial match using `name`, `space_key`, or `customer_key`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// Filter spaces by space_key. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List spaces = default) +{ +Spaces = spaces; +} + +/// +/// OK +/// +[DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] +public List Spaces { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all spaces. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/spaces/list", requestOptions).EnsureData("/spaces/list").Spaces; +} + +/// +/// Returns a list of all spaces. +/// +public List List(string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? spaceKey = default) +{ +return List(new ListRequest(customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, spaceKey: spaceKey)); +} + +/// +/// Returns a list of all spaces. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/spaces/list", requestOptions)).EnsureData("/spaces/list").Spaces; +} + +/// +/// Returns a list of all spaces. +/// +public async Task> ListAsync(string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? spaceKey = default) +{ +return (await ListAsync(new ListRequest(customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, spaceKey: spaceKey))); +} + +/// +/// Request parameters for Remove Entrances from a Space. +/// +[DataContract(Name = "removeAcsEntrancesRequest_request")] +public class RemoveAcsEntrancesRequest +{ +[JsonConstructorAttribute] +protected RemoveAcsEntrancesRequest() { } + +public RemoveAcsEntrancesRequest(List acsEntranceIds = default, string spaceId = default) +{ +AcsEntranceIds = acsEntranceIds; +SpaceId = spaceId; +} + +/// +/// IDs of the entrances that you want to remove from the space. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = true, EmitDefaultValue = false)] +public List AcsEntranceIds { get; set; } + +/// +/// ID of the space from which you want to remove entrances. +/// +[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. +/// +public void RemoveAcsEntrances(RemoveAcsEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/spaces/remove_acs_entrances", requestOptions); +} + +/// +/// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. +/// +public void RemoveAcsEntrances(List acsEntranceIds = default, string spaceId = default) +{ +RemoveAcsEntrances(new RemoveAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId)); +} + +/// +/// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. +/// +public async Task RemoveAcsEntrancesAsync(RemoveAcsEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/spaces/remove_acs_entrances", requestOptions); +} + +/// +/// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. +/// +public async Task RemoveAcsEntrancesAsync(List acsEntranceIds = default, string spaceId = default) +{ +await RemoveAcsEntrancesAsync(new RemoveAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId)); +} + +/// +/// Request parameters for Remove a Connected Account from a Space. +/// +[DataContract(Name = "removeConnectedAccountRequest_request")] +public class RemoveConnectedAccountRequest +{ +[JsonConstructorAttribute] +protected RemoveConnectedAccountRequest() { } + +public RemoveConnectedAccountRequest(string connectedAccountId = default, string spaceId = default) +{ +ConnectedAccountId = connectedAccountId; +SpaceId = spaceId; +} + +/// +/// ID of the connected account that you want to remove from the space. +/// +[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// ID of the space from which you want to remove the connected account. +/// +[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. +/// +public void RemoveConnectedAccount(RemoveConnectedAccountRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/spaces/remove_connected_account", requestOptions); +} + +/// +/// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. +/// +public void RemoveConnectedAccount(string connectedAccountId = default, string spaceId = default) +{ +RemoveConnectedAccount(new RemoveConnectedAccountRequest(connectedAccountId: connectedAccountId, spaceId: spaceId)); +} + +/// +/// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. +/// +public async Task RemoveConnectedAccountAsync(RemoveConnectedAccountRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/spaces/remove_connected_account", requestOptions); +} + +/// +/// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. +/// +public async Task RemoveConnectedAccountAsync(string connectedAccountId = default, string spaceId = default) +{ +await RemoveConnectedAccountAsync(new RemoveConnectedAccountRequest(connectedAccountId: connectedAccountId, spaceId: spaceId)); +} + +/// +/// Request parameters for Remove Devices from a Space. +/// +[DataContract(Name = "removeDevicesRequest_request")] +public class RemoveDevicesRequest +{ +[JsonConstructorAttribute] +protected RemoveDevicesRequest() { } + +public RemoveDevicesRequest(List deviceIds = default, string spaceId = default) +{ +DeviceIds = deviceIds; +SpaceId = spaceId; +} + +/// +/// IDs of the devices that you want to remove from the space. +/// +[DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +/// +/// ID of the space from which you want to remove devices. +/// +[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Removes devices from a specific space. +/// +public void RemoveDevices(RemoveDevicesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/spaces/remove_devices", requestOptions); +} + +/// +/// Removes devices from a specific space. +/// +public void RemoveDevices(List deviceIds = default, string spaceId = default) +{ +RemoveDevices(new RemoveDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); +} + +/// +/// Removes devices from a specific space. +/// +public async Task RemoveDevicesAsync(RemoveDevicesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/spaces/remove_devices", requestOptions); +} + +/// +/// Removes devices from a specific space. +/// +public async Task RemoveDevicesAsync(List deviceIds = default, string spaceId = default) +{ +await RemoveDevicesAsync(new RemoveDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); +} + +/// +/// Request parameters for Update a Space. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(List? acsEntranceIds = default, UpdateRequestCustomerData? customerData = default, List? deviceIds = default, string? name = default, string? spaceId = default, string? spaceKey = default) +{ +AcsEntranceIds = acsEntranceIds; +CustomerData = customerData; +DeviceIds = deviceIds; +Name = name; +SpaceId = spaceId; +SpaceKey = spaceKey; +} + +/// +/// IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsEntranceIds { get; set; } + +/// +/// Reservation/stay-related defaults for the space. Only the keys you provide are updated; omit a key to leave it unchanged. Pass null on a key to clear it. +/// +[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] +public UpdateRequestCustomerData? CustomerData { get; set; } + +/// +/// IDs of the devices that you want to set for the space. If specified, this will replace all existing devices. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceIds { get; set; } + +/// +/// Name of the space. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// ID of the space that you want to update. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +/// +/// Unique key of the space that you want to update. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateRequestCustomerData_model")] +public class UpdateRequestCustomerData +{ +[JsonConstructorAttribute] +protected UpdateRequestCustomerData() { } + +public UpdateRequestCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) +{ +Address = address; +DefaultCheckinTime = defaultCheckinTime; +DefaultCheckoutTime = defaultCheckoutTime; +TimeZone = timeZone; +} + +/// +/// Postal address for the space. +/// +[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] +public string? Address { get; set; } + +/// +/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckinTime { get; set; } + +/// +/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckoutTime { get; set; } + +/// +/// IANA time zone for the space, e.g. America/Los_Angeles. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateResponse_response")] +public class UpdateResponse +{ +[JsonConstructorAttribute] +protected UpdateResponse() { } + +public UpdateResponse(Space space = default) +{ +Space = space; +} + +/// +/// OK +/// +[DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] +public Space Space { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates an existing space. +/// +public Space Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Patch("/spaces/update", requestOptions).EnsureData("/spaces/update").Space; +} + +/// +/// Updates an existing space. +/// +public Space Update(List? acsEntranceIds = default, UpdateRequestCustomerData? customerData = default, List? deviceIds = default, string? name = default, string? spaceId = default, string? spaceKey = default) +{ +return Update(new UpdateRequest(acsEntranceIds: acsEntranceIds, customerData: customerData, deviceIds: deviceIds, name: name, spaceId: spaceId, spaceKey: spaceKey)); +} + +/// +/// Updates an existing space. +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PatchAsync("/spaces/update", requestOptions)).EnsureData("/spaces/update").Space; +} + +/// +/// Updates an existing space. +/// +public async Task UpdateAsync(List? acsEntranceIds = default, UpdateRequestCustomerData? customerData = default, List? deviceIds = default, string? name = default, string? spaceId = default, string? spaceKey = default) +{ +return (await UpdateAsync(new UpdateRequest(acsEntranceIds: acsEntranceIds, customerData: customerData, deviceIds: deviceIds, name: name, spaceId: spaceId, spaceKey: spaceKey))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Spaces Spaces => new(this); - } +public partial class SeamClient +{ +public Api.Spaces Spaces => new(this); +} - public partial interface ISeamClient - { - public Api.Spaces Spaces { get; } - } +public partial interface ISeamClient +{ +public Api.Spaces Spaces { get; } +} } diff --git a/src/Seam/Api/SystemsAcs.cs b/src/Seam/Api/SystemsAcs.cs index 4960c1fc..99c34e1c 100644 --- a/src/Seam/Api/SystemsAcs.cs +++ b/src/Seam/Api/SystemsAcs.cs @@ -9,764 +9,661 @@ namespace Seam.Api { - public class SystemsAcs - { - private ISeamClient _seam; - - public SystemsAcs(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get an ACS System. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string acsSystemId = default) - { - AcsSystemId = acsSystemId; - } - - /// - /// ID of the access system that you want to get. - /// - [DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AcsSystem acsSystem = default) - { - AcsSystem = acsSystem; - } - - /// - /// OK - /// - [DataMember(Name = "acs_system", IsRequired = false, EmitDefaultValue = false)] - public AcsSystem AcsSystem { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - public AcsSystem Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/systems/get", requestOptions) - .EnsureData("/acs/systems/get") - .AcsSystem; - } - - /// - /// Returns a specified [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - public AcsSystem Get(string acsSystemId = default) - { - return Get(new GetRequest(acsSystemId: acsSystemId)); - } - - /// - /// Returns a specified [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/systems/get", requestOptions)) - .EnsureData("/acs/systems/get") - .AcsSystem; - } - - /// - /// Returns a specified [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - public async Task GetAsync(string acsSystemId = default) - { - return (await GetAsync(new GetRequest(acsSystemId: acsSystemId))); - } - - /// - /// Request parameters for List ACS Systems. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? connectedAccountId = default, - string? customerKey = default, - string? search = default - ) - { - ConnectedAccountId = connectedAccountId; - CustomerKey = customerKey; - Search = search; - } - - /// - /// ID of the connected account by which you want to filter the list of access systems. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Customer key for which you want to list access systems. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// String for which to search. Filters returned access systems to include all records that satisfy a partial match using `name` or `acs_system_id`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List acsSystems = default) - { - AcsSystems = acsSystems; - } - - /// - /// OK - /// - [DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] - public List AcsSystems { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems). - /// - /// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/systems/list", requestOptions) - .EnsureData("/acs/systems/list") - .AcsSystems; - } - - /// - /// Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems). - /// - /// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. - /// - public List List( - string? connectedAccountId = default, - string? customerKey = default, - string? search = default - ) - { - return List( - new ListRequest( - connectedAccountId: connectedAccountId, - customerKey: customerKey, - search: search - ) - ); - } - - /// - /// Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems). - /// - /// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/systems/list", requestOptions)) - .EnsureData("/acs/systems/list") - .AcsSystems; - } - - /// - /// Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems). - /// - /// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. - /// - public async Task> ListAsync( - string? connectedAccountId = default, - string? customerKey = default, - string? search = default - ) - { - return ( - await ListAsync( - new ListRequest( - connectedAccountId: connectedAccountId, - customerKey: customerKey, - search: search - ) - ) - ); - } - - /// - /// Request parameters for List Compatible Credential Manager ACS Systems. - /// - [DataContract(Name = "listCompatibleCredentialManagerAcsSystemsRequest_request")] - public class ListCompatibleCredentialManagerAcsSystemsRequest - { - [JsonConstructorAttribute] - protected ListCompatibleCredentialManagerAcsSystemsRequest() { } - - public ListCompatibleCredentialManagerAcsSystemsRequest(string acsSystemId = default) - { - AcsSystemId = acsSystemId; - } - - /// - /// ID of the access system for which you want to retrieve all compatible credential manager systems. - /// - [DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listCompatibleCredentialManagerAcsSystemsResponse_response")] - public class ListCompatibleCredentialManagerAcsSystemsResponse - { - [JsonConstructorAttribute] - protected ListCompatibleCredentialManagerAcsSystemsResponse() { } - - public ListCompatibleCredentialManagerAcsSystemsResponse( - List acsSystems = default - ) - { - AcsSystems = acsSystems; - } - - /// - /// OK - /// - [DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] - public List AcsSystems { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all credential manager systems that are compatible with a specified [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. - /// - public List ListCompatibleCredentialManagerAcsSystems( - ListCompatibleCredentialManagerAcsSystemsRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get( - "/acs/systems/list_compatible_credential_manager_acs_systems", - requestOptions - ) - .EnsureData("/acs/systems/list_compatible_credential_manager_acs_systems") - .AcsSystems; - } - - /// - /// Returns a list of all credential manager systems that are compatible with a specified [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. - /// - public List ListCompatibleCredentialManagerAcsSystems( - string acsSystemId = default - ) - { - return ListCompatibleCredentialManagerAcsSystems( - new ListCompatibleCredentialManagerAcsSystemsRequest(acsSystemId: acsSystemId) - ); - } - - /// - /// Returns a list of all credential manager systems that are compatible with a specified [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. - /// - public async Task> ListCompatibleCredentialManagerAcsSystemsAsync( - ListCompatibleCredentialManagerAcsSystemsRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/acs/systems/list_compatible_credential_manager_acs_systems", - requestOptions - ) - ) - .EnsureData("/acs/systems/list_compatible_credential_manager_acs_systems") - .AcsSystems; - } - - /// - /// Returns a list of all credential manager systems that are compatible with a specified [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. - /// - public async Task> ListCompatibleCredentialManagerAcsSystemsAsync( - string acsSystemId = default - ) - { - return ( - await ListCompatibleCredentialManagerAcsSystemsAsync( - new ListCompatibleCredentialManagerAcsSystemsRequest(acsSystemId: acsSystemId) - ) - ); - } - - /// - /// Request parameters for Report Devices. - /// - [DataContract(Name = "reportDevicesRequest_request")] - public class ReportDevicesRequest - { - [JsonConstructorAttribute] - protected ReportDevicesRequest() { } - - public ReportDevicesRequest( - List? acsEncoders = default, - List? acsEntrances = default, - string acsSystemId = default - ) - { - AcsEncoders = acsEncoders; - AcsEntrances = acsEntrances; - AcsSystemId = acsSystemId; - } - - /// - /// Array of ACS encoders to report - /// - [DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEncoders { get; set; } - - /// - /// Array of ACS entrances to report - /// - [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] - public List? AcsEntrances { get; set; } - - /// - /// ID of the ACS system to report resources for - /// - [DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "reportDevicesRequestAcsEncoders_model")] - public class ReportDevicesRequestAcsEncoders - { - [JsonConstructorAttribute] - protected ReportDevicesRequestAcsEncoders() { } - - public ReportDevicesRequestAcsEncoders( - ReportDevicesRequestAcsEncodersHotekMetadata? hotekMetadata = default, - bool? isRemoved = default - ) - { - HotekMetadata = hotekMetadata; - IsRemoved = isRemoved; - } - - /// - /// Hotek-specific metadata associated with the entrance. - /// - [DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] - public ReportDevicesRequestAcsEncodersHotekMetadata? HotekMetadata { get; set; } - - /// - /// Whether the encoder is removed - /// - [DataMember(Name = "is_removed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsRemoved { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "reportDevicesRequestAcsEncodersHotekMetadata_model")] - public class ReportDevicesRequestAcsEncodersHotekMetadata - { - [JsonConstructorAttribute] - protected ReportDevicesRequestAcsEncodersHotekMetadata() { } - - public ReportDevicesRequestAcsEncodersHotekMetadata(string? encoderNumber = default) - { - EncoderNumber = encoderNumber; - } - - /// - /// The encoder number determined by the USB port connection. - /// - [DataMember(Name = "encoder_number", IsRequired = false, EmitDefaultValue = false)] - public string? EncoderNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "reportDevicesRequestAcsEntrances_model")] - public class ReportDevicesRequestAcsEntrances - { - [JsonConstructorAttribute] - protected ReportDevicesRequestAcsEntrances() { } - - public ReportDevicesRequestAcsEntrances( - ReportDevicesRequestAcsEntrancesHotekMetadata? hotekMetadata = default, - bool? isRemoved = default - ) - { - HotekMetadata = hotekMetadata; - IsRemoved = isRemoved; - } - - /// - /// Hotek-specific metadata associated with the entrance. - /// - [DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] - public ReportDevicesRequestAcsEntrancesHotekMetadata? HotekMetadata { get; set; } - - /// - /// Whether the entrance is removed - /// - [DataMember(Name = "is_removed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsRemoved { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "reportDevicesRequestAcsEntrancesHotekMetadata_model")] - public class ReportDevicesRequestAcsEntrancesHotekMetadata - { - [JsonConstructorAttribute] - protected ReportDevicesRequestAcsEntrancesHotekMetadata() { } - - public ReportDevicesRequestAcsEntrancesHotekMetadata( - string? commonAreaName = default, - string? commonAreaNumber = default, - string? roomNumber = default - ) - { - CommonAreaName = commonAreaName; - CommonAreaNumber = commonAreaNumber; - RoomNumber = roomNumber; - } - - /// - /// The common area name - /// - [DataMember(Name = "common_area_name", IsRequired = false, EmitDefaultValue = false)] - public string? CommonAreaName { get; set; } - - /// - /// The room number identifier - /// - [DataMember(Name = "common_area_number", IsRequired = false, EmitDefaultValue = false)] - public string? CommonAreaNumber { get; set; } - - /// - /// The room number identifier - /// - [DataMember(Name = "room_number", IsRequired = false, EmitDefaultValue = false)] - public string? RoomNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Reports ACS system device status including encoders and entrances. - /// - public void ReportDevices(ReportDevicesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/acs/systems/report_devices", requestOptions); - } - - /// - /// Reports ACS system device status including encoders and entrances. - /// - public void ReportDevices( - List? acsEncoders = default, - List? acsEntrances = default, - string acsSystemId = default - ) - { - ReportDevices( - new ReportDevicesRequest( - acsEncoders: acsEncoders, - acsEntrances: acsEntrances, - acsSystemId: acsSystemId - ) - ); - } - - /// - /// Reports ACS system device status including encoders and entrances. - /// - public async Task ReportDevicesAsync(ReportDevicesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/acs/systems/report_devices", requestOptions); - } - - /// - /// Reports ACS system device status including encoders and entrances. - /// - public async Task ReportDevicesAsync( - List? acsEncoders = default, - List? acsEntrances = default, - string acsSystemId = default - ) - { - await ReportDevicesAsync( - new ReportDevicesRequest( - acsEncoders: acsEncoders, - acsEntrances: acsEntrances, - acsSystemId: acsSystemId - ) - ); - } - } +public class SystemsAcs +{ +private ISeamClient _seam; + +public SystemsAcs(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get an ACS System. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string acsSystemId = default) +{ +AcsSystemId = acsSystemId; +} + +/// +/// ID of the access system that you want to get. +/// +[DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AcsSystem acsSystem = default) +{ +AcsSystem = acsSystem; +} + +/// +/// OK +/// +[DataMember(Name = "acs_system", IsRequired = false, EmitDefaultValue = false)] +public AcsSystem AcsSystem { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +public AcsSystem Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/systems/get", requestOptions).EnsureData("/acs/systems/get").AcsSystem; +} + +/// +/// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +public AcsSystem Get(string acsSystemId = default) +{ +return Get(new GetRequest(acsSystemId: acsSystemId)); +} + +/// +/// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/systems/get", requestOptions)).EnsureData("/acs/systems/get").AcsSystem; +} + +/// +/// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +public async Task GetAsync(string acsSystemId = default) +{ +return (await GetAsync(new GetRequest(acsSystemId: acsSystemId))); +} + +/// +/// Request parameters for List ACS Systems. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? connectedAccountId = default, string? customerKey = default, string? search = default) +{ +ConnectedAccountId = connectedAccountId; +CustomerKey = customerKey; +Search = search; +} + +/// +/// ID of the connected account by which you want to filter the list of access systems. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Customer key for which you want to list access systems. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// String for which to search. Filters returned access systems to include all records that satisfy a partial match using `name` or `acs_system_id`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List acsSystems = default) +{ +AcsSystems = acsSystems; +} + +/// +/// OK +/// +[DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] +public List AcsSystems { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/systems/list", requestOptions).EnsureData("/acs/systems/list").AcsSystems; +} + +/// +/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. +/// +public List List(string? connectedAccountId = default, string? customerKey = default, string? search = default) +{ +return List(new ListRequest(connectedAccountId: connectedAccountId, customerKey: customerKey, search: search)); +} + +/// +/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/systems/list", requestOptions)).EnsureData("/acs/systems/list").AcsSystems; +} + +/// +/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. +/// +public async Task> ListAsync(string? connectedAccountId = default, string? customerKey = default, string? search = default) +{ +return (await ListAsync(new ListRequest(connectedAccountId: connectedAccountId, customerKey: customerKey, search: search))); +} + +/// +/// Request parameters for List Compatible Credential Manager ACS Systems. +/// +[DataContract(Name = "listCompatibleCredentialManagerAcsSystemsRequest_request")] +public class ListCompatibleCredentialManagerAcsSystemsRequest +{ +[JsonConstructorAttribute] +protected ListCompatibleCredentialManagerAcsSystemsRequest() { } + +public ListCompatibleCredentialManagerAcsSystemsRequest(string acsSystemId = default) +{ +AcsSystemId = acsSystemId; +} + +/// +/// ID of the access system for which you want to retrieve all compatible credential manager systems. +/// +[DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listCompatibleCredentialManagerAcsSystemsResponse_response")] +public class ListCompatibleCredentialManagerAcsSystemsResponse +{ +[JsonConstructorAttribute] +protected ListCompatibleCredentialManagerAcsSystemsResponse() { } + +public ListCompatibleCredentialManagerAcsSystemsResponse(List acsSystems = default) +{ +AcsSystems = acsSystems; +} + +/// +/// OK +/// +[DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] +public List AcsSystems { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. +/// +public List ListCompatibleCredentialManagerAcsSystems(ListCompatibleCredentialManagerAcsSystemsRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/systems/list_compatible_credential_manager_acs_systems", requestOptions).EnsureData("/acs/systems/list_compatible_credential_manager_acs_systems").AcsSystems; +} + +/// +/// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. +/// +public List ListCompatibleCredentialManagerAcsSystems(string acsSystemId = default) +{ +return ListCompatibleCredentialManagerAcsSystems(new ListCompatibleCredentialManagerAcsSystemsRequest(acsSystemId: acsSystemId)); +} + +/// +/// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. +/// +public async Task> ListCompatibleCredentialManagerAcsSystemsAsync(ListCompatibleCredentialManagerAcsSystemsRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/systems/list_compatible_credential_manager_acs_systems", requestOptions)).EnsureData("/acs/systems/list_compatible_credential_manager_acs_systems").AcsSystems; +} + +/// +/// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. +/// +public async Task> ListCompatibleCredentialManagerAcsSystemsAsync(string acsSystemId = default) +{ +return (await ListCompatibleCredentialManagerAcsSystemsAsync(new ListCompatibleCredentialManagerAcsSystemsRequest(acsSystemId: acsSystemId))); +} + +/// +/// Request parameters for Report Devices. +/// +[DataContract(Name = "reportDevicesRequest_request")] +public class ReportDevicesRequest +{ +[JsonConstructorAttribute] +protected ReportDevicesRequest() { } + +public ReportDevicesRequest(List? acsEncoders = default, List? acsEntrances = default, string acsSystemId = default) +{ +AcsEncoders = acsEncoders; +AcsEntrances = acsEntrances; +AcsSystemId = acsSystemId; +} + +/// +/// Array of ACS encoders to report +/// +[DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] +public List? AcsEncoders { get; set; } + +/// +/// Array of ACS entrances to report +/// +[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public List? AcsEntrances { get; set; } + +/// +/// ID of the ACS system to report resources for +/// +[DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "reportDevicesRequestAcsEncoders_model")] +public class ReportDevicesRequestAcsEncoders +{ +[JsonConstructorAttribute] +protected ReportDevicesRequestAcsEncoders() { } + +public ReportDevicesRequestAcsEncoders(ReportDevicesRequestAcsEncodersHotekMetadata? hotekMetadata = default, bool? isRemoved = default) +{ +HotekMetadata = hotekMetadata; +IsRemoved = isRemoved; +} + +/// +/// Hotek-specific metadata associated with the entrance. +/// +[DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] +public ReportDevicesRequestAcsEncodersHotekMetadata? HotekMetadata { get; set; } + +/// +/// Whether the encoder is removed +/// +[DataMember(Name = "is_removed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsRemoved { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "reportDevicesRequestAcsEncodersHotekMetadata_model")] +public class ReportDevicesRequestAcsEncodersHotekMetadata +{ +[JsonConstructorAttribute] +protected ReportDevicesRequestAcsEncodersHotekMetadata() { } + +public ReportDevicesRequestAcsEncodersHotekMetadata(string? encoderNumber = default) +{ +EncoderNumber = encoderNumber; +} + +/// +/// The encoder number determined by the USB port connection. +/// +[DataMember(Name = "encoder_number", IsRequired = false, EmitDefaultValue = false)] +public string? EncoderNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "reportDevicesRequestAcsEntrances_model")] +public class ReportDevicesRequestAcsEntrances +{ +[JsonConstructorAttribute] +protected ReportDevicesRequestAcsEntrances() { } + +public ReportDevicesRequestAcsEntrances(ReportDevicesRequestAcsEntrancesHotekMetadata? hotekMetadata = default, bool? isRemoved = default) +{ +HotekMetadata = hotekMetadata; +IsRemoved = isRemoved; +} + +/// +/// Hotek-specific metadata associated with the entrance. +/// +[DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] +public ReportDevicesRequestAcsEntrancesHotekMetadata? HotekMetadata { get; set; } + +/// +/// Whether the entrance is removed +/// +[DataMember(Name = "is_removed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsRemoved { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "reportDevicesRequestAcsEntrancesHotekMetadata_model")] +public class ReportDevicesRequestAcsEntrancesHotekMetadata +{ +[JsonConstructorAttribute] +protected ReportDevicesRequestAcsEntrancesHotekMetadata() { } + +public ReportDevicesRequestAcsEntrancesHotekMetadata(string? commonAreaName = default, string? commonAreaNumber = default, string? roomNumber = default) +{ +CommonAreaName = commonAreaName; +CommonAreaNumber = commonAreaNumber; +RoomNumber = roomNumber; +} + +/// +/// The common area name +/// +[DataMember(Name = "common_area_name", IsRequired = false, EmitDefaultValue = false)] +public string? CommonAreaName { get; set; } + +/// +/// The room number identifier +/// +[DataMember(Name = "common_area_number", IsRequired = false, EmitDefaultValue = false)] +public string? CommonAreaNumber { get; set; } + +/// +/// The room number identifier +/// +[DataMember(Name = "room_number", IsRequired = false, EmitDefaultValue = false)] +public string? RoomNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Reports ACS system device status including encoders and entrances. +/// +public void ReportDevices(ReportDevicesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/systems/report_devices", requestOptions); +} + +/// +/// Reports ACS system device status including encoders and entrances. +/// +public void ReportDevices(List? acsEncoders = default, List? acsEntrances = default, string acsSystemId = default) +{ +ReportDevices(new ReportDevicesRequest(acsEncoders: acsEncoders, acsEntrances: acsEntrances, acsSystemId: acsSystemId)); +} + +/// +/// Reports ACS system device status including encoders and entrances. +/// +public async Task ReportDevicesAsync(ReportDevicesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/systems/report_devices", requestOptions); +} + +/// +/// Reports ACS system device status including encoders and entrances. +/// +public async Task ReportDevicesAsync(List? acsEncoders = default, List? acsEntrances = default, string acsSystemId = default) +{ +await ReportDevicesAsync(new ReportDevicesRequest(acsEncoders: acsEncoders, acsEntrances: acsEntrances, acsSystemId: acsSystemId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.SystemsAcs SystemsAcs => new(this); - } +public partial class SeamClient +{ +public Api.SystemsAcs SystemsAcs => new(this); +} - public partial interface ISeamClient - { - public Api.SystemsAcs SystemsAcs { get; } - } +public partial interface ISeamClient +{ +public Api.SystemsAcs SystemsAcs { get; } +} } diff --git a/src/Seam/Api/Thermostats.cs b/src/Seam/Api/Thermostats.cs index 98c0cf12..33f3d3b5 100644 --- a/src/Seam/Api/Thermostats.cs +++ b/src/Seam/Api/Thermostats.cs @@ -9,2910 +9,2350 @@ namespace Seam.Api { - public class Thermostats - { - private ISeamClient _seam; - - public Thermostats(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Activate a Climate Preset. - /// - [DataContract(Name = "activateClimatePresetRequest_request")] - public class ActivateClimatePresetRequest - { - [JsonConstructorAttribute] - protected ActivateClimatePresetRequest() { } - - public ActivateClimatePresetRequest( - string climatePresetKey = default, - string deviceId = default - ) - { - ClimatePresetKey = climatePresetKey; - DeviceId = deviceId; - } - - /// - /// Climate preset key of the climate preset that you want to activate. - /// - [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// ID of the thermostat device for which you want to activate a climate preset. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "activateClimatePresetResponse_response")] - public class ActivateClimatePresetResponse - { - [JsonConstructorAttribute] - protected ActivateClimatePresetResponse() { } - - public ActivateClimatePresetResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Activates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public ActionAttempt ActivateClimatePreset(ActivateClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/thermostats/activate_climate_preset", - requestOptions - ) - .EnsureData("/thermostats/activate_climate_preset") - .ActionAttempt; - } - - /// - /// Activates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public ActionAttempt ActivateClimatePreset( - string climatePresetKey = default, - string deviceId = default - ) - { - return ActivateClimatePreset( - new ActivateClimatePresetRequest( - climatePresetKey: climatePresetKey, - deviceId: deviceId - ) - ); - } - - /// - /// Activates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task ActivateClimatePresetAsync( - ActivateClimatePresetRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/thermostats/activate_climate_preset", - requestOptions - ) - ) - .EnsureData("/thermostats/activate_climate_preset") - .ActionAttempt; - } - - /// - /// Activates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task ActivateClimatePresetAsync( - string climatePresetKey = default, - string deviceId = default - ) - { - return ( - await ActivateClimatePresetAsync( - new ActivateClimatePresetRequest( - climatePresetKey: climatePresetKey, - deviceId: deviceId - ) - ) - ); - } - - /// - /// Request parameters for Set to Cool Mode. - /// - [DataContract(Name = "coolRequest_request")] - public class CoolRequest - { - [JsonConstructorAttribute] - protected CoolRequest() { } - - public CoolRequest( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default - ) - { - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DeviceId = deviceId; - } - - /// - /// [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// ID of the thermostat device that you want to set to cool mode. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "coolResponse_response")] - public class CoolResponse - { - [JsonConstructorAttribute] - protected CoolResponse() { } - - public CoolResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [cool mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public ActionAttempt Cool(CoolRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/thermostats/cool", requestOptions) - .EnsureData("/thermostats/cool") - .ActionAttempt; - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [cool mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public ActionAttempt Cool( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default - ) - { - return Cool( - new CoolRequest( - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId - ) - ); - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [cool mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public async Task CoolAsync(CoolRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/thermostats/cool", requestOptions)) - .EnsureData("/thermostats/cool") - .ActionAttempt; - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [cool mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public async Task CoolAsync( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default - ) - { - return ( - await CoolAsync( - new CoolRequest( - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId - ) - ) - ); - } - - /// - /// Request parameters for Create a Climate Preset. - /// - [DataContract(Name = "createClimatePresetRequest_request")] - public class CreateClimatePresetRequest - { - [JsonConstructorAttribute] - protected CreateClimatePresetRequest() { } - - public CreateClimatePresetRequest( - string climatePresetKey = default, - CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, - CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, - bool? manualOverrideAllowed = default, - string? name = default - ) - { - ClimatePresetKey = climatePresetKey; - ClimatePresetMode = climatePresetMode; - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DeviceId = deviceId; - EcobeeMetadata = ecobeeMetadata; - FanModeSetting = fanModeSetting; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - HvacModeSetting = hvacModeSetting; - ManualOverrideAllowed = manualOverrideAllowed; - Name = name; - } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ClimatePresetModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "home")] - Home = 1, - - [EnumMember(Value = "away")] - Away = 2, - - [EnumMember(Value = "wake")] - Wake = 3, - - [EnumMember(Value = "sleep")] - Sleep = 4, - - [EnumMember(Value = "occupied")] - Occupied = 5, - - [EnumMember(Value = "unoccupied")] - Unoccupied = 6, - } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum HvacModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "heat")] - Heat = 2, - - [EnumMember(Value = "cool")] - Cool = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - - [EnumMember(Value = "eco")] - Eco = 5, - } - - /// - /// Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] - public CreateClimatePresetRequest.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// ID of the thermostat device for which you want create a climate preset. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Metadata specific to the Ecobee climate, if applicable. - /// - [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] - public CreateClimatePresetRequestEcobeeMetadata? EcobeeMetadata { get; set; } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public CreateClimatePresetRequest.FanModeSettingEnum? FanModeSetting { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public CreateClimatePresetRequest.HvacModeSettingEnum? HvacModeSetting { get; set; } - - /// - /// Indicates whether a person at the thermostat or using the API can change the thermostat's settings. - /// - [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] - [DataMember( - Name = "manual_override_allowed", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? ManualOverrideAllowed { get; set; } - - /// - /// User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createClimatePresetRequestEcobeeMetadata_model")] - public class CreateClimatePresetRequestEcobeeMetadata - { - [JsonConstructorAttribute] - protected CreateClimatePresetRequestEcobeeMetadata() { } - - public CreateClimatePresetRequestEcobeeMetadata( - string? climateRef = default, - bool? isOptimized = default, - CreateClimatePresetRequestEcobeeMetadata.OwnerEnum? owner = default - ) - { - ClimateRef = climateRef; - IsOptimized = isOptimized; - Owner = owner; - } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum OwnerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "user")] - User = 1, - - [EnumMember(Value = "system")] - System = 2, - } - - /// - /// Reference to the Ecobee climate, if applicable. - /// - [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] - public string? ClimateRef { get; set; } - - /// - /// Indicates if the climate preset is optimized by Ecobee. - /// - [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOptimized { get; set; } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] - public CreateClimatePresetRequestEcobeeMetadata.OwnerEnum? Owner { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void CreateClimatePreset(CreateClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/thermostats/create_climate_preset", requestOptions); - } - - /// - /// Creates a [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void CreateClimatePreset( - string climatePresetKey = default, - CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, - CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, - bool? manualOverrideAllowed = default, - string? name = default - ) - { - CreateClimatePreset( - new CreateClimatePresetRequest( - climatePresetKey: climatePresetKey, - climatePresetMode: climatePresetMode, - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - ecobeeMetadata: ecobeeMetadata, - fanModeSetting: fanModeSetting, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit, - hvacModeSetting: hvacModeSetting, - manualOverrideAllowed: manualOverrideAllowed, - name: name - ) - ); - } - - /// - /// Creates a [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task CreateClimatePresetAsync(CreateClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/thermostats/create_climate_preset", requestOptions); - } - - /// - /// Creates a [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task CreateClimatePresetAsync( - string climatePresetKey = default, - CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, - CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, - bool? manualOverrideAllowed = default, - string? name = default - ) - { - await CreateClimatePresetAsync( - new CreateClimatePresetRequest( - climatePresetKey: climatePresetKey, - climatePresetMode: climatePresetMode, - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - ecobeeMetadata: ecobeeMetadata, - fanModeSetting: fanModeSetting, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit, - hvacModeSetting: hvacModeSetting, - manualOverrideAllowed: manualOverrideAllowed, - name: name - ) - ); - } - - /// - /// Request parameters for Delete a Climate Preset. - /// - [DataContract(Name = "deleteClimatePresetRequest_request")] - public class DeleteClimatePresetRequest - { - [JsonConstructorAttribute] - protected DeleteClimatePresetRequest() { } - - public DeleteClimatePresetRequest( - string climatePresetKey = default, - string deviceId = default - ) - { - ClimatePresetKey = climatePresetKey; - DeviceId = deviceId; - } - - /// - /// Climate preset key of the climate preset that you want to delete. - /// - [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// ID of the thermostat device for which you want to delete a climate preset. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void DeleteClimatePreset(DeleteClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/thermostats/delete_climate_preset", requestOptions); - } - - /// - /// Deletes a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void DeleteClimatePreset( - string climatePresetKey = default, - string deviceId = default - ) - { - DeleteClimatePreset( - new DeleteClimatePresetRequest( - climatePresetKey: climatePresetKey, - deviceId: deviceId - ) - ); - } - - /// - /// Deletes a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task DeleteClimatePresetAsync(DeleteClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/thermostats/delete_climate_preset", requestOptions); - } - - /// - /// Deletes a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task DeleteClimatePresetAsync( - string climatePresetKey = default, - string deviceId = default - ) - { - await DeleteClimatePresetAsync( - new DeleteClimatePresetRequest( - climatePresetKey: climatePresetKey, - deviceId: deviceId - ) - ); - } - - /// - /// Request parameters for Set to Heat Mode. - /// - [DataContract(Name = "heatRequest_request")] - public class HeatRequest - { - [JsonConstructorAttribute] - protected HeatRequest() { } - - public HeatRequest( - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default - ) - { - DeviceId = deviceId; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - } - - /// - /// ID of the thermostat device that you want to set to heat mode. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "heatResponse_response")] - public class HeatResponse - { - [JsonConstructorAttribute] - protected HeatResponse() { } - - public HeatResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public ActionAttempt Heat(HeatRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/thermostats/heat", requestOptions) - .EnsureData("/thermostats/heat") - .ActionAttempt; - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public ActionAttempt Heat( - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default - ) - { - return Heat( - new HeatRequest( - deviceId: deviceId, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit - ) - ); - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public async Task HeatAsync(HeatRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/thermostats/heat", requestOptions)) - .EnsureData("/thermostats/heat") - .ActionAttempt; - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public async Task HeatAsync( - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default - ) - { - return ( - await HeatAsync( - new HeatRequest( - deviceId: deviceId, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit - ) - ) - ); - } - - /// - /// Request parameters for Set to Heat-Cool (Auto) Mode. - /// - [DataContract(Name = "heatCoolRequest_request")] - public class HeatCoolRequest - { - [JsonConstructorAttribute] - protected HeatCoolRequest() { } - - public HeatCoolRequest( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default - ) - { - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DeviceId = deviceId; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - } - - /// - /// [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// ID of the thermostat device that you want to set to heat-cool mode. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "heatCoolResponse_response")] - public class HeatCoolResponse - { - [JsonConstructorAttribute] - protected HeatCoolResponse() { } - - public HeatCoolResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat-cool ("auto") mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public ActionAttempt HeatCool(HeatCoolRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/thermostats/heat_cool", requestOptions) - .EnsureData("/thermostats/heat_cool") - .ActionAttempt; - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat-cool ("auto") mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public ActionAttempt HeatCool( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default - ) - { - return HeatCool( - new HeatCoolRequest( - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit - ) - ); - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat-cool ("auto") mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public async Task HeatCoolAsync(HeatCoolRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync("/thermostats/heat_cool", requestOptions) - ) - .EnsureData("/thermostats/heat_cool") - .ActionAttempt; - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat-cool ("auto") mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public async Task HeatCoolAsync( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default - ) - { - return ( - await HeatCoolAsync( - new HeatCoolRequest( - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit - ) - ) - ); - } - - /// - /// Request parameters for List Thermostats. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountId = connectedAccountId; - CustomerKey = customerKey; - DeviceType = deviceType; - DeviceTypes = deviceTypes; - Manufacturer = manufacturer; - } - - /// - /// Device type by which you want to filter thermostat devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 1, - - [EnumMember(Value = "nest_thermostat")] - NestThermostat = 2, - - [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 3, - - [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 4, - - [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 5, - - [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 6, - } - - /// - /// Array of device types by which you want to filter thermostat devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 1, - - [EnumMember(Value = "nest_thermostat")] - NestThermostat = 2, - - [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 3, - - [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 4, - - [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 5, - - [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 6, - } - - /// - /// Manufacturer by which you want to filter thermostat devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ManufacturerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "ecobee")] - Ecobee = 1, - - [EnumMember(Value = "honeywell_resideo")] - HoneywellResideo = 2, - - [EnumMember(Value = "nest")] - Nest = 3, - - [EnumMember(Value = "sensi")] - Sensi = 4, - - [EnumMember(Value = "smartthings")] - Smartthings = 5, - - [EnumMember(Value = "tado")] - Tado = 6, - } - - /// - /// ID of the Connect Webview for which you want to list devices. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectWebviewId { get; set; } - - /// - /// ID of the connected account for which you want to list devices. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Customer key for which you want to list devices. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Device type by which you want to filter thermostat devices. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - - /// - /// Array of device types by which you want to filter thermostat devices. - /// - [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceTypes { get; set; } - - /// - /// Manufacturer by which you want to filter thermostat devices. - /// - [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List devices = default) - { - Devices = devices; - } - - /// - /// OK - /// - [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] - public List Devices { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [thermostats](https://docs.seam.co/capability-guides/thermostats). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/thermostats/list", requestOptions) - .EnsureData("/thermostats/list") - .Devices; - } - - /// - /// Returns a list of all [thermostats](https://docs.seam.co/capability-guides/thermostats). - /// - public List List( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - return List( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - deviceType: deviceType, - deviceTypes: deviceTypes, - manufacturer: manufacturer - ) - ); - } - - /// - /// Returns a list of all [thermostats](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/thermostats/list", requestOptions)) - .EnsureData("/thermostats/list") - .Devices; - } - - /// - /// Returns a list of all [thermostats](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task> ListAsync( - string? connectWebviewId = default, - string? connectedAccountId = default, - string? customerKey = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - ListRequest.ManufacturerEnum? manufacturer = default - ) - { - return ( - await ListAsync( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - customerKey: customerKey, - deviceType: deviceType, - deviceTypes: deviceTypes, - manufacturer: manufacturer - ) - ) - ); - } - - /// - /// Request parameters for Set to Off Mode. - /// - [DataContract(Name = "offRequest_request")] - public class OffRequest - { - [JsonConstructorAttribute] - protected OffRequest() { } - - public OffRequest(string deviceId = default) - { - DeviceId = deviceId; - } - - /// - /// ID of the thermostat device that you want to set to off mode. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "offResponse_response")] - public class OffResponse - { - [JsonConstructorAttribute] - protected OffResponse() { } - - public OffResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to ["off" mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public ActionAttempt Off(OffRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/thermostats/off", requestOptions) - .EnsureData("/thermostats/off") - .ActionAttempt; - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to ["off" mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public ActionAttempt Off(string deviceId = default) - { - return Off(new OffRequest(deviceId: deviceId)); - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to ["off" mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public async Task OffAsync(OffRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/thermostats/off", requestOptions)) - .EnsureData("/thermostats/off") - .ActionAttempt; - } - - /// - /// Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to ["off" mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). - /// - public async Task OffAsync(string deviceId = default) - { - return (await OffAsync(new OffRequest(deviceId: deviceId))); - } - - /// - /// Request parameters for Set the Fallback Climate Preset. - /// - [DataContract(Name = "setFallbackClimatePresetRequest_request")] - public class SetFallbackClimatePresetRequest - { - [JsonConstructorAttribute] - protected SetFallbackClimatePresetRequest() { } - - public SetFallbackClimatePresetRequest( - string climatePresetKey = default, - string deviceId = default - ) - { - ClimatePresetKey = climatePresetKey; - DeviceId = deviceId; - } - - /// - /// Climate preset key of the climate preset that you want to set as the fallback climate preset. - /// - [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// ID of the thermostat device for which you want to set the fallback climate preset. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Sets a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void SetFallbackClimatePreset(SetFallbackClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/thermostats/set_fallback_climate_preset", requestOptions); - } - - /// - /// Sets a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void SetFallbackClimatePreset( - string climatePresetKey = default, - string deviceId = default - ) - { - SetFallbackClimatePreset( - new SetFallbackClimatePresetRequest( - climatePresetKey: climatePresetKey, - deviceId: deviceId - ) - ); - } - - /// - /// Sets a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task SetFallbackClimatePresetAsync(SetFallbackClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/thermostats/set_fallback_climate_preset", - requestOptions - ); - } - - /// - /// Sets a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task SetFallbackClimatePresetAsync( - string climatePresetKey = default, - string deviceId = default - ) - { - await SetFallbackClimatePresetAsync( - new SetFallbackClimatePresetRequest( - climatePresetKey: climatePresetKey, - deviceId: deviceId - ) - ); - } - - /// - /// Request parameters for Set the Fan Mode Setting. - /// - [DataContract(Name = "setFanModeRequest_request")] - public class SetFanModeRequest - { - [JsonConstructorAttribute] - protected SetFanModeRequest() { } - - public SetFanModeRequest( - string deviceId = default, - SetFanModeRequest.FanModeEnum? fanMode = default, - SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default - ) - { - DeviceId = deviceId; - FanMode = fanMode; - FanModeSetting = fanModeSetting; - } - - /// - /// Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// [Fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// ID of the thermostat device for which you want to set the fan mode. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. - /// - [Obsolete("Use `fan_mode_setting` instead.")] - [DataMember(Name = "fan_mode", IsRequired = false, EmitDefaultValue = false)] - public SetFanModeRequest.FanModeEnum? FanMode { get; set; } - - /// - /// [Fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. - /// - [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public SetFanModeRequest.FanModeSettingEnum? FanModeSetting { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "setFanModeResponse_response")] - public class SetFanModeResponse - { - [JsonConstructorAttribute] - protected SetFanModeResponse() { } - - public SetFanModeResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Sets the [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public ActionAttempt SetFanMode(SetFanModeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/thermostats/set_fan_mode", requestOptions) - .EnsureData("/thermostats/set_fan_mode") - .ActionAttempt; - } - - /// - /// Sets the [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public ActionAttempt SetFanMode( - string deviceId = default, - SetFanModeRequest.FanModeEnum? fanMode = default, - SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default - ) - { - return SetFanMode( - new SetFanModeRequest( - deviceId: deviceId, - fanMode: fanMode, - fanModeSetting: fanModeSetting - ) - ); - } - - /// - /// Sets the [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task SetFanModeAsync(SetFanModeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/thermostats/set_fan_mode", - requestOptions - ) - ) - .EnsureData("/thermostats/set_fan_mode") - .ActionAttempt; - } - - /// - /// Sets the [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task SetFanModeAsync( - string deviceId = default, - SetFanModeRequest.FanModeEnum? fanMode = default, - SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default - ) - { - return ( - await SetFanModeAsync( - new SetFanModeRequest( - deviceId: deviceId, - fanMode: fanMode, - fanModeSetting: fanModeSetting - ) - ) - ); - } - - /// - /// Request parameters for Set the HVAC Mode. - /// - [DataContract(Name = "setHvacModeRequest_request")] - public class SetHvacModeRequest - { - [JsonConstructorAttribute] - protected SetHvacModeRequest() { } - - public SetHvacModeRequest( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default - ) - { - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DeviceId = deviceId; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - HvacModeSetting = hvacModeSetting; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum HvacModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "cool")] - Cool = 2, - - [EnumMember(Value = "heat")] - Heat = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - - [EnumMember(Value = "eco")] - Eco = 5, - } - - /// - /// [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// ID of the thermostat device for which you want to set the HVAC mode. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - [DataMember(Name = "hvac_mode_setting", IsRequired = true, EmitDefaultValue = false)] - public SetHvacModeRequest.HvacModeSettingEnum HvacModeSetting { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "setHvacModeResponse_response")] - public class SetHvacModeResponse - { - [JsonConstructorAttribute] - protected SetHvacModeResponse() { } - - public SetHvacModeResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Sets the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public ActionAttempt SetHvacMode(SetHvacModeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/thermostats/set_hvac_mode", requestOptions) - .EnsureData("/thermostats/set_hvac_mode") - .ActionAttempt; - } - - /// - /// Sets the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public ActionAttempt SetHvacMode( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default - ) - { - return SetHvacMode( - new SetHvacModeRequest( - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit, - hvacModeSetting: hvacModeSetting - ) - ); - } - - /// - /// Sets the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task SetHvacModeAsync(SetHvacModeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/thermostats/set_hvac_mode", - requestOptions - ) - ) - .EnsureData("/thermostats/set_hvac_mode") - .ActionAttempt; - } - - /// - /// Sets the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task SetHvacModeAsync( - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default - ) - { - return ( - await SetHvacModeAsync( - new SetHvacModeRequest( - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit, - hvacModeSetting: hvacModeSetting - ) - ) - ); - } - - /// - /// Request parameters for Set a Temperature Threshold. - /// - [DataContract(Name = "setTemperatureThresholdRequest_request")] - public class SetTemperatureThresholdRequest - { - [JsonConstructorAttribute] - protected SetTemperatureThresholdRequest() { } - - public SetTemperatureThresholdRequest( - string deviceId = default, - float? lowerLimitCelsius = default, - float? lowerLimitFahrenheit = default, - float? upperLimitCelsius = default, - float? upperLimitFahrenheit = default - ) - { - DeviceId = deviceId; - LowerLimitCelsius = lowerLimitCelsius; - LowerLimitFahrenheit = lowerLimitFahrenheit; - UpperLimitCelsius = upperLimitCelsius; - UpperLimitFahrenheit = upperLimitFahrenheit; - } - - /// - /// ID of the thermostat device for which you want to set a temperature threshold. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Lower temperature limit in in °C. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. - /// - [DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? LowerLimitCelsius { get; set; } - - /// - /// Lower temperature limit in in °F. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. - /// - [DataMember( - Name = "lower_limit_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? LowerLimitFahrenheit { get; set; } - - /// - /// Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. - /// - [DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? UpperLimitCelsius { get; set; } - - /// - /// Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. - /// - [DataMember( - Name = "upper_limit_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? UpperLimitFahrenheit { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Sets a [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. - /// - public void SetTemperatureThreshold(SetTemperatureThresholdRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/thermostats/set_temperature_threshold", requestOptions); - } - - /// - /// Sets a [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. - /// - public void SetTemperatureThreshold( - string deviceId = default, - float? lowerLimitCelsius = default, - float? lowerLimitFahrenheit = default, - float? upperLimitCelsius = default, - float? upperLimitFahrenheit = default - ) - { - SetTemperatureThreshold( - new SetTemperatureThresholdRequest( - deviceId: deviceId, - lowerLimitCelsius: lowerLimitCelsius, - lowerLimitFahrenheit: lowerLimitFahrenheit, - upperLimitCelsius: upperLimitCelsius, - upperLimitFahrenheit: upperLimitFahrenheit - ) - ); - } - - /// - /// Sets a [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. - /// - public async Task SetTemperatureThresholdAsync(SetTemperatureThresholdRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync( - "/thermostats/set_temperature_threshold", - requestOptions - ); - } - - /// - /// Sets a [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. - /// - public async Task SetTemperatureThresholdAsync( - string deviceId = default, - float? lowerLimitCelsius = default, - float? lowerLimitFahrenheit = default, - float? upperLimitCelsius = default, - float? upperLimitFahrenheit = default - ) - { - await SetTemperatureThresholdAsync( - new SetTemperatureThresholdRequest( - deviceId: deviceId, - lowerLimitCelsius: lowerLimitCelsius, - lowerLimitFahrenheit: lowerLimitFahrenheit, - upperLimitCelsius: upperLimitCelsius, - upperLimitFahrenheit: upperLimitFahrenheit - ) - ); - } - - /// - /// Request parameters for Update a Climate Preset. - /// - [DataContract(Name = "updateClimatePresetRequest_request")] - public class UpdateClimatePresetRequest - { - [JsonConstructorAttribute] - protected UpdateClimatePresetRequest() { } - - public UpdateClimatePresetRequest( - string climatePresetKey = default, - UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, - UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, - bool? manualOverrideAllowed = default, - string? name = default - ) - { - ClimatePresetKey = climatePresetKey; - ClimatePresetMode = climatePresetMode; - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DeviceId = deviceId; - EcobeeMetadata = ecobeeMetadata; - FanModeSetting = fanModeSetting; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - HvacModeSetting = hvacModeSetting; - ManualOverrideAllowed = manualOverrideAllowed; - Name = name; - } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ClimatePresetModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "home")] - Home = 1, - - [EnumMember(Value = "away")] - Away = 2, - - [EnumMember(Value = "wake")] - Wake = 3, - - [EnumMember(Value = "sleep")] - Sleep = 4, - - [EnumMember(Value = "occupied")] - Occupied = 5, - - [EnumMember(Value = "unoccupied")] - Unoccupied = 6, - } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum HvacModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "heat")] - Heat = 2, - - [EnumMember(Value = "cool")] - Cool = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - - [EnumMember(Value = "eco")] - Eco = 5, - } - - /// - /// Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] - public UpdateClimatePresetRequest.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// ID of the thermostat device for which you want to update a climate preset. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Metadata specific to the Ecobee climate, if applicable. - /// - [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] - public UpdateClimatePresetRequestEcobeeMetadata? EcobeeMetadata { get; set; } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public UpdateClimatePresetRequest.FanModeSettingEnum? FanModeSetting { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public UpdateClimatePresetRequest.HvacModeSettingEnum? HvacModeSetting { get; set; } - - /// - /// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] - [DataMember( - Name = "manual_override_allowed", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? ManualOverrideAllowed { get; set; } - - /// - /// User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateClimatePresetRequestEcobeeMetadata_model")] - public class UpdateClimatePresetRequestEcobeeMetadata - { - [JsonConstructorAttribute] - protected UpdateClimatePresetRequestEcobeeMetadata() { } - - public UpdateClimatePresetRequestEcobeeMetadata( - string? climateRef = default, - bool? isOptimized = default, - UpdateClimatePresetRequestEcobeeMetadata.OwnerEnum? owner = default - ) - { - ClimateRef = climateRef; - IsOptimized = isOptimized; - Owner = owner; - } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum OwnerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "user")] - User = 1, - - [EnumMember(Value = "system")] - System = 2, - } - - /// - /// Reference to the Ecobee climate, if applicable. - /// - [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] - public string? ClimateRef { get; set; } - - /// - /// Indicates if the climate preset is optimized by Ecobee. - /// - [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOptimized { get; set; } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] - public UpdateClimatePresetRequestEcobeeMetadata.OwnerEnum? Owner { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void UpdateClimatePreset(UpdateClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/thermostats/update_climate_preset", requestOptions); - } - - /// - /// Updates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public void UpdateClimatePreset( - string climatePresetKey = default, - UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, - UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, - bool? manualOverrideAllowed = default, - string? name = default - ) - { - UpdateClimatePreset( - new UpdateClimatePresetRequest( - climatePresetKey: climatePresetKey, - climatePresetMode: climatePresetMode, - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - ecobeeMetadata: ecobeeMetadata, - fanModeSetting: fanModeSetting, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit, - hvacModeSetting: hvacModeSetting, - manualOverrideAllowed: manualOverrideAllowed, - name: name - ) - ); - } - - /// - /// Updates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task UpdateClimatePresetAsync(UpdateClimatePresetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/thermostats/update_climate_preset", requestOptions); - } - - /// - /// Updates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). - /// - public async Task UpdateClimatePresetAsync( - string climatePresetKey = default, - UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string deviceId = default, - UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, - UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, - bool? manualOverrideAllowed = default, - string? name = default - ) - { - await UpdateClimatePresetAsync( - new UpdateClimatePresetRequest( - climatePresetKey: climatePresetKey, - climatePresetMode: climatePresetMode, - coolingSetPointCelsius: coolingSetPointCelsius, - coolingSetPointFahrenheit: coolingSetPointFahrenheit, - deviceId: deviceId, - ecobeeMetadata: ecobeeMetadata, - fanModeSetting: fanModeSetting, - heatingSetPointCelsius: heatingSetPointCelsius, - heatingSetPointFahrenheit: heatingSetPointFahrenheit, - hvacModeSetting: hvacModeSetting, - manualOverrideAllowed: manualOverrideAllowed, - name: name - ) - ); - } - - /// - /// Request parameters for Update the Thermostat Weekly Program. - /// - [DataContract(Name = "updateWeeklyProgramRequest_request")] - public class UpdateWeeklyProgramRequest - { - [JsonConstructorAttribute] - protected UpdateWeeklyProgramRequest() { } - - public UpdateWeeklyProgramRequest( - string deviceId = default, - string? fridayProgramId = default, - string? mondayProgramId = default, - string? saturdayProgramId = default, - string? sundayProgramId = default, - string? thursdayProgramId = default, - string? tuesdayProgramId = default, - string? wednesdayProgramId = default - ) - { - DeviceId = deviceId; - FridayProgramId = fridayProgramId; - MondayProgramId = mondayProgramId; - SaturdayProgramId = saturdayProgramId; - SundayProgramId = sundayProgramId; - ThursdayProgramId = thursdayProgramId; - TuesdayProgramId = tuesdayProgramId; - WednesdayProgramId = wednesdayProgramId; - } - - /// - /// ID of the thermostat device for which you want to update the weekly program. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// ID of the thermostat daily program to run on Fridays. - /// - [DataMember(Name = "friday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? FridayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Mondays. - /// - [DataMember(Name = "monday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? MondayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Saturdays. - /// - [DataMember(Name = "saturday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? SaturdayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Sundays. - /// - [DataMember(Name = "sunday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? SundayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Thursdays. - /// - [DataMember(Name = "thursday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? ThursdayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Tuesdays. - /// - [DataMember(Name = "tuesday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? TuesdayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Wednesdays. - /// - [DataMember( - Name = "wednesday_program_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? WednesdayProgramId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateWeeklyProgramResponse_response")] - public class UpdateWeeklyProgramResponse - { - [JsonConstructorAttribute] - protected UpdateWeeklyProgramResponse() { } - - public UpdateWeeklyProgramResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. - /// - public ActionAttempt UpdateWeeklyProgram(UpdateWeeklyProgramRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/thermostats/update_weekly_program", - requestOptions - ) - .EnsureData("/thermostats/update_weekly_program") - .ActionAttempt; - } - - /// - /// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. - /// - public ActionAttempt UpdateWeeklyProgram( - string deviceId = default, - string? fridayProgramId = default, - string? mondayProgramId = default, - string? saturdayProgramId = default, - string? sundayProgramId = default, - string? thursdayProgramId = default, - string? tuesdayProgramId = default, - string? wednesdayProgramId = default - ) - { - return UpdateWeeklyProgram( - new UpdateWeeklyProgramRequest( - deviceId: deviceId, - fridayProgramId: fridayProgramId, - mondayProgramId: mondayProgramId, - saturdayProgramId: saturdayProgramId, - sundayProgramId: sundayProgramId, - thursdayProgramId: thursdayProgramId, - tuesdayProgramId: tuesdayProgramId, - wednesdayProgramId: wednesdayProgramId - ) - ); - } - - /// - /// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. - /// - public async Task UpdateWeeklyProgramAsync( - UpdateWeeklyProgramRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/thermostats/update_weekly_program", - requestOptions - ) - ) - .EnsureData("/thermostats/update_weekly_program") - .ActionAttempt; - } - - /// - /// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. - /// - public async Task UpdateWeeklyProgramAsync( - string deviceId = default, - string? fridayProgramId = default, - string? mondayProgramId = default, - string? saturdayProgramId = default, - string? sundayProgramId = default, - string? thursdayProgramId = default, - string? tuesdayProgramId = default, - string? wednesdayProgramId = default - ) - { - return ( - await UpdateWeeklyProgramAsync( - new UpdateWeeklyProgramRequest( - deviceId: deviceId, - fridayProgramId: fridayProgramId, - mondayProgramId: mondayProgramId, - saturdayProgramId: saturdayProgramId, - sundayProgramId: sundayProgramId, - thursdayProgramId: thursdayProgramId, - tuesdayProgramId: tuesdayProgramId, - wednesdayProgramId: wednesdayProgramId - ) - ) - ); - } - } +public class Thermostats +{ +private ISeamClient _seam; + +public Thermostats(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Activate a Climate Preset. +/// +[DataContract(Name = "activateClimatePresetRequest_request")] +public class ActivateClimatePresetRequest +{ +[JsonConstructorAttribute] +protected ActivateClimatePresetRequest() { } + +public ActivateClimatePresetRequest(string climatePresetKey = default, string deviceId = default) +{ +ClimatePresetKey = climatePresetKey; +DeviceId = deviceId; +} + +/// +/// Climate preset key of the climate preset that you want to activate. +/// +[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// ID of the thermostat device for which you want to activate a climate preset. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "activateClimatePresetResponse_response")] +public class ActivateClimatePresetResponse +{ +[JsonConstructorAttribute] +protected ActivateClimatePresetResponse() { } + +public ActivateClimatePresetResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public ActionAttempt ActivateClimatePreset(ActivateClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/activate_climate_preset", requestOptions).EnsureData("/thermostats/activate_climate_preset").ActionAttempt; +} + +/// +/// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public ActionAttempt ActivateClimatePreset(string climatePresetKey = default, string deviceId = default) +{ +return ActivateClimatePreset(new ActivateClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); +} + +/// +/// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task ActivateClimatePresetAsync(ActivateClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/activate_climate_preset", requestOptions)).EnsureData("/thermostats/activate_climate_preset").ActionAttempt; +} + +/// +/// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task ActivateClimatePresetAsync(string climatePresetKey = default, string deviceId = default) +{ +return (await ActivateClimatePresetAsync(new ActivateClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId))); +} + +/// +/// Request parameters for Activate the Weekly Program. +/// +[DataContract(Name = "activateWeeklyProgramRequest_request")] +public class ActivateWeeklyProgramRequest +{ +[JsonConstructorAttribute] +protected ActivateWeeklyProgramRequest() { } + +public ActivateWeeklyProgramRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the thermostat device that you want to return to its weekly program. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "activateWeeklyProgramResponse_response")] +public class ActivateWeeklyProgramResponse +{ +[JsonConstructorAttribute] +protected ActivateWeeklyProgramResponse() { } + +public ActivateWeeklyProgramResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. +/// +public ActionAttempt ActivateWeeklyProgram(ActivateWeeklyProgramRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/activate_weekly_program", requestOptions).EnsureData("/thermostats/activate_weekly_program").ActionAttempt; +} + +/// +/// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. +/// +public ActionAttempt ActivateWeeklyProgram(string deviceId = default) +{ +return ActivateWeeklyProgram(new ActivateWeeklyProgramRequest(deviceId: deviceId)); +} + +/// +/// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. +/// +public async Task ActivateWeeklyProgramAsync(ActivateWeeklyProgramRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/activate_weekly_program", requestOptions)).EnsureData("/thermostats/activate_weekly_program").ActionAttempt; +} + +/// +/// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. +/// +public async Task ActivateWeeklyProgramAsync(string deviceId = default) +{ +return (await ActivateWeeklyProgramAsync(new ActivateWeeklyProgramRequest(deviceId: deviceId))); +} + +/// +/// Request parameters for Set to Cool Mode. +/// +[DataContract(Name = "coolRequest_request")] +public class CoolRequest +{ +[JsonConstructorAttribute] +protected CoolRequest() { } + +public CoolRequest(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default) +{ +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DeviceId = deviceId; +} + +/// +/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// ID of the thermostat device that you want to set to cool mode. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "coolResponse_response")] +public class CoolResponse +{ +[JsonConstructorAttribute] +protected CoolResponse() { } + +public CoolResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public ActionAttempt Cool(CoolRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/cool", requestOptions).EnsureData("/thermostats/cool").ActionAttempt; +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public ActionAttempt Cool(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default) +{ +return Cool(new CoolRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId)); +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public async Task CoolAsync(CoolRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/cool", requestOptions)).EnsureData("/thermostats/cool").ActionAttempt; +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public async Task CoolAsync(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default) +{ +return (await CoolAsync(new CoolRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId))); +} + +/// +/// Request parameters for Create a Climate Preset. +/// +[DataContract(Name = "createClimatePresetRequest_request")] +public class CreateClimatePresetRequest +{ +[JsonConstructorAttribute] +protected CreateClimatePresetRequest() { } + +public CreateClimatePresetRequest(string climatePresetKey = default, CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) +{ +ClimatePresetKey = climatePresetKey; +ClimatePresetMode = climatePresetMode; +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DeviceId = deviceId; +EcobeeMetadata = ecobeeMetadata; +FanModeSetting = fanModeSetting; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +HvacModeSetting = hvacModeSetting; +ManualOverrideAllowed = manualOverrideAllowed; +Name = name; +} + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ClimatePresetModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "home")] +Home = 1, + +[EnumMember(Value = "away")] +Away = 2, + +[EnumMember(Value = "wake")] +Wake = 3, + +[EnumMember(Value = "sleep")] +Sleep = 4, + +[EnumMember(Value = "occupied")] +Occupied = 5, + +[EnumMember(Value = "unoccupied")] +Unoccupied = 6, +} + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum HvacModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, + +[EnumMember(Value = "heat")] +Heat = 2, + +[EnumMember(Value = "cool")] +Cool = 3, + +[EnumMember(Value = "heat_cool")] +HeatCool = 4, + +[EnumMember(Value = "eco")] +Eco = 5, +} + +/// +/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] +public CreateClimatePresetRequest.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// ID of the thermostat device for which you want create a climate preset. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Metadata specific to the Ecobee climate, if applicable. +/// +[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] +public CreateClimatePresetRequestEcobeeMetadata? EcobeeMetadata { get; set; } + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public CreateClimatePresetRequest.FanModeSettingEnum? FanModeSetting { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public CreateClimatePresetRequest.HvacModeSettingEnum? HvacModeSetting { get; set; } + +/// +/// Indicates whether a person at the thermostat or using the API can change the thermostat's settings. +/// +[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] +[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? ManualOverrideAllowed { get; set; } + +/// +/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createClimatePresetRequestEcobeeMetadata_model")] +public class CreateClimatePresetRequestEcobeeMetadata +{ +[JsonConstructorAttribute] +protected CreateClimatePresetRequestEcobeeMetadata() { } + +public CreateClimatePresetRequestEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, CreateClimatePresetRequestEcobeeMetadata.OwnerEnum? owner = default) +{ +ClimateRef = climateRef; +IsOptimized = isOptimized; +Owner = owner; +} + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum OwnerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "user")] +User = 1, + +[EnumMember(Value = "system")] +System = 2, +} + +/// +/// Reference to the Ecobee climate, if applicable. +/// +[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] +public string? ClimateRef { get; set; } + +/// +/// Indicates if the climate preset is optimized by Ecobee. +/// +[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOptimized { get; set; } + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] +public CreateClimatePresetRequestEcobeeMetadata.OwnerEnum? Owner { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void CreateClimatePreset(CreateClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/thermostats/create_climate_preset", requestOptions); +} + +/// +/// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void CreateClimatePreset(string climatePresetKey = default, CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) +{ +CreateClimatePreset(new CreateClimatePresetRequest(climatePresetKey: climatePresetKey, climatePresetMode: climatePresetMode, coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, ecobeeMetadata: ecobeeMetadata, fanModeSetting: fanModeSetting, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting, manualOverrideAllowed: manualOverrideAllowed, name: name)); +} + +/// +/// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task CreateClimatePresetAsync(CreateClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/thermostats/create_climate_preset", requestOptions); +} + +/// +/// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task CreateClimatePresetAsync(string climatePresetKey = default, CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) +{ +await CreateClimatePresetAsync(new CreateClimatePresetRequest(climatePresetKey: climatePresetKey, climatePresetMode: climatePresetMode, coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, ecobeeMetadata: ecobeeMetadata, fanModeSetting: fanModeSetting, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting, manualOverrideAllowed: manualOverrideAllowed, name: name)); +} + +/// +/// Request parameters for Delete a Climate Preset. +/// +[DataContract(Name = "deleteClimatePresetRequest_request")] +public class DeleteClimatePresetRequest +{ +[JsonConstructorAttribute] +protected DeleteClimatePresetRequest() { } + +public DeleteClimatePresetRequest(string climatePresetKey = default, string deviceId = default) +{ +ClimatePresetKey = climatePresetKey; +DeviceId = deviceId; +} + +/// +/// Climate preset key of the climate preset that you want to delete. +/// +[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// ID of the thermostat device for which you want to delete a climate preset. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void DeleteClimatePreset(DeleteClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/thermostats/delete_climate_preset", requestOptions); +} + +/// +/// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void DeleteClimatePreset(string climatePresetKey = default, string deviceId = default) +{ +DeleteClimatePreset(new DeleteClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); +} + +/// +/// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task DeleteClimatePresetAsync(DeleteClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/thermostats/delete_climate_preset", requestOptions); +} + +/// +/// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task DeleteClimatePresetAsync(string climatePresetKey = default, string deviceId = default) +{ +await DeleteClimatePresetAsync(new DeleteClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); +} + +/// +/// Request parameters for Set to Heat Mode. +/// +[DataContract(Name = "heatRequest_request")] +public class HeatRequest +{ +[JsonConstructorAttribute] +protected HeatRequest() { } + +public HeatRequest(string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) +{ +DeviceId = deviceId; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +} + +/// +/// ID of the thermostat device that you want to set to heat mode. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "heatResponse_response")] +public class HeatResponse +{ +[JsonConstructorAttribute] +protected HeatResponse() { } + +public HeatResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public ActionAttempt Heat(HeatRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/heat", requestOptions).EnsureData("/thermostats/heat").ActionAttempt; +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public ActionAttempt Heat(string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) +{ +return Heat(new HeatRequest(deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit)); +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public async Task HeatAsync(HeatRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/heat", requestOptions)).EnsureData("/thermostats/heat").ActionAttempt; +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public async Task HeatAsync(string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) +{ +return (await HeatAsync(new HeatRequest(deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit))); +} + +/// +/// Request parameters for Set to Heat-Cool (Auto) Mode. +/// +[DataContract(Name = "heatCoolRequest_request")] +public class HeatCoolRequest +{ +[JsonConstructorAttribute] +protected HeatCoolRequest() { } + +public HeatCoolRequest(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) +{ +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DeviceId = deviceId; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +} + +/// +/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// ID of the thermostat device that you want to set to heat-cool mode. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "heatCoolResponse_response")] +public class HeatCoolResponse +{ +[JsonConstructorAttribute] +protected HeatCoolResponse() { } + +public HeatCoolResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public ActionAttempt HeatCool(HeatCoolRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/heat_cool", requestOptions).EnsureData("/thermostats/heat_cool").ActionAttempt; +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public ActionAttempt HeatCool(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) +{ +return HeatCool(new HeatCoolRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit)); +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public async Task HeatCoolAsync(HeatCoolRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/heat_cool", requestOptions)).EnsureData("/thermostats/heat_cool").ActionAttempt; +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public async Task HeatCoolAsync(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) +{ +return (await HeatCoolAsync(new HeatCoolRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit))); +} + +/// +/// Request parameters for List Thermostats. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountId = connectedAccountId; +CustomerKey = customerKey; +DeviceType = deviceType; +DeviceTypes = deviceTypes; +Manufacturer = manufacturer; +} + +/// +/// Device type by which you want to filter thermostat devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "ecobee_thermostat")] +EcobeeThermostat = 1, + +[EnumMember(Value = "nest_thermostat")] +NestThermostat = 2, + +[EnumMember(Value = "honeywell_resideo_thermostat")] +HoneywellResideoThermostat = 3, + +[EnumMember(Value = "tado_thermostat")] +TadoThermostat = 4, + +[EnumMember(Value = "sensi_thermostat")] +SensiThermostat = 5, + +[EnumMember(Value = "smartthings_thermostat")] +SmartthingsThermostat = 6, +} + +/// +/// Array of device types by which you want to filter thermostat devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "ecobee_thermostat")] +EcobeeThermostat = 1, + +[EnumMember(Value = "nest_thermostat")] +NestThermostat = 2, + +[EnumMember(Value = "honeywell_resideo_thermostat")] +HoneywellResideoThermostat = 3, + +[EnumMember(Value = "tado_thermostat")] +TadoThermostat = 4, + +[EnumMember(Value = "sensi_thermostat")] +SensiThermostat = 5, + +[EnumMember(Value = "smartthings_thermostat")] +SmartthingsThermostat = 6, +} + +/// +/// Manufacturer by which you want to filter thermostat devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ManufacturerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "ecobee")] +Ecobee = 1, + +[EnumMember(Value = "honeywell_resideo")] +HoneywellResideo = 2, + +[EnumMember(Value = "nest")] +Nest = 3, + +[EnumMember(Value = "sensi")] +Sensi = 4, + +[EnumMember(Value = "smartthings")] +Smartthings = 5, + +[EnumMember(Value = "tado")] +Tado = 6, +} + +/// +/// ID of the Connect Webview for which you want to list devices. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectWebviewId { get; set; } + +/// +/// ID of the connected account for which you want to list devices. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Customer key for which you want to list devices. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Device type by which you want to filter thermostat devices. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + +/// +/// Array of device types by which you want to filter thermostat devices. +/// +[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceTypes { get; set; } + +/// +/// Manufacturer by which you want to filter thermostat devices. +/// +[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List devices = default) +{ +Devices = devices; +} + +/// +/// OK +/// +[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] +public List Devices { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/thermostats/list", requestOptions).EnsureData("/thermostats/list").Devices; +} + +/// +/// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). +/// +public List List(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer)); +} + +/// +/// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/thermostats/list", requestOptions)).EnsureData("/thermostats/list").Devices; +} + +/// +/// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) +{ +return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer))); +} + +/// +/// Request parameters for Set to Off Mode. +/// +[DataContract(Name = "offRequest_request")] +public class OffRequest +{ +[JsonConstructorAttribute] +protected OffRequest() { } + +public OffRequest(string deviceId = default) +{ +DeviceId = deviceId; +} + +/// +/// ID of the thermostat device that you want to set to off mode. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "offResponse_response")] +public class OffResponse +{ +[JsonConstructorAttribute] +protected OffResponse() { } + +public OffResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public ActionAttempt Off(OffRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/off", requestOptions).EnsureData("/thermostats/off").ActionAttempt; +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public ActionAttempt Off(string deviceId = default) +{ +return Off(new OffRequest(deviceId: deviceId)); +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public async Task OffAsync(OffRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/off", requestOptions)).EnsureData("/thermostats/off").ActionAttempt; +} + +/// +/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). +/// +public async Task OffAsync(string deviceId = default) +{ +return (await OffAsync(new OffRequest(deviceId: deviceId))); +} + +/// +/// Request parameters for Set the Fallback Climate Preset. +/// +[DataContract(Name = "setFallbackClimatePresetRequest_request")] +public class SetFallbackClimatePresetRequest +{ +[JsonConstructorAttribute] +protected SetFallbackClimatePresetRequest() { } + +public SetFallbackClimatePresetRequest(string climatePresetKey = default, string deviceId = default) +{ +ClimatePresetKey = climatePresetKey; +DeviceId = deviceId; +} + +/// +/// Climate preset key of the climate preset that you want to set as the fallback climate preset. +/// +[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// ID of the thermostat device for which you want to set the fallback climate preset. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void SetFallbackClimatePreset(SetFallbackClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/thermostats/set_fallback_climate_preset", requestOptions); +} + +/// +/// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void SetFallbackClimatePreset(string climatePresetKey = default, string deviceId = default) +{ +SetFallbackClimatePreset(new SetFallbackClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); +} + +/// +/// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task SetFallbackClimatePresetAsync(SetFallbackClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/thermostats/set_fallback_climate_preset", requestOptions); +} + +/// +/// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task SetFallbackClimatePresetAsync(string climatePresetKey = default, string deviceId = default) +{ +await SetFallbackClimatePresetAsync(new SetFallbackClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); +} + +/// +/// Request parameters for Set the Fan Mode Setting. +/// +[DataContract(Name = "setFanModeRequest_request")] +public class SetFanModeRequest +{ +[JsonConstructorAttribute] +protected SetFanModeRequest() { } + +public SetFanModeRequest(string deviceId = default, SetFanModeRequest.FanModeEnum? fanMode = default, SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default) +{ +DeviceId = deviceId; +FanMode = fanMode; +FanModeSetting = fanModeSetting; +} + +/// +/// Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// [Fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// ID of the thermostat device for which you want to set the fan mode. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. +/// +[Obsolete("Use `fan_mode_setting` instead.")] +[DataMember(Name = "fan_mode", IsRequired = false, EmitDefaultValue = false)] +public SetFanModeRequest.FanModeEnum? FanMode { get; set; } + +/// +/// [Fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. +/// +[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public SetFanModeRequest.FanModeSettingEnum? FanModeSetting { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "setFanModeResponse_response")] +public class SetFanModeResponse +{ +[JsonConstructorAttribute] +protected SetFanModeResponse() { } + +public SetFanModeResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public ActionAttempt SetFanMode(SetFanModeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/set_fan_mode", requestOptions).EnsureData("/thermostats/set_fan_mode").ActionAttempt; +} + +/// +/// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public ActionAttempt SetFanMode(string deviceId = default, SetFanModeRequest.FanModeEnum? fanMode = default, SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default) +{ +return SetFanMode(new SetFanModeRequest(deviceId: deviceId, fanMode: fanMode, fanModeSetting: fanModeSetting)); +} + +/// +/// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task SetFanModeAsync(SetFanModeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/set_fan_mode", requestOptions)).EnsureData("/thermostats/set_fan_mode").ActionAttempt; +} + +/// +/// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task SetFanModeAsync(string deviceId = default, SetFanModeRequest.FanModeEnum? fanMode = default, SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default) +{ +return (await SetFanModeAsync(new SetFanModeRequest(deviceId: deviceId, fanMode: fanMode, fanModeSetting: fanModeSetting))); +} + +/// +/// Request parameters for Set the HVAC Mode. +/// +[DataContract(Name = "setHvacModeRequest_request")] +public class SetHvacModeRequest +{ +[JsonConstructorAttribute] +protected SetHvacModeRequest() { } + +public SetHvacModeRequest(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default) +{ +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DeviceId = deviceId; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +HvacModeSetting = hvacModeSetting; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum HvacModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, + +[EnumMember(Value = "cool")] +Cool = 2, + +[EnumMember(Value = "heat")] +Heat = 3, + +[EnumMember(Value = "heat_cool")] +HeatCool = 4, + +[EnumMember(Value = "eco")] +Eco = 5, +} + +/// +/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// ID of the thermostat device for which you want to set the HVAC mode. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +[DataMember(Name = "hvac_mode_setting", IsRequired = true, EmitDefaultValue = false)] +public SetHvacModeRequest.HvacModeSettingEnum HvacModeSetting { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "setHvacModeResponse_response")] +public class SetHvacModeResponse +{ +[JsonConstructorAttribute] +protected SetHvacModeResponse() { } + +public SetHvacModeResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public ActionAttempt SetHvacMode(SetHvacModeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/set_hvac_mode", requestOptions).EnsureData("/thermostats/set_hvac_mode").ActionAttempt; +} + +/// +/// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public ActionAttempt SetHvacMode(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default) +{ +return SetHvacMode(new SetHvacModeRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting)); +} + +/// +/// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task SetHvacModeAsync(SetHvacModeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/set_hvac_mode", requestOptions)).EnsureData("/thermostats/set_hvac_mode").ActionAttempt; +} + +/// +/// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task SetHvacModeAsync(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default) +{ +return (await SetHvacModeAsync(new SetHvacModeRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting))); +} + +/// +/// Request parameters for Set a Temperature Threshold. +/// +[DataContract(Name = "setTemperatureThresholdRequest_request")] +public class SetTemperatureThresholdRequest +{ +[JsonConstructorAttribute] +protected SetTemperatureThresholdRequest() { } + +public SetTemperatureThresholdRequest(string deviceId = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default) +{ +DeviceId = deviceId; +LowerLimitCelsius = lowerLimitCelsius; +LowerLimitFahrenheit = lowerLimitFahrenheit; +UpperLimitCelsius = upperLimitCelsius; +UpperLimitFahrenheit = upperLimitFahrenheit; +} + +/// +/// ID of the thermostat device for which you want to set a temperature threshold. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Lower temperature limit in in °C. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. +/// +[DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? LowerLimitCelsius { get; set; } + +/// +/// Lower temperature limit in in °F. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. +/// +[DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? LowerLimitFahrenheit { get; set; } + +/// +/// Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. +/// +[DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? UpperLimitCelsius { get; set; } + +/// +/// Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. +/// +[DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? UpperLimitFahrenheit { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. +/// +public void SetTemperatureThreshold(SetTemperatureThresholdRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/thermostats/set_temperature_threshold", requestOptions); +} + +/// +/// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. +/// +public void SetTemperatureThreshold(string deviceId = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default) +{ +SetTemperatureThreshold(new SetTemperatureThresholdRequest(deviceId: deviceId, lowerLimitCelsius: lowerLimitCelsius, lowerLimitFahrenheit: lowerLimitFahrenheit, upperLimitCelsius: upperLimitCelsius, upperLimitFahrenheit: upperLimitFahrenheit)); +} + +/// +/// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. +/// +public async Task SetTemperatureThresholdAsync(SetTemperatureThresholdRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/thermostats/set_temperature_threshold", requestOptions); +} + +/// +/// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. +/// +public async Task SetTemperatureThresholdAsync(string deviceId = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default) +{ +await SetTemperatureThresholdAsync(new SetTemperatureThresholdRequest(deviceId: deviceId, lowerLimitCelsius: lowerLimitCelsius, lowerLimitFahrenheit: lowerLimitFahrenheit, upperLimitCelsius: upperLimitCelsius, upperLimitFahrenheit: upperLimitFahrenheit)); +} + +/// +/// Request parameters for Update a Climate Preset. +/// +[DataContract(Name = "updateClimatePresetRequest_request")] +public class UpdateClimatePresetRequest +{ +[JsonConstructorAttribute] +protected UpdateClimatePresetRequest() { } + +public UpdateClimatePresetRequest(string climatePresetKey = default, UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) +{ +ClimatePresetKey = climatePresetKey; +ClimatePresetMode = climatePresetMode; +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DeviceId = deviceId; +EcobeeMetadata = ecobeeMetadata; +FanModeSetting = fanModeSetting; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +HvacModeSetting = hvacModeSetting; +ManualOverrideAllowed = manualOverrideAllowed; +Name = name; +} + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ClimatePresetModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "home")] +Home = 1, + +[EnumMember(Value = "away")] +Away = 2, + +[EnumMember(Value = "wake")] +Wake = 3, + +[EnumMember(Value = "sleep")] +Sleep = 4, + +[EnumMember(Value = "occupied")] +Occupied = 5, + +[EnumMember(Value = "unoccupied")] +Unoccupied = 6, +} + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum HvacModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, + +[EnumMember(Value = "heat")] +Heat = 2, + +[EnumMember(Value = "cool")] +Cool = 3, + +[EnumMember(Value = "heat_cool")] +HeatCool = 4, + +[EnumMember(Value = "eco")] +Eco = 5, +} + +/// +/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] +public UpdateClimatePresetRequest.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// ID of the thermostat device for which you want to update a climate preset. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Metadata specific to the Ecobee climate, if applicable. +/// +[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] +public UpdateClimatePresetRequestEcobeeMetadata? EcobeeMetadata { get; set; } + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public UpdateClimatePresetRequest.FanModeSettingEnum? FanModeSetting { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public UpdateClimatePresetRequest.HvacModeSettingEnum? HvacModeSetting { get; set; } + +/// +/// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] +[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? ManualOverrideAllowed { get; set; } + +/// +/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateClimatePresetRequestEcobeeMetadata_model")] +public class UpdateClimatePresetRequestEcobeeMetadata +{ +[JsonConstructorAttribute] +protected UpdateClimatePresetRequestEcobeeMetadata() { } + +public UpdateClimatePresetRequestEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, UpdateClimatePresetRequestEcobeeMetadata.OwnerEnum? owner = default) +{ +ClimateRef = climateRef; +IsOptimized = isOptimized; +Owner = owner; +} + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum OwnerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "user")] +User = 1, + +[EnumMember(Value = "system")] +System = 2, +} + +/// +/// Reference to the Ecobee climate, if applicable. +/// +[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] +public string? ClimateRef { get; set; } + +/// +/// Indicates if the climate preset is optimized by Ecobee. +/// +[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOptimized { get; set; } + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] +public UpdateClimatePresetRequestEcobeeMetadata.OwnerEnum? Owner { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void UpdateClimatePreset(UpdateClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/thermostats/update_climate_preset", requestOptions); +} + +/// +/// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public void UpdateClimatePreset(string climatePresetKey = default, UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) +{ +UpdateClimatePreset(new UpdateClimatePresetRequest(climatePresetKey: climatePresetKey, climatePresetMode: climatePresetMode, coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, ecobeeMetadata: ecobeeMetadata, fanModeSetting: fanModeSetting, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting, manualOverrideAllowed: manualOverrideAllowed, name: name)); +} + +/// +/// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task UpdateClimatePresetAsync(UpdateClimatePresetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/thermostats/update_climate_preset", requestOptions); +} + +/// +/// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). +/// +public async Task UpdateClimatePresetAsync(string climatePresetKey = default, UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) +{ +await UpdateClimatePresetAsync(new UpdateClimatePresetRequest(climatePresetKey: climatePresetKey, climatePresetMode: climatePresetMode, coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, ecobeeMetadata: ecobeeMetadata, fanModeSetting: fanModeSetting, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting, manualOverrideAllowed: manualOverrideAllowed, name: name)); +} + +/// +/// Request parameters for Update the Thermostat Weekly Program. +/// +[DataContract(Name = "updateWeeklyProgramRequest_request")] +public class UpdateWeeklyProgramRequest +{ +[JsonConstructorAttribute] +protected UpdateWeeklyProgramRequest() { } + +public UpdateWeeklyProgramRequest(string deviceId = default, string? fridayProgramId = default, string? mondayProgramId = default, string? saturdayProgramId = default, string? sundayProgramId = default, string? thursdayProgramId = default, string? tuesdayProgramId = default, string? wednesdayProgramId = default) +{ +DeviceId = deviceId; +FridayProgramId = fridayProgramId; +MondayProgramId = mondayProgramId; +SaturdayProgramId = saturdayProgramId; +SundayProgramId = sundayProgramId; +ThursdayProgramId = thursdayProgramId; +TuesdayProgramId = tuesdayProgramId; +WednesdayProgramId = wednesdayProgramId; +} + +/// +/// ID of the thermostat device for which you want to update the weekly program. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// ID of the thermostat daily program to run on Fridays. +/// +[DataMember(Name = "friday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? FridayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Mondays. +/// +[DataMember(Name = "monday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? MondayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Saturdays. +/// +[DataMember(Name = "saturday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? SaturdayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Sundays. +/// +[DataMember(Name = "sunday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? SundayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Thursdays. +/// +[DataMember(Name = "thursday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? ThursdayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Tuesdays. +/// +[DataMember(Name = "tuesday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? TuesdayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Wednesdays. +/// +[DataMember(Name = "wednesday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? WednesdayProgramId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateWeeklyProgramResponse_response")] +public class UpdateWeeklyProgramResponse +{ +[JsonConstructorAttribute] +protected UpdateWeeklyProgramResponse() { } + +public UpdateWeeklyProgramResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. +/// +public ActionAttempt UpdateWeeklyProgram(UpdateWeeklyProgramRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/thermostats/update_weekly_program", requestOptions).EnsureData("/thermostats/update_weekly_program").ActionAttempt; +} + +/// +/// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. +/// +public ActionAttempt UpdateWeeklyProgram(string deviceId = default, string? fridayProgramId = default, string? mondayProgramId = default, string? saturdayProgramId = default, string? sundayProgramId = default, string? thursdayProgramId = default, string? tuesdayProgramId = default, string? wednesdayProgramId = default) +{ +return UpdateWeeklyProgram(new UpdateWeeklyProgramRequest(deviceId: deviceId, fridayProgramId: fridayProgramId, mondayProgramId: mondayProgramId, saturdayProgramId: saturdayProgramId, sundayProgramId: sundayProgramId, thursdayProgramId: thursdayProgramId, tuesdayProgramId: tuesdayProgramId, wednesdayProgramId: wednesdayProgramId)); +} + +/// +/// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. +/// +public async Task UpdateWeeklyProgramAsync(UpdateWeeklyProgramRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/thermostats/update_weekly_program", requestOptions)).EnsureData("/thermostats/update_weekly_program").ActionAttempt; +} + +/// +/// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. +/// +public async Task UpdateWeeklyProgramAsync(string deviceId = default, string? fridayProgramId = default, string? mondayProgramId = default, string? saturdayProgramId = default, string? sundayProgramId = default, string? thursdayProgramId = default, string? tuesdayProgramId = default, string? wednesdayProgramId = default) +{ +return (await UpdateWeeklyProgramAsync(new UpdateWeeklyProgramRequest(deviceId: deviceId, fridayProgramId: fridayProgramId, mondayProgramId: mondayProgramId, saturdayProgramId: saturdayProgramId, sundayProgramId: sundayProgramId, thursdayProgramId: thursdayProgramId, tuesdayProgramId: tuesdayProgramId, wednesdayProgramId: wednesdayProgramId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Thermostats Thermostats => new(this); - } +public partial class SeamClient +{ +public Api.Thermostats Thermostats => new(this); +} - public partial interface ISeamClient - { - public Api.Thermostats Thermostats { get; } - } +public partial interface ISeamClient +{ +public Api.Thermostats Thermostats { get; } +} } diff --git a/src/Seam/Api/UnmanagedAccessCodes.cs b/src/Seam/Api/UnmanagedAccessCodes.cs index c7b4a584..f98871cb 100644 --- a/src/Seam/Api/UnmanagedAccessCodes.cs +++ b/src/Seam/Api/UnmanagedAccessCodes.cs @@ -9,740 +9,592 @@ namespace Seam.Api { - public class UnmanagedAccessCodes - { - private ISeamClient _seam; - - public UnmanagedAccessCodes(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Convert an Unmanaged Access Code. - /// - [DataContract(Name = "convertToManagedRequest_request")] - public class ConvertToManagedRequest - { - [JsonConstructorAttribute] - protected ConvertToManagedRequest() { } - - public ConvertToManagedRequest( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? force = default, - bool? isExternalModificationAllowed = default - ) - { - AccessCodeId = accessCodeId; - AllowExternalModification = allowExternalModification; - Force = force; - IsExternalModificationAllowed = isExternalModificationAllowed; - } - - /// - /// ID of the unmanaged access code that you want to convert to a managed access code. - /// - [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. - /// - [DataMember( - Name = "allow_external_modification", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AllowExternalModification { get; set; } - - /// - /// Indicates whether to force the access code conversion. To switch management of an access code from one Seam workspace to another, set `force` to `true`. - /// - [DataMember(Name = "force", IsRequired = false, EmitDefaultValue = false)] - public bool? Force { get; set; } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. - /// - [DataMember( - Name = "is_external_modification_allowed", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsExternalModificationAllowed { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Converts an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. - /// - /// Note that not all device providers support converting an unmanaged access code to a managed access code. - /// - public void ConvertToManaged(ConvertToManagedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/access_codes/unmanaged/convert_to_managed", requestOptions); - } - - /// - /// Converts an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. - /// - /// Note that not all device providers support converting an unmanaged access code to a managed access code. - /// - public void ConvertToManaged( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? force = default, - bool? isExternalModificationAllowed = default - ) - { - ConvertToManaged( - new ConvertToManagedRequest( - accessCodeId: accessCodeId, - allowExternalModification: allowExternalModification, - force: force, - isExternalModificationAllowed: isExternalModificationAllowed - ) - ); - } - - /// - /// Converts an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. - /// - /// Note that not all device providers support converting an unmanaged access code to a managed access code. - /// - public async Task ConvertToManagedAsync(ConvertToManagedRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync( - "/access_codes/unmanaged/convert_to_managed", - requestOptions - ); - } - - /// - /// Converts an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. - /// - /// Note that not all device providers support converting an unmanaged access code to a managed access code. - /// - public async Task ConvertToManagedAsync( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? force = default, - bool? isExternalModificationAllowed = default - ) - { - await ConvertToManagedAsync( - new ConvertToManagedRequest( - accessCodeId: accessCodeId, - allowExternalModification: allowExternalModification, - force: force, - isExternalModificationAllowed: isExternalModificationAllowed - ) - ); - } - - /// - /// Request parameters for Delete an Unmanaged Access Code. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string accessCodeId = default) - { - AccessCodeId = accessCodeId; - } - - /// - /// ID of the unmanaged access code that you want to delete. - /// - [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/access_codes/unmanaged/delete", requestOptions); - } - - /// - /// Deletes an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public void Delete(string accessCodeId = default) - { - Delete(new DeleteRequest(accessCodeId: accessCodeId)); - } - - /// - /// Deletes an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/access_codes/unmanaged/delete", requestOptions); - } - - /// - /// Deletes an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public async Task DeleteAsync(string accessCodeId = default) - { - await DeleteAsync(new DeleteRequest(accessCodeId: accessCodeId)); - } - - /// - /// Request parameters for Get an Unmanaged Access Code. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest( - string? accessCodeId = default, - string? code = default, - string? deviceId = default - ) - { - AccessCodeId = accessCodeId; - Code = code; - DeviceId = deviceId; - } - - /// - /// ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessCodeId { get; set; } - - /// - /// Code of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// ID of the device containing the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(UnmanagedAccessCode accessCode = default) - { - AccessCode = accessCode; - } - - /// - /// OK - /// - [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessCode AccessCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - /// You must specify either `access_code_id` or both `device_id` and `code`. - /// - public UnmanagedAccessCode Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_codes/unmanaged/get", requestOptions) - .EnsureData("/access_codes/unmanaged/get") - .AccessCode; - } - - /// - /// Returns a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - /// You must specify either `access_code_id` or both `device_id` and `code`. - /// - public UnmanagedAccessCode Get( - string? accessCodeId = default, - string? code = default, - string? deviceId = default - ) - { - return Get(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId)); - } - - /// - /// Returns a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - /// You must specify either `access_code_id` or both `device_id` and `code`. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync("/access_codes/unmanaged/get", requestOptions) - ) - .EnsureData("/access_codes/unmanaged/get") - .AccessCode; - } - - /// - /// Returns a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - /// You must specify either `access_code_id` or both `device_id` and `code`. - /// - public async Task GetAsync( - string? accessCodeId = default, - string? code = default, - string? deviceId = default - ) - { - return ( - await GetAsync( - new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId) - ) - ); - } - - /// - /// Request parameters for List Unmanaged Access Codes. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string deviceId = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - DeviceId = deviceId; - Limit = limit; - PageCursor = pageCursor; - Search = search; - UserIdentifierKey = userIdentifierKey; - } - - /// - /// ID of the device for which you want to list unmanaged access codes. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Numerical limit on the number of unmanaged access codes to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// Your user ID for the user by which to filter unmanaged access codes. - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List accessCodes = default) - { - AccessCodes = accessCodes; - } - - /// - /// OK - /// - [DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodes { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [unmanaged access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_codes/unmanaged/list", requestOptions) - .EnsureData("/access_codes/unmanaged/list") - .AccessCodes; - } - - /// - /// Returns a list of all [unmanaged access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public List List( - string deviceId = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - return List( - new ListRequest( - deviceId: deviceId, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentifierKey: userIdentifierKey - ) - ); - } - - /// - /// Returns a list of all [unmanaged access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync("/access_codes/unmanaged/list", requestOptions) - ) - .EnsureData("/access_codes/unmanaged/list") - .AccessCodes; - } - - /// - /// Returns a list of all [unmanaged access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public async Task> ListAsync( - string deviceId = default, - float? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentifierKey = default - ) - { - return ( - await ListAsync( - new ListRequest( - deviceId: deviceId, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentifierKey: userIdentifierKey - ) - ) - ); - } - - /// - /// Request parameters for Update an Unmanaged Access Code. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? force = default, - bool? isExternalModificationAllowed = default, - bool isManaged = default - ) - { - AccessCodeId = accessCodeId; - AllowExternalModification = allowExternalModification; - Force = force; - IsExternalModificationAllowed = isExternalModificationAllowed; - IsManaged = isManaged; - } - - /// - /// ID of the unmanaged access code that you want to update. - /// - [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. - /// - [DataMember( - Name = "allow_external_modification", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AllowExternalModification { get; set; } - - /// - /// Indicates whether to force the unmanaged access code update. - /// - [DataMember(Name = "force", IsRequired = false, EmitDefaultValue = false)] - public bool? Force { get; set; } - - /// - /// Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. - /// - [DataMember( - Name = "is_external_modification_allowed", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsExternalModificationAllowed { get; set; } - - [DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/access_codes/unmanaged/update", requestOptions); - } - - /// - /// Updates a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public void Update( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? force = default, - bool? isExternalModificationAllowed = default, - bool isManaged = default - ) - { - Update( - new UpdateRequest( - accessCodeId: accessCodeId, - allowExternalModification: allowExternalModification, - force: force, - isExternalModificationAllowed: isExternalModificationAllowed, - isManaged: isManaged - ) - ); - } - - /// - /// Updates a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/access_codes/unmanaged/update", requestOptions); - } - - /// - /// Updates a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - public async Task UpdateAsync( - string accessCodeId = default, - bool? allowExternalModification = default, - bool? force = default, - bool? isExternalModificationAllowed = default, - bool isManaged = default - ) - { - await UpdateAsync( - new UpdateRequest( - accessCodeId: accessCodeId, - allowExternalModification: allowExternalModification, - force: force, - isExternalModificationAllowed: isExternalModificationAllowed, - isManaged: isManaged - ) - ); - } - } +public class UnmanagedAccessCodes +{ +private ISeamClient _seam; + +public UnmanagedAccessCodes(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Convert an Unmanaged Access Code. +/// +[DataContract(Name = "convertToManagedRequest_request")] +public class ConvertToManagedRequest +{ +[JsonConstructorAttribute] +protected ConvertToManagedRequest() { } + +public ConvertToManagedRequest(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default) +{ +AccessCodeId = accessCodeId; +AllowExternalModification = allowExternalModification; +Force = force; +IsExternalModificationAllowed = isExternalModificationAllowed; +} + +/// +/// ID of the unmanaged access code that you want to convert to a managed access code. +/// +[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. +/// +[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] +public bool? AllowExternalModification { get; set; } + +/// +/// Indicates whether to force the access code conversion. To switch management of an access code from one Seam workspace to another, set `force` to `true`. +/// +[DataMember(Name = "force", IsRequired = false, EmitDefaultValue = false)] +public bool? Force { get; set; } + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. +/// +[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsExternalModificationAllowed { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. +/// +/// Note that not all device providers support converting an unmanaged access code to a managed access code. +/// +public void ConvertToManaged(ConvertToManagedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/access_codes/unmanaged/convert_to_managed", requestOptions); +} + +/// +/// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. +/// +/// Note that not all device providers support converting an unmanaged access code to a managed access code. +/// +public void ConvertToManaged(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default) +{ +ConvertToManaged(new ConvertToManagedRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, force: force, isExternalModificationAllowed: isExternalModificationAllowed)); +} + +/// +/// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. +/// +/// Note that not all device providers support converting an unmanaged access code to a managed access code. +/// +public async Task ConvertToManagedAsync(ConvertToManagedRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/access_codes/unmanaged/convert_to_managed", requestOptions); +} + +/// +/// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. +/// +/// Note that not all device providers support converting an unmanaged access code to a managed access code. +/// +public async Task ConvertToManagedAsync(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default) +{ +await ConvertToManagedAsync(new ConvertToManagedRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, force: force, isExternalModificationAllowed: isExternalModificationAllowed)); +} + +/// +/// Request parameters for Delete an Unmanaged Access Code. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string accessCodeId = default) +{ +AccessCodeId = accessCodeId; +} + +/// +/// ID of the unmanaged access code that you want to delete. +/// +[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/access_codes/unmanaged/delete", requestOptions); +} + +/// +/// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public void Delete(string accessCodeId = default) +{ +Delete(new DeleteRequest(accessCodeId: accessCodeId)); +} + +/// +/// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/access_codes/unmanaged/delete", requestOptions); +} + +/// +/// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public async Task DeleteAsync(string accessCodeId = default) +{ +await DeleteAsync(new DeleteRequest(accessCodeId: accessCodeId)); +} + +/// +/// Request parameters for Get an Unmanaged Access Code. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? accessCodeId = default, string? code = default, string? deviceId = default) +{ +AccessCodeId = accessCodeId; +Code = code; +DeviceId = deviceId; +} + +/// +/// ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessCodeId { get; set; } + +/// +/// Code of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// ID of the device containing the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(UnmanagedAccessCode accessCode = default) +{ +AccessCode = accessCode; +} + +/// +/// OK +/// +[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessCode AccessCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +/// You must specify either `access_code_id` or both `device_id` and `code`. +/// +public UnmanagedAccessCode Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_codes/unmanaged/get", requestOptions).EnsureData("/access_codes/unmanaged/get").AccessCode; +} + +/// +/// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +/// You must specify either `access_code_id` or both `device_id` and `code`. +/// +public UnmanagedAccessCode Get(string? accessCodeId = default, string? code = default, string? deviceId = default) +{ +return Get(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId)); +} + +/// +/// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +/// You must specify either `access_code_id` or both `device_id` and `code`. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_codes/unmanaged/get", requestOptions)).EnsureData("/access_codes/unmanaged/get").AccessCode; +} + +/// +/// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +/// You must specify either `access_code_id` or both `device_id` and `code`. +/// +public async Task GetAsync(string? accessCodeId = default, string? code = default, string? deviceId = default) +{ +return (await GetAsync(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId))); +} + +/// +/// Request parameters for List Unmanaged Access Codes. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +DeviceId = deviceId; +Limit = limit; +PageCursor = pageCursor; +Search = search; +UserIdentifierKey = userIdentifierKey; +} + +/// +/// ID of the device for which you want to list unmanaged access codes. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Numerical limit on the number of unmanaged access codes to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// Your user ID for the user by which to filter unmanaged access codes. +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List accessCodes = default) +{ +AccessCodes = accessCodes; +} + +/// +/// OK +/// +[DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodes { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_codes/unmanaged/list", requestOptions).EnsureData("/access_codes/unmanaged/list").AccessCodes; +} + +/// +/// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public List List(string deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +return List(new ListRequest(deviceId: deviceId, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey)); +} + +/// +/// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_codes/unmanaged/list", requestOptions)).EnsureData("/access_codes/unmanaged/list").AccessCodes; +} + +/// +/// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public async Task> ListAsync(string deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) +{ +return (await ListAsync(new ListRequest(deviceId: deviceId, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey))); +} + +/// +/// Request parameters for Update an Unmanaged Access Code. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default, bool isManaged = default) +{ +AccessCodeId = accessCodeId; +AllowExternalModification = allowExternalModification; +Force = force; +IsExternalModificationAllowed = isExternalModificationAllowed; +IsManaged = isManaged; +} + +/// +/// ID of the unmanaged access code that you want to update. +/// +[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. +/// +[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] +public bool? AllowExternalModification { get; set; } + +/// +/// Indicates whether to force the unmanaged access code update. +/// +[DataMember(Name = "force", IsRequired = false, EmitDefaultValue = false)] +public bool? Force { get; set; } + +/// +/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. +/// +[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsExternalModificationAllowed { get; set; } + +[DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/access_codes/unmanaged/update", requestOptions); +} + +/// +/// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public void Update(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default, bool isManaged = default) +{ +Update(new UpdateRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, force: force, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged)); +} + +/// +/// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/access_codes/unmanaged/update", requestOptions); +} + +/// +/// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +public async Task UpdateAsync(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default, bool isManaged = default) +{ +await UpdateAsync(new UpdateRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, force: force, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.UnmanagedAccessCodes UnmanagedAccessCodes => new(this); - } +public partial class SeamClient +{ +public Api.UnmanagedAccessCodes UnmanagedAccessCodes => new(this); +} - public partial interface ISeamClient - { - public Api.UnmanagedAccessCodes UnmanagedAccessCodes { get; } - } +public partial interface ISeamClient +{ +public Api.UnmanagedAccessCodes UnmanagedAccessCodes { get; } +} } diff --git a/src/Seam/Api/UnmanagedAccessGrants.cs b/src/Seam/Api/UnmanagedAccessGrants.cs index 7a679ee8..91988838 100644 --- a/src/Seam/Api/UnmanagedAccessGrants.cs +++ b/src/Seam/Api/UnmanagedAccessGrants.cs @@ -9,472 +9,393 @@ namespace Seam.Api { - public class UnmanagedAccessGrants - { - private ISeamClient _seam; - - public UnmanagedAccessGrants(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get an Unmanaged Access Grant. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string accessGrantId = default) - { - AccessGrantId = accessGrantId; - } - - /// - /// ID of unmanaged Access Grant to get. - /// - [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(UnmanagedAccessGrant accessGrant = default) - { - AccessGrant = accessGrant; - } - - /// - /// OK - /// - [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessGrant AccessGrant { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Get an unmanaged Access Grant (where is_managed = false). - /// - public UnmanagedAccessGrant Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_grants/unmanaged/get", requestOptions) - .EnsureData("/access_grants/unmanaged/get") - .AccessGrant; - } - - /// - /// Get an unmanaged Access Grant (where is_managed = false). - /// - public UnmanagedAccessGrant Get(string accessGrantId = default) - { - return Get(new GetRequest(accessGrantId: accessGrantId)); - } - - /// - /// Get an unmanaged Access Grant (where is_managed = false). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync("/access_grants/unmanaged/get", requestOptions) - ) - .EnsureData("/access_grants/unmanaged/get") - .AccessGrant; - } - - /// - /// Get an unmanaged Access Grant (where is_managed = false). - /// - public async Task GetAsync(string accessGrantId = default) - { - return (await GetAsync(new GetRequest(accessGrantId: accessGrantId))); - } - - /// - /// Request parameters for List Unmanaged Access Grants. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? acsEntranceId = default, - string? acsSystemId = default, - float? limit = default, - string? pageCursor = default, - string? reservationKey = default, - string? userIdentityId = default - ) - { - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - Limit = limit; - PageCursor = pageCursor; - ReservationKey = reservationKey; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the entrance by which you want to filter the list of unmanaged Access Grants. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - /// - /// ID of the access system by which you want to filter the list of unmanaged Access Grants. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// Numerical limit on the number of unmanaged access grants to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// Filter unmanaged Access Grants by reservation_key. - /// - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - /// - /// ID of user identity by which you want to filter the list of unmanaged Access Grants. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List accessGrants = default) - { - AccessGrants = accessGrants; - } - - /// - /// OK - /// - [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrants { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets unmanaged Access Grants (where is_managed = false). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_grants/unmanaged/list", requestOptions) - .EnsureData("/access_grants/unmanaged/list") - .AccessGrants; - } - - /// - /// Gets unmanaged Access Grants (where is_managed = false). - /// - public List List( - string? acsEntranceId = default, - string? acsSystemId = default, - float? limit = default, - string? pageCursor = default, - string? reservationKey = default, - string? userIdentityId = default - ) - { - return List( - new ListRequest( - acsEntranceId: acsEntranceId, - acsSystemId: acsSystemId, - limit: limit, - pageCursor: pageCursor, - reservationKey: reservationKey, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Gets unmanaged Access Grants (where is_managed = false). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync("/access_grants/unmanaged/list", requestOptions) - ) - .EnsureData("/access_grants/unmanaged/list") - .AccessGrants; - } - - /// - /// Gets unmanaged Access Grants (where is_managed = false). - /// - public async Task> ListAsync( - string? acsEntranceId = default, - string? acsSystemId = default, - float? limit = default, - string? pageCursor = default, - string? reservationKey = default, - string? userIdentityId = default - ) - { - return ( - await ListAsync( - new ListRequest( - acsEntranceId: acsEntranceId, - acsSystemId: acsSystemId, - limit: limit, - pageCursor: pageCursor, - reservationKey: reservationKey, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for Update an Unmanaged Access Grant. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string accessGrantId = default, - string? accessGrantKey = default, - bool isManaged = default - ) - { - AccessGrantId = accessGrantId; - AccessGrantKey = accessGrantKey; - IsManaged = isManaged; - } - - /// - /// ID of the unmanaged Access Grant to update. - /// - [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// Unique key for the access grant. If not provided, the existing key will be preserved. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// Must be set to true to convert the unmanaged access grant to managed. - /// - [DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates an unmanaged Access Grant to make it managed. - /// - /// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. - /// - /// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/access_grants/unmanaged/update", requestOptions); - } - - /// - /// Updates an unmanaged Access Grant to make it managed. - /// - /// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. - /// - /// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. - /// - public void Update( - string accessGrantId = default, - string? accessGrantKey = default, - bool isManaged = default - ) - { - Update( - new UpdateRequest( - accessGrantId: accessGrantId, - accessGrantKey: accessGrantKey, - isManaged: isManaged - ) - ); - } - - /// - /// Updates an unmanaged Access Grant to make it managed. - /// - /// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. - /// - /// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/access_grants/unmanaged/update", requestOptions); - } - - /// - /// Updates an unmanaged Access Grant to make it managed. - /// - /// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. - /// - /// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. - /// - public async Task UpdateAsync( - string accessGrantId = default, - string? accessGrantKey = default, - bool isManaged = default - ) - { - await UpdateAsync( - new UpdateRequest( - accessGrantId: accessGrantId, - accessGrantKey: accessGrantKey, - isManaged: isManaged - ) - ); - } - } +public class UnmanagedAccessGrants +{ +private ISeamClient _seam; + +public UnmanagedAccessGrants(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get an Unmanaged Access Grant. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string accessGrantId = default) +{ +AccessGrantId = accessGrantId; +} + +/// +/// ID of unmanaged Access Grant to get. +/// +[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(UnmanagedAccessGrant accessGrant = default) +{ +AccessGrant = accessGrant; +} + +/// +/// OK +/// +[DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessGrant AccessGrant { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Get an unmanaged Access Grant (where is_managed = false). +/// +public UnmanagedAccessGrant Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_grants/unmanaged/get", requestOptions).EnsureData("/access_grants/unmanaged/get").AccessGrant; +} + +/// +/// Get an unmanaged Access Grant (where is_managed = false). +/// +public UnmanagedAccessGrant Get(string accessGrantId = default) +{ +return Get(new GetRequest(accessGrantId: accessGrantId)); +} + +/// +/// Get an unmanaged Access Grant (where is_managed = false). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_grants/unmanaged/get", requestOptions)).EnsureData("/access_grants/unmanaged/get").AccessGrant; +} + +/// +/// Get an unmanaged Access Grant (where is_managed = false). +/// +public async Task GetAsync(string accessGrantId = default) +{ +return (await GetAsync(new GetRequest(accessGrantId: accessGrantId))); +} + +/// +/// Request parameters for List Unmanaged Access Grants. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? acsEntranceId = default, string? acsSystemId = default, float? limit = default, string? pageCursor = default, string? reservationKey = default, string? userIdentityId = default) +{ +AcsEntranceId = acsEntranceId; +AcsSystemId = acsSystemId; +Limit = limit; +PageCursor = pageCursor; +ReservationKey = reservationKey; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the entrance by which you want to filter the list of unmanaged Access Grants. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsEntranceId { get; set; } + +/// +/// ID of the access system by which you want to filter the list of unmanaged Access Grants. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// Numerical limit on the number of unmanaged access grants to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// Filter unmanaged Access Grants by reservation_key. +/// +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +/// +/// ID of user identity by which you want to filter the list of unmanaged Access Grants. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List accessGrants = default) +{ +AccessGrants = accessGrants; +} + +/// +/// OK +/// +[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrants { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets unmanaged Access Grants (where is_managed = false). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_grants/unmanaged/list", requestOptions).EnsureData("/access_grants/unmanaged/list").AccessGrants; +} + +/// +/// Gets unmanaged Access Grants (where is_managed = false). +/// +public List List(string? acsEntranceId = default, string? acsSystemId = default, float? limit = default, string? pageCursor = default, string? reservationKey = default, string? userIdentityId = default) +{ +return List(new ListRequest(acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, limit: limit, pageCursor: pageCursor, reservationKey: reservationKey, userIdentityId: userIdentityId)); +} + +/// +/// Gets unmanaged Access Grants (where is_managed = false). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_grants/unmanaged/list", requestOptions)).EnsureData("/access_grants/unmanaged/list").AccessGrants; +} + +/// +/// Gets unmanaged Access Grants (where is_managed = false). +/// +public async Task> ListAsync(string? acsEntranceId = default, string? acsSystemId = default, float? limit = default, string? pageCursor = default, string? reservationKey = default, string? userIdentityId = default) +{ +return (await ListAsync(new ListRequest(acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, limit: limit, pageCursor: pageCursor, reservationKey: reservationKey, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for Update an Unmanaged Access Grant. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string accessGrantId = default, string? accessGrantKey = default, bool isManaged = default) +{ +AccessGrantId = accessGrantId; +AccessGrantKey = accessGrantKey; +IsManaged = isManaged; +} + +/// +/// ID of the unmanaged Access Grant to update. +/// +[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// Unique key for the access grant. If not provided, the existing key will be preserved. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// Must be set to true to convert the unmanaged access grant to managed. +/// +[DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates an unmanaged Access Grant to make it managed. +/// +/// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. +/// +/// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/access_grants/unmanaged/update", requestOptions); +} + +/// +/// Updates an unmanaged Access Grant to make it managed. +/// +/// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. +/// +/// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. +/// +public void Update(string accessGrantId = default, string? accessGrantKey = default, bool isManaged = default) +{ +Update(new UpdateRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, isManaged: isManaged)); +} + +/// +/// Updates an unmanaged Access Grant to make it managed. +/// +/// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. +/// +/// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/access_grants/unmanaged/update", requestOptions); +} + +/// +/// Updates an unmanaged Access Grant to make it managed. +/// +/// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. +/// +/// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. +/// +public async Task UpdateAsync(string accessGrantId = default, string? accessGrantKey = default, bool isManaged = default) +{ +await UpdateAsync(new UpdateRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, isManaged: isManaged)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.UnmanagedAccessGrants UnmanagedAccessGrants => new(this); - } +public partial class SeamClient +{ +public Api.UnmanagedAccessGrants UnmanagedAccessGrants => new(this); +} - public partial interface ISeamClient - { - public Api.UnmanagedAccessGrants UnmanagedAccessGrants { get; } - } +public partial interface ISeamClient +{ +public Api.UnmanagedAccessGrants UnmanagedAccessGrants { get; } +} } diff --git a/src/Seam/Api/UnmanagedAccessMethods.cs b/src/Seam/Api/UnmanagedAccessMethods.cs index df4a90c4..c4d1bd21 100644 --- a/src/Seam/Api/UnmanagedAccessMethods.cs +++ b/src/Seam/Api/UnmanagedAccessMethods.cs @@ -9,318 +9,273 @@ namespace Seam.Api { - public class UnmanagedAccessMethods - { - private ISeamClient _seam; - - public UnmanagedAccessMethods(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get an Unmanaged Access Method. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string accessMethodId = default) - { - AccessMethodId = accessMethodId; - } - - /// - /// ID of unmanaged access method to get. - /// - [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(UnmanagedAccessMethod accessMethod = default) - { - AccessMethod = accessMethod; - } - - /// - /// OK - /// - [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessMethod AccessMethod { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets an unmanaged access method (where is_managed = false). - /// - public UnmanagedAccessMethod Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_methods/unmanaged/get", requestOptions) - .EnsureData("/access_methods/unmanaged/get") - .AccessMethod; - } - - /// - /// Gets an unmanaged access method (where is_managed = false). - /// - public UnmanagedAccessMethod Get(string accessMethodId = default) - { - return Get(new GetRequest(accessMethodId: accessMethodId)); - } - - /// - /// Gets an unmanaged access method (where is_managed = false). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync("/access_methods/unmanaged/get", requestOptions) - ) - .EnsureData("/access_methods/unmanaged/get") - .AccessMethod; - } - - /// - /// Gets an unmanaged access method (where is_managed = false). - /// - public async Task GetAsync(string accessMethodId = default) - { - return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); - } - - /// - /// Request parameters for List Unmanaged Access Methods. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string accessGrantId = default, - string? acsEntranceId = default, - string? deviceId = default, - string? spaceId = default - ) - { - AccessGrantId = accessGrantId; - AcsEntranceId = acsEntranceId; - DeviceId = deviceId; - SpaceId = spaceId; - } - - /// - /// ID of Access Grant to list unmanaged access methods for. - /// - [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// ID of the entrance for which you want to retrieve all unmanaged access methods. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - /// - /// ID of the device for which you want to retrieve all unmanaged access methods. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// ID of the space for which you want to retrieve all unmanaged access methods. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List accessMethods = default) - { - AccessMethods = accessMethods; - } - - /// - /// OK - /// - [DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethods { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/access_methods/unmanaged/list", requestOptions) - .EnsureData("/access_methods/unmanaged/list") - .AccessMethods; - } - - /// - /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. - /// - public List List( - string accessGrantId = default, - string? acsEntranceId = default, - string? deviceId = default, - string? spaceId = default - ) - { - return List( - new ListRequest( - accessGrantId: accessGrantId, - acsEntranceId: acsEntranceId, - deviceId: deviceId, - spaceId: spaceId - ) - ); - } - - /// - /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync("/access_methods/unmanaged/list", requestOptions) - ) - .EnsureData("/access_methods/unmanaged/list") - .AccessMethods; - } - - /// - /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. - /// - public async Task> ListAsync( - string accessGrantId = default, - string? acsEntranceId = default, - string? deviceId = default, - string? spaceId = default - ) - { - return ( - await ListAsync( - new ListRequest( - accessGrantId: accessGrantId, - acsEntranceId: acsEntranceId, - deviceId: deviceId, - spaceId: spaceId - ) - ) - ); - } - } +public class UnmanagedAccessMethods +{ +private ISeamClient _seam; + +public UnmanagedAccessMethods(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get an Unmanaged Access Method. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string accessMethodId = default) +{ +AccessMethodId = accessMethodId; +} + +/// +/// ID of unmanaged access method to get. +/// +[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(UnmanagedAccessMethod accessMethod = default) +{ +AccessMethod = accessMethod; +} + +/// +/// OK +/// +[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessMethod AccessMethod { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets an unmanaged access method (where is_managed = false). +/// +public UnmanagedAccessMethod Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_methods/unmanaged/get", requestOptions).EnsureData("/access_methods/unmanaged/get").AccessMethod; +} + +/// +/// Gets an unmanaged access method (where is_managed = false). +/// +public UnmanagedAccessMethod Get(string accessMethodId = default) +{ +return Get(new GetRequest(accessMethodId: accessMethodId)); +} + +/// +/// Gets an unmanaged access method (where is_managed = false). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_methods/unmanaged/get", requestOptions)).EnsureData("/access_methods/unmanaged/get").AccessMethod; +} + +/// +/// Gets an unmanaged access method (where is_managed = false). +/// +public async Task GetAsync(string accessMethodId = default) +{ +return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); +} + +/// +/// Request parameters for List Unmanaged Access Methods. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string accessGrantId = default, string? acsEntranceId = default, string? deviceId = default, string? spaceId = default) +{ +AccessGrantId = accessGrantId; +AcsEntranceId = acsEntranceId; +DeviceId = deviceId; +SpaceId = spaceId; +} + +/// +/// ID of Access Grant to list unmanaged access methods for. +/// +[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// ID of the entrance for which you want to retrieve all unmanaged access methods. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsEntranceId { get; set; } + +/// +/// ID of the device for which you want to retrieve all unmanaged access methods. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// ID of the space for which you want to retrieve all unmanaged access methods. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List accessMethods = default) +{ +AccessMethods = accessMethods; +} + +/// +/// OK +/// +[DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] +public List AccessMethods { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/access_methods/unmanaged/list", requestOptions).EnsureData("/access_methods/unmanaged/list").AccessMethods; +} + +/// +/// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. +/// +public List List(string accessGrantId = default, string? acsEntranceId = default, string? deviceId = default, string? spaceId = default) +{ +return List(new ListRequest(accessGrantId: accessGrantId, acsEntranceId: acsEntranceId, deviceId: deviceId, spaceId: spaceId)); +} + +/// +/// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/access_methods/unmanaged/list", requestOptions)).EnsureData("/access_methods/unmanaged/list").AccessMethods; +} + +/// +/// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. +/// +public async Task> ListAsync(string accessGrantId = default, string? acsEntranceId = default, string? deviceId = default, string? spaceId = default) +{ +return (await ListAsync(new ListRequest(accessGrantId: accessGrantId, acsEntranceId: acsEntranceId, deviceId: deviceId, spaceId: spaceId))); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.UnmanagedAccessMethods UnmanagedAccessMethods => new(this); - } - - public partial interface ISeamClient - { - public Api.UnmanagedAccessMethods UnmanagedAccessMethods { get; } - } +public partial class SeamClient +{ +public Api.UnmanagedAccessMethods UnmanagedAccessMethods => new(this); +} + +public partial interface ISeamClient +{ +public Api.UnmanagedAccessMethods UnmanagedAccessMethods { get; } +} } diff --git a/src/Seam/Api/UnmanagedDevices.cs b/src/Seam/Api/UnmanagedDevices.cs index a9b72408..13784f32 100644 --- a/src/Seam/Api/UnmanagedDevices.cs +++ b/src/Seam/Api/UnmanagedDevices.cs @@ -9,1018 +9,935 @@ namespace Seam.Api { - public class UnmanagedDevices - { - private ISeamClient _seam; - - public UnmanagedDevices(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get an Unmanaged Device. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string? deviceId = default, string? name = default) - { - DeviceId = deviceId; - Name = name; - } - - /// - /// ID of the unmanaged device that you want to get. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Name of the unmanaged device that you want to get. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(UnmanagedDevice device = default) - { - Device = device; - } - - /// - /// OK - /// - [DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDevice Device { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - /// You must specify either `device_id` or `name`. - /// - public UnmanagedDevice Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/devices/unmanaged/get", requestOptions) - .EnsureData("/devices/unmanaged/get") - .Device; - } - - /// - /// Returns a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - /// You must specify either `device_id` or `name`. - /// - public UnmanagedDevice Get(string? deviceId = default, string? name = default) - { - return Get(new GetRequest(deviceId: deviceId, name: name)); - } - - /// - /// Returns a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - /// You must specify either `device_id` or `name`. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/devices/unmanaged/get", requestOptions)) - .EnsureData("/devices/unmanaged/get") - .Device; - } - - /// - /// Returns a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - /// You must specify either `device_id` or `name`. - /// - public async Task GetAsync( - string? deviceId = default, - string? name = default - ) - { - return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); - } - - /// - /// Request parameters for List Unmanaged Devices. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? connectWebviewId = default, - string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - string? customerKey = default, - List? deviceIds = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountId = connectedAccountId; - ConnectedAccountIds = connectedAccountIds; - CreatedBefore = createdBefore; - CustomerKey = customerKey; - DeviceIds = deviceIds; - DeviceType = deviceType; - DeviceTypes = deviceTypes; - Limit = limit; - Manufacturer = manufacturer; - PageCursor = pageCursor; - Search = search; - } - - /// - /// Device type for which you want to list devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "akuvox_lock")] - AkuvoxLock = 1, - - [EnumMember(Value = "august_lock")] - AugustLock = 2, - - [EnumMember(Value = "brivo_access_point")] - BrivoAccessPoint = 3, - - [EnumMember(Value = "butterflymx_panel")] - ButterflymxPanel = 4, - - [EnumMember(Value = "avigilon_alta_entry")] - AvigilonAltaEntry = 5, - - [EnumMember(Value = "doorking_lock")] - DoorkingLock = 6, - - [EnumMember(Value = "genie_door")] - GenieDoor = 7, - - [EnumMember(Value = "igloo_lock")] - IglooLock = 8, - - [EnumMember(Value = "linear_lock")] - LinearLock = 9, - - [EnumMember(Value = "lockly_lock")] - LocklyLock = 10, - - [EnumMember(Value = "kwikset_lock")] - KwiksetLock = 11, - - [EnumMember(Value = "nuki_lock")] - NukiLock = 12, - - [EnumMember(Value = "salto_lock")] - SaltoLock = 13, - - [EnumMember(Value = "schlage_lock")] - SchlageLock = 14, - - [EnumMember(Value = "smartthings_lock")] - SmartthingsLock = 15, +public class UnmanagedDevices +{ +private ISeamClient _seam; + +public UnmanagedDevices(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get an Unmanaged Device. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? deviceId = default, string? name = default) +{ +DeviceId = deviceId; +Name = name; +} + +/// +/// ID of the unmanaged device that you want to get. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Name of the unmanaged device that you want to get. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(UnmanagedDevice device = default) +{ +Device = device; +} + +/// +/// OK +/// +[DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDevice Device { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +/// You must specify either `device_id` or `name`. +/// +public UnmanagedDevice Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/devices/unmanaged/get", requestOptions).EnsureData("/devices/unmanaged/get").Device; +} + +/// +/// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +/// You must specify either `device_id` or `name`. +/// +public UnmanagedDevice Get(string? deviceId = default, string? name = default) +{ +return Get(new GetRequest(deviceId: deviceId, name: name)); +} + +/// +/// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +/// You must specify either `device_id` or `name`. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/devices/unmanaged/get", requestOptions)).EnsureData("/devices/unmanaged/get").Device; +} + +/// +/// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +/// You must specify either `device_id` or `name`. +/// +public async Task GetAsync(string? deviceId = default, string? name = default) +{ +return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); +} + +/// +/// Request parameters for List Unmanaged Devices. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountId = connectedAccountId; +ConnectedAccountIds = connectedAccountIds; +CreatedBefore = createdBefore; +CustomerKey = customerKey; +DeviceIds = deviceIds; +DeviceType = deviceType; +DeviceTypes = deviceTypes; +Limit = limit; +Manufacturer = manufacturer; +PageCursor = pageCursor; +Search = search; +} + +/// +/// Device type for which you want to list devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "akuvox_lock")] +AkuvoxLock = 1, + +[EnumMember(Value = "august_lock")] +AugustLock = 2, + +[EnumMember(Value = "brivo_access_point")] +BrivoAccessPoint = 3, + +[EnumMember(Value = "butterflymx_panel")] +ButterflymxPanel = 4, + +[EnumMember(Value = "avigilon_alta_entry")] +AvigilonAltaEntry = 5, + +[EnumMember(Value = "doorking_lock")] +DoorkingLock = 6, + +[EnumMember(Value = "genie_door")] +GenieDoor = 7, + +[EnumMember(Value = "igloo_lock")] +IglooLock = 8, + +[EnumMember(Value = "linear_lock")] +LinearLock = 9, + +[EnumMember(Value = "lockly_lock")] +LocklyLock = 10, + +[EnumMember(Value = "kwikset_lock")] +KwiksetLock = 11, + +[EnumMember(Value = "nuki_lock")] +NukiLock = 12, + +[EnumMember(Value = "salto_lock")] +SaltoLock = 13, + +[EnumMember(Value = "schlage_lock")] +SchlageLock = 14, + +[EnumMember(Value = "smartthings_lock")] +SmartthingsLock = 15, + +[EnumMember(Value = "wyze_lock")] +WyzeLock = 16, + +[EnumMember(Value = "yale_lock")] +YaleLock = 17, + +[EnumMember(Value = "two_n_intercom")] +TwoNIntercom = 18, + +[EnumMember(Value = "controlbyweb_device")] +ControlbywebDevice = 19, + +[EnumMember(Value = "ttlock_lock")] +TtlockLock = 20, + +[EnumMember(Value = "igloohome_lock")] +IgloohomeLock = 21, + +[EnumMember(Value = "four_suites_door")] +FourSuitesDoor = 22, + +[EnumMember(Value = "dormakaba_oracode_door")] +DormakabaOracodeDoor = 23, - [EnumMember(Value = "wyze_lock")] - WyzeLock = 16, +[EnumMember(Value = "tedee_lock")] +TedeeLock = 24, - [EnumMember(Value = "yale_lock")] - YaleLock = 17, +[EnumMember(Value = "akiles_lock")] +AkilesLock = 25, - [EnumMember(Value = "two_n_intercom")] - TwoNIntercom = 18, +[EnumMember(Value = "ultraloq_lock")] +UltraloqLock = 26, - [EnumMember(Value = "controlbyweb_device")] - ControlbywebDevice = 19, +[EnumMember(Value = "yacan_lock")] +YacanLock = 27, - [EnumMember(Value = "ttlock_lock")] - TtlockLock = 20, +[EnumMember(Value = "keyincode_lock")] +KeyincodeLock = 28, - [EnumMember(Value = "igloohome_lock")] - IgloohomeLock = 21, +[EnumMember(Value = "omnitec_lock")] +OmnitecLock = 29, - [EnumMember(Value = "four_suites_door")] - FourSuitesDoor = 22, +[EnumMember(Value = "kisi_lock")] +KisiLock = 30, - [EnumMember(Value = "dormakaba_oracode_door")] - DormakabaOracodeDoor = 23, +[EnumMember(Value = "aqara_lock")] +AqaraLock = 31, - [EnumMember(Value = "tedee_lock")] - TedeeLock = 24, +[EnumMember(Value = "keynest_key")] +KeynestKey = 32, - [EnumMember(Value = "akiles_lock")] - AkilesLock = 25, +[EnumMember(Value = "noiseaware_activity_zone")] +NoiseawareActivityZone = 33, - [EnumMember(Value = "ultraloq_lock")] - UltraloqLock = 26, +[EnumMember(Value = "minut_sensor")] +MinutSensor = 34, - [EnumMember(Value = "yacan_lock")] - YacanLock = 27, +[EnumMember(Value = "ecobee_thermostat")] +EcobeeThermostat = 35, - [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 28, +[EnumMember(Value = "nest_thermostat")] +NestThermostat = 36, - [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 29, +[EnumMember(Value = "honeywell_resideo_thermostat")] +HoneywellResideoThermostat = 37, - [EnumMember(Value = "kisi_lock")] - KisiLock = 30, +[EnumMember(Value = "tado_thermostat")] +TadoThermostat = 38, - [EnumMember(Value = "aqara_lock")] - AqaraLock = 31, +[EnumMember(Value = "sensi_thermostat")] +SensiThermostat = 39, - [EnumMember(Value = "keynest_key")] - KeynestKey = 32, +[EnumMember(Value = "smartthings_thermostat")] +SmartthingsThermostat = 40, - [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 33, +[EnumMember(Value = "ios_phone")] +IosPhone = 41, - [EnumMember(Value = "minut_sensor")] - MinutSensor = 34, +[EnumMember(Value = "android_phone")] +AndroidPhone = 42, - [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 35, +[EnumMember(Value = "ring_camera")] +RingCamera = 43, - [EnumMember(Value = "nest_thermostat")] - NestThermostat = 36, +[EnumMember(Value = "tapo_camera")] +TapoCamera = 44, - [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 37, +[EnumMember(Value = "arlo_camera")] +ArloCamera = 45, - [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 38, +[EnumMember(Value = "reolink_camera")] +ReolinkCamera = 46, +} + +/// +/// Array of device types for which you want to list devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "akuvox_lock")] +AkuvoxLock = 1, + +[EnumMember(Value = "august_lock")] +AugustLock = 2, + +[EnumMember(Value = "brivo_access_point")] +BrivoAccessPoint = 3, + +[EnumMember(Value = "butterflymx_panel")] +ButterflymxPanel = 4, + +[EnumMember(Value = "avigilon_alta_entry")] +AvigilonAltaEntry = 5, + +[EnumMember(Value = "doorking_lock")] +DoorkingLock = 6, + +[EnumMember(Value = "genie_door")] +GenieDoor = 7, - [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 39, +[EnumMember(Value = "igloo_lock")] +IglooLock = 8, - [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 40, +[EnumMember(Value = "linear_lock")] +LinearLock = 9, - [EnumMember(Value = "ios_phone")] - IosPhone = 41, +[EnumMember(Value = "lockly_lock")] +LocklyLock = 10, - [EnumMember(Value = "android_phone")] - AndroidPhone = 42, +[EnumMember(Value = "kwikset_lock")] +KwiksetLock = 11, - [EnumMember(Value = "ring_camera")] - RingCamera = 43, - } +[EnumMember(Value = "nuki_lock")] +NukiLock = 12, - /// - /// Array of device types for which you want to list devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "salto_lock")] +SaltoLock = 13, - [EnumMember(Value = "akuvox_lock")] - AkuvoxLock = 1, +[EnumMember(Value = "schlage_lock")] +SchlageLock = 14, - [EnumMember(Value = "august_lock")] - AugustLock = 2, +[EnumMember(Value = "smartthings_lock")] +SmartthingsLock = 15, - [EnumMember(Value = "brivo_access_point")] - BrivoAccessPoint = 3, +[EnumMember(Value = "wyze_lock")] +WyzeLock = 16, - [EnumMember(Value = "butterflymx_panel")] - ButterflymxPanel = 4, +[EnumMember(Value = "yale_lock")] +YaleLock = 17, - [EnumMember(Value = "avigilon_alta_entry")] - AvigilonAltaEntry = 5, +[EnumMember(Value = "two_n_intercom")] +TwoNIntercom = 18, - [EnumMember(Value = "doorking_lock")] - DoorkingLock = 6, +[EnumMember(Value = "controlbyweb_device")] +ControlbywebDevice = 19, - [EnumMember(Value = "genie_door")] - GenieDoor = 7, +[EnumMember(Value = "ttlock_lock")] +TtlockLock = 20, - [EnumMember(Value = "igloo_lock")] - IglooLock = 8, +[EnumMember(Value = "igloohome_lock")] +IgloohomeLock = 21, - [EnumMember(Value = "linear_lock")] - LinearLock = 9, +[EnumMember(Value = "four_suites_door")] +FourSuitesDoor = 22, - [EnumMember(Value = "lockly_lock")] - LocklyLock = 10, +[EnumMember(Value = "dormakaba_oracode_door")] +DormakabaOracodeDoor = 23, - [EnumMember(Value = "kwikset_lock")] - KwiksetLock = 11, +[EnumMember(Value = "tedee_lock")] +TedeeLock = 24, - [EnumMember(Value = "nuki_lock")] - NukiLock = 12, +[EnumMember(Value = "akiles_lock")] +AkilesLock = 25, - [EnumMember(Value = "salto_lock")] - SaltoLock = 13, +[EnumMember(Value = "ultraloq_lock")] +UltraloqLock = 26, - [EnumMember(Value = "schlage_lock")] - SchlageLock = 14, +[EnumMember(Value = "yacan_lock")] +YacanLock = 27, - [EnumMember(Value = "smartthings_lock")] - SmartthingsLock = 15, +[EnumMember(Value = "keyincode_lock")] +KeyincodeLock = 28, - [EnumMember(Value = "wyze_lock")] - WyzeLock = 16, +[EnumMember(Value = "omnitec_lock")] +OmnitecLock = 29, - [EnumMember(Value = "yale_lock")] - YaleLock = 17, +[EnumMember(Value = "kisi_lock")] +KisiLock = 30, - [EnumMember(Value = "two_n_intercom")] - TwoNIntercom = 18, +[EnumMember(Value = "aqara_lock")] +AqaraLock = 31, - [EnumMember(Value = "controlbyweb_device")] - ControlbywebDevice = 19, +[EnumMember(Value = "keynest_key")] +KeynestKey = 32, - [EnumMember(Value = "ttlock_lock")] - TtlockLock = 20, +[EnumMember(Value = "noiseaware_activity_zone")] +NoiseawareActivityZone = 33, - [EnumMember(Value = "igloohome_lock")] - IgloohomeLock = 21, +[EnumMember(Value = "minut_sensor")] +MinutSensor = 34, - [EnumMember(Value = "four_suites_door")] - FourSuitesDoor = 22, +[EnumMember(Value = "ecobee_thermostat")] +EcobeeThermostat = 35, - [EnumMember(Value = "dormakaba_oracode_door")] - DormakabaOracodeDoor = 23, +[EnumMember(Value = "nest_thermostat")] +NestThermostat = 36, - [EnumMember(Value = "tedee_lock")] - TedeeLock = 24, +[EnumMember(Value = "honeywell_resideo_thermostat")] +HoneywellResideoThermostat = 37, - [EnumMember(Value = "akiles_lock")] - AkilesLock = 25, +[EnumMember(Value = "tado_thermostat")] +TadoThermostat = 38, + +[EnumMember(Value = "sensi_thermostat")] +SensiThermostat = 39, + +[EnumMember(Value = "smartthings_thermostat")] +SmartthingsThermostat = 40, + +[EnumMember(Value = "ios_phone")] +IosPhone = 41, + +[EnumMember(Value = "android_phone")] +AndroidPhone = 42, + +[EnumMember(Value = "ring_camera")] +RingCamera = 43, + +[EnumMember(Value = "tapo_camera")] +TapoCamera = 44, + +[EnumMember(Value = "arlo_camera")] +ArloCamera = 45, + +[EnumMember(Value = "reolink_camera")] +ReolinkCamera = 46, +} - [EnumMember(Value = "ultraloq_lock")] - UltraloqLock = 26, +/// +/// Manufacturer for which you want to list devices. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ManufacturerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "yacan_lock")] - YacanLock = 27, +[EnumMember(Value = "akuvox")] +Akuvox = 1, - [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 28, +[EnumMember(Value = "august")] +August = 2, - [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 29, +[EnumMember(Value = "avigilon_alta")] +AvigilonAlta = 3, - [EnumMember(Value = "kisi_lock")] - KisiLock = 30, +[EnumMember(Value = "brivo")] +Brivo = 4, - [EnumMember(Value = "aqara_lock")] - AqaraLock = 31, +[EnumMember(Value = "butterflymx")] +Butterflymx = 5, - [EnumMember(Value = "keynest_key")] - KeynestKey = 32, +[EnumMember(Value = "doorking")] +Doorking = 6, - [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 33, +[EnumMember(Value = "four_suites")] +FourSuites = 7, - [EnumMember(Value = "minut_sensor")] - MinutSensor = 34, +[EnumMember(Value = "genie")] +Genie = 8, - [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 35, +[EnumMember(Value = "igloo")] +Igloo = 9, - [EnumMember(Value = "nest_thermostat")] - NestThermostat = 36, +[EnumMember(Value = "keywe")] +Keywe = 10, - [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 37, +[EnumMember(Value = "kwikset")] +Kwikset = 11, - [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 38, +[EnumMember(Value = "linear")] +Linear = 12, - [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 39, +[EnumMember(Value = "nuki")] +Nuki = 13, - [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 40, +[EnumMember(Value = "philia")] +Philia = 14, - [EnumMember(Value = "ios_phone")] - IosPhone = 41, +[EnumMember(Value = "salto")] +Salto = 15, - [EnumMember(Value = "android_phone")] - AndroidPhone = 42, +[EnumMember(Value = "samsung")] +Samsung = 16, - [EnumMember(Value = "ring_camera")] - RingCamera = 43, - } +[EnumMember(Value = "schlage")] +Schlage = 17, - /// - /// Manufacturer for which you want to list devices. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ManufacturerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, +[EnumMember(Value = "seam")] +Seam = 18, - [EnumMember(Value = "akuvox")] - Akuvox = 1, +[EnumMember(Value = "unknown")] +Unknown = 19, - [EnumMember(Value = "august")] - August = 2, +[EnumMember(Value = "wyze")] +Wyze = 20, - [EnumMember(Value = "avigilon_alta")] - AvigilonAlta = 3, +[EnumMember(Value = "yale")] +Yale = 21, - [EnumMember(Value = "brivo")] - Brivo = 4, +[EnumMember(Value = "two_n")] +TwoN = 22, - [EnumMember(Value = "butterflymx")] - Butterflymx = 5, +[EnumMember(Value = "ttlock")] +Ttlock = 23, - [EnumMember(Value = "doorking")] - Doorking = 6, +[EnumMember(Value = "igloohome")] +Igloohome = 24, - [EnumMember(Value = "four_suites")] - FourSuites = 7, +[EnumMember(Value = "controlbyweb")] +Controlbyweb = 25, - [EnumMember(Value = "genie")] - Genie = 8, +[EnumMember(Value = "tedee")] +Tedee = 26, - [EnumMember(Value = "igloo")] - Igloo = 9, +[EnumMember(Value = "keyincode")] +Keyincode = 27, - [EnumMember(Value = "keywe")] - Keywe = 10, +[EnumMember(Value = "akiles")] +Akiles = 28, - [EnumMember(Value = "kwikset")] - Kwikset = 11, +[EnumMember(Value = "aqara")] +Aqara = 29, - [EnumMember(Value = "linear")] - Linear = 12, +[EnumMember(Value = "ecobee")] +Ecobee = 30, - [EnumMember(Value = "nuki")] - Nuki = 13, +[EnumMember(Value = "eufy")] +Eufy = 31, - [EnumMember(Value = "philia")] - Philia = 14, +[EnumMember(Value = "dormakaba_oracode")] +DormakabaOracode = 32, - [EnumMember(Value = "salto")] - Salto = 15, +[EnumMember(Value = "dormakaba_oracode_iho")] +DormakabaOracodeIho = 33, - [EnumMember(Value = "samsung")] - Samsung = 16, +[EnumMember(Value = "honeywell_resideo")] +HoneywellResideo = 34, - [EnumMember(Value = "schlage")] - Schlage = 17, +[EnumMember(Value = "keynest")] +Keynest = 35, - [EnumMember(Value = "seam")] - Seam = 18, +[EnumMember(Value = "korelock")] +Korelock = 36, - [EnumMember(Value = "unknown")] - Unknown = 19, +[EnumMember(Value = "lockly")] +Lockly = 37, - [EnumMember(Value = "wyze")] - Wyze = 20, +[EnumMember(Value = "minut")] +Minut = 38, - [EnumMember(Value = "yale")] - Yale = 21, +[EnumMember(Value = "nest")] +Nest = 39, - [EnumMember(Value = "two_n")] - TwoN = 22, +[EnumMember(Value = "noiseaware")] +Noiseaware = 40, - [EnumMember(Value = "ttlock")] - Ttlock = 23, +[EnumMember(Value = "sensi")] +Sensi = 41, - [EnumMember(Value = "igloohome")] - Igloohome = 24, +[EnumMember(Value = "smartthings")] +Smartthings = 42, - [EnumMember(Value = "controlbyweb")] - Controlbyweb = 25, +[EnumMember(Value = "tado")] +Tado = 43, - [EnumMember(Value = "dormakaba_oracode")] - DormakabaOracode = 26, +[EnumMember(Value = "ultraloq")] +Ultraloq = 44, - [EnumMember(Value = "tedee")] - Tedee = 27, +[EnumMember(Value = "ring")] +Ring = 45, - [EnumMember(Value = "keyincode")] - Keyincode = 28, +[EnumMember(Value = "tapo")] +Tapo = 46, - [EnumMember(Value = "akiles")] - Akiles = 29, +[EnumMember(Value = "arlo")] +Arlo = 47, - [EnumMember(Value = "aqara")] - Aqara = 30, +[EnumMember(Value = "reolink")] +Reolink = 48, - [EnumMember(Value = "ecobee")] - Ecobee = 31, +[EnumMember(Value = "ical")] +Ical = 49, - [EnumMember(Value = "honeywell_resideo")] - HoneywellResideo = 32, +[EnumMember(Value = "lodgify")] +Lodgify = 50, - [EnumMember(Value = "keynest")] - Keynest = 33, +[EnumMember(Value = "hostaway")] +Hostaway = 51, - [EnumMember(Value = "korelock")] - Korelock = 34, +[EnumMember(Value = "guesty")] +Guesty = 52, - [EnumMember(Value = "lockly")] - Lockly = 35, +[EnumMember(Value = "acuity_scheduling")] +AcuityScheduling = 53, - [EnumMember(Value = "minut")] - Minut = 36, +[EnumMember(Value = "omnitec")] +Omnitec = 54, - [EnumMember(Value = "nest")] - Nest = 37, +[EnumMember(Value = "kisi")] +Kisi = 55, - [EnumMember(Value = "noiseaware")] - Noiseaware = 38, +[EnumMember(Value = "slack")] +Slack = 56, - [EnumMember(Value = "sensi")] - Sensi = 39, +[EnumMember(Value = "yacan")] +Yacan = 57, +} - [EnumMember(Value = "smartthings")] - Smartthings = 40, +/// +/// ID of the Connect Webview for which you want to list devices. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectWebviewId { get; set; } + +/// +/// ID of the connected account for which you want to list devices. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Array of IDs of the connected accounts for which you want to list devices. +/// +[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] +public List? ConnectedAccountIds { get; set; } + +/// +/// Timestamp by which to limit returned devices. Returns devices created before this timestamp. +/// +[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedBefore { get; set; } + +/// +/// Customer key for which you want to list devices. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Array of device IDs for which you want to list devices. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceIds { get; set; } + +/// +/// Device type for which you want to list devices. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + +/// +/// Array of device types for which you want to list devices. +/// +[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] +public List? DeviceTypes { get; set; } + +/// +/// Numerical limit on the number of devices to return. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public float? Limit { get; set; } + +/// +/// Manufacturer for which you want to list devices. +/// +[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] +public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "tado")] - Tado = 41, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "ultraloq")] - Ultraloq = 42, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "ring")] - Ring = 43, +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } - [EnumMember(Value = "ical")] - Ical = 44, +public ListResponse(List devices = default) +{ +Devices = devices; +} - [EnumMember(Value = "lodgify")] - Lodgify = 45, +/// +/// OK +/// +[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] +public List Devices { get; set; } - [EnumMember(Value = "hostaway")] - Hostaway = 46, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "guesty")] - Guesty = 47, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "acuity_scheduling")] - AcuityScheduling = 48, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "omnitec")] - Omnitec = 49, +/// +/// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/devices/unmanaged/list", requestOptions).EnsureData("/devices/unmanaged/list").Devices; +} - [EnumMember(Value = "kisi")] - Kisi = 50, - - [EnumMember(Value = "slack")] - Slack = 51, - - [EnumMember(Value = "yacan")] - Yacan = 52, - } - - /// - /// ID of the Connect Webview for which you want to list devices. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectWebviewId { get; set; } - - /// - /// ID of the connected account for which you want to list devices. - /// - [DataMember( - Name = "connected_account_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectedAccountId { get; set; } - - /// - /// Array of IDs of the connected accounts for which you want to list devices. - /// - [DataMember( - Name = "connected_account_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ConnectedAccountIds { get; set; } - - /// - /// Timestamp by which to limit returned devices. Returns devices created before this timestamp. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// Customer key for which you want to list devices. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Array of device IDs for which you want to list devices. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceIds { get; set; } - - /// - /// Device type for which you want to list devices. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - - /// - /// Array of device types for which you want to list devices. - /// - [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] - public List? DeviceTypes { get; set; } - - /// - /// Numerical limit on the number of devices to return. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public float? Limit { get; set; } - - /// - /// Manufacturer for which you want to list devices. - /// - [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] - public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List devices = default) - { - Devices = devices; - } - - /// - /// OK - /// - [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] - public List Devices { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [unmanaged devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/devices/unmanaged/list", requestOptions) - .EnsureData("/devices/unmanaged/list") - .Devices; - } - - /// - /// Returns a list of all [unmanaged devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - public List List( - string? connectWebviewId = default, - string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - string? customerKey = default, - List? deviceIds = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default - ) - { - return List( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customerKey: customerKey, - deviceIds: deviceIds, - deviceType: deviceType, - deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search - ) - ); - } - - /// - /// Returns a list of all [unmanaged devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/devices/unmanaged/list", requestOptions)) - .EnsureData("/devices/unmanaged/list") - .Devices; - } - - /// - /// Returns a list of all [unmanaged devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - public async Task> ListAsync( - string? connectWebviewId = default, - string? connectedAccountId = default, - List? connectedAccountIds = default, - string? createdBefore = default, - string? customerKey = default, - List? deviceIds = default, - ListRequest.DeviceTypeEnum? deviceType = default, - List? deviceTypes = default, - float? limit = default, - ListRequest.ManufacturerEnum? manufacturer = default, - string? pageCursor = default, - string? search = default - ) - { - return ( - await ListAsync( - new ListRequest( - connectWebviewId: connectWebviewId, - connectedAccountId: connectedAccountId, - connectedAccountIds: connectedAccountIds, - createdBefore: createdBefore, - customerKey: customerKey, - deviceIds: deviceIds, - deviceType: deviceType, - deviceTypes: deviceTypes, - limit: limit, - manufacturer: manufacturer, - pageCursor: pageCursor, - search: search - ) - ) - ); - } - - /// - /// Request parameters for Update an Unmanaged Device. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - object? customMetadata = default, - string deviceId = default, - bool? isManaged = default - ) - { - CustomMetadata = customMetadata; - DeviceId = deviceId; - IsManaged = isManaged; - } - - /// - /// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Set a key to `null` or to an empty string to remove that key from the custom metadata. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? CustomMetadata { get; set; } - - /// - /// ID of the unmanaged device that you want to update. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsManaged { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/devices/unmanaged/update", requestOptions); - } - - /// - /// Updates a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - public void Update( - object? customMetadata = default, - string deviceId = default, - bool? isManaged = default - ) - { - Update( - new UpdateRequest( - customMetadata: customMetadata, - deviceId: deviceId, - isManaged: isManaged - ) - ); - } - - /// - /// Updates a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/devices/unmanaged/update", requestOptions); - } - - /// - /// Updates a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. - /// - /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - public async Task UpdateAsync( - object? customMetadata = default, - string deviceId = default, - bool? isManaged = default - ) - { - await UpdateAsync( - new UpdateRequest( - customMetadata: customMetadata, - deviceId: deviceId, - isManaged: isManaged - ) - ); - } - } +/// +/// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +public List List(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default) +{ +return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, search: search)); +} + +/// +/// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/devices/unmanaged/list", requestOptions)).EnsureData("/devices/unmanaged/list").Devices; +} + +/// +/// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default) +{ +return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, search: search))); +} + +/// +/// Request parameters for Update an Unmanaged Device. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(object? customMetadata = default, string deviceId = default, bool? isManaged = default) +{ +CustomMetadata = customMetadata; +DeviceId = deviceId; +IsManaged = isManaged; +} + +/// +/// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Set a key to `null` or to an empty string to remove that key from the custom metadata. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? CustomMetadata { get; set; } + +/// +/// ID of the unmanaged device that you want to update. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsManaged { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/devices/unmanaged/update", requestOptions); +} + +/// +/// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +public void Update(object? customMetadata = default, string deviceId = default, bool? isManaged = default) +{ +Update(new UpdateRequest(customMetadata: customMetadata, deviceId: deviceId, isManaged: isManaged)); +} + +/// +/// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/devices/unmanaged/update", requestOptions); +} + +/// +/// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. +/// +/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +public async Task UpdateAsync(object? customMetadata = default, string deviceId = default, bool? isManaged = default) +{ +await UpdateAsync(new UpdateRequest(customMetadata: customMetadata, deviceId: deviceId, isManaged: isManaged)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.UnmanagedDevices UnmanagedDevices => new(this); - } - - public partial interface ISeamClient - { - public Api.UnmanagedDevices UnmanagedDevices { get; } - } +public partial class SeamClient +{ +public Api.UnmanagedDevices UnmanagedDevices => new(this); +} + +public partial interface ISeamClient +{ +public Api.UnmanagedDevices UnmanagedDevices { get; } +} } diff --git a/src/Seam/Api/UnmanagedUserIdentities.cs b/src/Seam/Api/UnmanagedUserIdentities.cs index d390dba2..6012a742 100644 --- a/src/Seam/Api/UnmanagedUserIdentities.cs +++ b/src/Seam/Api/UnmanagedUserIdentities.cs @@ -9,443 +9,371 @@ namespace Seam.Api { - public class UnmanagedUserIdentities - { - private ISeamClient _seam; - - public UnmanagedUserIdentities(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Get an Unmanaged User Identity. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string userIdentityId = default) - { - UserIdentityId = userIdentityId; - } - - /// - /// ID of the unmanaged user identity that you want to get. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(UnmanagedUserIdentity userIdentity = default) - { - UserIdentity = userIdentity; - } - - /// - /// OK - /// - [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedUserIdentity UserIdentity { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). - /// - public UnmanagedUserIdentity Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/user_identities/unmanaged/get", requestOptions) - .EnsureData("/user_identities/unmanaged/get") - .UserIdentity; - } - - /// - /// Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). - /// - public UnmanagedUserIdentity Get(string userIdentityId = default) - { - return Get(new GetRequest(userIdentityId: userIdentityId)); - } - - /// - /// Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync("/user_identities/unmanaged/get", requestOptions) - ) - .EnsureData("/user_identities/unmanaged/get") - .UserIdentity; - } - - /// - /// Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). - /// - public async Task GetAsync(string userIdentityId = default) - { - return (await GetAsync(new GetRequest(userIdentityId: userIdentityId))); - } - - /// - /// Request parameters for List Unmanaged User Identities. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? createdBefore = default, - int? limit = default, - string? pageCursor = default, - string? search = default - ) - { - CreatedBefore = createdBefore; - Limit = limit; - PageCursor = pageCursor; - Search = search; - } - - /// - /// Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public int? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned unmanaged user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `user_identity_id` or `acs_system_id`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List userIdentities = default) - { - UserIdentities = userIdentities; - } - - /// - /// OK - /// - [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] - public List UserIdentities { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/user_identities/unmanaged/list", requestOptions) - .EnsureData("/user_identities/unmanaged/list") - .UserIdentities; - } - - /// - /// Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). - /// - public List List( - string? createdBefore = default, - int? limit = default, - string? pageCursor = default, - string? search = default - ) - { - return List( - new ListRequest( - createdBefore: createdBefore, - limit: limit, - pageCursor: pageCursor, - search: search - ) - ); - } - - /// - /// Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/user_identities/unmanaged/list", - requestOptions - ) - ) - .EnsureData("/user_identities/unmanaged/list") - .UserIdentities; - } - - /// - /// Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). - /// - public async Task> ListAsync( - string? createdBefore = default, - int? limit = default, - string? pageCursor = default, - string? search = default - ) - { - return ( - await ListAsync( - new ListRequest( - createdBefore: createdBefore, - limit: limit, - pageCursor: pageCursor, - search: search - ) - ) - ); - } - - /// - /// Request parameters for Update an Unmanaged User Identity. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - bool isManaged = default, - string userIdentityId = default, - string? userIdentityKey = default - ) - { - IsManaged = isManaged; - UserIdentityId = userIdentityId; - UserIdentityKey = userIdentityKey; - } - - /// - /// Must be set to true to convert the unmanaged user identity to managed. - /// - [DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// ID of the unmanaged user identity that you want to update. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - /// - /// Unique key for the user identity. If not provided, the existing key will be preserved. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates an unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. - /// - /// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/user_identities/unmanaged/update", requestOptions); - } - - /// - /// Updates an unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. - /// - /// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. - /// - public void Update( - bool isManaged = default, - string userIdentityId = default, - string? userIdentityKey = default - ) - { - Update( - new UpdateRequest( - isManaged: isManaged, - userIdentityId: userIdentityId, - userIdentityKey: userIdentityKey - ) - ); - } - - /// - /// Updates an unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. - /// - /// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/user_identities/unmanaged/update", requestOptions); - } - - /// - /// Updates an unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. - /// - /// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. - /// - public async Task UpdateAsync( - bool isManaged = default, - string userIdentityId = default, - string? userIdentityKey = default - ) - { - await UpdateAsync( - new UpdateRequest( - isManaged: isManaged, - userIdentityId: userIdentityId, - userIdentityKey: userIdentityKey - ) - ); - } - } +public class UnmanagedUserIdentities +{ +private ISeamClient _seam; + +public UnmanagedUserIdentities(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Get an Unmanaged User Identity. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string userIdentityId = default) +{ +UserIdentityId = userIdentityId; +} + +/// +/// ID of the unmanaged user identity that you want to get. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(UnmanagedUserIdentity userIdentity = default) +{ +UserIdentity = userIdentity; +} + +/// +/// OK +/// +[DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedUserIdentity UserIdentity { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). +/// +public UnmanagedUserIdentity Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/user_identities/unmanaged/get", requestOptions).EnsureData("/user_identities/unmanaged/get").UserIdentity; +} + +/// +/// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). +/// +public UnmanagedUserIdentity Get(string userIdentityId = default) +{ +return Get(new GetRequest(userIdentityId: userIdentityId)); +} + +/// +/// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/user_identities/unmanaged/get", requestOptions)).EnsureData("/user_identities/unmanaged/get").UserIdentity; +} + +/// +/// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). +/// +public async Task GetAsync(string userIdentityId = default) +{ +return (await GetAsync(new GetRequest(userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for List Unmanaged User Identities. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default) +{ +CreatedBefore = createdBefore; +Limit = limit; +PageCursor = pageCursor; +Search = search; +} + +/// +/// Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp. +/// +[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedBefore { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public int? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned unmanaged user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `user_identity_id` or `acs_system_id`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List userIdentities = default) +{ +UserIdentities = userIdentities; +} + +/// +/// OK +/// +[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] +public List UserIdentities { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/user_identities/unmanaged/list", requestOptions).EnsureData("/user_identities/unmanaged/list").UserIdentities; +} + +/// +/// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). +/// +public List List(string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default) +{ +return List(new ListRequest(createdBefore: createdBefore, limit: limit, pageCursor: pageCursor, search: search)); +} + +/// +/// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/user_identities/unmanaged/list", requestOptions)).EnsureData("/user_identities/unmanaged/list").UserIdentities; +} + +/// +/// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). +/// +public async Task> ListAsync(string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default) +{ +return (await ListAsync(new ListRequest(createdBefore: createdBefore, limit: limit, pageCursor: pageCursor, search: search))); +} + +/// +/// Request parameters for Update an Unmanaged User Identity. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(bool isManaged = default, string userIdentityId = default, string? userIdentityKey = default) +{ +IsManaged = isManaged; +UserIdentityId = userIdentityId; +UserIdentityKey = userIdentityKey; +} + +/// +/// Must be set to true to convert the unmanaged user identity to managed. +/// +[DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// ID of the unmanaged user identity that you want to update. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +/// +/// Unique key for the user identity. If not provided, the existing key will be preserved. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. +/// +/// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/user_identities/unmanaged/update", requestOptions); +} + +/// +/// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. +/// +/// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. +/// +public void Update(bool isManaged = default, string userIdentityId = default, string? userIdentityKey = default) +{ +Update(new UpdateRequest(isManaged: isManaged, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} + +/// +/// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. +/// +/// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/user_identities/unmanaged/update", requestOptions); +} + +/// +/// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. +/// +/// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. +/// +public async Task UpdateAsync(bool isManaged = default, string userIdentityId = default, string? userIdentityKey = default) +{ +await UpdateAsync(new UpdateRequest(isManaged: isManaged, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.UnmanagedUserIdentities UnmanagedUserIdentities => new(this); - } +public partial class SeamClient +{ +public Api.UnmanagedUserIdentities UnmanagedUserIdentities => new(this); +} - public partial interface ISeamClient - { - public Api.UnmanagedUserIdentities UnmanagedUserIdentities { get; } - } +public partial interface ISeamClient +{ +public Api.UnmanagedUserIdentities UnmanagedUserIdentities { get; } +} } diff --git a/src/Seam/Api/UserIdentities.cs b/src/Seam/Api/UserIdentities.cs index 0a069440..1c7a2cf2 100644 --- a/src/Seam/Api/UserIdentities.cs +++ b/src/Seam/Api/UserIdentities.cs @@ -9,2007 +9,1664 @@ namespace Seam.Api { - public class UserIdentities - { - private ISeamClient _seam; - - public UserIdentities(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Add an ACS User to a User Identity. - /// - [DataContract(Name = "addAcsUserRequest_request")] - public class AddAcsUserRequest - { - [JsonConstructorAttribute] - protected AddAcsUserRequest() { } - - public AddAcsUserRequest( - string acsUserId = default, - string? userIdentityId = default, - string? userIdentityKey = default - ) - { - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - UserIdentityKey = userIdentityKey; - } - - /// - /// ID of the access system user that you want to add to the user identity. - /// - [DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsUserId { get; set; } - - /// - /// ID of the user identity to which you want to add an access system user. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Key of the user identity to which you want to add an access system user. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - /// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. - /// - /// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. - /// - public void AddAcsUser(AddAcsUserRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Put("/user_identities/add_acs_user", requestOptions); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - /// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. - /// - /// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. - /// - public void AddAcsUser( - string acsUserId = default, - string? userIdentityId = default, - string? userIdentityKey = default - ) - { - AddAcsUser( - new AddAcsUserRequest( - acsUserId: acsUserId, - userIdentityId: userIdentityId, - userIdentityKey: userIdentityKey - ) - ); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - /// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. - /// - /// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. - /// - public async Task AddAcsUserAsync(AddAcsUserRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PutAsync("/user_identities/add_acs_user", requestOptions); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - /// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. - /// - /// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. - /// - public async Task AddAcsUserAsync( - string acsUserId = default, - string? userIdentityId = default, - string? userIdentityKey = default - ) - { - await AddAcsUserAsync( - new AddAcsUserRequest( - acsUserId: acsUserId, - userIdentityId: userIdentityId, - userIdentityKey: userIdentityKey - ) - ); - } - - /// - /// Request parameters for Create a User Identity. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - List? acsSystemIds = default, - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default, - string? userIdentityKey = default - ) - { - AcsSystemIds = acsSystemIds; - EmailAddress = emailAddress; - FullName = fullName; - PhoneNumber = phoneNumber; - UserIdentityKey = userIdentityKey; - } - - /// - /// List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. - /// - [DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] - public List? AcsSystemIds { get; set; } - - /// - /// Unique email address for the new user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Full name of the user associated with the new user identity. - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// Unique phone number for the new user identity in E.164 format (for example, +15555550100). - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Unique key for the new user identity. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(UserIdentity userIdentity = default) - { - UserIdentity = userIdentity; - } - - /// - /// OK - /// - [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] - public UserIdentity UserIdentity { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public UserIdentity Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/user_identities/create", requestOptions) - .EnsureData("/user_identities/create") - .UserIdentity; - } - - /// - /// Creates a new [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public UserIdentity Create( - List? acsSystemIds = default, - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default, - string? userIdentityKey = default - ) - { - return Create( - new CreateRequest( - acsSystemIds: acsSystemIds, - emailAddress: emailAddress, - fullName: fullName, - phoneNumber: phoneNumber, - userIdentityKey: userIdentityKey - ) - ); - } - - /// - /// Creates a new [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync("/user_identities/create", requestOptions) - ) - .EnsureData("/user_identities/create") - .UserIdentity; - } - - /// - /// Creates a new [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task CreateAsync( - List? acsSystemIds = default, - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default, - string? userIdentityKey = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - acsSystemIds: acsSystemIds, - emailAddress: emailAddress, - fullName: fullName, - phoneNumber: phoneNumber, - userIdentityKey: userIdentityKey - ) - ) - ); - } - - /// - /// Request parameters for Delete a User Identity. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string userIdentityId = default) - { - UserIdentityId = userIdentityId; - } - - /// - /// ID of the user identity that you want to delete. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://docs.seam.co/api/acs/credentials), [acs users](https://docs.seam.co/api/acs/users) and [client sessions](https://docs.seam.co/api/client_sessions). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/user_identities/delete", requestOptions); - } - - /// - /// Deletes a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://docs.seam.co/api/acs/credentials), [acs users](https://docs.seam.co/api/acs/users) and [client sessions](https://docs.seam.co/api/client_sessions). - /// - public void Delete(string userIdentityId = default) - { - Delete(new DeleteRequest(userIdentityId: userIdentityId)); - } - - /// - /// Deletes a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://docs.seam.co/api/acs/credentials), [acs users](https://docs.seam.co/api/acs/users) and [client sessions](https://docs.seam.co/api/client_sessions). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/user_identities/delete", requestOptions); - } - - /// - /// Deletes a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://docs.seam.co/api/acs/credentials), [acs users](https://docs.seam.co/api/acs/users) and [client sessions](https://docs.seam.co/api/client_sessions). - /// - public async Task DeleteAsync(string userIdentityId = default) - { - await DeleteAsync(new DeleteRequest(userIdentityId: userIdentityId)); - } - - /// - /// Request parameters for Generate an Instant Key. - /// - [DataContract(Name = "generateInstantKeyRequest_request")] - public class GenerateInstantKeyRequest - { - [JsonConstructorAttribute] - protected GenerateInstantKeyRequest() { } - - public GenerateInstantKeyRequest( - string? customizationProfileId = default, - float? maxUseCount = default, - string userIdentityId = default - ) - { - CustomizationProfileId = customizationProfileId; - MaxUseCount = maxUseCount; - UserIdentityId = userIdentityId; - } - - [DataMember( - Name = "customization_profile_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomizationProfileId { get; set; } - - /// - /// Maximum number of times the instant key can be used. Default: 1. - /// - [DataMember(Name = "max_use_count", IsRequired = false, EmitDefaultValue = false)] - public float? MaxUseCount { get; set; } - - /// - /// ID of the user identity for which you want to generate an instant key. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "generateInstantKeyResponse_response")] - public class GenerateInstantKeyResponse - { - [JsonConstructorAttribute] - protected GenerateInstantKeyResponse() { } - - public GenerateInstantKeyResponse(InstantKey instantKey = default) - { - InstantKey = instantKey; - } - - /// - /// OK - /// - [DataMember(Name = "instant_key", IsRequired = false, EmitDefaultValue = false)] - public InstantKey InstantKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Generates a new [instant key](https://docs.seam.co/capability-guides/instant-keys) for a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public InstantKey GenerateInstantKey(GenerateInstantKeyRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post( - "/user_identities/generate_instant_key", - requestOptions - ) - .EnsureData("/user_identities/generate_instant_key") - .InstantKey; - } - - /// - /// Generates a new [instant key](https://docs.seam.co/capability-guides/instant-keys) for a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public InstantKey GenerateInstantKey( - string? customizationProfileId = default, - float? maxUseCount = default, - string userIdentityId = default - ) - { - return GenerateInstantKey( - new GenerateInstantKeyRequest( - customizationProfileId: customizationProfileId, - maxUseCount: maxUseCount, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Generates a new [instant key](https://docs.seam.co/capability-guides/instant-keys) for a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task GenerateInstantKeyAsync(GenerateInstantKeyRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/user_identities/generate_instant_key", - requestOptions - ) - ) - .EnsureData("/user_identities/generate_instant_key") - .InstantKey; - } - - /// - /// Generates a new [instant key](https://docs.seam.co/capability-guides/instant-keys) for a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task GenerateInstantKeyAsync( - string? customizationProfileId = default, - float? maxUseCount = default, - string userIdentityId = default - ) - { - return ( - await GenerateInstantKeyAsync( - new GenerateInstantKeyRequest( - customizationProfileId: customizationProfileId, - maxUseCount: maxUseCount, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for Get a User Identity. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string? userIdentityId = default, string? userIdentityKey = default) - { - UserIdentityId = userIdentityId; - UserIdentityKey = userIdentityKey; - } - - /// - /// ID of the user identity that you want to get. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(UserIdentity userIdentity = default) - { - UserIdentity = userIdentity; - } - - /// - /// OK - /// - [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] - public UserIdentity UserIdentity { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public UserIdentity Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/user_identities/get", requestOptions) - .EnsureData("/user_identities/get") - .UserIdentity; - } - - /// - /// Returns a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public UserIdentity Get(string? userIdentityId = default, string? userIdentityKey = default) - { - return Get( - new GetRequest(userIdentityId: userIdentityId, userIdentityKey: userIdentityKey) - ); - } - - /// - /// Returns a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/user_identities/get", requestOptions)) - .EnsureData("/user_identities/get") - .UserIdentity; - } - - /// - /// Returns a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task GetAsync( - string? userIdentityId = default, - string? userIdentityKey = default - ) - { - return ( - await GetAsync( - new GetRequest(userIdentityId: userIdentityId, userIdentityKey: userIdentityKey) - ) - ); - } - - /// - /// Request parameters for Grant a User Identity Access to a Device. - /// - [DataContract(Name = "grantAccessToDeviceRequest_request")] - public class GrantAccessToDeviceRequest - { - [JsonConstructorAttribute] - protected GrantAccessToDeviceRequest() { } - - public GrantAccessToDeviceRequest( - string deviceId = default, - string userIdentityId = default - ) - { - DeviceId = deviceId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the managed device to which you want to grant access to the user identity. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// ID of the user identity that you want to grant access to a device. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Grants a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://docs.seam.co/core-concepts/devices/). - /// - public void GrantAccessToDevice(GrantAccessToDeviceRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Put("/user_identities/grant_access_to_device", requestOptions); - } - - /// - /// Grants a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://docs.seam.co/core-concepts/devices/). - /// - public void GrantAccessToDevice(string deviceId = default, string userIdentityId = default) - { - GrantAccessToDevice( - new GrantAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId) - ); - } - - /// - /// Grants a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://docs.seam.co/core-concepts/devices/). - /// - public async Task GrantAccessToDeviceAsync(GrantAccessToDeviceRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PutAsync("/user_identities/grant_access_to_device", requestOptions); - } - - /// - /// Grants a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://docs.seam.co/core-concepts/devices/). - /// - public async Task GrantAccessToDeviceAsync( - string deviceId = default, - string userIdentityId = default - ) - { - await GrantAccessToDeviceAsync( - new GrantAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId) - ); - } - - /// - /// Request parameters for List User Identities. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? createdBefore = default, - string? credentialManagerAcsSystemId = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - List? userIdentityIds = default - ) - { - CreatedBefore = createdBefore; - CredentialManagerAcsSystemId = credentialManagerAcsSystemId; - Limit = limit; - PageCursor = pageCursor; - Search = search; - UserIdentityIds = userIdentityIds; - } - - /// - /// Timestamp by which to limit returned user identities. Returns user identities created before this timestamp. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// `acs_system_id` of the credential manager by which you want to filter the list of user identities. - /// - [DataMember( - Name = "credential_manager_acs_system_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CredentialManagerAcsSystemId { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public int? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address` or `user_identity_id`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// Array of user identity IDs by which to filter the list of user identities. - /// - [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] - public List? UserIdentityIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List userIdentities = default) - { - UserIdentities = userIdentities; - } - - /// - /// OK - /// - [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] - public List UserIdentities { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/user_identities/list", requestOptions) - .EnsureData("/user_identities/list") - .UserIdentities; - } - - /// - /// Returns a list of all [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public List List( - string? createdBefore = default, - string? credentialManagerAcsSystemId = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - List? userIdentityIds = default - ) - { - return List( - new ListRequest( - createdBefore: createdBefore, - credentialManagerAcsSystemId: credentialManagerAcsSystemId, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentityIds: userIdentityIds - ) - ); - } - - /// - /// Returns a list of all [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/user_identities/list", requestOptions)) - .EnsureData("/user_identities/list") - .UserIdentities; - } - - /// - /// Returns a list of all [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task> ListAsync( - string? createdBefore = default, - string? credentialManagerAcsSystemId = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - List? userIdentityIds = default - ) - { - return ( - await ListAsync( - new ListRequest( - createdBefore: createdBefore, - credentialManagerAcsSystemId: credentialManagerAcsSystemId, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentityIds: userIdentityIds - ) - ) - ); - } - - /// - /// Request parameters for List Accessible Devices for a User Identity. - /// - [DataContract(Name = "listAccessibleDevicesRequest_request")] - public class ListAccessibleDevicesRequest - { - [JsonConstructorAttribute] - protected ListAccessibleDevicesRequest() { } - - public ListAccessibleDevicesRequest(string userIdentityId = default) - { - UserIdentityId = userIdentityId; - } - - /// - /// ID of the user identity for which you want to retrieve all accessible devices. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listAccessibleDevicesResponse_response")] - public class ListAccessibleDevicesResponse - { - [JsonConstructorAttribute] - protected ListAccessibleDevicesResponse() { } - - public ListAccessibleDevicesResponse(List devices = default) - { - Devices = devices; - } - - /// - /// OK - /// - [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] - public List Devices { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [devices](https://docs.seam.co/core-concepts/devices) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. - /// - public List ListAccessibleDevices(ListAccessibleDevicesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get( - "/user_identities/list_accessible_devices", - requestOptions - ) - .EnsureData("/user_identities/list_accessible_devices") - .Devices; - } - - /// - /// Returns a list of all [devices](https://docs.seam.co/core-concepts/devices) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. - /// - public List ListAccessibleDevices(string userIdentityId = default) - { - return ListAccessibleDevices( - new ListAccessibleDevicesRequest(userIdentityId: userIdentityId) - ); - } - - /// - /// Returns a list of all [devices](https://docs.seam.co/core-concepts/devices) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. - /// - public async Task> ListAccessibleDevicesAsync( - ListAccessibleDevicesRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/user_identities/list_accessible_devices", - requestOptions - ) - ) - .EnsureData("/user_identities/list_accessible_devices") - .Devices; - } - - /// - /// Returns a list of all [devices](https://docs.seam.co/core-concepts/devices) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. - /// - public async Task> ListAccessibleDevicesAsync(string userIdentityId = default) - { - return ( - await ListAccessibleDevicesAsync( - new ListAccessibleDevicesRequest(userIdentityId: userIdentityId) - ) - ); - } - - /// - /// Request parameters for List Accessible Entrances for a User Identity. - /// - [DataContract(Name = "listAccessibleEntrancesRequest_request")] - public class ListAccessibleEntrancesRequest - { - [JsonConstructorAttribute] - protected ListAccessibleEntrancesRequest() { } - - public ListAccessibleEntrancesRequest(string userIdentityId = default) - { - UserIdentityId = userIdentityId; - } - - /// - /// ID of the user identity for which you want to retrieve all accessible entrances. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listAccessibleEntrancesResponse_response")] - public class ListAccessibleEntrancesResponse - { - [JsonConstructorAttribute] - protected ListAccessibleEntrancesResponse() { } - - public ListAccessibleEntrancesResponse(List acsEntrances = default) - { - AcsEntrances = acsEntrances; - } - - /// - /// OK - /// - [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] - public List AcsEntrances { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [ACS entrances](https://docs.seam.co/api/acs/entrances) accessible to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. - /// - public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get( - "/user_identities/list_accessible_entrances", - requestOptions - ) - .EnsureData("/user_identities/list_accessible_entrances") - .AcsEntrances; - } - - /// - /// Returns a list of all [ACS entrances](https://docs.seam.co/api/acs/entrances) accessible to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. - /// - public List ListAccessibleEntrances(string userIdentityId = default) - { - return ListAccessibleEntrances( - new ListAccessibleEntrancesRequest(userIdentityId: userIdentityId) - ); - } - - /// - /// Returns a list of all [ACS entrances](https://docs.seam.co/api/acs/entrances) accessible to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. - /// - public async Task> ListAccessibleEntrancesAsync( - ListAccessibleEntrancesRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/user_identities/list_accessible_entrances", - requestOptions - ) - ) - .EnsureData("/user_identities/list_accessible_entrances") - .AcsEntrances; - } - - /// - /// Returns a list of all [ACS entrances](https://docs.seam.co/api/acs/entrances) accessible to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. - /// - public async Task> ListAccessibleEntrancesAsync( - string userIdentityId = default - ) - { - return ( - await ListAccessibleEntrancesAsync( - new ListAccessibleEntrancesRequest(userIdentityId: userIdentityId) - ) - ); - } - - /// - /// Request parameters for List ACS Systems Associated with a User Identity. - /// - [DataContract(Name = "listAcsSystemsRequest_request")] - public class ListAcsSystemsRequest - { - [JsonConstructorAttribute] - protected ListAcsSystemsRequest() { } - - public ListAcsSystemsRequest(string userIdentityId = default) - { - UserIdentityId = userIdentityId; - } - - /// - /// ID of the user identity for which you want to retrieve all access systems. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listAcsSystemsResponse_response")] - public class ListAcsSystemsResponse - { - [JsonConstructorAttribute] - protected ListAcsSystemsResponse() { } - - public ListAcsSystemsResponse(List acsSystems = default) - { - AcsSystems = acsSystems; - } - - /// - /// OK - /// - [DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] - public List AcsSystems { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public List ListAcsSystems(ListAcsSystemsRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/user_identities/list_acs_systems", requestOptions) - .EnsureData("/user_identities/list_acs_systems") - .AcsSystems; - } - - /// - /// Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public List ListAcsSystems(string userIdentityId = default) - { - return ListAcsSystems(new ListAcsSystemsRequest(userIdentityId: userIdentityId)); - } - - /// - /// Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task> ListAcsSystemsAsync(ListAcsSystemsRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/user_identities/list_acs_systems", - requestOptions - ) - ) - .EnsureData("/user_identities/list_acs_systems") - .AcsSystems; - } - - /// - /// Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task> ListAcsSystemsAsync(string userIdentityId = default) - { - return ( - await ListAcsSystemsAsync(new ListAcsSystemsRequest(userIdentityId: userIdentityId)) - ); - } - - /// - /// Request parameters for List ACS Users Associated with a User Identity. - /// - [DataContract(Name = "listAcsUsersRequest_request")] - public class ListAcsUsersRequest - { - [JsonConstructorAttribute] - protected ListAcsUsersRequest() { } - - public ListAcsUsersRequest(string userIdentityId = default) - { - UserIdentityId = userIdentityId; - } - - /// - /// ID of the user identity for which you want to retrieve all access system users. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listAcsUsersResponse_response")] - public class ListAcsUsersResponse - { - [JsonConstructorAttribute] - protected ListAcsUsersResponse() { } - - public ListAcsUsersResponse(List acsUsers = default) - { - AcsUsers = acsUsers; - } - - /// - /// OK - /// - [DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] - public List AcsUsers { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public List ListAcsUsers(ListAcsUsersRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/user_identities/list_acs_users", requestOptions) - .EnsureData("/user_identities/list_acs_users") - .AcsUsers; - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public List ListAcsUsers(string userIdentityId = default) - { - return ListAcsUsers(new ListAcsUsersRequest(userIdentityId: userIdentityId)); - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task> ListAcsUsersAsync(ListAcsUsersRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/user_identities/list_acs_users", - requestOptions - ) - ) - .EnsureData("/user_identities/list_acs_users") - .AcsUsers; - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task> ListAcsUsersAsync(string userIdentityId = default) - { - return ( - await ListAcsUsersAsync(new ListAcsUsersRequest(userIdentityId: userIdentityId)) - ); - } - - /// - /// Request parameters for Merge User Identities. - /// - [DataContract(Name = "mergeRequest_request")] - public class MergeRequest - { - [JsonConstructorAttribute] - protected MergeRequest() { } - - public MergeRequest( - List? mergedUserIdentityIds = default, - List? mergedUserIdentityKeys = default, - string? userIdentityId = default, - string? userIdentityKey = default - ) - { - MergedUserIdentityIds = mergedUserIdentityIds; - MergedUserIdentityKeys = mergedUserIdentityKeys; - UserIdentityId = userIdentityId; - UserIdentityKey = userIdentityKey; - } - - /// - /// IDs of the user identities to merge into the primary user identity. These user identities are deleted. - /// - [DataMember( - Name = "merged_user_identity_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? MergedUserIdentityIds { get; set; } - - /// - /// Keys of the user identities to merge into the primary user identity. These user identities are deleted. - /// - [DataMember( - Name = "merged_user_identity_keys", - IsRequired = false, - EmitDefaultValue = false - )] - public List? MergedUserIdentityKeys { get; set; } - - /// - /// ID of the primary user identity to keep. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Key of the primary user identity to keep. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. - /// - /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. - /// - /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. - /// - /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. - /// - public void Merge(MergeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/user_identities/merge", requestOptions); - } - - /// - /// Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. - /// - /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. - /// - /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. - /// - /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. - /// - public void Merge( - List? mergedUserIdentityIds = default, - List? mergedUserIdentityKeys = default, - string? userIdentityId = default, - string? userIdentityKey = default - ) - { - Merge( - new MergeRequest( - mergedUserIdentityIds: mergedUserIdentityIds, - mergedUserIdentityKeys: mergedUserIdentityKeys, - userIdentityId: userIdentityId, - userIdentityKey: userIdentityKey - ) - ); - } - - /// - /// Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. - /// - /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. - /// - /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. - /// - /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. - /// - public async Task MergeAsync(MergeRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/user_identities/merge", requestOptions); - } - - /// - /// Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. - /// - /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. - /// - /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. - /// - /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. - /// - public async Task MergeAsync( - List? mergedUserIdentityIds = default, - List? mergedUserIdentityKeys = default, - string? userIdentityId = default, - string? userIdentityKey = default - ) - { - await MergeAsync( - new MergeRequest( - mergedUserIdentityIds: mergedUserIdentityIds, - mergedUserIdentityKeys: mergedUserIdentityKeys, - userIdentityId: userIdentityId, - userIdentityKey: userIdentityKey - ) - ); - } - - /// - /// Request parameters for Remove an ACS User from a User Identity. - /// - [DataContract(Name = "removeAcsUserRequest_request")] - public class RemoveAcsUserRequest - { - [JsonConstructorAttribute] - protected RemoveAcsUserRequest() { } - - public RemoveAcsUserRequest(string acsUserId = default, string userIdentityId = default) - { - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system user that you want to remove from the user identity.. - /// - [DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsUserId { get; set; } - - /// - /// ID of the user identity from which you want to remove an access system user. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public void RemoveAcsUser(RemoveAcsUserRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/user_identities/remove_acs_user", requestOptions); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public void RemoveAcsUser(string acsUserId = default, string userIdentityId = default) - { - RemoveAcsUser( - new RemoveAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId) - ); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task RemoveAcsUserAsync(RemoveAcsUserRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/user_identities/remove_acs_user", requestOptions); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task RemoveAcsUserAsync( - string acsUserId = default, - string userIdentityId = default - ) - { - await RemoveAcsUserAsync( - new RemoveAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId) - ); - } - - /// - /// Request parameters for Revoke Access to a Device from a User Identity. - /// - [DataContract(Name = "revokeAccessToDeviceRequest_request")] - public class RevokeAccessToDeviceRequest - { - [JsonConstructorAttribute] - protected RevokeAccessToDeviceRequest() { } - - public RevokeAccessToDeviceRequest( - string deviceId = default, - string userIdentityId = default - ) - { - DeviceId = deviceId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the managed device to which you want to revoke access from the user identity. - /// - [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// ID of the user identity from which you want to revoke access to a device. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Revokes access to a specified [device](https://docs.seam.co/core-concepts/devices/) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public void RevokeAccessToDevice(RevokeAccessToDeviceRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/user_identities/revoke_access_to_device", requestOptions); - } - - /// - /// Revokes access to a specified [device](https://docs.seam.co/core-concepts/devices/) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public void RevokeAccessToDevice(string deviceId = default, string userIdentityId = default) - { - RevokeAccessToDevice( - new RevokeAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId) - ); - } - - /// - /// Revokes access to a specified [device](https://docs.seam.co/core-concepts/devices/) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task RevokeAccessToDeviceAsync(RevokeAccessToDeviceRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync( - "/user_identities/revoke_access_to_device", - requestOptions - ); - } - - /// - /// Revokes access to a specified [device](https://docs.seam.co/core-concepts/devices/) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task RevokeAccessToDeviceAsync( - string deviceId = default, - string userIdentityId = default - ) - { - await RevokeAccessToDeviceAsync( - new RevokeAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId) - ); - } - - /// - /// Request parameters for Update a User Identity. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default, - string userIdentityId = default, - string? userIdentityKey = default - ) - { - EmailAddress = emailAddress; - FullName = fullName; - PhoneNumber = phoneNumber; - UserIdentityId = userIdentityId; - UserIdentityKey = userIdentityKey; - } - - /// - /// Unique email address for the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Full name of the user associated with the user identity. - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// Unique phone number for the user identity. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// ID of the user identity that you want to update. - /// - [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - /// - /// Unique key for the user identity. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/user_identities/update", requestOptions); - } - - /// - /// Updates a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public void Update( - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default, - string userIdentityId = default, - string? userIdentityKey = default - ) - { - Update( - new UpdateRequest( - emailAddress: emailAddress, - fullName: fullName, - phoneNumber: phoneNumber, - userIdentityId: userIdentityId, - userIdentityKey: userIdentityKey - ) - ); - } - - /// - /// Updates a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/user_identities/update", requestOptions); - } - - /// - /// Updates a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). - /// - public async Task UpdateAsync( - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default, - string userIdentityId = default, - string? userIdentityKey = default - ) - { - await UpdateAsync( - new UpdateRequest( - emailAddress: emailAddress, - fullName: fullName, - phoneNumber: phoneNumber, - userIdentityId: userIdentityId, - userIdentityKey: userIdentityKey - ) - ); - } - } +public class UserIdentities +{ +private ISeamClient _seam; + +public UserIdentities(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Add an ACS User to a User Identity. +/// +[DataContract(Name = "addAcsUserRequest_request")] +public class AddAcsUserRequest +{ +[JsonConstructorAttribute] +protected AddAcsUserRequest() { } + +public AddAcsUserRequest(string acsUserId = default, string? userIdentityId = default, string? userIdentityKey = default) +{ +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +UserIdentityKey = userIdentityKey; +} + +/// +/// ID of the access system user that you want to add to the user identity. +/// +[DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsUserId { get; set; } + +/// +/// ID of the user identity to which you want to add an access system user. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Key of the user identity to which you want to add an access system user. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +/// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. +/// +/// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. +/// +public void AddAcsUser(AddAcsUserRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Put("/user_identities/add_acs_user", requestOptions); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +/// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. +/// +/// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. +/// +public void AddAcsUser(string acsUserId = default, string? userIdentityId = default, string? userIdentityKey = default) +{ +AddAcsUser(new AddAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +/// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. +/// +/// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. +/// +public async Task AddAcsUserAsync(AddAcsUserRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PutAsync("/user_identities/add_acs_user", requestOptions); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +/// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. +/// +/// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. +/// +public async Task AddAcsUserAsync(string acsUserId = default, string? userIdentityId = default, string? userIdentityKey = default) +{ +await AddAcsUserAsync(new AddAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} + +/// +/// Request parameters for Create a User Identity. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(List? acsSystemIds = default, string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string? userIdentityKey = default) +{ +AcsSystemIds = acsSystemIds; +EmailAddress = emailAddress; +FullName = fullName; +PhoneNumber = phoneNumber; +UserIdentityKey = userIdentityKey; +} + +/// +/// List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. +/// +[DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsSystemIds { get; set; } + +/// +/// Unique email address for the new user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Full name of the user associated with the new user identity. +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// Unique phone number for the new user identity in E.164 format (for example, +15555550100). +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Unique key for the new user identity. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(UserIdentity userIdentity = default) +{ +UserIdentity = userIdentity; +} + +/// +/// OK +/// +[DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] +public UserIdentity UserIdentity { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public UserIdentity Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/user_identities/create", requestOptions).EnsureData("/user_identities/create").UserIdentity; +} + +/// +/// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public UserIdentity Create(List? acsSystemIds = default, string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string? userIdentityKey = default) +{ +return Create(new CreateRequest(acsSystemIds: acsSystemIds, emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityKey: userIdentityKey)); +} + +/// +/// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/user_identities/create", requestOptions)).EnsureData("/user_identities/create").UserIdentity; +} + +/// +/// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task CreateAsync(List? acsSystemIds = default, string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string? userIdentityKey = default) +{ +return (await CreateAsync(new CreateRequest(acsSystemIds: acsSystemIds, emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityKey: userIdentityKey))); +} + +/// +/// Request parameters for Delete a User Identity. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string userIdentityId = default) +{ +UserIdentityId = userIdentityId; +} + +/// +/// ID of the user identity that you want to delete. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/user_identities/delete", requestOptions); +} + +/// +/// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). +/// +public void Delete(string userIdentityId = default) +{ +Delete(new DeleteRequest(userIdentityId: userIdentityId)); +} + +/// +/// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/user_identities/delete", requestOptions); +} + +/// +/// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). +/// +public async Task DeleteAsync(string userIdentityId = default) +{ +await DeleteAsync(new DeleteRequest(userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Generate an Instant Key. +/// +[DataContract(Name = "generateInstantKeyRequest_request")] +public class GenerateInstantKeyRequest +{ +[JsonConstructorAttribute] +protected GenerateInstantKeyRequest() { } + +public GenerateInstantKeyRequest(string? customizationProfileId = default, float? maxUseCount = default, string userIdentityId = default) +{ +CustomizationProfileId = customizationProfileId; +MaxUseCount = maxUseCount; +UserIdentityId = userIdentityId; +} + +[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomizationProfileId { get; set; } + +/// +/// Maximum number of times the instant key can be used. Default: 1. +/// +[DataMember(Name = "max_use_count", IsRequired = false, EmitDefaultValue = false)] +public float? MaxUseCount { get; set; } + +/// +/// ID of the user identity for which you want to generate an instant key. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "generateInstantKeyResponse_response")] +public class GenerateInstantKeyResponse +{ +[JsonConstructorAttribute] +protected GenerateInstantKeyResponse() { } + +public GenerateInstantKeyResponse(InstantKey instantKey = default) +{ +InstantKey = instantKey; +} + +/// +/// OK +/// +[DataMember(Name = "instant_key", IsRequired = false, EmitDefaultValue = false)] +public InstantKey InstantKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public InstantKey GenerateInstantKey(GenerateInstantKeyRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/user_identities/generate_instant_key", requestOptions).EnsureData("/user_identities/generate_instant_key").InstantKey; +} + +/// +/// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public InstantKey GenerateInstantKey(string? customizationProfileId = default, float? maxUseCount = default, string userIdentityId = default) +{ +return GenerateInstantKey(new GenerateInstantKeyRequest(customizationProfileId: customizationProfileId, maxUseCount: maxUseCount, userIdentityId: userIdentityId)); +} + +/// +/// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task GenerateInstantKeyAsync(GenerateInstantKeyRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/user_identities/generate_instant_key", requestOptions)).EnsureData("/user_identities/generate_instant_key").InstantKey; +} + +/// +/// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task GenerateInstantKeyAsync(string? customizationProfileId = default, float? maxUseCount = default, string userIdentityId = default) +{ +return (await GenerateInstantKeyAsync(new GenerateInstantKeyRequest(customizationProfileId: customizationProfileId, maxUseCount: maxUseCount, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for Get a User Identity. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? userIdentityId = default, string? userIdentityKey = default) +{ +UserIdentityId = userIdentityId; +UserIdentityKey = userIdentityKey; +} + +/// +/// ID of the user identity that you want to get. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(UserIdentity userIdentity = default) +{ +UserIdentity = userIdentity; +} + +/// +/// OK +/// +[DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] +public UserIdentity UserIdentity { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public UserIdentity Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/user_identities/get", requestOptions).EnsureData("/user_identities/get").UserIdentity; +} + +/// +/// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public UserIdentity Get(string? userIdentityId = default, string? userIdentityKey = default) +{ +return Get(new GetRequest(userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} + +/// +/// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/user_identities/get", requestOptions)).EnsureData("/user_identities/get").UserIdentity; +} + +/// +/// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task GetAsync(string? userIdentityId = default, string? userIdentityKey = default) +{ +return (await GetAsync(new GetRequest(userIdentityId: userIdentityId, userIdentityKey: userIdentityKey))); +} + +/// +/// Request parameters for Grant a User Identity Access to a Device. +/// +[DataContract(Name = "grantAccessToDeviceRequest_request")] +public class GrantAccessToDeviceRequest +{ +[JsonConstructorAttribute] +protected GrantAccessToDeviceRequest() { } + +public GrantAccessToDeviceRequest(string deviceId = default, string userIdentityId = default) +{ +DeviceId = deviceId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the managed device to which you want to grant access to the user identity. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// ID of the user identity that you want to grant access to a device. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +public void GrantAccessToDevice(GrantAccessToDeviceRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Put("/user_identities/grant_access_to_device", requestOptions); +} + +/// +/// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +public void GrantAccessToDevice(string deviceId = default, string userIdentityId = default) +{ +GrantAccessToDevice(new GrantAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId)); +} + +/// +/// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +public async Task GrantAccessToDeviceAsync(GrantAccessToDeviceRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PutAsync("/user_identities/grant_access_to_device", requestOptions); +} + +/// +/// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). +/// +public async Task GrantAccessToDeviceAsync(string deviceId = default, string userIdentityId = default) +{ +await GrantAccessToDeviceAsync(new GrantAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for List User Identities. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? createdBefore = default, string? credentialManagerAcsSystemId = default, int? limit = default, string? pageCursor = default, string? search = default, List? userIdentityIds = default) +{ +CreatedBefore = createdBefore; +CredentialManagerAcsSystemId = credentialManagerAcsSystemId; +Limit = limit; +PageCursor = pageCursor; +Search = search; +UserIdentityIds = userIdentityIds; +} + +/// +/// Timestamp by which to limit returned user identities. Returns user identities created before this timestamp. +/// +[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedBefore { get; set; } + +/// +/// `acs_system_id` of the credential manager by which you want to filter the list of user identities. +/// +[DataMember(Name = "credential_manager_acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? CredentialManagerAcsSystemId { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public int? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address` or `user_identity_id`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// Array of user identity IDs by which to filter the list of user identities. +/// +[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] +public List? UserIdentityIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List userIdentities = default) +{ +UserIdentities = userIdentities; +} + +/// +/// OK +/// +[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] +public List UserIdentities { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/user_identities/list", requestOptions).EnsureData("/user_identities/list").UserIdentities; +} + +/// +/// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public List List(string? createdBefore = default, string? credentialManagerAcsSystemId = default, int? limit = default, string? pageCursor = default, string? search = default, List? userIdentityIds = default) +{ +return List(new ListRequest(createdBefore: createdBefore, credentialManagerAcsSystemId: credentialManagerAcsSystemId, limit: limit, pageCursor: pageCursor, search: search, userIdentityIds: userIdentityIds)); +} + +/// +/// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/user_identities/list", requestOptions)).EnsureData("/user_identities/list").UserIdentities; +} + +/// +/// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task> ListAsync(string? createdBefore = default, string? credentialManagerAcsSystemId = default, int? limit = default, string? pageCursor = default, string? search = default, List? userIdentityIds = default) +{ +return (await ListAsync(new ListRequest(createdBefore: createdBefore, credentialManagerAcsSystemId: credentialManagerAcsSystemId, limit: limit, pageCursor: pageCursor, search: search, userIdentityIds: userIdentityIds))); +} + +/// +/// Request parameters for List Accessible Devices for a User Identity. +/// +[DataContract(Name = "listAccessibleDevicesRequest_request")] +public class ListAccessibleDevicesRequest +{ +[JsonConstructorAttribute] +protected ListAccessibleDevicesRequest() { } + +public ListAccessibleDevicesRequest(string userIdentityId = default) +{ +UserIdentityId = userIdentityId; +} + +/// +/// ID of the user identity for which you want to retrieve all accessible devices. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listAccessibleDevicesResponse_response")] +public class ListAccessibleDevicesResponse +{ +[JsonConstructorAttribute] +protected ListAccessibleDevicesResponse() { } + +public ListAccessibleDevicesResponse(List devices = default) +{ +Devices = devices; +} + +/// +/// OK +/// +[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] +public List Devices { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. +/// +public List ListAccessibleDevices(ListAccessibleDevicesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/user_identities/list_accessible_devices", requestOptions).EnsureData("/user_identities/list_accessible_devices").Devices; +} + +/// +/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. +/// +public List ListAccessibleDevices(string userIdentityId = default) +{ +return ListAccessibleDevices(new ListAccessibleDevicesRequest(userIdentityId: userIdentityId)); +} + +/// +/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. +/// +public async Task> ListAccessibleDevicesAsync(ListAccessibleDevicesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/user_identities/list_accessible_devices", requestOptions)).EnsureData("/user_identities/list_accessible_devices").Devices; +} + +/// +/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. +/// +public async Task> ListAccessibleDevicesAsync(string userIdentityId = default) +{ +return (await ListAccessibleDevicesAsync(new ListAccessibleDevicesRequest(userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for List Accessible Entrances for a User Identity. +/// +[DataContract(Name = "listAccessibleEntrancesRequest_request")] +public class ListAccessibleEntrancesRequest +{ +[JsonConstructorAttribute] +protected ListAccessibleEntrancesRequest() { } + +public ListAccessibleEntrancesRequest(string userIdentityId = default) +{ +UserIdentityId = userIdentityId; +} + +/// +/// ID of the user identity for which you want to retrieve all accessible entrances. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listAccessibleEntrancesResponse_response")] +public class ListAccessibleEntrancesResponse +{ +[JsonConstructorAttribute] +protected ListAccessibleEntrancesResponse() { } + +public ListAccessibleEntrancesResponse(List acsEntrances = default) +{ +AcsEntrances = acsEntrances; +} + +/// +/// OK +/// +[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public List AcsEntrances { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. +/// +public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/user_identities/list_accessible_entrances", requestOptions).EnsureData("/user_identities/list_accessible_entrances").AcsEntrances; +} + +/// +/// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. +/// +public List ListAccessibleEntrances(string userIdentityId = default) +{ +return ListAccessibleEntrances(new ListAccessibleEntrancesRequest(userIdentityId: userIdentityId)); +} + +/// +/// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. +/// +public async Task> ListAccessibleEntrancesAsync(ListAccessibleEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/user_identities/list_accessible_entrances", requestOptions)).EnsureData("/user_identities/list_accessible_entrances").AcsEntrances; +} + +/// +/// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. +/// +public async Task> ListAccessibleEntrancesAsync(string userIdentityId = default) +{ +return (await ListAccessibleEntrancesAsync(new ListAccessibleEntrancesRequest(userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for List ACS Systems Associated with a User Identity. +/// +[DataContract(Name = "listAcsSystemsRequest_request")] +public class ListAcsSystemsRequest +{ +[JsonConstructorAttribute] +protected ListAcsSystemsRequest() { } + +public ListAcsSystemsRequest(string userIdentityId = default) +{ +UserIdentityId = userIdentityId; +} + +/// +/// ID of the user identity for which you want to retrieve all access systems. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listAcsSystemsResponse_response")] +public class ListAcsSystemsResponse +{ +[JsonConstructorAttribute] +protected ListAcsSystemsResponse() { } + +public ListAcsSystemsResponse(List acsSystems = default) +{ +AcsSystems = acsSystems; +} + +/// +/// OK +/// +[DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] +public List AcsSystems { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public List ListAcsSystems(ListAcsSystemsRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/user_identities/list_acs_systems", requestOptions).EnsureData("/user_identities/list_acs_systems").AcsSystems; +} + +/// +/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public List ListAcsSystems(string userIdentityId = default) +{ +return ListAcsSystems(new ListAcsSystemsRequest(userIdentityId: userIdentityId)); +} + +/// +/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task> ListAcsSystemsAsync(ListAcsSystemsRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/user_identities/list_acs_systems", requestOptions)).EnsureData("/user_identities/list_acs_systems").AcsSystems; +} + +/// +/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task> ListAcsSystemsAsync(string userIdentityId = default) +{ +return (await ListAcsSystemsAsync(new ListAcsSystemsRequest(userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for List ACS Users Associated with a User Identity. +/// +[DataContract(Name = "listAcsUsersRequest_request")] +public class ListAcsUsersRequest +{ +[JsonConstructorAttribute] +protected ListAcsUsersRequest() { } + +public ListAcsUsersRequest(string userIdentityId = default) +{ +UserIdentityId = userIdentityId; +} + +/// +/// ID of the user identity for which you want to retrieve all access system users. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listAcsUsersResponse_response")] +public class ListAcsUsersResponse +{ +[JsonConstructorAttribute] +protected ListAcsUsersResponse() { } + +public ListAcsUsersResponse(List acsUsers = default) +{ +AcsUsers = acsUsers; +} + +/// +/// OK +/// +[DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] +public List AcsUsers { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public List ListAcsUsers(ListAcsUsersRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/user_identities/list_acs_users", requestOptions).EnsureData("/user_identities/list_acs_users").AcsUsers; +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public List ListAcsUsers(string userIdentityId = default) +{ +return ListAcsUsers(new ListAcsUsersRequest(userIdentityId: userIdentityId)); +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task> ListAcsUsersAsync(ListAcsUsersRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/user_identities/list_acs_users", requestOptions)).EnsureData("/user_identities/list_acs_users").AcsUsers; +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task> ListAcsUsersAsync(string userIdentityId = default) +{ +return (await ListAcsUsersAsync(new ListAcsUsersRequest(userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for Merge User Identities. +/// +[DataContract(Name = "mergeRequest_request")] +public class MergeRequest +{ +[JsonConstructorAttribute] +protected MergeRequest() { } + +public MergeRequest(List? mergedUserIdentityIds = default, List? mergedUserIdentityKeys = default, string? userIdentityId = default, string? userIdentityKey = default) +{ +MergedUserIdentityIds = mergedUserIdentityIds; +MergedUserIdentityKeys = mergedUserIdentityKeys; +UserIdentityId = userIdentityId; +UserIdentityKey = userIdentityKey; +} + +/// +/// IDs of the user identities to merge into the primary user identity. These user identities are deleted. +/// +[DataMember(Name = "merged_user_identity_ids", IsRequired = false, EmitDefaultValue = false)] +public List? MergedUserIdentityIds { get; set; } + +/// +/// Keys of the user identities to merge into the primary user identity. These user identities are deleted. +/// +[DataMember(Name = "merged_user_identity_keys", IsRequired = false, EmitDefaultValue = false)] +public List? MergedUserIdentityKeys { get; set; } + +/// +/// ID of the primary user identity to keep. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Key of the primary user identity to keep. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. +/// +/// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. +/// +/// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. +/// +/// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. +/// +public void Merge(MergeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/user_identities/merge", requestOptions); +} + +/// +/// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. +/// +/// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. +/// +/// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. +/// +/// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. +/// +public void Merge(List? mergedUserIdentityIds = default, List? mergedUserIdentityKeys = default, string? userIdentityId = default, string? userIdentityKey = default) +{ +Merge(new MergeRequest(mergedUserIdentityIds: mergedUserIdentityIds, mergedUserIdentityKeys: mergedUserIdentityKeys, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} + +/// +/// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. +/// +/// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. +/// +/// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. +/// +/// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. +/// +public async Task MergeAsync(MergeRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/user_identities/merge", requestOptions); +} + +/// +/// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. +/// +/// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. +/// +/// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. +/// +/// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. +/// +public async Task MergeAsync(List? mergedUserIdentityIds = default, List? mergedUserIdentityKeys = default, string? userIdentityId = default, string? userIdentityKey = default) +{ +await MergeAsync(new MergeRequest(mergedUserIdentityIds: mergedUserIdentityIds, mergedUserIdentityKeys: mergedUserIdentityKeys, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} + +/// +/// Request parameters for Remove an ACS User from a User Identity. +/// +[DataContract(Name = "removeAcsUserRequest_request")] +public class RemoveAcsUserRequest +{ +[JsonConstructorAttribute] +protected RemoveAcsUserRequest() { } + +public RemoveAcsUserRequest(string acsUserId = default, string userIdentityId = default) +{ +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system user that you want to remove from the user identity.. +/// +[DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsUserId { get; set; } + +/// +/// ID of the user identity from which you want to remove an access system user. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public void RemoveAcsUser(RemoveAcsUserRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/user_identities/remove_acs_user", requestOptions); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public void RemoveAcsUser(string acsUserId = default, string userIdentityId = default) +{ +RemoveAcsUser(new RemoveAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task RemoveAcsUserAsync(RemoveAcsUserRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/user_identities/remove_acs_user", requestOptions); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task RemoveAcsUserAsync(string acsUserId = default, string userIdentityId = default) +{ +await RemoveAcsUserAsync(new RemoveAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Revoke Access to a Device from a User Identity. +/// +[DataContract(Name = "revokeAccessToDeviceRequest_request")] +public class RevokeAccessToDeviceRequest +{ +[JsonConstructorAttribute] +protected RevokeAccessToDeviceRequest() { } + +public RevokeAccessToDeviceRequest(string deviceId = default, string userIdentityId = default) +{ +DeviceId = deviceId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the managed device to which you want to revoke access from the user identity. +/// +[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// ID of the user identity from which you want to revoke access to a device. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public void RevokeAccessToDevice(RevokeAccessToDeviceRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/user_identities/revoke_access_to_device", requestOptions); +} + +/// +/// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public void RevokeAccessToDevice(string deviceId = default, string userIdentityId = default) +{ +RevokeAccessToDevice(new RevokeAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId)); +} + +/// +/// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task RevokeAccessToDeviceAsync(RevokeAccessToDeviceRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/user_identities/revoke_access_to_device", requestOptions); +} + +/// +/// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task RevokeAccessToDeviceAsync(string deviceId = default, string userIdentityId = default) +{ +await RevokeAccessToDeviceAsync(new RevokeAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Update a User Identity. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default) +{ +EmailAddress = emailAddress; +FullName = fullName; +PhoneNumber = phoneNumber; +UserIdentityId = userIdentityId; +UserIdentityKey = userIdentityKey; +} + +/// +/// Unique email address for the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Full name of the user associated with the user identity. +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// Unique phone number for the user identity. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// ID of the user identity that you want to update. +/// +[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +/// +/// Unique key for the user identity. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/user_identities/update", requestOptions); +} + +/// +/// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public void Update(string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default) +{ +Update(new UpdateRequest(emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} + +/// +/// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/user_identities/update", requestOptions); +} + +/// +/// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). +/// +public async Task UpdateAsync(string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default) +{ +await UpdateAsync(new UpdateRequest(emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.UserIdentities UserIdentities => new(this); - } +public partial class SeamClient +{ +public Api.UserIdentities UserIdentities => new(this); +} - public partial interface ISeamClient - { - public Api.UserIdentities UserIdentities { get; } - } +public partial interface ISeamClient +{ +public Api.UserIdentities UserIdentities { get; } +} } diff --git a/src/Seam/Api/UsersAcs.cs b/src/Seam/Api/UsersAcs.cs index 152d54ca..441357c2 100644 --- a/src/Seam/Api/UsersAcs.cs +++ b/src/Seam/Api/UsersAcs.cs @@ -9,1742 +9,1353 @@ namespace Seam.Api { - public class UsersAcs - { - private ISeamClient _seam; - - public UsersAcs(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Add an ACS User to an Access Group. - /// - [DataContract(Name = "addToAccessGroupRequest_request")] - public class AddToAccessGroupRequest - { - [JsonConstructorAttribute] - protected AddToAccessGroupRequest() { } - - public AddToAccessGroupRequest( - string acsAccessGroupId = default, - string acsUserId = default - ) - { - AcsAccessGroupId = acsAccessGroupId; - AcsUserId = acsUserId; - } - - /// - /// ID of the access group to which you want to add an access system user. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - /// - /// ID of the access system user that you want to add to an access group. - /// - [DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsUserId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void AddToAccessGroup(AddToAccessGroupRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Put("/acs/users/add_to_access_group", requestOptions); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void AddToAccessGroup(string acsAccessGroupId = default, string acsUserId = default) - { - AddToAccessGroup( - new AddToAccessGroupRequest( - acsAccessGroupId: acsAccessGroupId, - acsUserId: acsUserId - ) - ); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task AddToAccessGroupAsync(AddToAccessGroupRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PutAsync("/acs/users/add_to_access_group", requestOptions); - } - - /// - /// Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task AddToAccessGroupAsync( - string acsAccessGroupId = default, - string acsUserId = default - ) - { - await AddToAccessGroupAsync( - new AddToAccessGroupRequest( - acsAccessGroupId: acsAccessGroupId, - acsUserId: acsUserId - ) - ); - } - - /// - /// Request parameters for Create an ACS User. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - CreateRequestAccessSchedule? accessSchedule = default, - List? acsAccessGroupIds = default, - string acsSystemId = default, - string? email = default, - string? emailAddress = default, - string fullName = default, - string? phoneNumber = default, - string? userIdentityId = default - ) - { - AccessSchedule = accessSchedule; - AcsAccessGroupIds = acsAccessGroupIds; - AcsSystemId = acsSystemId; - Email = email; - EmailAddress = emailAddress; - FullName = fullName; - PhoneNumber = phoneNumber; - UserIdentityId = userIdentityId; - } - - /// - /// `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestAccessSchedule? AccessSchedule { get; set; } - - /// - /// Array of access group IDs to indicate the access groups to which you want to add the new access system user. - /// - [DataMember( - Name = "acs_access_group_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? AcsAccessGroupIds { get; set; } - - /// - /// ID of the access system to which you want to add the new access system user. - /// - [DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - [Obsolete("use email_address.")] - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string? Email { get; set; } - - /// - /// Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Full name of the new access system user. - /// - [DataMember(Name = "full_name", IsRequired = true, EmitDefaultValue = false)] - public string FullName { get; set; } - - /// - /// Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// ID of the user identity with which you want to associate the new access system user. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestAccessSchedule_model")] - public class CreateRequestAccessSchedule - { - [JsonConstructorAttribute] - protected CreateRequestAccessSchedule() { } - - public CreateRequestAccessSchedule(string? endsAt = default, string? startsAt = default) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Ending timestamp for the new access system user's access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Starting timestamp for the new access system user's access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(AcsUser acsUser = default) - { - AcsUser = acsUser; - } - - /// - /// OK - /// - [DataMember(Name = "acs_user", IsRequired = false, EmitDefaultValue = false)] - public AcsUser AcsUser { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public AcsUser Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/acs/users/create", requestOptions) - .EnsureData("/acs/users/create") - .AcsUser; - } - - /// - /// Creates a new [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public AcsUser Create( - CreateRequestAccessSchedule? accessSchedule = default, - List? acsAccessGroupIds = default, - string acsSystemId = default, - string? email = default, - string? emailAddress = default, - string fullName = default, - string? phoneNumber = default, - string? userIdentityId = default - ) - { - return Create( - new CreateRequest( - accessSchedule: accessSchedule, - acsAccessGroupIds: acsAccessGroupIds, - acsSystemId: acsSystemId, - email: email, - emailAddress: emailAddress, - fullName: fullName, - phoneNumber: phoneNumber, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Creates a new [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/acs/users/create", requestOptions)) - .EnsureData("/acs/users/create") - .AcsUser; - } - - /// - /// Creates a new [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task CreateAsync( - CreateRequestAccessSchedule? accessSchedule = default, - List? acsAccessGroupIds = default, - string acsSystemId = default, - string? email = default, - string? emailAddress = default, - string fullName = default, - string? phoneNumber = default, - string? userIdentityId = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - accessSchedule: accessSchedule, - acsAccessGroupIds: acsAccessGroupIds, - acsSystemId: acsSystemId, - email: email, - emailAddress: emailAddress, - fullName: fullName, - phoneNumber: phoneNumber, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for Delete an ACS User. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user that you want to delete. You must provide either acs_user_id or user_identity_id - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity that you want to delete. You must provide either acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/acs/users/delete", requestOptions); - } - - /// - /// Deletes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public void Delete( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - Delete( - new DeleteRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Deletes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/acs/users/delete", requestOptions); - } - - /// - /// Deletes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - public async Task DeleteAsync( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await DeleteAsync( - new DeleteRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for Get an ACS User. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user that you want to get. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity that you want to get. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(AcsUser acsUser = default) - { - AcsUser = acsUser; - } - - /// - /// OK - /// - [DataMember(Name = "acs_user", IsRequired = false, EmitDefaultValue = false)] - public AcsUser AcsUser { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public AcsUser Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/users/get", requestOptions) - .EnsureData("/acs/users/get") - .AcsUser; - } - - /// - /// Returns a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public AcsUser Get( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - return Get( - new GetRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Returns a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/users/get", requestOptions)) - .EnsureData("/acs/users/get") - .AcsUser; - } - - /// - /// Returns a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task GetAsync( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - return ( - await GetAsync( - new GetRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for List ACS Users. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - protected ListRequest() { } - - public ListRequest( - string? acsSystemId = default, - string? createdBefore = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentityEmailAddress = default, - string? userIdentityId = default, - string? userIdentityPhoneNumber = default - ) - { - AcsSystemId = acsSystemId; - CreatedBefore = createdBefore; - Limit = limit; - PageCursor = pageCursor; - Search = search; - UserIdentityEmailAddress = userIdentityEmailAddress; - UserIdentityId = userIdentityId; - UserIdentityPhoneNumber = userIdentityPhoneNumber; - } - - /// - /// ID of the `acs_system` for which you want to retrieve all access system users. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// Timestamp by which to limit returned access system users. Returns users created before this timestamp. - /// - [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedBefore { get; set; } - - /// - /// Maximum number of records to return per page. - /// - [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] - public int? Limit { get; set; } - - /// - /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. - /// - [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] - public string? PageCursor { get; set; } - - /// - /// String for which to search. Filters returned access system users to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `acs_user_id`, `user_identity_id`, `user_identity_full_name` or `user_identity_phone_number`. - /// - [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] - public string? Search { get; set; } - - /// - /// Email address of the user identity for which you want to retrieve all access system users. Specify `null` to retrieve access system users whose user identity has no email address. - /// - [DataMember( - Name = "user_identity_email_address", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UserIdentityEmailAddress { get; set; } - - /// - /// ID of the user identity for which you want to retrieve all access system users. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`). Specify `null` to retrieve access system users whose user identity has no phone number. - /// - [DataMember( - Name = "user_identity_phone_number", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UserIdentityPhoneNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List acsUsers = default) - { - AcsUsers = acsUsers; - } - - /// - /// OK - /// - [DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] - public List AcsUsers { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/acs/users/list", requestOptions) - .EnsureData("/acs/users/list") - .AcsUsers; - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public List List( - string? acsSystemId = default, - string? createdBefore = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentityEmailAddress = default, - string? userIdentityId = default, - string? userIdentityPhoneNumber = default - ) - { - return List( - new ListRequest( - acsSystemId: acsSystemId, - createdBefore: createdBefore, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentityEmailAddress: userIdentityEmailAddress, - userIdentityId: userIdentityId, - userIdentityPhoneNumber: userIdentityPhoneNumber - ) - ); - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/acs/users/list", requestOptions)) - .EnsureData("/acs/users/list") - .AcsUsers; - } - - /// - /// Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task> ListAsync( - string? acsSystemId = default, - string? createdBefore = default, - int? limit = default, - string? pageCursor = default, - string? search = default, - string? userIdentityEmailAddress = default, - string? userIdentityId = default, - string? userIdentityPhoneNumber = default - ) - { - return ( - await ListAsync( - new ListRequest( - acsSystemId: acsSystemId, - createdBefore: createdBefore, - limit: limit, - pageCursor: pageCursor, - search: search, - userIdentityEmailAddress: userIdentityEmailAddress, - userIdentityId: userIdentityId, - userIdentityPhoneNumber: userIdentityPhoneNumber - ) - ) - ); - } - - /// - /// Request parameters for List ACS User-Accessible Entrances. - /// - [DataContract(Name = "listAccessibleEntrancesRequest_request")] - public class ListAccessibleEntrancesRequest - { - [JsonConstructorAttribute] - protected ListAccessibleEntrancesRequest() { } - - public ListAccessibleEntrancesRequest( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listAccessibleEntrancesResponse_response")] - public class ListAccessibleEntrancesResponse - { - [JsonConstructorAttribute] - protected ListAccessibleEntrancesResponse() { } - - public ListAccessibleEntrancesResponse(List acsEntrances = default) - { - AcsEntrances = acsEntrances; - } - - /// - /// OK - /// - [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] - public List AcsEntrances { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Lists the [entrances](https://docs.seam.co/api/acs/entrances) to which a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) has access. - /// - public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get( - "/acs/users/list_accessible_entrances", - requestOptions - ) - .EnsureData("/acs/users/list_accessible_entrances") - .AcsEntrances; - } - - /// - /// Lists the [entrances](https://docs.seam.co/api/acs/entrances) to which a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) has access. - /// - public List ListAccessibleEntrances( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - return ListAccessibleEntrances( - new ListAccessibleEntrancesRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Lists the [entrances](https://docs.seam.co/api/acs/entrances) to which a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) has access. - /// - public async Task> ListAccessibleEntrancesAsync( - ListAccessibleEntrancesRequest request - ) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.GetAsync( - "/acs/users/list_accessible_entrances", - requestOptions - ) - ) - .EnsureData("/acs/users/list_accessible_entrances") - .AcsEntrances; - } - - /// - /// Lists the [entrances](https://docs.seam.co/api/acs/entrances) to which a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) has access. - /// - public async Task> ListAccessibleEntrancesAsync( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - return ( - await ListAccessibleEntrancesAsync( - new ListAccessibleEntrancesRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ) - ); - } - - /// - /// Request parameters for Remove an ACS User from an Access Group. - /// - [DataContract(Name = "removeFromAccessGroupRequest_request")] - public class RemoveFromAccessGroupRequest - { - [JsonConstructorAttribute] - protected RemoveFromAccessGroupRequest() { } - - public RemoveFromAccessGroupRequest( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsAccessGroupId = acsAccessGroupId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access group from which you want to remove an access system user. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - /// - /// ID of the access system user that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void RemoveFromAccessGroup(RemoveFromAccessGroupRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/acs/users/remove_from_access_group", requestOptions); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public void RemoveFromAccessGroup( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - RemoveFromAccessGroup( - new RemoveFromAccessGroupRequest( - acsAccessGroupId: acsAccessGroupId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task RemoveFromAccessGroupAsync(RemoveFromAccessGroupRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/acs/users/remove_from_access_group", requestOptions); - } - - /// - /// Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). - /// - public async Task RemoveFromAccessGroupAsync( - string acsAccessGroupId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await RemoveFromAccessGroupAsync( - new RemoveFromAccessGroupRequest( - acsAccessGroupId: acsAccessGroupId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for Revoke ACS User Access to All Entrances. - /// - [DataContract(Name = "revokeAccessToAllEntrancesRequest_request")] - public class RevokeAccessToAllEntrancesRequest - { - [JsonConstructorAttribute] - protected RevokeAccessToAllEntrancesRequest() { } - - public RevokeAccessToAllEntrancesRequest( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Revokes access to all [entrances](https://docs.seam.co/api/acs/entrances) for a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public void RevokeAccessToAllEntrances(RevokeAccessToAllEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/acs/users/revoke_access_to_all_entrances", requestOptions); - } - - /// - /// Revokes access to all [entrances](https://docs.seam.co/api/acs/entrances) for a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public void RevokeAccessToAllEntrances( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - RevokeAccessToAllEntrances( - new RevokeAccessToAllEntrancesRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Revokes access to all [entrances](https://docs.seam.co/api/acs/entrances) for a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task RevokeAccessToAllEntrancesAsync(RevokeAccessToAllEntrancesRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync( - "/acs/users/revoke_access_to_all_entrances", - requestOptions - ); - } - - /// - /// Revokes access to all [entrances](https://docs.seam.co/api/acs/entrances) for a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task RevokeAccessToAllEntrancesAsync( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await RevokeAccessToAllEntrancesAsync( - new RevokeAccessToAllEntrancesRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for Suspend an ACS User. - /// - [DataContract(Name = "suspendRequest_request")] - public class SuspendRequest - { - [JsonConstructorAttribute] - protected SuspendRequest() { } - - public SuspendRequest( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// [Suspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://docs.seam.co/api/acs/users/unsuspend) them. - /// - public void Suspend(SuspendRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/acs/users/suspend", requestOptions); - } - - /// - /// [Suspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://docs.seam.co/api/acs/users/unsuspend) them. - /// - public void Suspend( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - Suspend( - new SuspendRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// [Suspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://docs.seam.co/api/acs/users/unsuspend) them. - /// - public async Task SuspendAsync(SuspendRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/acs/users/suspend", requestOptions); - } - - /// - /// [Suspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://docs.seam.co/api/acs/users/unsuspend) them. - /// - public async Task SuspendAsync( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await SuspendAsync( - new SuspendRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for Unsuspend an ACS User. - /// - [DataContract(Name = "unsuspendRequest_request")] - public class UnsuspendRequest - { - [JsonConstructorAttribute] - protected UnsuspendRequest() { } - - public UnsuspendRequest( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - UserIdentityId = userIdentityId; - } - - /// - /// ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// ID of the user identity that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// [Unsuspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). While [suspending an access system user](https://docs.seam.co/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. - /// - public void Unsuspend(UnsuspendRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Post("/acs/users/unsuspend", requestOptions); - } - - /// - /// [Unsuspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). While [suspending an access system user](https://docs.seam.co/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. - /// - public void Unsuspend( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - Unsuspend( - new UnsuspendRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// [Unsuspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). While [suspending an access system user](https://docs.seam.co/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. - /// - public async Task UnsuspendAsync(UnsuspendRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PostAsync("/acs/users/unsuspend", requestOptions); - } - - /// - /// [Unsuspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). While [suspending an access system user](https://docs.seam.co/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. - /// - public async Task UnsuspendAsync( - string? acsSystemId = default, - string? acsUserId = default, - string? userIdentityId = default - ) - { - await UnsuspendAsync( - new UnsuspendRequest( - acsSystemId: acsSystemId, - acsUserId: acsUserId, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Request parameters for Update an ACS User. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - UpdateRequestAccessSchedule? accessSchedule = default, - string? acsSystemId = default, - string? acsUserId = default, - string? email = default, - string? emailAddress = default, - string? fullName = default, - string? hidAcsSystemId = default, - string? phoneNumber = default, - string? userIdentityId = default - ) - { - AccessSchedule = accessSchedule; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - Email = email; - EmailAddress = emailAddress; - FullName = fullName; - HidAcsSystemId = hidAcsSystemId; - PhoneNumber = phoneNumber; - UserIdentityId = userIdentityId; - } - - /// - /// `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] - public UpdateRequestAccessSchedule? AccessSchedule { get; set; } - - /// - /// ID of the access system that you want to update. You can only provide acs_system_id with user_identity_id. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsSystemId { get; set; } - - /// - /// ID of the access system user that you want to update. You can only provide acs_user_id or user_identity_id. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - [Obsolete("use email_address.")] - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string? Email { get; set; } - - /// - /// Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Full name of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// ID of the HID access control system associated with the user. - /// - [DataMember(Name = "hid_acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? HidAcsSystemId { get; set; } - - /// - /// Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// ID of the user identity that you want to update. You can only provide acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateRequestAccessSchedule_model")] - public class UpdateRequestAccessSchedule - { - [JsonConstructorAttribute] - protected UpdateRequestAccessSchedule() { } - - public UpdateRequestAccessSchedule(string? endsAt = default, string? startsAt = default) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Ending timestamp for the access system user's access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Starting timestamp for the access system user's access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates the properties of a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/acs/users/update", requestOptions); - } - - /// - /// Updates the properties of a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public void Update( - UpdateRequestAccessSchedule? accessSchedule = default, - string? acsSystemId = default, - string? acsUserId = default, - string? email = default, - string? emailAddress = default, - string? fullName = default, - string? hidAcsSystemId = default, - string? phoneNumber = default, - string? userIdentityId = default - ) - { - Update( - new UpdateRequest( - accessSchedule: accessSchedule, - acsSystemId: acsSystemId, - acsUserId: acsUserId, - email: email, - emailAddress: emailAddress, - fullName: fullName, - hidAcsSystemId: hidAcsSystemId, - phoneNumber: phoneNumber, - userIdentityId: userIdentityId - ) - ); - } - - /// - /// Updates the properties of a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/acs/users/update", requestOptions); - } - - /// - /// Updates the properties of a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - public async Task UpdateAsync( - UpdateRequestAccessSchedule? accessSchedule = default, - string? acsSystemId = default, - string? acsUserId = default, - string? email = default, - string? emailAddress = default, - string? fullName = default, - string? hidAcsSystemId = default, - string? phoneNumber = default, - string? userIdentityId = default - ) - { - await UpdateAsync( - new UpdateRequest( - accessSchedule: accessSchedule, - acsSystemId: acsSystemId, - acsUserId: acsUserId, - email: email, - emailAddress: emailAddress, - fullName: fullName, - hidAcsSystemId: hidAcsSystemId, - phoneNumber: phoneNumber, - userIdentityId: userIdentityId - ) - ); - } - } +public class UsersAcs +{ +private ISeamClient _seam; + +public UsersAcs(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Add an ACS User to an Access Group. +/// +[DataContract(Name = "addToAccessGroupRequest_request")] +public class AddToAccessGroupRequest +{ +[JsonConstructorAttribute] +protected AddToAccessGroupRequest() { } + +public AddToAccessGroupRequest(string acsAccessGroupId = default, string acsUserId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +AcsUserId = acsUserId; +} + +/// +/// ID of the access group to which you want to add an access system user. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +/// +/// ID of the access system user that you want to add to an access group. +/// +[DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsUserId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void AddToAccessGroup(AddToAccessGroupRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Put("/acs/users/add_to_access_group", requestOptions); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void AddToAccessGroup(string acsAccessGroupId = default, string acsUserId = default) +{ +AddToAccessGroup(new AddToAccessGroupRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId)); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task AddToAccessGroupAsync(AddToAccessGroupRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PutAsync("/acs/users/add_to_access_group", requestOptions); +} + +/// +/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task AddToAccessGroupAsync(string acsAccessGroupId = default, string acsUserId = default) +{ +await AddToAccessGroupAsync(new AddToAccessGroupRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId)); +} + +/// +/// Request parameters for Create an ACS User. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(CreateRequestAccessSchedule? accessSchedule = default, List? acsAccessGroupIds = default, string acsSystemId = default, string? email = default, string? emailAddress = default, string fullName = default, string? phoneNumber = default, string? userIdentityId = default) +{ +AccessSchedule = accessSchedule; +AcsAccessGroupIds = acsAccessGroupIds; +AcsSystemId = acsSystemId; +Email = email; +EmailAddress = emailAddress; +FullName = fullName; +PhoneNumber = phoneNumber; +UserIdentityId = userIdentityId; +} + +/// +/// `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestAccessSchedule? AccessSchedule { get; set; } + +/// +/// Array of access group IDs to indicate the access groups to which you want to add the new access system user. +/// +[DataMember(Name = "acs_access_group_ids", IsRequired = false, EmitDefaultValue = false)] +public List? AcsAccessGroupIds { get; set; } + +/// +/// ID of the access system to which you want to add the new access system user. +/// +[DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +[Obsolete("use email_address.")] +[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] +public string? Email { get; set; } + +/// +/// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Full name of the new access system user. +/// +[DataMember(Name = "full_name", IsRequired = true, EmitDefaultValue = false)] +public string FullName { get; set; } + +/// +/// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// ID of the user identity with which you want to associate the new access system user. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestAccessSchedule_model")] +public class CreateRequestAccessSchedule +{ +[JsonConstructorAttribute] +protected CreateRequestAccessSchedule() { } + +public CreateRequestAccessSchedule(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Ending timestamp for the new access system user's access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Starting timestamp for the new access system user's access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(AcsUser acsUser = default) +{ +AcsUser = acsUser; +} + +/// +/// OK +/// +[DataMember(Name = "acs_user", IsRequired = false, EmitDefaultValue = false)] +public AcsUser AcsUser { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public AcsUser Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/acs/users/create", requestOptions).EnsureData("/acs/users/create").AcsUser; +} + +/// +/// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public AcsUser Create(CreateRequestAccessSchedule? accessSchedule = default, List? acsAccessGroupIds = default, string acsSystemId = default, string? email = default, string? emailAddress = default, string fullName = default, string? phoneNumber = default, string? userIdentityId = default) +{ +return Create(new CreateRequest(accessSchedule: accessSchedule, acsAccessGroupIds: acsAccessGroupIds, acsSystemId: acsSystemId, email: email, emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityId: userIdentityId)); +} + +/// +/// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/acs/users/create", requestOptions)).EnsureData("/acs/users/create").AcsUser; +} + +/// +/// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task CreateAsync(CreateRequestAccessSchedule? accessSchedule = default, List? acsAccessGroupIds = default, string acsSystemId = default, string? email = default, string? emailAddress = default, string fullName = default, string? phoneNumber = default, string? userIdentityId = default) +{ +return (await CreateAsync(new CreateRequest(accessSchedule: accessSchedule, acsAccessGroupIds: acsAccessGroupIds, acsSystemId: acsSystemId, email: email, emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for Delete an ACS User. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user that you want to delete. You must provide either acs_user_id or user_identity_id +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity that you want to delete. You must provide either acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/acs/users/delete", requestOptions); +} + +/// +/// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public void Delete(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +Delete(new DeleteRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/acs/users/delete", requestOptions); +} + +/// +/// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +public async Task DeleteAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await DeleteAsync(new DeleteRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Get an ACS User. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user that you want to get. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity that you want to get. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(AcsUser acsUser = default) +{ +AcsUser = acsUser; +} + +/// +/// OK +/// +[DataMember(Name = "acs_user", IsRequired = false, EmitDefaultValue = false)] +public AcsUser AcsUser { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public AcsUser Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/users/get", requestOptions).EnsureData("/acs/users/get").AcsUser; +} + +/// +/// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public AcsUser Get(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +return Get(new GetRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/users/get", requestOptions)).EnsureData("/acs/users/get").AcsUser; +} + +/// +/// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task GetAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +return (await GetAsync(new GetRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for List ACS Users. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +protected ListRequest() { } + +public ListRequest(string? acsSystemId = default, string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default, string? userIdentityEmailAddress = default, string? userIdentityId = default, string? userIdentityPhoneNumber = default) +{ +AcsSystemId = acsSystemId; +CreatedBefore = createdBefore; +Limit = limit; +PageCursor = pageCursor; +Search = search; +UserIdentityEmailAddress = userIdentityEmailAddress; +UserIdentityId = userIdentityId; +UserIdentityPhoneNumber = userIdentityPhoneNumber; +} + +/// +/// ID of the `acs_system` for which you want to retrieve all access system users. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// Timestamp by which to limit returned access system users. Returns users created before this timestamp. +/// +[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedBefore { get; set; } + +/// +/// Maximum number of records to return per page. +/// +[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] +public int? Limit { get; set; } + +/// +/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. +/// +[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] +public string? PageCursor { get; set; } + +/// +/// String for which to search. Filters returned access system users to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `acs_user_id`, `user_identity_id`, `user_identity_full_name` or `user_identity_phone_number`. +/// +[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] +public string? Search { get; set; } + +/// +/// Email address of the user identity for which you want to retrieve all access system users. Specify `null` to retrieve access system users whose user identity has no email address. +/// +[DataMember(Name = "user_identity_email_address", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityEmailAddress { get; set; } + +/// +/// ID of the user identity for which you want to retrieve all access system users. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`). Specify `null` to retrieve access system users whose user identity has no phone number. +/// +[DataMember(Name = "user_identity_phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityPhoneNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List acsUsers = default) +{ +AcsUsers = acsUsers; +} + +/// +/// OK +/// +[DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] +public List AcsUsers { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/users/list", requestOptions).EnsureData("/acs/users/list").AcsUsers; +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public List List(string? acsSystemId = default, string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default, string? userIdentityEmailAddress = default, string? userIdentityId = default, string? userIdentityPhoneNumber = default) +{ +return List(new ListRequest(acsSystemId: acsSystemId, createdBefore: createdBefore, limit: limit, pageCursor: pageCursor, search: search, userIdentityEmailAddress: userIdentityEmailAddress, userIdentityId: userIdentityId, userIdentityPhoneNumber: userIdentityPhoneNumber)); +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/users/list", requestOptions)).EnsureData("/acs/users/list").AcsUsers; +} + +/// +/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task> ListAsync(string? acsSystemId = default, string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default, string? userIdentityEmailAddress = default, string? userIdentityId = default, string? userIdentityPhoneNumber = default) +{ +return (await ListAsync(new ListRequest(acsSystemId: acsSystemId, createdBefore: createdBefore, limit: limit, pageCursor: pageCursor, search: search, userIdentityEmailAddress: userIdentityEmailAddress, userIdentityId: userIdentityId, userIdentityPhoneNumber: userIdentityPhoneNumber))); +} + +/// +/// Request parameters for List ACS User-Accessible Entrances. +/// +[DataContract(Name = "listAccessibleEntrancesRequest_request")] +public class ListAccessibleEntrancesRequest +{ +[JsonConstructorAttribute] +protected ListAccessibleEntrancesRequest() { } + +public ListAccessibleEntrancesRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listAccessibleEntrancesResponse_response")] +public class ListAccessibleEntrancesResponse +{ +[JsonConstructorAttribute] +protected ListAccessibleEntrancesResponse() { } + +public ListAccessibleEntrancesResponse(List acsEntrances = default) +{ +AcsEntrances = acsEntrances; +} + +/// +/// OK +/// +[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public List AcsEntrances { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. +/// +public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/acs/users/list_accessible_entrances", requestOptions).EnsureData("/acs/users/list_accessible_entrances").AcsEntrances; +} + +/// +/// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. +/// +public List ListAccessibleEntrances(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +return ListAccessibleEntrances(new ListAccessibleEntrancesRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. +/// +public async Task> ListAccessibleEntrancesAsync(ListAccessibleEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/acs/users/list_accessible_entrances", requestOptions)).EnsureData("/acs/users/list_accessible_entrances").AcsEntrances; +} + +/// +/// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. +/// +public async Task> ListAccessibleEntrancesAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +return (await ListAccessibleEntrancesAsync(new ListAccessibleEntrancesRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId))); +} + +/// +/// Request parameters for Remove an ACS User from an Access Group. +/// +[DataContract(Name = "removeFromAccessGroupRequest_request")] +public class RemoveFromAccessGroupRequest +{ +[JsonConstructorAttribute] +protected RemoveFromAccessGroupRequest() { } + +public RemoveFromAccessGroupRequest(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access group from which you want to remove an access system user. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +/// +/// ID of the access system user that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void RemoveFromAccessGroup(RemoveFromAccessGroupRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/acs/users/remove_from_access_group", requestOptions); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public void RemoveFromAccessGroup(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +RemoveFromAccessGroup(new RemoveFromAccessGroupRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task RemoveFromAccessGroupAsync(RemoveFromAccessGroupRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/acs/users/remove_from_access_group", requestOptions); +} + +/// +/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). +/// +public async Task RemoveFromAccessGroupAsync(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await RemoveFromAccessGroupAsync(new RemoveFromAccessGroupRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Revoke ACS User Access to All Entrances. +/// +[DataContract(Name = "revokeAccessToAllEntrancesRequest_request")] +public class RevokeAccessToAllEntrancesRequest +{ +[JsonConstructorAttribute] +protected RevokeAccessToAllEntrancesRequest() { } + +public RevokeAccessToAllEntrancesRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public void RevokeAccessToAllEntrances(RevokeAccessToAllEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/users/revoke_access_to_all_entrances", requestOptions); +} + +/// +/// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public void RevokeAccessToAllEntrances(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +RevokeAccessToAllEntrances(new RevokeAccessToAllEntrancesRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task RevokeAccessToAllEntrancesAsync(RevokeAccessToAllEntrancesRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/users/revoke_access_to_all_entrances", requestOptions); +} + +/// +/// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task RevokeAccessToAllEntrancesAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await RevokeAccessToAllEntrancesAsync(new RevokeAccessToAllEntrancesRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Suspend an ACS User. +/// +[DataContract(Name = "suspendRequest_request")] +public class SuspendRequest +{ +[JsonConstructorAttribute] +protected SuspendRequest() { } + +public SuspendRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. +/// +public void Suspend(SuspendRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/users/suspend", requestOptions); +} + +/// +/// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. +/// +public void Suspend(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +Suspend(new SuspendRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. +/// +public async Task SuspendAsync(SuspendRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/users/suspend", requestOptions); +} + +/// +/// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. +/// +public async Task SuspendAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await SuspendAsync(new SuspendRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Unsuspend an ACS User. +/// +[DataContract(Name = "unsuspendRequest_request")] +public class UnsuspendRequest +{ +[JsonConstructorAttribute] +protected UnsuspendRequest() { } + +public UnsuspendRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +UserIdentityId = userIdentityId; +} + +/// +/// ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// ID of the user identity that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. +/// +public void Unsuspend(UnsuspendRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Post("/acs/users/unsuspend", requestOptions); +} + +/// +/// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. +/// +public void Unsuspend(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +Unsuspend(new UnsuspendRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. +/// +public async Task UnsuspendAsync(UnsuspendRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PostAsync("/acs/users/unsuspend", requestOptions); +} + +/// +/// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. +/// +public async Task UnsuspendAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) +{ +await UnsuspendAsync(new UnsuspendRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); +} + +/// +/// Request parameters for Update an ACS User. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(UpdateRequestAccessSchedule? accessSchedule = default, string? acsSystemId = default, string? acsUserId = default, string? email = default, string? emailAddress = default, string? fullName = default, string? hidAcsSystemId = default, string? phoneNumber = default, string? userIdentityId = default) +{ +AccessSchedule = accessSchedule; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +Email = email; +EmailAddress = emailAddress; +FullName = fullName; +HidAcsSystemId = hidAcsSystemId; +PhoneNumber = phoneNumber; +UserIdentityId = userIdentityId; +} + +/// +/// `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] +public UpdateRequestAccessSchedule? AccessSchedule { get; set; } + +/// +/// ID of the access system that you want to update. You can only provide acs_system_id with user_identity_id. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsSystemId { get; set; } + +/// +/// ID of the access system user that you want to update. You can only provide acs_user_id or user_identity_id. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +[Obsolete("use email_address.")] +[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] +public string? Email { get; set; } + +/// +/// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Full name of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// ID of the HID access control system associated with the user. +/// +[DataMember(Name = "hid_acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? HidAcsSystemId { get; set; } + +/// +/// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// ID of the user identity that you want to update. You can only provide acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateRequestAccessSchedule_model")] +public class UpdateRequestAccessSchedule +{ +[JsonConstructorAttribute] +protected UpdateRequestAccessSchedule() { } + +public UpdateRequestAccessSchedule(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Ending timestamp for the access system user's access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Starting timestamp for the access system user's access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/acs/users/update", requestOptions); +} + +/// +/// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public void Update(UpdateRequestAccessSchedule? accessSchedule = default, string? acsSystemId = default, string? acsUserId = default, string? email = default, string? emailAddress = default, string? fullName = default, string? hidAcsSystemId = default, string? phoneNumber = default, string? userIdentityId = default) +{ +Update(new UpdateRequest(accessSchedule: accessSchedule, acsSystemId: acsSystemId, acsUserId: acsUserId, email: email, emailAddress: emailAddress, fullName: fullName, hidAcsSystemId: hidAcsSystemId, phoneNumber: phoneNumber, userIdentityId: userIdentityId)); +} + +/// +/// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/acs/users/update", requestOptions); +} + +/// +/// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +public async Task UpdateAsync(UpdateRequestAccessSchedule? accessSchedule = default, string? acsSystemId = default, string? acsUserId = default, string? email = default, string? emailAddress = default, string? fullName = default, string? hidAcsSystemId = default, string? phoneNumber = default, string? userIdentityId = default) +{ +await UpdateAsync(new UpdateRequest(accessSchedule: accessSchedule, acsSystemId: acsSystemId, acsUserId: acsUserId, email: email, emailAddress: emailAddress, fullName: fullName, hidAcsSystemId: hidAcsSystemId, phoneNumber: phoneNumber, userIdentityId: userIdentityId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.UsersAcs UsersAcs => new(this); - } +public partial class SeamClient +{ +public Api.UsersAcs UsersAcs => new(this); +} - public partial interface ISeamClient - { - public Api.UsersAcs UsersAcs { get; } - } +public partial interface ISeamClient +{ +public Api.UsersAcs UsersAcs { get; } +} } diff --git a/src/Seam/Api/Webhooks.cs b/src/Seam/Api/Webhooks.cs index 7256e4e1..8adc606a 100644 --- a/src/Seam/Api/Webhooks.cs +++ b/src/Seam/Api/Webhooks.cs @@ -9,538 +9,520 @@ namespace Seam.Api { - public class Webhooks - { - private ISeamClient _seam; - - public Webhooks(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create a Webhook. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest(List? eventTypes = default, string url = default) - { - EventTypes = eventTypes; - Url = url; - } - - /// - /// Types of events that you want the new webhook to receive. - /// - [DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] - public List? EventTypes { get; set; } - - /// - /// URL for the new webhook. - /// - [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] - public string Url { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(Webhook webhook = default) - { - Webhook = webhook; - } - - /// - /// OK - /// - [DataMember(Name = "webhook", IsRequired = false, EmitDefaultValue = false)] - public Webhook Webhook { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public Webhook Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/webhooks/create", requestOptions) - .EnsureData("/webhooks/create") - .Webhook; - } - - /// - /// Creates a new [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public Webhook Create(List? eventTypes = default, string url = default) - { - return Create(new CreateRequest(eventTypes: eventTypes, url: url)); - } - - /// - /// Creates a new [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/webhooks/create", requestOptions)) - .EnsureData("/webhooks/create") - .Webhook; - } - - /// - /// Creates a new [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task CreateAsync( - List? eventTypes = default, - string url = default - ) - { - return (await CreateAsync(new CreateRequest(eventTypes: eventTypes, url: url))); - } - - /// - /// Request parameters for Delete a Webhook. - /// - [DataContract(Name = "deleteRequest_request")] - public class DeleteRequest - { - [JsonConstructorAttribute] - protected DeleteRequest() { } - - public DeleteRequest(string webhookId = default) - { - WebhookId = webhookId; - } - - /// - /// ID of the webhook that you want to delete. - /// - [DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] - public string WebhookId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Deletes a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public void Delete(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Delete("/webhooks/delete", requestOptions); - } - - /// - /// Deletes a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public void Delete(string webhookId = default) - { - Delete(new DeleteRequest(webhookId: webhookId)); - } - - /// - /// Deletes a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task DeleteAsync(DeleteRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.DeleteAsync("/webhooks/delete", requestOptions); - } - - /// - /// Deletes a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task DeleteAsync(string webhookId = default) - { - await DeleteAsync(new DeleteRequest(webhookId: webhookId)); - } - - /// - /// Request parameters for Get a Webhook. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - protected GetRequest() { } - - public GetRequest(string webhookId = default) - { - WebhookId = webhookId; - } - - /// - /// ID of the webhook that you want to get. - /// - [DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] - public string WebhookId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(Webhook webhook = default) - { - Webhook = webhook; - } - - /// - /// OK - /// - [DataMember(Name = "webhook", IsRequired = false, EmitDefaultValue = false)] - public Webhook Webhook { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Gets a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public Webhook Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/webhooks/get", requestOptions) - .EnsureData("/webhooks/get") - .Webhook; - } - - /// - /// Gets a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public Webhook Get(string webhookId = default) - { - return Get(new GetRequest(webhookId: webhookId)); - } - - /// - /// Gets a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/webhooks/get", requestOptions)) - .EnsureData("/webhooks/get") - .Webhook; - } - - /// - /// Gets a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task GetAsync(string webhookId = default) - { - return (await GetAsync(new GetRequest(webhookId: webhookId))); - } - - /// - /// Request parameters for List Webhooks. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - public ListRequest() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List webhooks = default) - { - Webhooks = webhooks; - } - - /// - /// OK - /// - [DataMember(Name = "webhooks", IsRequired = false, EmitDefaultValue = false)] - public List Webhooks { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of all [webhooks](https://docs.seam.co/developer-tools/webhooks). - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/webhooks/list", requestOptions) - .EnsureData("/webhooks/list") - .Webhooks; - } - - /// - /// Returns a list of all [webhooks](https://docs.seam.co/developer-tools/webhooks). - /// - public List List() - { - return List(new ListRequest()); - } - - /// - /// Returns a list of all [webhooks](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/webhooks/list", requestOptions)) - .EnsureData("/webhooks/list") - .Webhooks; - } - - /// - /// Returns a list of all [webhooks](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task> ListAsync() - { - return (await ListAsync(new ListRequest())); - } - - /// - /// Request parameters for Update a Webhook. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest(List eventTypes = default, string webhookId = default) - { - EventTypes = eventTypes; - WebhookId = webhookId; - } - - /// - /// Types of events that you want the webhook to receive. - /// - [DataMember(Name = "event_types", IsRequired = true, EmitDefaultValue = false)] - public List EventTypes { get; set; } - - /// - /// ID of the webhook that you want to update. - /// - [DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] - public string WebhookId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Put("/webhooks/update", requestOptions); - } - - /// - /// Updates a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public void Update(List eventTypes = default, string webhookId = default) - { - Update(new UpdateRequest(eventTypes: eventTypes, webhookId: webhookId)); - } - - /// - /// Updates a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PutAsync("/webhooks/update", requestOptions); - } - - /// - /// Updates a specified [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - public async Task UpdateAsync(List eventTypes = default, string webhookId = default) - { - await UpdateAsync(new UpdateRequest(eventTypes: eventTypes, webhookId: webhookId)); - } - } +public class Webhooks +{ +private ISeamClient _seam; + +public Webhooks(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Webhook. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(List? eventTypes = default, string url = default) +{ +EventTypes = eventTypes; +Url = url; +} + +/// +/// Types of events that you want the new webhook to receive. +/// +[DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] +public List? EventTypes { get; set; } + +/// +/// URL for the new webhook. +/// +[DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] +public string Url { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(Webhook webhook = default) +{ +Webhook = webhook; +} + +/// +/// OK +/// +[DataMember(Name = "webhook", IsRequired = false, EmitDefaultValue = false)] +public Webhook Webhook { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public Webhook Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/webhooks/create", requestOptions).EnsureData("/webhooks/create").Webhook; +} + +/// +/// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public Webhook Create(List? eventTypes = default, string url = default) +{ +return Create(new CreateRequest(eventTypes: eventTypes, url: url)); +} + +/// +/// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/webhooks/create", requestOptions)).EnsureData("/webhooks/create").Webhook; +} + +/// +/// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task CreateAsync(List? eventTypes = default, string url = default) +{ +return (await CreateAsync(new CreateRequest(eventTypes: eventTypes, url: url))); +} + +/// +/// Request parameters for Delete a Webhook. +/// +[DataContract(Name = "deleteRequest_request")] +public class DeleteRequest +{ +[JsonConstructorAttribute] +protected DeleteRequest() { } + +public DeleteRequest(string webhookId = default) +{ +WebhookId = webhookId; +} + +/// +/// ID of the webhook that you want to delete. +/// +[DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] +public string WebhookId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public void Delete(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Delete("/webhooks/delete", requestOptions); +} + +/// +/// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public void Delete(string webhookId = default) +{ +Delete(new DeleteRequest(webhookId: webhookId)); +} + +/// +/// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task DeleteAsync(DeleteRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.DeleteAsync("/webhooks/delete", requestOptions); +} + +/// +/// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task DeleteAsync(string webhookId = default) +{ +await DeleteAsync(new DeleteRequest(webhookId: webhookId)); +} + +/// +/// Request parameters for Get a Webhook. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +protected GetRequest() { } + +public GetRequest(string webhookId = default) +{ +WebhookId = webhookId; +} + +/// +/// ID of the webhook that you want to get. +/// +[DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] +public string WebhookId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(Webhook webhook = default) +{ +Webhook = webhook; +} + +/// +/// OK +/// +[DataMember(Name = "webhook", IsRequired = false, EmitDefaultValue = false)] +public Webhook Webhook { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public Webhook Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/webhooks/get", requestOptions).EnsureData("/webhooks/get").Webhook; +} + +/// +/// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public Webhook Get(string webhookId = default) +{ +return Get(new GetRequest(webhookId: webhookId)); +} + +/// +/// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/webhooks/get", requestOptions)).EnsureData("/webhooks/get").Webhook; +} + +/// +/// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task GetAsync(string webhookId = default) +{ +return (await GetAsync(new GetRequest(webhookId: webhookId))); +} + +/// +/// Request parameters for List Webhooks. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +public ListRequest() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List webhooks = default) +{ +Webhooks = webhooks; +} + +/// +/// OK +/// +[DataMember(Name = "webhooks", IsRequired = false, EmitDefaultValue = false)] +public List Webhooks { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/webhooks/list", requestOptions).EnsureData("/webhooks/list").Webhooks; +} + +/// +/// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). +/// +public List List() +{ +return List(new ListRequest()); +} + +/// +/// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/webhooks/list", requestOptions)).EnsureData("/webhooks/list").Webhooks; +} + +/// +/// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task> ListAsync() +{ +return (await ListAsync(new ListRequest())); +} + +/// +/// Request parameters for Update a Webhook. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(List eventTypes = default, string webhookId = default) +{ +EventTypes = eventTypes; +WebhookId = webhookId; +} + +/// +/// Types of events that you want the webhook to receive. +/// +[DataMember(Name = "event_types", IsRequired = true, EmitDefaultValue = false)] +public List EventTypes { get; set; } + +/// +/// ID of the webhook that you want to update. +/// +[DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] +public string WebhookId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Put("/webhooks/update", requestOptions); +} + +/// +/// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public void Update(List eventTypes = default, string webhookId = default) +{ +Update(new UpdateRequest(eventTypes: eventTypes, webhookId: webhookId)); +} + +/// +/// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PutAsync("/webhooks/update", requestOptions); +} + +/// +/// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +public async Task UpdateAsync(List eventTypes = default, string webhookId = default) +{ +await UpdateAsync(new UpdateRequest(eventTypes: eventTypes, webhookId: webhookId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Webhooks Webhooks => new(this); - } +public partial class SeamClient +{ +public Api.Webhooks Webhooks => new(this); +} - public partial interface ISeamClient - { - public Api.Webhooks Webhooks { get; } - } +public partial interface ISeamClient +{ +public Api.Webhooks Webhooks { get; } +} } diff --git a/src/Seam/Api/Workspaces.cs b/src/Seam/Api/Workspaces.cs index 98772b55..4247fb3e 100644 --- a/src/Seam/Api/Workspaces.cs +++ b/src/Seam/Api/Workspaces.cs @@ -9,958 +9,773 @@ namespace Seam.Api { - public class Workspaces - { - private ISeamClient _seam; - - public Workspaces(ISeamClient seam) - { - _seam = seam; - } - - /// - /// Request parameters for Create a Workspace. - /// - [DataContract(Name = "createRequest_request")] - public class CreateRequest - { - [JsonConstructorAttribute] - protected CreateRequest() { } - - public CreateRequest( - string? companyName = default, - string? connectPartnerName = default, - CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, - bool? isSandbox = default, - string name = default, - string? organizationId = default, - CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, - string? webviewPrimaryButtonColor = default, - string? webviewPrimaryButtonTextColor = default, - string? webviewSuccessMessage = default - ) - { - CompanyName = companyName; - ConnectPartnerName = connectPartnerName; - ConnectWebviewCustomization = connectWebviewCustomization; - IsSandbox = isSandbox; - Name = name; - OrganizationId = organizationId; - WebviewLogoShape = webviewLogoShape; - WebviewPrimaryButtonColor = webviewPrimaryButtonColor; - WebviewPrimaryButtonTextColor = webviewPrimaryButtonTextColor; - WebviewSuccessMessage = webviewSuccessMessage; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum WebviewLogoShapeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "circle")] - Circle = 1, - - [EnumMember(Value = "square")] - Square = 2, - } - - /// - /// Company name for the new workspace. - /// - [Obsolete("Use `connect_partner_name` instead.")] - [DataMember(Name = "company_name", IsRequired = false, EmitDefaultValue = false)] - public string? CompanyName { get; set; } - - /// - /// Connect partner name for the new workspace. - /// - [DataMember( - Name = "connect_partner_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectPartnerName { get; set; } - - /// - /// [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) customizations for the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember( - Name = "connect_webview_customization", - IsRequired = false, - EmitDefaultValue = false - )] - public CreateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } - - /// - /// Indicates whether the new workspace is a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - [DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] - public bool? IsSandbox { get; set; } - - /// - /// Name of the new workspace. - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// ID of the organization to associate with the new workspace. If omitted, the new workspace is associated with the organization that you administer, if you administer exactly one. - /// - [DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] - public string? OrganizationId { get; set; } - - [Obsolete("Use `connect_webview_customization.webview_logo_shape` instead.")] - [DataMember(Name = "webview_logo_shape", IsRequired = false, EmitDefaultValue = false)] - public CreateRequest.WebviewLogoShapeEnum? WebviewLogoShape { get; set; } - - [Obsolete("Use `connect_webview_customization.webview_primary_button_color` instead.")] - [DataMember( - Name = "webview_primary_button_color", - IsRequired = false, - EmitDefaultValue = false - )] - public string? WebviewPrimaryButtonColor { get; set; } - - [Obsolete( - "Use `connect_webview_customization.webview_primary_button_text_color` instead." - )] - [DataMember( - Name = "webview_primary_button_text_color", - IsRequired = false, - EmitDefaultValue = false - )] - public string? WebviewPrimaryButtonTextColor { get; set; } - - [Obsolete("Use `connect_webview_customization.webview_success_message` instead.")] - [DataMember( - Name = "webview_success_message", - IsRequired = false, - EmitDefaultValue = false - )] - public string? WebviewSuccessMessage { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createRequestConnectWebviewCustomization_model")] - public class CreateRequestConnectWebviewCustomization - { - [JsonConstructorAttribute] - protected CreateRequestConnectWebviewCustomization() { } - - public CreateRequestConnectWebviewCustomization( - CreateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, - string? primaryButtonColor = default, - string? primaryButtonTextColor = default, - string? successMessage = default - ) - { - LogoShape = logoShape; - PrimaryButtonColor = primaryButtonColor; - PrimaryButtonTextColor = primaryButtonTextColor; - SuccessMessage = successMessage; - } - - /// - /// Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum LogoShapeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "circle")] - Circle = 1, - - [EnumMember(Value = "square")] - Square = 2, - } - - /// - /// Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] - public CreateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } - - /// - /// Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember( - Name = "primary_button_color", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PrimaryButtonColor { get; set; } - - /// - /// Primary button text color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember( - Name = "primary_button_text_color", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PrimaryButtonTextColor { get; set; } - - /// - /// Success message for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] - public string? SuccessMessage { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "createResponse_response")] - public class CreateResponse - { - [JsonConstructorAttribute] - protected CreateResponse() { } - - public CreateResponse(Workspace workspace = default) - { - Workspace = workspace; - } - - /// - /// OK - /// - [DataMember(Name = "workspace", IsRequired = false, EmitDefaultValue = false)] - public Workspace Workspace { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces). - /// - public Workspace Create(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/workspaces/create", requestOptions) - .EnsureData("/workspaces/create") - .Workspace; - } - - /// - /// Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces). - /// - public Workspace Create( - string? companyName = default, - string? connectPartnerName = default, - CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, - bool? isSandbox = default, - string name = default, - string? organizationId = default, - CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, - string? webviewPrimaryButtonColor = default, - string? webviewPrimaryButtonTextColor = default, - string? webviewSuccessMessage = default - ) - { - return Create( - new CreateRequest( - companyName: companyName, - connectPartnerName: connectPartnerName, - connectWebviewCustomization: connectWebviewCustomization, - isSandbox: isSandbox, - name: name, - organizationId: organizationId, - webviewLogoShape: webviewLogoShape, - webviewPrimaryButtonColor: webviewPrimaryButtonColor, - webviewPrimaryButtonTextColor: webviewPrimaryButtonTextColor, - webviewSuccessMessage: webviewSuccessMessage - ) - ); - } - - /// - /// Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces). - /// - public async Task CreateAsync(CreateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.PostAsync("/workspaces/create", requestOptions)) - .EnsureData("/workspaces/create") - .Workspace; - } - - /// - /// Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces). - /// - public async Task CreateAsync( - string? companyName = default, - string? connectPartnerName = default, - CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, - bool? isSandbox = default, - string name = default, - string? organizationId = default, - CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, - string? webviewPrimaryButtonColor = default, - string? webviewPrimaryButtonTextColor = default, - string? webviewSuccessMessage = default - ) - { - return ( - await CreateAsync( - new CreateRequest( - companyName: companyName, - connectPartnerName: connectPartnerName, - connectWebviewCustomization: connectWebviewCustomization, - isSandbox: isSandbox, - name: name, - organizationId: organizationId, - webviewLogoShape: webviewLogoShape, - webviewPrimaryButtonColor: webviewPrimaryButtonColor, - webviewPrimaryButtonTextColor: webviewPrimaryButtonTextColor, - webviewSuccessMessage: webviewSuccessMessage - ) - ) - ); - } - - /// - /// Request parameters for Get a Workspace. - /// - [DataContract(Name = "getRequest_request")] - public class GetRequest - { - [JsonConstructorAttribute] - public GetRequest() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "getResponse_response")] - public class GetResponse - { - [JsonConstructorAttribute] - protected GetResponse() { } - - public GetResponse(Workspace workspace = default) - { - Workspace = workspace; - } - - /// - /// OK - /// - [DataMember(Name = "workspace", IsRequired = false, EmitDefaultValue = false)] - public Workspace Workspace { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public Workspace Get(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/workspaces/get", requestOptions) - .EnsureData("/workspaces/get") - .Workspace; - } - - /// - /// Returns the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public Workspace Get() - { - return Get(new GetRequest()); - } - - /// - /// Returns the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public async Task GetAsync(GetRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/workspaces/get", requestOptions)) - .EnsureData("/workspaces/get") - .Workspace; - } - - /// - /// Returns the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public async Task GetAsync() - { - return (await GetAsync(new GetRequest())); - } - - /// - /// Request parameters for List Workspaces. - /// - [DataContract(Name = "listRequest_request")] - public class ListRequest - { - [JsonConstructorAttribute] - public ListRequest() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "listResponse_response")] - public class ListResponse - { - [JsonConstructorAttribute] - protected ListResponse() { } - - public ListResponse(List workspaces = default) - { - Workspaces = workspaces; - } - - /// - /// OK - /// - [DataMember(Name = "workspaces", IsRequired = false, EmitDefaultValue = false)] - public List Workspaces { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public List List(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Get("/workspaces/list", requestOptions) - .EnsureData("/workspaces/list") - .Workspaces; - } - - /// - /// Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public List List() - { - return List(new ListRequest()); - } - - /// - /// Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public async Task> ListAsync(ListRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return (await _seam.GetAsync("/workspaces/list", requestOptions)) - .EnsureData("/workspaces/list") - .Workspaces; - } - - /// - /// Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public async Task> ListAsync() - { - return (await ListAsync(new ListRequest())); - } - - /// - /// Request parameters for Reset a Sandbox Workspace. - /// - [DataContract(Name = "resetSandboxRequest_request")] - public class ResetSandboxRequest - { - [JsonConstructorAttribute] - public ResetSandboxRequest() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "resetSandboxResponse_response")] - public class ResetSandboxResponse - { - [JsonConstructorAttribute] - protected ResetSandboxResponse() { } - - public ResetSandboxResponse(ActionAttempt actionAttempt = default) - { - ActionAttempt = actionAttempt; - } - - /// - /// OK - /// - [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] - public ActionAttempt ActionAttempt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Resets the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. - /// - public ActionAttempt ResetSandbox(ResetSandboxRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return _seam - .Post("/workspaces/reset_sandbox", requestOptions) - .EnsureData("/workspaces/reset_sandbox") - .ActionAttempt; - } - - /// - /// Resets the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. - /// - public ActionAttempt ResetSandbox() - { - return ResetSandbox(new ResetSandboxRequest()); - } - - /// - /// Resets the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. - /// - public async Task ResetSandboxAsync(ResetSandboxRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - return ( - await _seam.PostAsync( - "/workspaces/reset_sandbox", - requestOptions - ) - ) - .EnsureData("/workspaces/reset_sandbox") - .ActionAttempt; - } - - /// - /// Resets the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. - /// - public async Task ResetSandboxAsync() - { - return (await ResetSandboxAsync(new ResetSandboxRequest())); - } - - /// - /// Request parameters for Update a Workspace. - /// - [DataContract(Name = "updateRequest_request")] - public class UpdateRequest - { - [JsonConstructorAttribute] - protected UpdateRequest() { } - - public UpdateRequest( - string? connectPartnerName = default, - UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, - bool? isPublishableKeyAuthEnabled = default, - bool? isSuspended = default, - string? name = default, - string? organizationId = default - ) - { - ConnectPartnerName = connectPartnerName; - ConnectWebviewCustomization = connectWebviewCustomization; - IsPublishableKeyAuthEnabled = isPublishableKeyAuthEnabled; - IsSuspended = isSuspended; - Name = name; - OrganizationId = organizationId; - } - - /// - /// Connect partner name for the workspace. - /// - [DataMember( - Name = "connect_partner_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ConnectPartnerName { get; set; } - - /// - /// [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) customizations for the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember( - Name = "connect_webview_customization", - IsRequired = false, - EmitDefaultValue = false - )] - public UpdateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } - - /// - /// Indicates whether publishable key authentication is enabled for this workspace. - /// - [DataMember( - Name = "is_publishable_key_auth_enabled", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsPublishableKeyAuthEnabled { get; set; } - - /// - /// Indicates whether the workspace is suspended. - /// - [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] - public bool? IsSuspended { get; set; } - - /// - /// Name of the workspace. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// ID of the organization to assign the workspace to. The authenticated user must be the owner of the workspace and an admin of the target organization. - /// - [DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] - public string? OrganizationId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "updateRequestConnectWebviewCustomization_model")] - public class UpdateRequestConnectWebviewCustomization - { - [JsonConstructorAttribute] - protected UpdateRequestConnectWebviewCustomization() { } - - public UpdateRequestConnectWebviewCustomization( - UpdateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, - string? primaryButtonColor = default, - string? primaryButtonTextColor = default, - string? successMessage = default - ) - { - LogoShape = logoShape; - PrimaryButtonColor = primaryButtonColor; - PrimaryButtonTextColor = primaryButtonTextColor; - SuccessMessage = successMessage; - } - - /// - /// Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum LogoShapeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "circle")] - Circle = 1, - - [EnumMember(Value = "square")] - Square = 2, - } - - /// - /// Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] - public UpdateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } - - /// - /// Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember( - Name = "primary_button_color", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PrimaryButtonColor { get; set; } - - /// - /// Primary button text color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember( - Name = "primary_button_text_color", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PrimaryButtonTextColor { get; set; } - - /// - /// Success message for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] - public string? SuccessMessage { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Updates the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public void Update(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - _seam.Patch("/workspaces/update", requestOptions); - } - - /// - /// Updates the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public void Update( - string? connectPartnerName = default, - UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, - bool? isPublishableKeyAuthEnabled = default, - bool? isSuspended = default, - string? name = default, - string? organizationId = default - ) - { - Update( - new UpdateRequest( - connectPartnerName: connectPartnerName, - connectWebviewCustomization: connectWebviewCustomization, - isPublishableKeyAuthEnabled: isPublishableKeyAuthEnabled, - isSuspended: isSuspended, - name: name, - organizationId: organizationId - ) - ); - } - - /// - /// Updates the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public async Task UpdateAsync(UpdateRequest request) - { - var requestOptions = new RequestOptions(); - requestOptions.Data = request; - await _seam.PatchAsync("/workspaces/update", requestOptions); - } - - /// - /// Updates the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. - /// - public async Task UpdateAsync( - string? connectPartnerName = default, - UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, - bool? isPublishableKeyAuthEnabled = default, - bool? isSuspended = default, - string? name = default, - string? organizationId = default - ) - { - await UpdateAsync( - new UpdateRequest( - connectPartnerName: connectPartnerName, - connectWebviewCustomization: connectWebviewCustomization, - isPublishableKeyAuthEnabled: isPublishableKeyAuthEnabled, - isSuspended: isSuspended, - name: name, - organizationId: organizationId - ) - ); - } - } +public class Workspaces +{ +private ISeamClient _seam; + +public Workspaces(ISeamClient seam) +{ +_seam = seam; +} + +/// +/// Request parameters for Create a Workspace. +/// +[DataContract(Name = "createRequest_request")] +public class CreateRequest +{ +[JsonConstructorAttribute] +protected CreateRequest() { } + +public CreateRequest(string? companyName = default, string? connectPartnerName = default, CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, string? organizationId = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, string? webviewPrimaryButtonColor = default, string? webviewPrimaryButtonTextColor = default, string? webviewSuccessMessage = default) +{ +CompanyName = companyName; +ConnectPartnerName = connectPartnerName; +ConnectWebviewCustomization = connectWebviewCustomization; +IsSandbox = isSandbox; +Name = name; +OrganizationId = organizationId; +WebviewLogoShape = webviewLogoShape; +WebviewPrimaryButtonColor = webviewPrimaryButtonColor; +WebviewPrimaryButtonTextColor = webviewPrimaryButtonTextColor; +WebviewSuccessMessage = webviewSuccessMessage; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum WebviewLogoShapeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "circle")] +Circle = 1, + +[EnumMember(Value = "square")] +Square = 2, +} + +/// +/// Company name for the new workspace. +/// +[Obsolete("Use `connect_partner_name` instead.")] +[DataMember(Name = "company_name", IsRequired = false, EmitDefaultValue = false)] +public string? CompanyName { get; set; } + +/// +/// Connect partner name for the new workspace. +/// +[DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectPartnerName { get; set; } + +/// +/// [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) customizations for the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "connect_webview_customization", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } + +/// +/// Indicates whether the new workspace is a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +[DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] +public bool? IsSandbox { get; set; } + +/// +/// Name of the new workspace. +/// +[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// ID of the organization to associate with the new workspace. If omitted, the new workspace is associated with the organization that you administer, if you administer exactly one. If you administer no organization, Seam creates one for you and associates the new workspace with it. +/// +[DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] +public string? OrganizationId { get; set; } + +[Obsolete("Use `connect_webview_customization.webview_logo_shape` instead.")] +[DataMember(Name = "webview_logo_shape", IsRequired = false, EmitDefaultValue = false)] +public CreateRequest.WebviewLogoShapeEnum? WebviewLogoShape { get; set; } + +[Obsolete("Use `connect_webview_customization.webview_primary_button_color` instead.")] +[DataMember(Name = "webview_primary_button_color", IsRequired = false, EmitDefaultValue = false)] +public string? WebviewPrimaryButtonColor { get; set; } + +[Obsolete("Use `connect_webview_customization.webview_primary_button_text_color` instead.")] +[DataMember(Name = "webview_primary_button_text_color", IsRequired = false, EmitDefaultValue = false)] +public string? WebviewPrimaryButtonTextColor { get; set; } + +[Obsolete("Use `connect_webview_customization.webview_success_message` instead.")] +[DataMember(Name = "webview_success_message", IsRequired = false, EmitDefaultValue = false)] +public string? WebviewSuccessMessage { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createRequestConnectWebviewCustomization_model")] +public class CreateRequestConnectWebviewCustomization +{ +[JsonConstructorAttribute] +protected CreateRequestConnectWebviewCustomization() { } + +public CreateRequestConnectWebviewCustomization(CreateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, string? primaryButtonColor = default, string? primaryButtonTextColor = default, string? successMessage = default) +{ +LogoShape = logoShape; +PrimaryButtonColor = primaryButtonColor; +PrimaryButtonTextColor = primaryButtonTextColor; +SuccessMessage = successMessage; +} + +/// +/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum LogoShapeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "circle")] +Circle = 1, + +[EnumMember(Value = "square")] +Square = 2, +} + +/// +/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] +public CreateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } + +/// +/// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] +public string? PrimaryButtonColor { get; set; } + +/// +/// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "primary_button_text_color", IsRequired = false, EmitDefaultValue = false)] +public string? PrimaryButtonTextColor { get; set; } + +/// +/// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] +public string? SuccessMessage { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "createResponse_response")] +public class CreateResponse +{ +[JsonConstructorAttribute] +protected CreateResponse() { } + +public CreateResponse(Workspace workspace = default) +{ +Workspace = workspace; +} + +/// +/// OK +/// +[DataMember(Name = "workspace", IsRequired = false, EmitDefaultValue = false)] +public Workspace Workspace { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). +/// +public Workspace Create(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/workspaces/create", requestOptions).EnsureData("/workspaces/create").Workspace; +} + +/// +/// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). +/// +public Workspace Create(string? companyName = default, string? connectPartnerName = default, CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, string? organizationId = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, string? webviewPrimaryButtonColor = default, string? webviewPrimaryButtonTextColor = default, string? webviewSuccessMessage = default) +{ +return Create(new CreateRequest(companyName: companyName, connectPartnerName: connectPartnerName, connectWebviewCustomization: connectWebviewCustomization, isSandbox: isSandbox, name: name, organizationId: organizationId, webviewLogoShape: webviewLogoShape, webviewPrimaryButtonColor: webviewPrimaryButtonColor, webviewPrimaryButtonTextColor: webviewPrimaryButtonTextColor, webviewSuccessMessage: webviewSuccessMessage)); +} + +/// +/// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). +/// +public async Task CreateAsync(CreateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/workspaces/create", requestOptions)).EnsureData("/workspaces/create").Workspace; +} + +/// +/// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). +/// +public async Task CreateAsync(string? companyName = default, string? connectPartnerName = default, CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, string? organizationId = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, string? webviewPrimaryButtonColor = default, string? webviewPrimaryButtonTextColor = default, string? webviewSuccessMessage = default) +{ +return (await CreateAsync(new CreateRequest(companyName: companyName, connectPartnerName: connectPartnerName, connectWebviewCustomization: connectWebviewCustomization, isSandbox: isSandbox, name: name, organizationId: organizationId, webviewLogoShape: webviewLogoShape, webviewPrimaryButtonColor: webviewPrimaryButtonColor, webviewPrimaryButtonTextColor: webviewPrimaryButtonTextColor, webviewSuccessMessage: webviewSuccessMessage))); +} + +/// +/// Request parameters for Get a Workspace. +/// +[DataContract(Name = "getRequest_request")] +public class GetRequest +{ +[JsonConstructorAttribute] +public GetRequest() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "getResponse_response")] +public class GetResponse +{ +[JsonConstructorAttribute] +protected GetResponse() { } + +public GetResponse(Workspace workspace = default) +{ +Workspace = workspace; +} + +/// +/// OK +/// +[DataMember(Name = "workspace", IsRequired = false, EmitDefaultValue = false)] +public Workspace Workspace { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public Workspace Get(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/workspaces/get", requestOptions).EnsureData("/workspaces/get").Workspace; +} + +/// +/// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public Workspace Get() +{ +return Get(new GetRequest()); +} + +/// +/// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public async Task GetAsync(GetRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/workspaces/get", requestOptions)).EnsureData("/workspaces/get").Workspace; +} + +/// +/// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public async Task GetAsync() +{ +return (await GetAsync(new GetRequest())); +} + +/// +/// Request parameters for List Workspaces. +/// +[DataContract(Name = "listRequest_request")] +public class ListRequest +{ +[JsonConstructorAttribute] +public ListRequest() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "listResponse_response")] +public class ListResponse +{ +[JsonConstructorAttribute] +protected ListResponse() { } + +public ListResponse(List workspaces = default) +{ +Workspaces = workspaces; +} + +/// +/// OK +/// +[DataMember(Name = "workspaces", IsRequired = false, EmitDefaultValue = false)] +public List Workspaces { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public List List(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Get("/workspaces/list", requestOptions).EnsureData("/workspaces/list").Workspaces; +} + +/// +/// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public List List() +{ +return List(new ListRequest()); +} + +/// +/// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public async Task> ListAsync(ListRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.GetAsync("/workspaces/list", requestOptions)).EnsureData("/workspaces/list").Workspaces; +} + +/// +/// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public async Task> ListAsync() +{ +return (await ListAsync(new ListRequest())); +} + +/// +/// Request parameters for Reset a Sandbox Workspace. +/// +[DataContract(Name = "resetSandboxRequest_request")] +public class ResetSandboxRequest +{ +[JsonConstructorAttribute] +public ResetSandboxRequest() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "resetSandboxResponse_response")] +public class ResetSandboxResponse +{ +[JsonConstructorAttribute] +protected ResetSandboxResponse() { } + +public ResetSandboxResponse(ActionAttempt actionAttempt = default) +{ +ActionAttempt = actionAttempt; +} + +/// +/// OK +/// +[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] +public ActionAttempt ActionAttempt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. +/// +public ActionAttempt ResetSandbox(ResetSandboxRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return _seam.Post("/workspaces/reset_sandbox", requestOptions).EnsureData("/workspaces/reset_sandbox").ActionAttempt; +} + +/// +/// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. +/// +public ActionAttempt ResetSandbox() +{ +return ResetSandbox(new ResetSandboxRequest()); +} + +/// +/// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. +/// +public async Task ResetSandboxAsync(ResetSandboxRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +return (await _seam.PostAsync("/workspaces/reset_sandbox", requestOptions)).EnsureData("/workspaces/reset_sandbox").ActionAttempt; +} + +/// +/// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. +/// +public async Task ResetSandboxAsync() +{ +return (await ResetSandboxAsync(new ResetSandboxRequest())); +} + +/// +/// Request parameters for Update a Workspace. +/// +[DataContract(Name = "updateRequest_request")] +public class UpdateRequest +{ +[JsonConstructorAttribute] +protected UpdateRequest() { } + +public UpdateRequest(string? connectPartnerName = default, UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isPublishableKeyAuthEnabled = default, bool? isSuspended = default, string? name = default, string? organizationId = default) +{ +ConnectPartnerName = connectPartnerName; +ConnectWebviewCustomization = connectWebviewCustomization; +IsPublishableKeyAuthEnabled = isPublishableKeyAuthEnabled; +IsSuspended = isSuspended; +Name = name; +OrganizationId = organizationId; +} + +/// +/// Connect partner name for the workspace. +/// +[DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectPartnerName { get; set; } + +/// +/// [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) customizations for the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "connect_webview_customization", IsRequired = false, EmitDefaultValue = false)] +public UpdateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } + +/// +/// Indicates whether publishable key authentication is enabled for this workspace. +/// +[DataMember(Name = "is_publishable_key_auth_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? IsPublishableKeyAuthEnabled { get; set; } + +/// +/// Indicates whether the workspace is suspended. +/// +[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] +public bool? IsSuspended { get; set; } + +/// +/// Name of the workspace. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// ID of the organization to assign the workspace to. The authenticated user must be the owner of the workspace and an admin of the target organization. +/// +[DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] +public string? OrganizationId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "updateRequestConnectWebviewCustomization_model")] +public class UpdateRequestConnectWebviewCustomization +{ +[JsonConstructorAttribute] +protected UpdateRequestConnectWebviewCustomization() { } + +public UpdateRequestConnectWebviewCustomization(UpdateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, string? primaryButtonColor = default, string? primaryButtonTextColor = default, string? successMessage = default) +{ +LogoShape = logoShape; +PrimaryButtonColor = primaryButtonColor; +PrimaryButtonTextColor = primaryButtonTextColor; +SuccessMessage = successMessage; +} + +/// +/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum LogoShapeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "circle")] +Circle = 1, + +[EnumMember(Value = "square")] +Square = 2, +} + +/// +/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] +public UpdateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } + +/// +/// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] +public string? PrimaryButtonColor { get; set; } + +/// +/// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "primary_button_text_color", IsRequired = false, EmitDefaultValue = false)] +public string? PrimaryButtonTextColor { get; set; } + +/// +/// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] +public string? SuccessMessage { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public void Update(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +_seam.Patch("/workspaces/update", requestOptions); +} + +/// +/// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public void Update(string? connectPartnerName = default, UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isPublishableKeyAuthEnabled = default, bool? isSuspended = default, string? name = default, string? organizationId = default) +{ +Update(new UpdateRequest(connectPartnerName: connectPartnerName, connectWebviewCustomization: connectWebviewCustomization, isPublishableKeyAuthEnabled: isPublishableKeyAuthEnabled, isSuspended: isSuspended, name: name, organizationId: organizationId)); +} + +/// +/// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public async Task UpdateAsync(UpdateRequest request) +{ +var requestOptions = new RequestOptions(); +requestOptions.Data = request; +await _seam.PatchAsync("/workspaces/update", requestOptions); +} + +/// +/// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. +/// +public async Task UpdateAsync(string? connectPartnerName = default, UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isPublishableKeyAuthEnabled = default, bool? isSuspended = default, string? name = default, string? organizationId = default) +{ +await UpdateAsync(new UpdateRequest(connectPartnerName: connectPartnerName, connectWebviewCustomization: connectWebviewCustomization, isPublishableKeyAuthEnabled: isPublishableKeyAuthEnabled, isSuspended: isSuspended, name: name, organizationId: organizationId)); +} +} } namespace Seam.Client { - public partial class SeamClient - { - public Api.Workspaces Workspaces => new(this); - } +public partial class SeamClient +{ +public Api.Workspaces Workspaces => new(this); +} - public partial interface ISeamClient - { - public Api.Workspaces Workspaces { get; } - } +public partial interface ISeamClient +{ +public Api.Workspaces Workspaces { get; } +} } diff --git a/src/Seam/Model/AccessCode.cs b/src/Seam/Model/AccessCode.cs index d252dad6..8e167878 100644 --- a/src/Seam/Model/AccessCode.cs +++ b/src/Seam/Model/AccessCode.cs @@ -8,3760 +8,3300 @@ namespace Seam.Model { - /// - /// Represents a smart lock [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. - /// - /// Seam supports programming two types of access codes: [ongoing](https://docs.seam.co/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://docs.seam.co/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. - /// - /// In addition, for certain devices, Seam also supports [offline access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. - /// - /// For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. - /// - [DataContract(Name = "seamModel_accessCode_model")] - public class AccessCode - { - [JsonConstructorAttribute] - protected AccessCode() { } - - public AccessCode( - string accessCodeId = default, - string? code = default, - string? commonCodeKey = default, - string createdAt = default, - string deviceId = default, - AccessCodeDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, - string? endsAt = default, - List errors = default, - bool? isBackup = default, - bool isBackupAccessCodeAvailable = default, - bool isExternalModificationAllowed = default, - bool isManaged = default, - bool isOfflineAccessCode = default, - bool isOneTimeUse = default, - bool? isScheduledOnDevice = default, - bool? isWaitingForCodeAssignment = default, - string? name = default, - List pendingMutations = default, - string? pulledBackupAccessCodeId = default, - string? startsAt = default, - AccessCode.StatusEnum status = default, - AccessCode.TypeEnum type = default, - List warnings = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - Code = code; - CommonCodeKey = commonCodeKey; - CreatedAt = createdAt; - DeviceId = deviceId; - DormakabaOracodeMetadata = dormakabaOracodeMetadata; - EndsAt = endsAt; - Errors = errors; - IsBackup = isBackup; - IsBackupAccessCodeAvailable = isBackupAccessCodeAvailable; - IsExternalModificationAllowed = isExternalModificationAllowed; - IsManaged = isManaged; - IsOfflineAccessCode = isOfflineAccessCode; - IsOneTimeUse = isOneTimeUse; - IsScheduledOnDevice = isScheduledOnDevice; - IsWaitingForCodeAssignment = isWaitingForCodeAssignment; - Name = name; - PendingMutations = pendingMutations; - PulledBackupAccessCodeId = pulledBackupAccessCodeId; - StartsAt = startsAt; - Status = status; - Type = type; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessCodeErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsBridgeDisconnected), - "bridge_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsSubscriptionRequired), - "subscription_required" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsAuxiliaryHeatRunning), - "auxiliary_heat_running" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsMissingDeviceCredentials), - "missing_device_credentials" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsAugustLockNotAuthorized), - "august_lock_not_authorized" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsEmptyBackupAccessCodePool), - "empty_backup_access_code_pool" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsDeviceDisconnected), - "device_disconnected" - )] - [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsHubDisconnected), "hub_disconnected")] - [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceRemoved), "device_removed")] - [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceOffline), "device_offline")] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsDormakabaSitesDisconnected), - "dormakaba_sites_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsInsufficientPermissions), - "insufficient_permissions" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsSaltoKsSubscriptionLimitExceeded), - "salto_ks_subscription_limit_exceeded" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsAccountDisconnected), - "account_disconnected" - )] - [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToExpire), "failed_to_expire")] - [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToUpdate), "failed_to_update")] - [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToIssue), "failed_to_issue")] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsCodeConstraintsViolated), - "code_constraints_violated" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsAccessCodeInactive), - "access_code_inactive" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsConflictingExternalModification), - "conflicting_external_modification" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsNoSpaceForAccessCodeOnDevice), - "no_space_for_access_code_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsDuplicateCodeOnDevice), - "duplicate_code_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsFailedToRemoveFromDevice), - "failed_to_remove_from_device" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeErrorsFailedToSetOnDevice), - "failed_to_set_on_device" - )] - [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsProviderIssue), "provider_issue")] - public abstract class AccessCodeErrors - { - public abstract string ErrorCode { get; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessCodeErrorsProviderIssue_model")] - public class AccessCodeErrorsProviderIssue : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsProviderIssue() { } - - public AccessCodeErrorsProviderIssue( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "provider_issue"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsFailedToSetOnDevice_model")] - public class AccessCodeErrorsFailedToSetOnDevice : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsFailedToSetOnDevice() { } - - public AccessCodeErrorsFailedToSetOnDevice( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_set_on_device"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsFailedToRemoveFromDevice_model")] - public class AccessCodeErrorsFailedToRemoveFromDevice : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsFailedToRemoveFromDevice() { } - - public AccessCodeErrorsFailedToRemoveFromDevice( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_remove_from_device"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsDuplicateCodeOnDevice_model")] - public class AccessCodeErrorsDuplicateCodeOnDevice : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsDuplicateCodeOnDevice() { } - - public AccessCodeErrorsDuplicateCodeOnDevice( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string? managedAccessCodeId = default, - string message = default, - string? unmanagedAccessCodeId = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - ManagedAccessCodeId = managedAccessCodeId; - Message = message; - UnmanagedAccessCodeId = unmanagedAccessCodeId; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "duplicate_code_on_device"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// ID of the managed access code that conflicts with this managed access code, when Seam can identify it. - /// - [DataMember( - Name = "managed_access_code_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ManagedAccessCodeId { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. - /// - [DataMember( - Name = "unmanaged_access_code_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UnmanagedAccessCodeId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsNoSpaceForAccessCodeOnDevice_model")] - public class AccessCodeErrorsNoSpaceForAccessCodeOnDevice : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsNoSpaceForAccessCodeOnDevice() { } - - public AccessCodeErrorsNoSpaceForAccessCodeOnDevice( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "no_space_for_access_code_on_device"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsConflictingExternalModification_model")] - public class AccessCodeErrorsConflictingExternalModification : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsConflictingExternalModification() { } - - public AccessCodeErrorsConflictingExternalModification( - AccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? changeType = - default, - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default, - List? modifiedFields = - default - ) - { - ChangeType = changeType; - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - ModifiedFields = modifiedFields; - } - - /// - /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ChangeTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "modified")] - Modified = 1, - - [EnumMember(Value = "removed")] - Removed = 2, - } - - /// - /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - /// - [DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] - public AccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? ChangeType { get; set; } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "conflicting_external_modification"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// List of fields that were changed externally, with their previous and new values. - /// - [DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] - public List? ModifiedFields { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_accessCodeErrorsConflictingExternalModificationModifiedFields_model" - )] - public class AccessCodeErrorsConflictingExternalModificationModifiedFields - { - [JsonConstructorAttribute] - protected AccessCodeErrorsConflictingExternalModificationModifiedFields() { } - - public AccessCodeErrorsConflictingExternalModificationModifiedFields( - string field = default, - string? from = default, - string? to = default - ) - { - Field = field; - From = from; - To = to; - } - - /// - /// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). - /// - [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The previous value of the field. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public string? From { get; set; } - - /// - /// The new value of the field. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public string? To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsAccessCodeInactive_model")] - public class AccessCodeErrorsAccessCodeInactive : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsAccessCodeInactive() { } - - public AccessCodeErrorsAccessCodeInactive( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "access_code_inactive"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsCodeConstraintsViolated_model")] - public class AccessCodeErrorsCodeConstraintsViolated : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsCodeConstraintsViolated() { } - - public AccessCodeErrorsCodeConstraintsViolated( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "code_constraints_violated"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsFailedToIssue_model")] - public class AccessCodeErrorsFailedToIssue : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsFailedToIssue() { } - - public AccessCodeErrorsFailedToIssue( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_issue"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsFailedToUpdate_model")] - public class AccessCodeErrorsFailedToUpdate : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsFailedToUpdate() { } - - public AccessCodeErrorsFailedToUpdate( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_update"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsFailedToExpire_model")] - public class AccessCodeErrorsFailedToExpire : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsFailedToExpire() { } - - public AccessCodeErrorsFailedToExpire( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_expire"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsAccountDisconnected_model")] - public class AccessCodeErrorsAccountDisconnected : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsAccountDisconnected() { } - - public AccessCodeErrorsAccountDisconnected( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "account_disconnected"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsSaltoKsSubscriptionLimitExceeded_model")] - public class AccessCodeErrorsSaltoKsSubscriptionLimitExceeded : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsSaltoKsSubscriptionLimitExceeded() { } - - public AccessCodeErrorsSaltoKsSubscriptionLimitExceeded( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsInsufficientPermissions_model")] - public class AccessCodeErrorsInsufficientPermissions : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsInsufficientPermissions() { } - - public AccessCodeErrorsInsufficientPermissions( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "insufficient_permissions"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsDormakabaSitesDisconnected_model")] - public class AccessCodeErrorsDormakabaSitesDisconnected : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsDormakabaSitesDisconnected() { } - - public AccessCodeErrorsDormakabaSitesDisconnected( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsDeviceOffline_model")] - public class AccessCodeErrorsDeviceOffline : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsDeviceOffline() { } - - public AccessCodeErrorsDeviceOffline( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_offline"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsDeviceRemoved_model")] - public class AccessCodeErrorsDeviceRemoved : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsDeviceRemoved() { } - - public AccessCodeErrorsDeviceRemoved( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_removed"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsHubDisconnected_model")] - public class AccessCodeErrorsHubDisconnected : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsHubDisconnected() { } - - public AccessCodeErrorsHubDisconnected( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "hub_disconnected"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsDeviceDisconnected_model")] - public class AccessCodeErrorsDeviceDisconnected : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsDeviceDisconnected() { } - - public AccessCodeErrorsDeviceDisconnected( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_disconnected"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsEmptyBackupAccessCodePool_model")] - public class AccessCodeErrorsEmptyBackupAccessCodePool : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsEmptyBackupAccessCodePool() { } - - public AccessCodeErrorsEmptyBackupAccessCodePool( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "empty_backup_access_code_pool"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsAugustLockNotAuthorized_model")] - public class AccessCodeErrorsAugustLockNotAuthorized : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsAugustLockNotAuthorized() { } - - public AccessCodeErrorsAugustLockNotAuthorized( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "august_lock_not_authorized"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsMissingDeviceCredentials_model")] - public class AccessCodeErrorsMissingDeviceCredentials : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsMissingDeviceCredentials() { } - - public AccessCodeErrorsMissingDeviceCredentials( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "missing_device_credentials"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsAuxiliaryHeatRunning_model")] - public class AccessCodeErrorsAuxiliaryHeatRunning : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsAuxiliaryHeatRunning() { } - - public AccessCodeErrorsAuxiliaryHeatRunning( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "auxiliary_heat_running"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsSubscriptionRequired_model")] - public class AccessCodeErrorsSubscriptionRequired : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsSubscriptionRequired() { } - - public AccessCodeErrorsSubscriptionRequired( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "subscription_required"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsBridgeDisconnected_model")] - public class AccessCodeErrorsBridgeDisconnected : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsBridgeDisconnected() { } - - public AccessCodeErrorsBridgeDisconnected( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "bridge_disconnected"; - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeErrorsUnrecognized_model")] - public class AccessCodeErrorsUnrecognized : AccessCodeErrors - { - [JsonConstructorAttribute] - protected AccessCodeErrorsUnrecognized() { } - - public AccessCodeErrorsUnrecognized( - string errorCode = default, - string message = default - ) - { - ErrorCode = errorCode; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "mutation_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessCodePendingMutationsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AccessCodePendingMutationsUpdatingTimeFrame), - "updating_time_frame" - )] - [JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingName), "updating_name")] - [JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingCode), "updating_code")] - [JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsDeleting), "deleting")] - [JsonSubtypes.KnownSubType( - typeof(AccessCodePendingMutationsDeferringCreation), - "deferring_creation" - )] - [JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsCreating), "creating")] - public abstract class AccessCodePendingMutations - { - public abstract string MutationCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsCreating_model")] - public class AccessCodePendingMutationsCreating : AccessCodePendingMutations - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsCreating() { } - - public AccessCodePendingMutationsCreating( - string createdAt = default, - string message = default, - string mutationCode = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "creating"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsDeferringCreation_model")] - public class AccessCodePendingMutationsDeferringCreation : AccessCodePendingMutations - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsDeferringCreation() { } - - public AccessCodePendingMutationsDeferringCreation( - string createdAt = default, - string message = default, - string mutationCode = default, - string scheduledAt = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - ScheduledAt = scheduledAt; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "deferring_creation"; - - /// - /// Date and time at which Seam will attempt to program this access code on the device. - /// - [DataMember(Name = "scheduled_at", IsRequired = false, EmitDefaultValue = false)] - public string ScheduledAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsDeleting_model")] - public class AccessCodePendingMutationsDeleting : AccessCodePendingMutations - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsDeleting() { } - - public AccessCodePendingMutationsDeleting( - string createdAt = default, - string message = default, - string mutationCode = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "deleting"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCode_model")] - public class AccessCodePendingMutationsUpdatingCode : AccessCodePendingMutations - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingCode() { } - - public AccessCodePendingMutationsUpdatingCode( - string createdAt = default, - AccessCodePendingMutationsUpdatingCodeFrom from = default, - string message = default, - string mutationCode = default, - AccessCodePendingMutationsUpdatingCodeTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous code configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AccessCodePendingMutationsUpdatingCodeFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_code"; - - /// - /// New code configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AccessCodePendingMutationsUpdatingCodeTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCodeFrom_model")] - public class AccessCodePendingMutationsUpdatingCodeFrom - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingCodeFrom() { } - - public AccessCodePendingMutationsUpdatingCodeFrom(string? code = default) - { - Code = code; - } - - /// - /// Previous PIN code. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCodeTo_model")] - public class AccessCodePendingMutationsUpdatingCodeTo - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingCodeTo() { } - - public AccessCodePendingMutationsUpdatingCodeTo(string? code = default) - { - Code = code; - } - - /// - /// New PIN code. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingName_model")] - public class AccessCodePendingMutationsUpdatingName : AccessCodePendingMutations - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingName() { } - - public AccessCodePendingMutationsUpdatingName( - string createdAt = default, - AccessCodePendingMutationsUpdatingNameFrom from = default, - string message = default, - string mutationCode = default, - AccessCodePendingMutationsUpdatingNameTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous name configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AccessCodePendingMutationsUpdatingNameFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_name"; - - /// - /// New name configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AccessCodePendingMutationsUpdatingNameTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingNameFrom_model")] - public class AccessCodePendingMutationsUpdatingNameFrom - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingNameFrom() { } - - public AccessCodePendingMutationsUpdatingNameFrom(string? name = default) - { - Name = name; - } - - /// - /// Previous access code name. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingNameTo_model")] - public class AccessCodePendingMutationsUpdatingNameTo - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingNameTo() { } - - public AccessCodePendingMutationsUpdatingNameTo(string? name = default) - { - Name = name; - } - - /// - /// New access code name. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrame_model")] - public class AccessCodePendingMutationsUpdatingTimeFrame : AccessCodePendingMutations - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingTimeFrame() { } - - public AccessCodePendingMutationsUpdatingTimeFrame( - string createdAt = default, - AccessCodePendingMutationsUpdatingTimeFrameFrom from = default, - string message = default, - string mutationCode = default, - AccessCodePendingMutationsUpdatingTimeFrameTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous time frame configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AccessCodePendingMutationsUpdatingTimeFrameFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_time_frame"; - - /// - /// New time frame configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AccessCodePendingMutationsUpdatingTimeFrameTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrameFrom_model")] - public class AccessCodePendingMutationsUpdatingTimeFrameFrom - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingTimeFrameFrom() { } - - public AccessCodePendingMutationsUpdatingTimeFrameFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Previous end time for the access code. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Previous start time for the access code. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrameTo_model")] - public class AccessCodePendingMutationsUpdatingTimeFrameTo - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUpdatingTimeFrameTo() { } - - public AccessCodePendingMutationsUpdatingTimeFrameTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// New end time for the access code. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// New start time for the access code. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodePendingMutationsUnrecognized_model")] - public class AccessCodePendingMutationsUnrecognized : AccessCodePendingMutations - { - [JsonConstructorAttribute] - protected AccessCodePendingMutationsUnrecognized() { } - - public AccessCodePendingMutationsUnrecognized( - string mutationCode = default, - string createdAt = default, - string message = default - ) - { - MutationCode = mutationCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "unrecognized"; - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "setting")] - Setting = 1, - - [EnumMember(Value = "set")] - Set = 2, - - [EnumMember(Value = "unset")] - Unset = 3, - - [EnumMember(Value = "removing")] - Removing = 4, - - [EnumMember(Value = "unknown")] - Unknown = 5, - } - - /// - /// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "time_bound")] - TimeBound = 1, - - [EnumMember(Value = "ongoing")] - Ongoing = 2, - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessCodeWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsUnknownIssueWithAccessCode), - "unknown_issue_with_access_code" - )] - [JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsBeingDeleted), "being_deleted")] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsUsingBackupAccessCode), - "using_backup_access_code" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsManagementTransferred), - "management_transferred" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours), - "igloo_algopin_must_be_used_within_24_hours" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsThirdPartyIntegrationDetected), - "third_party_integration_detected" - )] - [JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsDelayInIssuing), "delay_in_issuing")] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsDelayInRemovingFromDevice), - "delay_in_removing_from_device" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsDelayInSettingOnDevice), - "delay_in_setting_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsExternalModificationInEffect), - "external_modification_in_effect" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone), - "time_frame_adjusted_for_unknown_time_zone" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessCodeWarningsCodeRotatesPeriodically), - "code_rotates_periodically" - )] - public abstract class AccessCodeWarnings - { - public abstract string WarningCode { get; } - - public abstract string? CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessCodeWarningsCodeRotatesPeriodically_model")] - public class AccessCodeWarningsCodeRotatesPeriodically : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsCodeRotatesPeriodically() { } - - public AccessCodeWarningsCodeRotatesPeriodically( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "code_rotates_periodically"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_accessCodeWarningsTimeFrameAdjustedForUnknownTimeZone_model" - )] - public class AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone() { } - - public AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "time_frame_adjusted_for_unknown_time_zone"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsExternalModificationInEffect_model")] - public class AccessCodeWarningsExternalModificationInEffect : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsExternalModificationInEffect() { } - - public AccessCodeWarningsExternalModificationInEffect( - AccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? changeType = default, - string? createdAt = default, - string message = default, - List? modifiedFields = - default, - string warningCode = default - ) - { - ChangeType = changeType; - CreatedAt = createdAt; - Message = message; - ModifiedFields = modifiedFields; - WarningCode = warningCode; - } - - /// - /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ChangeTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "modified")] - Modified = 1, - - [EnumMember(Value = "removed")] - Removed = 2, - } - - /// - /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - /// - [DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] - public AccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? ChangeType { get; set; } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// List of fields that were changed externally, with their previous and new values. - /// - [DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] - public List? ModifiedFields { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "external_modification_in_effect"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_accessCodeWarningsExternalModificationInEffectModifiedFields_model" - )] - public class AccessCodeWarningsExternalModificationInEffectModifiedFields - { - [JsonConstructorAttribute] - protected AccessCodeWarningsExternalModificationInEffectModifiedFields() { } - - public AccessCodeWarningsExternalModificationInEffectModifiedFields( - string field = default, - string? from = default, - string? to = default - ) - { - Field = field; - From = from; - To = to; - } - - /// - /// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). - /// - [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The previous value of the field. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public string? From { get; set; } - - /// - /// The new value of the field. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public string? To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsDelayInSettingOnDevice_model")] - public class AccessCodeWarningsDelayInSettingOnDevice : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsDelayInSettingOnDevice() { } - - public AccessCodeWarningsDelayInSettingOnDevice( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "delay_in_setting_on_device"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsDelayInRemovingFromDevice_model")] - public class AccessCodeWarningsDelayInRemovingFromDevice : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsDelayInRemovingFromDevice() { } - - public AccessCodeWarningsDelayInRemovingFromDevice( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "delay_in_removing_from_device"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsDelayInIssuing_model")] - public class AccessCodeWarningsDelayInIssuing : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsDelayInIssuing() { } - - public AccessCodeWarningsDelayInIssuing( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "delay_in_issuing"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsThirdPartyIntegrationDetected_model")] - public class AccessCodeWarningsThirdPartyIntegrationDetected : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsThirdPartyIntegrationDetected() { } - - public AccessCodeWarningsThirdPartyIntegrationDetected( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "third_party_integration_detected"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_accessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours_model" - )] - public class AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours() { } - - public AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "igloo_algopin_must_be_used_within_24_hours"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsManagementTransferred_model")] - public class AccessCodeWarningsManagementTransferred : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsManagementTransferred() { } - - public AccessCodeWarningsManagementTransferred( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "management_transferred"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsUsingBackupAccessCode_model")] - public class AccessCodeWarningsUsingBackupAccessCode : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsUsingBackupAccessCode() { } - - public AccessCodeWarningsUsingBackupAccessCode( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "using_backup_access_code"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsBeingDeleted_model")] - public class AccessCodeWarningsBeingDeleted : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsBeingDeleted() { } - - public AccessCodeWarningsBeingDeleted( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsUnknownIssueWithAccessCode_model")] - public class AccessCodeWarningsUnknownIssueWithAccessCode : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsUnknownIssueWithAccessCode() { } - - public AccessCodeWarningsUnknownIssueWithAccessCode( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unknown_issue_with_access_code"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeWarningsUnrecognized_model")] - public class AccessCodeWarningsUnrecognized : AccessCodeWarnings - { - [JsonConstructorAttribute] - protected AccessCodeWarningsUnrecognized() { } - - public AccessCodeWarningsUnrecognized( - string warningCode = default, - string? createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Unique identifier for the access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Code used for access. Typically, a numeric or alphanumeric string. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Unique identifier for a group of access codes that share the same code. - /// - [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] - public string? CommonCodeKey { get; set; } - - /// - /// Date and time at which the access code was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier for the device associated with the access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices. - /// - [DataMember( - Name = "dormakaba_oracode_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public AccessCodeDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } - - /// - /// Date and time after which the time-bound access code becomes inactive. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Indicates whether the access code is a backup code. - /// - [DataMember(Name = "is_backup", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBackup { get; set; } - - /// - /// Indicates whether a backup access code is available for use if the primary access code is lost or compromised. - /// - [DataMember( - Name = "is_backup_access_code_available", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsBackupAccessCodeAvailable { get; set; } - - /// - /// Indicates whether changes to the access code from external sources are permitted. - /// - [DataMember( - Name = "is_external_modification_allowed", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsExternalModificationAllowed { get; set; } - - /// - /// Indicates whether Seam manages the access code. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection. - /// - [DataMember(Name = "is_offline_access_code", IsRequired = false, EmitDefaultValue = false)] - public bool IsOfflineAccessCode { get; set; } - - /// - /// Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use. - /// - [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] - public bool IsOneTimeUse { get; set; } - - /// - /// Indicates whether the code is set on the device according to a preconfigured schedule. - /// - [DataMember(Name = "is_scheduled_on_device", IsRequired = false, EmitDefaultValue = false)] - public bool? IsScheduledOnDevice { get; set; } - - /// - /// Indicates whether the access code is waiting for a code assignment. - /// - [DataMember( - Name = "is_waiting_for_code_assignment", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsWaitingForCodeAssignment { get; set; } - - /// - /// Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device. - /// - [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] - public List PendingMutations { get; set; } - - /// - /// Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. - /// - [DataMember( - Name = "pulled_backup_access_code_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PulledBackupAccessCodeId { get; set; } - - /// - /// Date and time at which the time-bound access code becomes active. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public AccessCode.StatusEnum Status { get; set; } - - /// - /// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public AccessCode.TypeEnum Type { get; set; } - - /// - /// Warnings associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// Unique identifier for the Seam workspace associated with the access code. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessCodeDormakabaOracodeMetadata_model")] - public class AccessCodeDormakabaOracodeMetadata - { - [JsonConstructorAttribute] - protected AccessCodeDormakabaOracodeMetadata() { } - - public AccessCodeDormakabaOracodeMetadata( - bool? isCancellable = default, - bool? isEarlyCheckinAble = default, - bool? isExtendable = default, - bool? isOverridable = default, - string? siteName = default, - float? stayId = default, - string? userLevelId = default, - string? userLevelName = default - ) - { - IsCancellable = isCancellable; - IsEarlyCheckinAble = isEarlyCheckinAble; - IsExtendable = isExtendable; - IsOverridable = isOverridable; - SiteName = siteName; - StayId = stayId; - UserLevelId = userLevelId; - UserLevelName = userLevelName; - } - - /// - /// Indicates whether the stay can be cancelled via the Dormakaba Oracode API. - /// - [DataMember(Name = "is_cancellable", IsRequired = false, EmitDefaultValue = false)] - public bool? IsCancellable { get; set; } - - /// - /// Indicates whether early check-in is available for this stay. - /// - [DataMember(Name = "is_early_checkin_able", IsRequired = false, EmitDefaultValue = false)] - public bool? IsEarlyCheckinAble { get; set; } - - /// - /// Indicates whether the stay can be extended via the Dormakaba Oracode API. - /// - [DataMember(Name = "is_extendable", IsRequired = false, EmitDefaultValue = false)] - public bool? IsExtendable { get; set; } - - /// - /// Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. - /// - [DataMember(Name = "is_overridable", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOverridable { get; set; } - - /// - /// Dormakaba Oracode site name associated with this access code. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - /// - /// Dormakaba Oracode stay ID associated with this access code. - /// - [DataMember(Name = "stay_id", IsRequired = false, EmitDefaultValue = false)] - public float? StayId { get; set; } - - /// - /// Dormakaba Oracode user level ID associated with this access code. - /// - [DataMember(Name = "user_level_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserLevelId { get; set; } - - /// - /// Dormakaba Oracode user level name associated with this access code. - /// - [DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] - public string? UserLevelName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a smart lock [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. +/// +/// Seam supports programming two types of access codes: [ongoing](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. +/// +/// In addition, for certain devices, Seam also supports [offline access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. +/// +/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. +/// +[DataContract(Name = "seamModel_accessCode_model")] +public class AccessCode +{ +[JsonConstructorAttribute] +protected AccessCode() { } + +public AccessCode(string accessCodeId = default, string? code = default, string? commonCodeKey = default, string createdAt = default, string deviceId = default, string displayStatus = default, AccessCodeDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, string? endsAt = default, List errors = default, bool? isBackup = default, bool isBackupAccessCodeAvailable = default, bool isExternalModificationAllowed = default, bool isManaged = default, bool isOfflineAccessCode = default, bool isOneTimeUse = default, bool? isScheduledOnDevice = default, bool? isWaitingForCodeAssignment = default, string? name = default, List pendingMutations = default, string? pulledBackupAccessCodeId = default, string? startsAt = default, AccessCode.StatusEnum status = default, AccessCode.TypeEnum type = default, List warnings = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +Code = code; +CommonCodeKey = commonCodeKey; +CreatedAt = createdAt; +DeviceId = deviceId; +DisplayStatus = displayStatus; +DormakabaOracodeMetadata = dormakabaOracodeMetadata; +EndsAt = endsAt; +Errors = errors; +IsBackup = isBackup; +IsBackupAccessCodeAvailable = isBackupAccessCodeAvailable; +IsExternalModificationAllowed = isExternalModificationAllowed; +IsManaged = isManaged; +IsOfflineAccessCode = isOfflineAccessCode; +IsOneTimeUse = isOneTimeUse; +IsScheduledOnDevice = isScheduledOnDevice; +IsWaitingForCodeAssignment = isWaitingForCodeAssignment; +Name = name; +PendingMutations = pendingMutations; +PulledBackupAccessCodeId = pulledBackupAccessCodeId; +StartsAt = startsAt; +Status = status; +Type = type; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessCodeErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsBridgeDisconnected), "bridge_disconnected")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsSubscriptionRequired), "subscription_required")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsAuxiliaryHeatRunning), "auxiliary_heat_running")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsMissingDeviceCredentials), "missing_device_credentials")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsAugustLockNotAuthorized), "august_lock_not_authorized")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsEmptyBackupAccessCodePool), "empty_backup_access_code_pool")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceDisconnected), "device_disconnected")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsHubDisconnected), "hub_disconnected")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceRemoved), "device_removed")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceOffline), "device_offline")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsInsufficientPermissions), "insufficient_permissions")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsAccountDisconnected), "account_disconnected")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToDelete), "failed_to_delete")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToUpdate), "failed_to_update")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToIssue), "failed_to_issue")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsCodeConstraintsViolated), "code_constraints_violated")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsAccessCodeInactive), "access_code_inactive")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsConflictingExternalModification), "conflicting_external_modification")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsNoSpaceForAccessCodeOnDevice), "no_space_for_access_code_on_device")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDuplicateCodeOnDevice), "duplicate_code_on_device")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToRemoveFromDevice), "failed_to_remove_from_device")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToSetOnDevice), "failed_to_set_on_device")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsProviderIssue), "provider_issue")] +public abstract class AccessCodeErrors +{ +public abstract string ErrorCode { get; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessCodeErrorsProviderIssue_model")] +public class AccessCodeErrorsProviderIssue : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsProviderIssue() { } + +public AccessCodeErrorsProviderIssue(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "provider_issue"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsFailedToSetOnDevice_model")] +public class AccessCodeErrorsFailedToSetOnDevice : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsFailedToSetOnDevice() { } + +public AccessCodeErrorsFailedToSetOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_set_on_device"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsFailedToRemoveFromDevice_model")] +public class AccessCodeErrorsFailedToRemoveFromDevice : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsFailedToRemoveFromDevice() { } + +public AccessCodeErrorsFailedToRemoveFromDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_remove_from_device"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsDuplicateCodeOnDevice_model")] +public class AccessCodeErrorsDuplicateCodeOnDevice : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsDuplicateCodeOnDevice() { } + +public AccessCodeErrorsDuplicateCodeOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string? managedAccessCodeId = default, string message = default, string? unmanagedAccessCodeId = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +ManagedAccessCodeId = managedAccessCodeId; +Message = message; +UnmanagedAccessCodeId = unmanagedAccessCodeId; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "duplicate_code_on_device"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// ID of the managed access code that conflicts with this managed access code, when Seam can identify it. +/// +[DataMember(Name = "managed_access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? ManagedAccessCodeId { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. +/// +[DataMember(Name = "unmanaged_access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? UnmanagedAccessCodeId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsNoSpaceForAccessCodeOnDevice_model")] +public class AccessCodeErrorsNoSpaceForAccessCodeOnDevice : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsNoSpaceForAccessCodeOnDevice() { } + +public AccessCodeErrorsNoSpaceForAccessCodeOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "no_space_for_access_code_on_device"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsConflictingExternalModification_model")] +public class AccessCodeErrorsConflictingExternalModification : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsConflictingExternalModification() { } + +public AccessCodeErrorsConflictingExternalModification(AccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? changeType = default, string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default, List? modifiedFields = default) +{ +ChangeType = changeType; +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +ModifiedFields = modifiedFields; +} + +/// +/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ChangeTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "modified")] +Modified = 1, + +[EnumMember(Value = "removed")] +Removed = 2, +} + +/// +/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. +/// +[DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] +public AccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? ChangeType { get; set; } + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "conflicting_external_modification"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// List of fields that were changed externally, with their previous and new values. +/// +[DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] +public List? ModifiedFields { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsConflictingExternalModificationModifiedFields_model")] +public class AccessCodeErrorsConflictingExternalModificationModifiedFields +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsConflictingExternalModificationModifiedFields() { } + +public AccessCodeErrorsConflictingExternalModificationModifiedFields(string field = default, string? from = default, string? to = default) +{ +Field = field; +From = from; +To = to; +} + +/// +/// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). +/// +[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] +public string Field { get; set; } + +/// +/// The previous value of the field. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public string? From { get; set; } + +/// +/// The new value of the field. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public string? To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsAccessCodeInactive_model")] +public class AccessCodeErrorsAccessCodeInactive : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsAccessCodeInactive() { } + +public AccessCodeErrorsAccessCodeInactive(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "access_code_inactive"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsCodeConstraintsViolated_model")] +public class AccessCodeErrorsCodeConstraintsViolated : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsCodeConstraintsViolated() { } + +public AccessCodeErrorsCodeConstraintsViolated(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "code_constraints_violated"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsFailedToIssue_model")] +public class AccessCodeErrorsFailedToIssue : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsFailedToIssue() { } + +public AccessCodeErrorsFailedToIssue(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_issue"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsFailedToUpdate_model")] +public class AccessCodeErrorsFailedToUpdate : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsFailedToUpdate() { } + +public AccessCodeErrorsFailedToUpdate(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_update"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsFailedToDelete_model")] +public class AccessCodeErrorsFailedToDelete : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsFailedToDelete() { } + +public AccessCodeErrorsFailedToDelete(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_delete"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsAccountDisconnected_model")] +public class AccessCodeErrorsAccountDisconnected : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsAccountDisconnected() { } + +public AccessCodeErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "account_disconnected"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsSaltoKsSubscriptionLimitExceeded_model")] +public class AccessCodeErrorsSaltoKsSubscriptionLimitExceeded : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsSaltoKsSubscriptionLimitExceeded() { } + +public AccessCodeErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsInsufficientPermissions_model")] +public class AccessCodeErrorsInsufficientPermissions : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsInsufficientPermissions() { } + +public AccessCodeErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "insufficient_permissions"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsDormakabaSitesDisconnected_model")] +public class AccessCodeErrorsDormakabaSitesDisconnected : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsDormakabaSitesDisconnected() { } + +public AccessCodeErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsDeviceOffline_model")] +public class AccessCodeErrorsDeviceOffline : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsDeviceOffline() { } + +public AccessCodeErrorsDeviceOffline(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_offline"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsDeviceRemoved_model")] +public class AccessCodeErrorsDeviceRemoved : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsDeviceRemoved() { } + +public AccessCodeErrorsDeviceRemoved(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_removed"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsHubDisconnected_model")] +public class AccessCodeErrorsHubDisconnected : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsHubDisconnected() { } + +public AccessCodeErrorsHubDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "hub_disconnected"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsDeviceDisconnected_model")] +public class AccessCodeErrorsDeviceDisconnected : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsDeviceDisconnected() { } + +public AccessCodeErrorsDeviceDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_disconnected"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsEmptyBackupAccessCodePool_model")] +public class AccessCodeErrorsEmptyBackupAccessCodePool : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsEmptyBackupAccessCodePool() { } + +public AccessCodeErrorsEmptyBackupAccessCodePool(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "empty_backup_access_code_pool"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsAugustLockNotAuthorized_model")] +public class AccessCodeErrorsAugustLockNotAuthorized : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsAugustLockNotAuthorized() { } + +public AccessCodeErrorsAugustLockNotAuthorized(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "august_lock_not_authorized"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsMissingDeviceCredentials_model")] +public class AccessCodeErrorsMissingDeviceCredentials : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsMissingDeviceCredentials() { } + +public AccessCodeErrorsMissingDeviceCredentials(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "missing_device_credentials"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsAuxiliaryHeatRunning_model")] +public class AccessCodeErrorsAuxiliaryHeatRunning : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsAuxiliaryHeatRunning() { } + +public AccessCodeErrorsAuxiliaryHeatRunning(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "auxiliary_heat_running"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsSubscriptionRequired_model")] +public class AccessCodeErrorsSubscriptionRequired : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsSubscriptionRequired() { } + +public AccessCodeErrorsSubscriptionRequired(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "subscription_required"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsBridgeDisconnected_model")] +public class AccessCodeErrorsBridgeDisconnected : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsBridgeDisconnected() { } + +public AccessCodeErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "bridge_disconnected"; + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeErrorsUnrecognized_model")] +public class AccessCodeErrorsUnrecognized : AccessCodeErrors +{ +[JsonConstructorAttribute] +protected AccessCodeErrorsUnrecognized() { } + +public AccessCodeErrorsUnrecognized(string errorCode = default, string message = default) +{ +ErrorCode = errorCode; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "mutation_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessCodePendingMutationsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingTimeFrame), "updating_time_frame")] +[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingName), "updating_name")] +[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingCode), "updating_code")] +[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsDeleting), "deleting")] +[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsDeferringCreation), "deferring_creation")] +[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsCreating), "creating")] +public abstract class AccessCodePendingMutations +{ +public abstract string MutationCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsCreating_model")] +public class AccessCodePendingMutationsCreating : AccessCodePendingMutations +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsCreating() { } + +public AccessCodePendingMutationsCreating(string createdAt = default, string message = default, string mutationCode = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "creating"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsDeferringCreation_model")] +public class AccessCodePendingMutationsDeferringCreation : AccessCodePendingMutations +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsDeferringCreation() { } + +public AccessCodePendingMutationsDeferringCreation(string createdAt = default, string message = default, string mutationCode = default, string scheduledAt = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +ScheduledAt = scheduledAt; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "deferring_creation"; + +/// +/// Date and time at which Seam will attempt to program this access code on the device. +/// +[DataMember(Name = "scheduled_at", IsRequired = false, EmitDefaultValue = false)] +public string ScheduledAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsDeleting_model")] +public class AccessCodePendingMutationsDeleting : AccessCodePendingMutations +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsDeleting() { } + +public AccessCodePendingMutationsDeleting(string createdAt = default, string message = default, string mutationCode = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "deleting"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCode_model")] +public class AccessCodePendingMutationsUpdatingCode : AccessCodePendingMutations +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingCode() { } + +public AccessCodePendingMutationsUpdatingCode(string createdAt = default, AccessCodePendingMutationsUpdatingCodeFrom from = default, string message = default, string mutationCode = default, AccessCodePendingMutationsUpdatingCodeTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous code configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AccessCodePendingMutationsUpdatingCodeFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_code"; + +/// +/// New code configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AccessCodePendingMutationsUpdatingCodeTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCodeFrom_model")] +public class AccessCodePendingMutationsUpdatingCodeFrom +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingCodeFrom() { } + +public AccessCodePendingMutationsUpdatingCodeFrom(string? code = default) +{ +Code = code; +} + +/// +/// Previous PIN code. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCodeTo_model")] +public class AccessCodePendingMutationsUpdatingCodeTo +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingCodeTo() { } + +public AccessCodePendingMutationsUpdatingCodeTo(string? code = default) +{ +Code = code; +} + +/// +/// New PIN code. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingName_model")] +public class AccessCodePendingMutationsUpdatingName : AccessCodePendingMutations +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingName() { } + +public AccessCodePendingMutationsUpdatingName(string createdAt = default, AccessCodePendingMutationsUpdatingNameFrom from = default, string message = default, string mutationCode = default, AccessCodePendingMutationsUpdatingNameTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous name configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AccessCodePendingMutationsUpdatingNameFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_name"; + +/// +/// New name configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AccessCodePendingMutationsUpdatingNameTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingNameFrom_model")] +public class AccessCodePendingMutationsUpdatingNameFrom +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingNameFrom() { } + +public AccessCodePendingMutationsUpdatingNameFrom(string? name = default) +{ +Name = name; +} + +/// +/// Previous access code name. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingNameTo_model")] +public class AccessCodePendingMutationsUpdatingNameTo +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingNameTo() { } + +public AccessCodePendingMutationsUpdatingNameTo(string? name = default) +{ +Name = name; +} + +/// +/// New access code name. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrame_model")] +public class AccessCodePendingMutationsUpdatingTimeFrame : AccessCodePendingMutations +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingTimeFrame() { } + +public AccessCodePendingMutationsUpdatingTimeFrame(string createdAt = default, AccessCodePendingMutationsUpdatingTimeFrameFrom from = default, string message = default, string mutationCode = default, AccessCodePendingMutationsUpdatingTimeFrameTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous time frame configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AccessCodePendingMutationsUpdatingTimeFrameFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_time_frame"; + +/// +/// New time frame configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AccessCodePendingMutationsUpdatingTimeFrameTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrameFrom_model")] +public class AccessCodePendingMutationsUpdatingTimeFrameFrom +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingTimeFrameFrom() { } + +public AccessCodePendingMutationsUpdatingTimeFrameFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Previous end time for the access code. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Previous start time for the access code. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrameTo_model")] +public class AccessCodePendingMutationsUpdatingTimeFrameTo +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUpdatingTimeFrameTo() { } + +public AccessCodePendingMutationsUpdatingTimeFrameTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// New end time for the access code. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// New start time for the access code. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodePendingMutationsUnrecognized_model")] +public class AccessCodePendingMutationsUnrecognized : AccessCodePendingMutations +{ +[JsonConstructorAttribute] +protected AccessCodePendingMutationsUnrecognized() { } + +public AccessCodePendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) +{ +MutationCode = mutationCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "unrecognized"; + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "setting")] +Setting = 1, + +[EnumMember(Value = "set")] +Set = 2, + +[EnumMember(Value = "unset")] +Unset = 3, + +[EnumMember(Value = "removing")] +Removing = 4, + +[EnumMember(Value = "unknown")] +Unknown = 5, +} + +/// +/// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "time_bound")] +TimeBound = 1, + +[EnumMember(Value = "ongoing")] +Ongoing = 2, +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessCodeWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsUnknownIssueWithAccessCode), "unknown_issue_with_access_code")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsBeingDeleted), "being_deleted")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsUsingBackupAccessCode), "using_backup_access_code")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsManagementTransferred), "management_transferred")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours), "igloo_algopin_must_be_used_within_24_hours")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsThirdPartyIntegrationDetected), "third_party_integration_detected")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsDelayInIssuing), "delay_in_issuing")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsDelayInRemovingFromDevice), "delay_in_removing_from_device")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsDelayInSettingOnDevice), "delay_in_setting_on_device")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsExternalModificationInEffect), "external_modification_in_effect")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone), "time_frame_adjusted_for_unknown_time_zone")] +[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsCodeRotatesPeriodically), "code_rotates_periodically")] +public abstract class AccessCodeWarnings +{ +public abstract string WarningCode { get; } + +public abstract string? CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessCodeWarningsCodeRotatesPeriodically_model")] +public class AccessCodeWarningsCodeRotatesPeriodically : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsCodeRotatesPeriodically() { } + +public AccessCodeWarningsCodeRotatesPeriodically(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "code_rotates_periodically"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsTimeFrameAdjustedForUnknownTimeZone_model")] +public class AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone() { } + +public AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "time_frame_adjusted_for_unknown_time_zone"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsExternalModificationInEffect_model")] +public class AccessCodeWarningsExternalModificationInEffect : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsExternalModificationInEffect() { } + +public AccessCodeWarningsExternalModificationInEffect(AccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? changeType = default, string? createdAt = default, string message = default, List? modifiedFields = default, string warningCode = default) +{ +ChangeType = changeType; +CreatedAt = createdAt; +Message = message; +ModifiedFields = modifiedFields; +WarningCode = warningCode; +} + +/// +/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ChangeTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "modified")] +Modified = 1, + +[EnumMember(Value = "removed")] +Removed = 2, +} + +/// +/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. +/// +[DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] +public AccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? ChangeType { get; set; } + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// List of fields that were changed externally, with their previous and new values. +/// +[DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] +public List? ModifiedFields { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "external_modification_in_effect"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsExternalModificationInEffectModifiedFields_model")] +public class AccessCodeWarningsExternalModificationInEffectModifiedFields +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsExternalModificationInEffectModifiedFields() { } + +public AccessCodeWarningsExternalModificationInEffectModifiedFields(string field = default, string? from = default, string? to = default) +{ +Field = field; +From = from; +To = to; +} + +/// +/// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). +/// +[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] +public string Field { get; set; } + +/// +/// The previous value of the field. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public string? From { get; set; } + +/// +/// The new value of the field. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public string? To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsDelayInSettingOnDevice_model")] +public class AccessCodeWarningsDelayInSettingOnDevice : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsDelayInSettingOnDevice() { } + +public AccessCodeWarningsDelayInSettingOnDevice(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "delay_in_setting_on_device"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsDelayInRemovingFromDevice_model")] +public class AccessCodeWarningsDelayInRemovingFromDevice : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsDelayInRemovingFromDevice() { } + +public AccessCodeWarningsDelayInRemovingFromDevice(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "delay_in_removing_from_device"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsDelayInIssuing_model")] +public class AccessCodeWarningsDelayInIssuing : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsDelayInIssuing() { } + +public AccessCodeWarningsDelayInIssuing(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "delay_in_issuing"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsThirdPartyIntegrationDetected_model")] +public class AccessCodeWarningsThirdPartyIntegrationDetected : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsThirdPartyIntegrationDetected() { } + +public AccessCodeWarningsThirdPartyIntegrationDetected(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "third_party_integration_detected"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours_model")] +public class AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours() { } + +public AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "igloo_algopin_must_be_used_within_24_hours"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsManagementTransferred_model")] +public class AccessCodeWarningsManagementTransferred : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsManagementTransferred() { } + +public AccessCodeWarningsManagementTransferred(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "management_transferred"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsUsingBackupAccessCode_model")] +public class AccessCodeWarningsUsingBackupAccessCode : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsUsingBackupAccessCode() { } + +public AccessCodeWarningsUsingBackupAccessCode(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "using_backup_access_code"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsBeingDeleted_model")] +public class AccessCodeWarningsBeingDeleted : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsBeingDeleted() { } + +public AccessCodeWarningsBeingDeleted(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsUnknownIssueWithAccessCode_model")] +public class AccessCodeWarningsUnknownIssueWithAccessCode : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsUnknownIssueWithAccessCode() { } + +public AccessCodeWarningsUnknownIssueWithAccessCode(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unknown_issue_with_access_code"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeWarningsUnrecognized_model")] +public class AccessCodeWarningsUnrecognized : AccessCodeWarnings +{ +[JsonConstructorAttribute] +protected AccessCodeWarningsUnrecognized() { } + +public AccessCodeWarningsUnrecognized(string warningCode = default, string? createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Unique identifier for the access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Code used for access. Typically, a numeric or alphanumeric string. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Unique identifier for a group of access codes that share the same code. +/// +[DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] +public string? CommonCodeKey { get; set; } + +/// +/// Date and time at which the access code was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier for the device associated with the access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable label for where this access code sits in its lifecycle, for example `Active`, `Issuing`, or `Expired`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`. +/// +[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] +public string DisplayStatus { get; set; } + +/// +/// Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices. +/// +[DataMember(Name = "dormakaba_oracode_metadata", IsRequired = false, EmitDefaultValue = false)] +public AccessCodeDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } + +/// +/// Date and time after which the time-bound access code becomes inactive. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Errors associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Indicates whether the access code is a backup code. +/// +[DataMember(Name = "is_backup", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBackup { get; set; } + +/// +/// Indicates whether a backup access code is available for use if the primary access code is lost or compromised. +/// +[DataMember(Name = "is_backup_access_code_available", IsRequired = false, EmitDefaultValue = false)] +public bool IsBackupAccessCodeAvailable { get; set; } + +/// +/// Indicates whether changes to the access code from external sources are permitted. +/// +[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool IsExternalModificationAllowed { get; set; } + +/// +/// Indicates whether Seam manages the access code. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection. +/// +[DataMember(Name = "is_offline_access_code", IsRequired = false, EmitDefaultValue = false)] +public bool IsOfflineAccessCode { get; set; } + +/// +/// Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use. +/// +[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] +public bool IsOneTimeUse { get; set; } + +/// +/// Indicates whether the code is set on the device according to a preconfigured schedule. +/// +[DataMember(Name = "is_scheduled_on_device", IsRequired = false, EmitDefaultValue = false)] +public bool? IsScheduledOnDevice { get; set; } + +/// +/// Indicates whether the access code is waiting for a code assignment. +/// +[DataMember(Name = "is_waiting_for_code_assignment", IsRequired = false, EmitDefaultValue = false)] +public bool? IsWaitingForCodeAssignment { get; set; } + +/// +/// Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device. +/// +[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] +public List PendingMutations { get; set; } + +/// +/// Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. +/// +[DataMember(Name = "pulled_backup_access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? PulledBackupAccessCodeId { get; set; } + +/// +/// Date and time at which the time-bound access code becomes active. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). +/// +[Obsolete("Use `display_status` to show a person the code's state. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`.")] +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public AccessCode.StatusEnum Status { get; set; } + +/// +/// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public AccessCode.TypeEnum Type { get; set; } + +/// +/// Warnings associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// Unique identifier for the Seam workspace associated with the access code. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessCodeDormakabaOracodeMetadata_model")] +public class AccessCodeDormakabaOracodeMetadata +{ +[JsonConstructorAttribute] +protected AccessCodeDormakabaOracodeMetadata() { } + +public AccessCodeDormakabaOracodeMetadata(bool? isCancellable = default, bool? isEarlyCheckinAble = default, bool? isExtendable = default, bool? isOverridable = default, string? siteName = default, float? stayId = default, string? userLevelId = default, string? userLevelName = default) +{ +IsCancellable = isCancellable; +IsEarlyCheckinAble = isEarlyCheckinAble; +IsExtendable = isExtendable; +IsOverridable = isOverridable; +SiteName = siteName; +StayId = stayId; +UserLevelId = userLevelId; +UserLevelName = userLevelName; +} + +/// +/// Indicates whether the stay can be cancelled via the Dormakaba Oracode API. +/// +[DataMember(Name = "is_cancellable", IsRequired = false, EmitDefaultValue = false)] +public bool? IsCancellable { get; set; } + +/// +/// Indicates whether early check-in is available for this stay. +/// +[DataMember(Name = "is_early_checkin_able", IsRequired = false, EmitDefaultValue = false)] +public bool? IsEarlyCheckinAble { get; set; } + +/// +/// Indicates whether the stay can be extended via the Dormakaba Oracode API. +/// +[DataMember(Name = "is_extendable", IsRequired = false, EmitDefaultValue = false)] +public bool? IsExtendable { get; set; } + +/// +/// Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. +/// +[DataMember(Name = "is_overridable", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOverridable { get; set; } + +/// +/// Dormakaba Oracode site name associated with this access code. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +/// +/// Dormakaba Oracode stay ID associated with this access code. +/// +[DataMember(Name = "stay_id", IsRequired = false, EmitDefaultValue = false)] +public float? StayId { get; set; } + +/// +/// Dormakaba Oracode user level ID associated with this access code. +/// +[DataMember(Name = "user_level_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserLevelId { get; set; } + +/// +/// Dormakaba Oracode user level name associated with this access code. +/// +[DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] +public string? UserLevelName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/AccessGrant.cs b/src/Seam/Model/AccessGrant.cs index fb87ee44..27e56b2b 100644 --- a/src/Seam/Model/AccessGrant.cs +++ b/src/Seam/Model/AccessGrant.cs @@ -8,1439 +8,1286 @@ namespace Seam.Model { - /// - /// Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. - /// - [DataContract(Name = "seamModel_accessGrant_model")] - public class AccessGrant - { - [JsonConstructorAttribute] - protected AccessGrant() { } - - public AccessGrant( - string accessGrantId = default, - string? accessGrantKey = default, - List accessMethodIds = default, - string? clientSessionToken = default, - string createdAt = default, - string? customizationProfileId = default, - string displayName = default, - string displayStatus = default, - string? endsAt = default, - List errors = default, - string? instantKeyUrl = default, - List locationIds = default, - string? name = default, - List pendingMutations = default, - List requestedAccessMethods = default, - string? reservationKey = default, - List spaceIds = default, - string startsAt = default, - string userIdentityId = default, - List warnings = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - AccessGrantKey = accessGrantKey; - AccessMethodIds = accessMethodIds; - ClientSessionToken = clientSessionToken; - CreatedAt = createdAt; - CustomizationProfileId = customizationProfileId; - DisplayName = displayName; - DisplayStatus = displayStatus; - EndsAt = endsAt; - Errors = errors; - InstantKeyUrl = instantKeyUrl; - LocationIds = locationIds; - Name = name; - PendingMutations = pendingMutations; - RequestedAccessMethods = requestedAccessMethods; - ReservationKey = reservationKey; - SpaceIds = spaceIds; - StartsAt = startsAt; - UserIdentityId = userIdentityId; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessGrantErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantErrorsCannotCreateRequestedAccessMethods), - "cannot_create_requested_access_methods" - )] - public abstract class AccessGrantErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessGrantErrorsCannotCreateRequestedAccessMethods_model")] - public class AccessGrantErrorsCannotCreateRequestedAccessMethods : AccessGrantErrors - { - [JsonConstructorAttribute] - protected AccessGrantErrorsCannotCreateRequestedAccessMethods() { } - - public AccessGrantErrorsCannotCreateRequestedAccessMethods( - string createdAt = default, - string errorCode = default, - string message = default, - List? missingDeviceIds = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - MissingDeviceIds = missingDeviceIds; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. - /// - [DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? MissingDeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantErrorsUnrecognized_model")] - public class AccessGrantErrorsUnrecognized : AccessGrantErrors - { - [JsonConstructorAttribute] - protected AccessGrantErrorsUnrecognized() { } - - public AccessGrantErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "mutation_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessGrantPendingMutationsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantPendingMutationsUpdatingAccessTimes), - "updating_access_times" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantPendingMutationsUpdatingSpaces), - "updating_spaces" - )] - public abstract class AccessGrantPendingMutations - { - public abstract string MutationCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpaces_model")] - public class AccessGrantPendingMutationsUpdatingSpaces : AccessGrantPendingMutations - { - [JsonConstructorAttribute] - protected AccessGrantPendingMutationsUpdatingSpaces() { } - - public AccessGrantPendingMutationsUpdatingSpaces( - string createdAt = default, - AccessGrantPendingMutationsUpdatingSpacesFrom from = default, - string message = default, - string mutationCode = default, - AccessGrantPendingMutationsUpdatingSpacesTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous location configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_spaces"; - - /// - /// New location configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AccessGrantPendingMutationsUpdatingSpacesTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpacesFrom_model")] - public class AccessGrantPendingMutationsUpdatingSpacesFrom - { - [JsonConstructorAttribute] - protected AccessGrantPendingMutationsUpdatingSpacesFrom() { } - - public AccessGrantPendingMutationsUpdatingSpacesFrom(List deviceIds = default) - { - DeviceIds = deviceIds; - } - - /// - /// Previous device IDs where access codes existed. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpacesTo_model")] - public class AccessGrantPendingMutationsUpdatingSpacesTo - { - [JsonConstructorAttribute] - protected AccessGrantPendingMutationsUpdatingSpacesTo() { } - - public AccessGrantPendingMutationsUpdatingSpacesTo( - string? commonCodeKey = default, - List deviceIds = default - ) - { - CommonCodeKey = commonCodeKey; - DeviceIds = deviceIds; - } - - /// - /// Common code key to ensure PIN code reuse across devices. - /// - [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] - public string? CommonCodeKey { get; set; } - - /// - /// New device IDs where access codes should be created. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimes_model")] - public class AccessGrantPendingMutationsUpdatingAccessTimes : AccessGrantPendingMutations - { - [JsonConstructorAttribute] - protected AccessGrantPendingMutationsUpdatingAccessTimes() { } - - public AccessGrantPendingMutationsUpdatingAccessTimes( - List accessMethodIds = default, - string createdAt = default, - AccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, - string message = default, - string mutationCode = default, - AccessGrantPendingMutationsUpdatingAccessTimesTo to = default - ) - { - AccessMethodIds = accessMethodIds; - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// IDs of the access methods being updated. - /// - [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethodIds { get; set; } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous access time configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_access_times"; - - /// - /// New access time configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AccessGrantPendingMutationsUpdatingAccessTimesTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimesFrom_model")] - public class AccessGrantPendingMutationsUpdatingAccessTimesFrom - { - [JsonConstructorAttribute] - protected AccessGrantPendingMutationsUpdatingAccessTimesFrom() { } - - public AccessGrantPendingMutationsUpdatingAccessTimesFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Previous end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Previous start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimesTo_model")] - public class AccessGrantPendingMutationsUpdatingAccessTimesTo - { - [JsonConstructorAttribute] - protected AccessGrantPendingMutationsUpdatingAccessTimesTo() { } - - public AccessGrantPendingMutationsUpdatingAccessTimesTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// New end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// New start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantPendingMutationsUnrecognized_model")] - public class AccessGrantPendingMutationsUnrecognized : AccessGrantPendingMutations - { - [JsonConstructorAttribute] - protected AccessGrantPendingMutationsUnrecognized() { } - - public AccessGrantPendingMutationsUnrecognized( - string mutationCode = default, - string createdAt = default, - string message = default - ) - { - MutationCode = mutationCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "unrecognized"; - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessGrantWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantWarningsDeviceTimeConstraintsViolated), - "device_time_constraints_violated" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantWarningsDeviceDoesNotSupportAccessCodes), - "device_does_not_support_access_codes" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantWarningsRequestedCodeUnavailable), - "requested_code_unavailable" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantWarningsUpdatingAccessTimes), - "updating_access_times" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantWarningsOverprovisionedAccess), - "overprovisioned_access" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessGrantWarningsUnderprovisionedAccess), - "underprovisioned_access" - )] - [JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsBeingDeleted), "being_deleted")] - public abstract class AccessGrantWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessGrantWarningsBeingDeleted_model")] - public class AccessGrantWarningsBeingDeleted : AccessGrantWarnings - { - [JsonConstructorAttribute] - protected AccessGrantWarningsBeingDeleted() { } - - public AccessGrantWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantWarningsUnderprovisionedAccess_model")] - public class AccessGrantWarningsUnderprovisionedAccess : AccessGrantWarnings - { - [JsonConstructorAttribute] - protected AccessGrantWarningsUnderprovisionedAccess() { } - - public AccessGrantWarningsUnderprovisionedAccess( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "underprovisioned_access"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantWarningsOverprovisionedAccess_model")] - public class AccessGrantWarningsOverprovisionedAccess : AccessGrantWarnings - { - [JsonConstructorAttribute] - protected AccessGrantWarningsOverprovisionedAccess() { } - - public AccessGrantWarningsOverprovisionedAccess( - string createdAt = default, - List? failedDevices = - default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - FailedDevices = failedDevices; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). - /// - [DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] - public List? FailedDevices { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "overprovisioned_access"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_accessGrantWarningsOverprovisionedAccessFailedDevices_model" - )] - public class AccessGrantWarningsOverprovisionedAccessFailedDevices - { - [JsonConstructorAttribute] - protected AccessGrantWarningsOverprovisionedAccessFailedDevices() { } - - public AccessGrantWarningsOverprovisionedAccessFailedDevices( - string deviceId = default, - string errorCode = default, - string message = default - ) - { - DeviceId = deviceId; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Device whose access code could not be revoked. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Human-readable description of why revocation failed. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantWarningsUpdatingAccessTimes_model")] - public class AccessGrantWarningsUpdatingAccessTimes : AccessGrantWarnings - { - [JsonConstructorAttribute] - protected AccessGrantWarningsUpdatingAccessTimes() { } - - public AccessGrantWarningsUpdatingAccessTimes( - List accessMethodIds = default, - string createdAt = default, - string message = default, - string warningCode = default - ) - { - AccessMethodIds = accessMethodIds; - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// IDs of the access methods being updated. - /// - [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethodIds { get; set; } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "updating_access_times"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantWarningsRequestedCodeUnavailable_model")] - public class AccessGrantWarningsRequestedCodeUnavailable : AccessGrantWarnings - { - [JsonConstructorAttribute] - protected AccessGrantWarningsRequestedCodeUnavailable() { } - - public AccessGrantWarningsRequestedCodeUnavailable( - string createdAt = default, - string deviceId = default, - string message = default, - string newCode = default, - string originalCode = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - DeviceId = deviceId; - Message = message; - NewCode = newCode; - OriginalCode = originalCode; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device where the requested code was unavailable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// The new PIN code that was assigned instead. - /// - [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] - public string NewCode { get; set; } - - /// - /// The originally requested PIN code that was unavailable. - /// - [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] - public string OriginalCode { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "requested_code_unavailable"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantWarningsDeviceDoesNotSupportAccessCodes_model")] - public class AccessGrantWarningsDeviceDoesNotSupportAccessCodes : AccessGrantWarnings - { - [JsonConstructorAttribute] - protected AccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } - - public AccessGrantWarningsDeviceDoesNotSupportAccessCodes( - string createdAt = default, - string deviceId = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - DeviceId = deviceId; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device that does not support access codes. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "device_does_not_support_access_codes"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantWarningsDeviceTimeConstraintsViolated_model")] - public class AccessGrantWarningsDeviceTimeConstraintsViolated : AccessGrantWarnings - { - [JsonConstructorAttribute] - protected AccessGrantWarningsDeviceTimeConstraintsViolated() { } - - public AccessGrantWarningsDeviceTimeConstraintsViolated( - string createdAt = default, - string deviceId = default, - string message = default, - AccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - DeviceId = deviceId; - Message = message; - Reason = reason; - WarningCode = warningCode; - } - - /// - /// Specific reason why the grant's times are not programmable on the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ReasonEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "duration_exceeds_max")] - DurationExceedsMax = 1, - - [EnumMember(Value = "times_do_not_match_slots")] - TimesDoNotMatchSlots = 2, - - [EnumMember(Value = "ongoing_not_supported")] - OngoingNotSupported = 3, - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device whose time constraints the access grant violates. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// Specific reason why the grant's times are not programmable on the device. - /// - [DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] - public AccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "device_time_constraints_violated"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantWarningsUnrecognized_model")] - public class AccessGrantWarningsUnrecognized : AccessGrantWarnings - { - [JsonConstructorAttribute] - protected AccessGrantWarningsUnrecognized() { } - - public AccessGrantWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// ID of the Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// Unique key for the access grant within the workspace. - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// IDs of the access methods created for the Access Grant. - /// - [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethodIds { get; set; } - - /// - /// Client Session Token. Only returned if the Access Grant has a mobile_key access method. - /// - [DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] - public string? ClientSessionToken { get; set; } - - /// - /// Date and time at which the Access Grant was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the customization profile associated with the Access Grant. - /// - [DataMember( - Name = "customization_profile_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomizationProfileId { get; set; } - - /// - /// Display name of the Access Grant. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Human-readable sentence answering whether the user can currently get in, for example `Active`, `Awaiting issuance`, or `Upcoming`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `starts_at`, `ends_at`, `errors`, and the access methods' own fields. - /// - [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] - public string DisplayStatus { get; set; } - - /// - /// Date and time at which the Access Grant ends. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Errors associated with the [access grant](https://docs.seam.co/use-cases/granting-access). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method. - /// - [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] - public string? InstantKeyUrl { get; set; } - - [Obsolete("Use `space_ids`.")] - [DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] - public List LocationIds { get; set; } - - /// - /// Name of the Access Grant. If not provided, the display name will be computed. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// List of pending mutations for the access grant. This shows updates that are in progress. - /// - [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] - public List PendingMutations { get; set; } - - /// - /// Access methods that the user requested for the Access Grant. - /// - [DataMember( - Name = "requested_access_methods", - IsRequired = false, - EmitDefaultValue = false - )] - public List RequestedAccessMethods { get; set; } - - /// - /// Reservation key for the access grant. - /// - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - /// - /// IDs of the spaces to which the Access Grant gives access. - /// - [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] - public List SpaceIds { get; set; } - - /// - /// Date and time at which the Access Grant starts. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string StartsAt { get; set; } - - /// - /// ID of user identity to which the Access Grant gives access. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - /// - /// Warnings associated with the [access grant](https://docs.seam.co/use-cases/granting-access). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the Seam workspace associated with the Access Grant. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessGrantRequestedAccessMethods_model")] - public class AccessGrantRequestedAccessMethods - { - [JsonConstructorAttribute] - protected AccessGrantRequestedAccessMethods() { } - - public AccessGrantRequestedAccessMethods( - string? code = default, - List createdAccessMethodIds = default, - string createdAt = default, - string displayName = default, - int? instantKeyMaxUseCount = default, - AccessGrantRequestedAccessMethods.ModeEnum mode = default - ) - { - Code = code; - CreatedAccessMethodIds = createdAccessMethodIds; - CreatedAt = createdAt; - DisplayName = displayName; - InstantKeyMaxUseCount = instantKeyMaxUseCount; - Mode = mode; - } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// IDs of the access methods created for the requested access method. - /// - [DataMember( - Name = "created_access_method_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List CreatedAccessMethodIds { get; set; } - - /// - /// Date and time at which the requested access method was added to the Access Grant. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name of the access method. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. - /// - [DataMember( - Name = "instant_key_max_use_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int? InstantKeyMaxUseCount { get; set; } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] - public AccessGrantRequestedAccessMethods.ModeEnum Mode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. +/// +[DataContract(Name = "seamModel_accessGrant_model")] +public class AccessGrant +{ +[JsonConstructorAttribute] +protected AccessGrant() { } + +public AccessGrant(string accessGrantId = default, string? accessGrantKey = default, List accessMethodIds = default, string? clientSessionToken = default, string createdAt = default, string? customizationProfileId = default, string displayName = default, string displayStatus = default, string? endsAt = default, List errors = default, string? instantKeyUrl = default, List locationIds = default, string? name = default, List pendingMutations = default, List requestedAccessMethods = default, string? reservationKey = default, List spaceIds = default, string startsAt = default, string userIdentityId = default, List warnings = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +AccessGrantKey = accessGrantKey; +AccessMethodIds = accessMethodIds; +ClientSessionToken = clientSessionToken; +CreatedAt = createdAt; +CustomizationProfileId = customizationProfileId; +DisplayName = displayName; +DisplayStatus = displayStatus; +EndsAt = endsAt; +Errors = errors; +InstantKeyUrl = instantKeyUrl; +LocationIds = locationIds; +Name = name; +PendingMutations = pendingMutations; +RequestedAccessMethods = requestedAccessMethods; +ReservationKey = reservationKey; +SpaceIds = spaceIds; +StartsAt = startsAt; +UserIdentityId = userIdentityId; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessGrantErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessGrantErrorsCannotCreateRequestedAccessMethods), "cannot_create_requested_access_methods")] +public abstract class AccessGrantErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessGrantErrorsCannotCreateRequestedAccessMethods_model")] +public class AccessGrantErrorsCannotCreateRequestedAccessMethods : AccessGrantErrors +{ +[JsonConstructorAttribute] +protected AccessGrantErrorsCannotCreateRequestedAccessMethods() { } + +public AccessGrantErrorsCannotCreateRequestedAccessMethods(string createdAt = default, string errorCode = default, string message = default, List? missingDeviceIds = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +MissingDeviceIds = missingDeviceIds; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. +/// +[DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? MissingDeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantErrorsUnrecognized_model")] +public class AccessGrantErrorsUnrecognized : AccessGrantErrors +{ +[JsonConstructorAttribute] +protected AccessGrantErrorsUnrecognized() { } + +public AccessGrantErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "mutation_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessGrantPendingMutationsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessGrantPendingMutationsUpdatingAccessTimes), "updating_access_times")] +[JsonSubtypes.KnownSubType(typeof(AccessGrantPendingMutationsUpdatingSpaces), "updating_spaces")] +public abstract class AccessGrantPendingMutations +{ +public abstract string MutationCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpaces_model")] +public class AccessGrantPendingMutationsUpdatingSpaces : AccessGrantPendingMutations +{ +[JsonConstructorAttribute] +protected AccessGrantPendingMutationsUpdatingSpaces() { } + +public AccessGrantPendingMutationsUpdatingSpaces(string createdAt = default, AccessGrantPendingMutationsUpdatingSpacesFrom from = default, string message = default, string mutationCode = default, AccessGrantPendingMutationsUpdatingSpacesTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous location configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_spaces"; + +/// +/// New location configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AccessGrantPendingMutationsUpdatingSpacesTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpacesFrom_model")] +public class AccessGrantPendingMutationsUpdatingSpacesFrom +{ +[JsonConstructorAttribute] +protected AccessGrantPendingMutationsUpdatingSpacesFrom() { } + +public AccessGrantPendingMutationsUpdatingSpacesFrom(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// Previous device IDs where access codes existed. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpacesTo_model")] +public class AccessGrantPendingMutationsUpdatingSpacesTo +{ +[JsonConstructorAttribute] +protected AccessGrantPendingMutationsUpdatingSpacesTo() { } + +public AccessGrantPendingMutationsUpdatingSpacesTo(string? commonCodeKey = default, List deviceIds = default) +{ +CommonCodeKey = commonCodeKey; +DeviceIds = deviceIds; +} + +/// +/// Common code key to ensure PIN code reuse across devices. +/// +[DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] +public string? CommonCodeKey { get; set; } + +/// +/// New device IDs where access codes should be created. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimes_model")] +public class AccessGrantPendingMutationsUpdatingAccessTimes : AccessGrantPendingMutations +{ +[JsonConstructorAttribute] +protected AccessGrantPendingMutationsUpdatingAccessTimes() { } + +public AccessGrantPendingMutationsUpdatingAccessTimes(List accessMethodIds = default, string createdAt = default, AccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, string message = default, string mutationCode = default, AccessGrantPendingMutationsUpdatingAccessTimesTo to = default) +{ +AccessMethodIds = accessMethodIds; +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// IDs of the access methods being updated. +/// +[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessMethodIds { get; set; } + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous access time configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_access_times"; + +/// +/// New access time configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AccessGrantPendingMutationsUpdatingAccessTimesTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimesFrom_model")] +public class AccessGrantPendingMutationsUpdatingAccessTimesFrom +{ +[JsonConstructorAttribute] +protected AccessGrantPendingMutationsUpdatingAccessTimesFrom() { } + +public AccessGrantPendingMutationsUpdatingAccessTimesFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Previous end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Previous start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimesTo_model")] +public class AccessGrantPendingMutationsUpdatingAccessTimesTo +{ +[JsonConstructorAttribute] +protected AccessGrantPendingMutationsUpdatingAccessTimesTo() { } + +public AccessGrantPendingMutationsUpdatingAccessTimesTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// New end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// New start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantPendingMutationsUnrecognized_model")] +public class AccessGrantPendingMutationsUnrecognized : AccessGrantPendingMutations +{ +[JsonConstructorAttribute] +protected AccessGrantPendingMutationsUnrecognized() { } + +public AccessGrantPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) +{ +MutationCode = mutationCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "unrecognized"; + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessGrantWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsDeviceTimeConstraintsViolated), "device_time_constraints_violated")] +[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsDeviceDoesNotSupportAccessCodes), "device_does_not_support_access_codes")] +[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsRequestedCodeUnavailable), "requested_code_unavailable")] +[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsUpdatingAccessTimes), "updating_access_times")] +[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsOverprovisionedAccess), "overprovisioned_access")] +[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsUnderprovisionedAccess), "underprovisioned_access")] +[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsBeingDeleted), "being_deleted")] +public abstract class AccessGrantWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessGrantWarningsBeingDeleted_model")] +public class AccessGrantWarningsBeingDeleted : AccessGrantWarnings +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsBeingDeleted() { } + +public AccessGrantWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantWarningsUnderprovisionedAccess_model")] +public class AccessGrantWarningsUnderprovisionedAccess : AccessGrantWarnings +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsUnderprovisionedAccess() { } + +public AccessGrantWarningsUnderprovisionedAccess(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "underprovisioned_access"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantWarningsOverprovisionedAccess_model")] +public class AccessGrantWarningsOverprovisionedAccess : AccessGrantWarnings +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsOverprovisionedAccess() { } + +public AccessGrantWarningsOverprovisionedAccess(string createdAt = default, List? failedDevices = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +FailedDevices = failedDevices; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). +/// +[DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] +public List? FailedDevices { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "overprovisioned_access"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantWarningsOverprovisionedAccessFailedDevices_model")] +public class AccessGrantWarningsOverprovisionedAccessFailedDevices +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsOverprovisionedAccessFailedDevices() { } + +public AccessGrantWarningsOverprovisionedAccessFailedDevices(string deviceId = default, string errorCode = default, string message = default) +{ +DeviceId = deviceId; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Device whose access code could not be revoked. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Human-readable description of why revocation failed. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantWarningsUpdatingAccessTimes_model")] +public class AccessGrantWarningsUpdatingAccessTimes : AccessGrantWarnings +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsUpdatingAccessTimes() { } + +public AccessGrantWarningsUpdatingAccessTimes(List accessMethodIds = default, string createdAt = default, string message = default, string warningCode = default) +{ +AccessMethodIds = accessMethodIds; +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// IDs of the access methods being updated. +/// +[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessMethodIds { get; set; } + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "updating_access_times"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantWarningsRequestedCodeUnavailable_model")] +public class AccessGrantWarningsRequestedCodeUnavailable : AccessGrantWarnings +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsRequestedCodeUnavailable() { } + +public AccessGrantWarningsRequestedCodeUnavailable(string createdAt = default, string deviceId = default, string message = default, string newCode = default, string originalCode = default, string warningCode = default) +{ +CreatedAt = createdAt; +DeviceId = deviceId; +Message = message; +NewCode = newCode; +OriginalCode = originalCode; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device where the requested code was unavailable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// The new PIN code that was assigned instead. +/// +[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] +public string NewCode { get; set; } + +/// +/// The originally requested PIN code that was unavailable. +/// +[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] +public string OriginalCode { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "requested_code_unavailable"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantWarningsDeviceDoesNotSupportAccessCodes_model")] +public class AccessGrantWarningsDeviceDoesNotSupportAccessCodes : AccessGrantWarnings +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } + +public AccessGrantWarningsDeviceDoesNotSupportAccessCodes(string createdAt = default, string deviceId = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +DeviceId = deviceId; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device that does not support access codes. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "device_does_not_support_access_codes"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantWarningsDeviceTimeConstraintsViolated_model")] +public class AccessGrantWarningsDeviceTimeConstraintsViolated : AccessGrantWarnings +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsDeviceTimeConstraintsViolated() { } + +public AccessGrantWarningsDeviceTimeConstraintsViolated(string createdAt = default, string deviceId = default, string message = default, AccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = default, string warningCode = default) +{ +CreatedAt = createdAt; +DeviceId = deviceId; +Message = message; +Reason = reason; +WarningCode = warningCode; +} + +/// +/// Specific reason why the grant's times are not programmable on the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ReasonEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "duration_exceeds_max")] +DurationExceedsMax = 1, + +[EnumMember(Value = "times_do_not_match_slots")] +TimesDoNotMatchSlots = 2, + +[EnumMember(Value = "ongoing_not_supported")] +OngoingNotSupported = 3, +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device whose time constraints the access grant violates. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// Specific reason why the grant's times are not programmable on the device. +/// +[DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] +public AccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "device_time_constraints_violated"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantWarningsUnrecognized_model")] +public class AccessGrantWarningsUnrecognized : AccessGrantWarnings +{ +[JsonConstructorAttribute] +protected AccessGrantWarningsUnrecognized() { } + +public AccessGrantWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// ID of the Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// Unique key for the access grant within the workspace. +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// IDs of the access methods created for the Access Grant. +/// +[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessMethodIds { get; set; } + +/// +/// Client Session Token. Only returned if the Access Grant has a mobile_key access method. +/// +[DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] +public string? ClientSessionToken { get; set; } + +/// +/// Date and time at which the Access Grant was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the customization profile associated with the Access Grant. +/// +[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomizationProfileId { get; set; } + +/// +/// Display name of the Access Grant. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Human-readable sentence answering whether the user can currently get in, for example `Active`, `Awaiting issuance`, or `Upcoming`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `starts_at`, `ends_at`, `errors`, and the access methods' own fields. +/// +[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] +public string DisplayStatus { get; set; } + +/// +/// Date and time at which the Access Grant ends. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Errors associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method. +/// +[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] +public string? InstantKeyUrl { get; set; } + +[Obsolete("Use `space_ids`.")] +[DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] +public List LocationIds { get; set; } + +/// +/// Name of the Access Grant. If not provided, the display name will be computed. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// List of pending mutations for the access grant. This shows updates that are in progress. +/// +[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] +public List PendingMutations { get; set; } + +/// +/// Access methods that the user requested for the Access Grant. +/// +[DataMember(Name = "requested_access_methods", IsRequired = false, EmitDefaultValue = false)] +public List RequestedAccessMethods { get; set; } + +/// +/// Reservation key for the access grant. +/// +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +/// +/// IDs of the spaces to which the Access Grant gives access. +/// +[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] +public List SpaceIds { get; set; } + +/// +/// Date and time at which the Access Grant starts. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string StartsAt { get; set; } + +/// +/// ID of user identity to which the Access Grant gives access. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +/// +/// Warnings associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the Seam workspace associated with the Access Grant. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessGrantRequestedAccessMethods_model")] +public class AccessGrantRequestedAccessMethods +{ +[JsonConstructorAttribute] +protected AccessGrantRequestedAccessMethods() { } + +public AccessGrantRequestedAccessMethods(string? code = default, List createdAccessMethodIds = default, string createdAt = default, string displayName = default, int? instantKeyMaxUseCount = default, AccessGrantRequestedAccessMethods.ModeEnum mode = default) +{ +Code = code; +CreatedAccessMethodIds = createdAccessMethodIds; +CreatedAt = createdAt; +DisplayName = displayName; +InstantKeyMaxUseCount = instantKeyMaxUseCount; +Mode = mode; +} + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Specific PIN code to use for this access method. Only applicable when mode is 'code'. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// IDs of the access methods created for the requested access method. +/// +[DataMember(Name = "created_access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List CreatedAccessMethodIds { get; set; } + +/// +/// Date and time at which the requested access method was added to the Access Grant. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name of the access method. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. +/// +[DataMember(Name = "instant_key_max_use_count", IsRequired = false, EmitDefaultValue = false)] +public int? InstantKeyMaxUseCount { get; set; } + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] +public AccessGrantRequestedAccessMethods.ModeEnum Mode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/AccessMethod.cs b/src/Seam/Model/AccessMethod.cs index f8635235..b6ef2eba 100644 --- a/src/Seam/Model/AccessMethod.cs +++ b/src/Seam/Model/AccessMethod.cs @@ -8,1155 +8,1150 @@ namespace Seam.Model { - /// - /// Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. - /// - [DataContract(Name = "seamModel_accessMethod_model")] - public class AccessMethod - { - [JsonConstructorAttribute] - protected AccessMethod() { } - - public AccessMethod( - string accessMethodId = default, - string? clientSessionToken = default, - string? code = default, - string createdAt = default, - string? customizationProfileId = default, - string displayName = default, - string displayStatus = default, - List errors = default, - string? instantKeyUrl = default, - bool? isAssignmentRequired = default, - bool? isEncodingRequired = default, - bool isIssued = default, - bool? isReadyForAssignment = default, - bool? isReadyForEncoding = default, - string? issuedAt = default, - AccessMethod.ModeEnum mode = default, - List pendingMutations = default, - List warnings = default, - string workspaceId = default - ) - { - AccessMethodId = accessMethodId; - ClientSessionToken = clientSessionToken; - Code = code; - CreatedAt = createdAt; - CustomizationProfileId = customizationProfileId; - DisplayName = displayName; - DisplayStatus = displayStatus; - Errors = errors; - InstantKeyUrl = instantKeyUrl; - IsAssignmentRequired = isAssignmentRequired; - IsEncodingRequired = isEncodingRequired; - IsIssued = isIssued; - IsReadyForAssignment = isReadyForAssignment; - IsReadyForEncoding = isReadyForEncoding; - IssuedAt = issuedAt; - Mode = mode; - PendingMutations = pendingMutations; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessMethodErrorsUnrecognized))] - [JsonSubtypes.KnownSubType(typeof(AccessMethodErrorsFailedToIssue), "failed_to_issue")] - public abstract class AccessMethodErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessMethodErrorsFailedToIssue_model")] - public class AccessMethodErrorsFailedToIssue : AccessMethodErrors - { - [JsonConstructorAttribute] - protected AccessMethodErrorsFailedToIssue() { } - - public AccessMethodErrorsFailedToIssue( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_issue"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodErrorsUnrecognized_model")] - public class AccessMethodErrorsUnrecognized : AccessMethodErrors - { - [JsonConstructorAttribute] - protected AccessMethodErrorsUnrecognized() { } - - public AccessMethodErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - [JsonConverter(typeof(JsonSubtypes), "mutation_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessMethodPendingMutationsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AccessMethodPendingMutationsUpdatingAccessTimes), - "updating_access_times" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessMethodPendingMutationsRevokingAccess), - "revoking_access" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessMethodPendingMutationsProvisioningAccess), - "provisioning_access" - )] - public abstract class AccessMethodPendingMutations - { - public abstract string MutationCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccess_model")] - public class AccessMethodPendingMutationsProvisioningAccess : AccessMethodPendingMutations - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsProvisioningAccess() { } - - public AccessMethodPendingMutationsProvisioningAccess( - string createdAt = default, - AccessMethodPendingMutationsProvisioningAccessFrom from = default, - string message = default, - string mutationCode = default, - AccessMethodPendingMutationsProvisioningAccessTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous device configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "provisioning_access"; - - /// - /// New device configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AccessMethodPendingMutationsProvisioningAccessTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccessFrom_model")] - public class AccessMethodPendingMutationsProvisioningAccessFrom - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsProvisioningAccessFrom() { } - - public AccessMethodPendingMutationsProvisioningAccessFrom( - List deviceIds = default - ) - { - DeviceIds = deviceIds; - } - - /// - /// Previous device IDs where access was provisioned. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccessTo_model")] - public class AccessMethodPendingMutationsProvisioningAccessTo - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsProvisioningAccessTo() { } - - public AccessMethodPendingMutationsProvisioningAccessTo( - List deviceIds = default - ) - { - DeviceIds = deviceIds; - } - - /// - /// New device IDs where access is being provisioned. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccess_model")] - public class AccessMethodPendingMutationsRevokingAccess : AccessMethodPendingMutations - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsRevokingAccess() { } - - public AccessMethodPendingMutationsRevokingAccess( - string createdAt = default, - AccessMethodPendingMutationsRevokingAccessFrom from = default, - string message = default, - string mutationCode = default, - AccessMethodPendingMutationsRevokingAccessTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous device configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AccessMethodPendingMutationsRevokingAccessFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "revoking_access"; - - /// - /// New device configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AccessMethodPendingMutationsRevokingAccessTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccessFrom_model")] - public class AccessMethodPendingMutationsRevokingAccessFrom - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsRevokingAccessFrom() { } - - public AccessMethodPendingMutationsRevokingAccessFrom(List deviceIds = default) - { - DeviceIds = deviceIds; - } - - /// - /// Previous device IDs where access existed. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccessTo_model")] - public class AccessMethodPendingMutationsRevokingAccessTo - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsRevokingAccessTo() { } - - public AccessMethodPendingMutationsRevokingAccessTo(List deviceIds = default) - { - DeviceIds = deviceIds; - } - - /// - /// New device IDs where access should remain. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimes_model")] - public class AccessMethodPendingMutationsUpdatingAccessTimes : AccessMethodPendingMutations - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsUpdatingAccessTimes() { } - - public AccessMethodPendingMutationsUpdatingAccessTimes( - string createdAt = default, - AccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, - string message = default, - string mutationCode = default, - AccessMethodPendingMutationsUpdatingAccessTimesTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous access time configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_access_times"; - - /// - /// New access time configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AccessMethodPendingMutationsUpdatingAccessTimesTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimesFrom_model")] - public class AccessMethodPendingMutationsUpdatingAccessTimesFrom - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsUpdatingAccessTimesFrom() { } - - public AccessMethodPendingMutationsUpdatingAccessTimesFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Previous end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Previous start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimesTo_model")] - public class AccessMethodPendingMutationsUpdatingAccessTimesTo - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsUpdatingAccessTimesTo() { } - - public AccessMethodPendingMutationsUpdatingAccessTimesTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// New end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// New start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodPendingMutationsUnrecognized_model")] - public class AccessMethodPendingMutationsUnrecognized : AccessMethodPendingMutations - { - [JsonConstructorAttribute] - protected AccessMethodPendingMutationsUnrecognized() { } - - public AccessMethodPendingMutationsUnrecognized( - string mutationCode = default, - string createdAt = default, - string message = default - ) - { - MutationCode = mutationCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "unrecognized"; - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(AccessMethodWarningsUnrecognized))] - [JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsDelayInIssuing), "delay_in_issuing")] - [JsonSubtypes.KnownSubType( - typeof(AccessMethodWarningsPulledBackupAccessCode), - "pulled_backup_access_code" - )] - [JsonSubtypes.KnownSubType( - typeof(AccessMethodWarningsUpdatingAccessTimes), - "updating_access_times" - )] - [JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsBeingDeleted), "being_deleted")] - public abstract class AccessMethodWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_accessMethodWarningsBeingDeleted_model")] - public class AccessMethodWarningsBeingDeleted : AccessMethodWarnings - { - [JsonConstructorAttribute] - protected AccessMethodWarningsBeingDeleted() { } - - public AccessMethodWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodWarningsUpdatingAccessTimes_model")] - public class AccessMethodWarningsUpdatingAccessTimes : AccessMethodWarnings - { - [JsonConstructorAttribute] - protected AccessMethodWarningsUpdatingAccessTimes() { } - - public AccessMethodWarningsUpdatingAccessTimes( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "updating_access_times"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodWarningsPulledBackupAccessCode_model")] - public class AccessMethodWarningsPulledBackupAccessCode : AccessMethodWarnings - { - [JsonConstructorAttribute] - protected AccessMethodWarningsPulledBackupAccessCode() { } - - public AccessMethodWarningsPulledBackupAccessCode( - string createdAt = default, - string message = default, - string? originalAccessMethodId = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - OriginalAccessMethodId = originalAccessMethodId; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// ID of the original access method from which this backup access method was split, if applicable. - /// - [DataMember( - Name = "original_access_method_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? OriginalAccessMethodId { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "pulled_backup_access_code"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodWarningsDelayInIssuing_model")] - public class AccessMethodWarningsDelayInIssuing : AccessMethodWarnings - { - [JsonConstructorAttribute] - protected AccessMethodWarningsDelayInIssuing() { } - - public AccessMethodWarningsDelayInIssuing( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "delay_in_issuing"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_accessMethodWarningsUnrecognized_model")] - public class AccessMethodWarningsUnrecognized : AccessMethodWarnings - { - [JsonConstructorAttribute] - protected AccessMethodWarningsUnrecognized() { } - - public AccessMethodWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// ID of the access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Token of the client session associated with the access method. - /// - [DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] - public string? ClientSessionToken { get; set; } - - /// - /// The actual PIN code for code access methods. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Date and time at which the access method was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the customization profile associated with the access method. - /// - [DataMember( - Name = "customization_profile_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomizationProfileId { get; set; } - - /// - /// Display name of the access method. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. - /// - [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] - public string DisplayStatus { get; set; } - - /// - /// Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// URL of the Instant Key for mobile key access methods. - /// - [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] - public string? InstantKeyUrl { get; set; } - - /// - /// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. - /// - [DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] - public bool? IsAssignmentRequired { get; set; } - - /// - /// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. - /// - [DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] - public bool? IsEncodingRequired { get; set; } - - /// - /// Indicates whether the access method has been issued. - /// - [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] - public bool IsIssued { get; set; } - - /// - /// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. - /// - [DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] - public bool? IsReadyForAssignment { get; set; } - - /// - /// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. - /// - [DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] - public bool? IsReadyForEncoding { get; set; } - - /// - /// Date and time at which the access method was issued. - /// - [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] - public string? IssuedAt { get; set; } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] - public AccessMethod.ModeEnum Mode { get; set; } - - /// - /// Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. - /// - [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] - public List PendingMutations { get; set; } - - /// - /// Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the Seam workspace associated with the access method. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. +/// +[DataContract(Name = "seamModel_accessMethod_model")] +public class AccessMethod +{ +[JsonConstructorAttribute] +protected AccessMethod() { } + +public AccessMethod(string accessMethodId = default, string? clientSessionToken = default, string? code = default, string createdAt = default, string? customizationProfileId = default, string displayName = default, string displayStatus = default, List errors = default, string? instantKeyUrl = default, bool? isAssignmentRequired = default, bool? isEncodingRequired = default, bool isIssued = default, bool? isReadyForAssignment = default, bool? isReadyForEncoding = default, string? issuedAt = default, AccessMethod.ModeEnum mode = default, List pendingMutations = default, List warnings = default, string workspaceId = default) +{ +AccessMethodId = accessMethodId; +ClientSessionToken = clientSessionToken; +Code = code; +CreatedAt = createdAt; +CustomizationProfileId = customizationProfileId; +DisplayName = displayName; +DisplayStatus = displayStatus; +Errors = errors; +InstantKeyUrl = instantKeyUrl; +IsAssignmentRequired = isAssignmentRequired; +IsEncodingRequired = isEncodingRequired; +IsIssued = isIssued; +IsReadyForAssignment = isReadyForAssignment; +IsReadyForEncoding = isReadyForEncoding; +IssuedAt = issuedAt; +Mode = mode; +PendingMutations = pendingMutations; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessMethodErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessMethodErrorsFailedToIssue), "failed_to_issue")] +public abstract class AccessMethodErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessMethodErrorsFailedToIssue_model")] +public class AccessMethodErrorsFailedToIssue : AccessMethodErrors +{ +[JsonConstructorAttribute] +protected AccessMethodErrorsFailedToIssue() { } + +public AccessMethodErrorsFailedToIssue(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_issue"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodErrorsUnrecognized_model")] +public class AccessMethodErrorsUnrecognized : AccessMethodErrors +{ +[JsonConstructorAttribute] +protected AccessMethodErrorsUnrecognized() { } + +public AccessMethodErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +[JsonConverter(typeof(JsonSubtypes), "mutation_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessMethodPendingMutationsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessMethodPendingMutationsUpdatingAccessTimes), "updating_access_times")] +[JsonSubtypes.KnownSubType(typeof(AccessMethodPendingMutationsRevokingAccess), "revoking_access")] +[JsonSubtypes.KnownSubType(typeof(AccessMethodPendingMutationsProvisioningAccess), "provisioning_access")] +public abstract class AccessMethodPendingMutations +{ +public abstract string MutationCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccess_model")] +public class AccessMethodPendingMutationsProvisioningAccess : AccessMethodPendingMutations +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsProvisioningAccess() { } + +public AccessMethodPendingMutationsProvisioningAccess(string createdAt = default, AccessMethodPendingMutationsProvisioningAccessFrom from = default, string message = default, string mutationCode = default, AccessMethodPendingMutationsProvisioningAccessTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous device configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "provisioning_access"; + +/// +/// New device configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AccessMethodPendingMutationsProvisioningAccessTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccessFrom_model")] +public class AccessMethodPendingMutationsProvisioningAccessFrom +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsProvisioningAccessFrom() { } + +public AccessMethodPendingMutationsProvisioningAccessFrom(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// Previous device IDs where access was provisioned. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccessTo_model")] +public class AccessMethodPendingMutationsProvisioningAccessTo +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsProvisioningAccessTo() { } + +public AccessMethodPendingMutationsProvisioningAccessTo(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// New device IDs where access is being provisioned. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccess_model")] +public class AccessMethodPendingMutationsRevokingAccess : AccessMethodPendingMutations +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsRevokingAccess() { } + +public AccessMethodPendingMutationsRevokingAccess(string createdAt = default, AccessMethodPendingMutationsRevokingAccessFrom from = default, string message = default, string mutationCode = default, AccessMethodPendingMutationsRevokingAccessTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous device configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AccessMethodPendingMutationsRevokingAccessFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "revoking_access"; + +/// +/// New device configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AccessMethodPendingMutationsRevokingAccessTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccessFrom_model")] +public class AccessMethodPendingMutationsRevokingAccessFrom +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsRevokingAccessFrom() { } + +public AccessMethodPendingMutationsRevokingAccessFrom(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// Previous device IDs where access existed. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccessTo_model")] +public class AccessMethodPendingMutationsRevokingAccessTo +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsRevokingAccessTo() { } + +public AccessMethodPendingMutationsRevokingAccessTo(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// New device IDs where access should remain. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimes_model")] +public class AccessMethodPendingMutationsUpdatingAccessTimes : AccessMethodPendingMutations +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsUpdatingAccessTimes() { } + +public AccessMethodPendingMutationsUpdatingAccessTimes(string createdAt = default, AccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, string message = default, string mutationCode = default, AccessMethodPendingMutationsUpdatingAccessTimesTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous access time configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_access_times"; + +/// +/// New access time configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AccessMethodPendingMutationsUpdatingAccessTimesTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimesFrom_model")] +public class AccessMethodPendingMutationsUpdatingAccessTimesFrom +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsUpdatingAccessTimesFrom() { } + +public AccessMethodPendingMutationsUpdatingAccessTimesFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Previous end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Previous start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimesTo_model")] +public class AccessMethodPendingMutationsUpdatingAccessTimesTo +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsUpdatingAccessTimesTo() { } + +public AccessMethodPendingMutationsUpdatingAccessTimesTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// New end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// New start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodPendingMutationsUnrecognized_model")] +public class AccessMethodPendingMutationsUnrecognized : AccessMethodPendingMutations +{ +[JsonConstructorAttribute] +protected AccessMethodPendingMutationsUnrecognized() { } + +public AccessMethodPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) +{ +MutationCode = mutationCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "unrecognized"; + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(AccessMethodWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsUserIdentityMissingPhoneNumber), "user_identity_missing_phone_number")] +[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsUserIdentityMissingEmailAddress), "user_identity_missing_email_address")] +[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsDelayInIssuing), "delay_in_issuing")] +[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsPulledBackupAccessCode), "pulled_backup_access_code")] +[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsUpdatingAccessTimes), "updating_access_times")] +[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsBeingDeleted), "being_deleted")] +public abstract class AccessMethodWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_accessMethodWarningsBeingDeleted_model")] +public class AccessMethodWarningsBeingDeleted : AccessMethodWarnings +{ +[JsonConstructorAttribute] +protected AccessMethodWarningsBeingDeleted() { } + +public AccessMethodWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodWarningsUpdatingAccessTimes_model")] +public class AccessMethodWarningsUpdatingAccessTimes : AccessMethodWarnings +{ +[JsonConstructorAttribute] +protected AccessMethodWarningsUpdatingAccessTimes() { } + +public AccessMethodWarningsUpdatingAccessTimes(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "updating_access_times"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodWarningsPulledBackupAccessCode_model")] +public class AccessMethodWarningsPulledBackupAccessCode : AccessMethodWarnings +{ +[JsonConstructorAttribute] +protected AccessMethodWarningsPulledBackupAccessCode() { } + +public AccessMethodWarningsPulledBackupAccessCode(string createdAt = default, string message = default, string? originalAccessMethodId = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +OriginalAccessMethodId = originalAccessMethodId; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// ID of the original access method from which this backup access method was split, if applicable. +/// +[DataMember(Name = "original_access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string? OriginalAccessMethodId { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "pulled_backup_access_code"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodWarningsDelayInIssuing_model")] +public class AccessMethodWarningsDelayInIssuing : AccessMethodWarnings +{ +[JsonConstructorAttribute] +protected AccessMethodWarningsDelayInIssuing() { } + +public AccessMethodWarningsDelayInIssuing(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "delay_in_issuing"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodWarningsUserIdentityMissingEmailAddress_model")] +public class AccessMethodWarningsUserIdentityMissingEmailAddress : AccessMethodWarnings +{ +[JsonConstructorAttribute] +protected AccessMethodWarningsUserIdentityMissingEmailAddress() { } + +public AccessMethodWarningsUserIdentityMissingEmailAddress(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "user_identity_missing_email_address"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodWarningsUserIdentityMissingPhoneNumber_model")] +public class AccessMethodWarningsUserIdentityMissingPhoneNumber : AccessMethodWarnings +{ +[JsonConstructorAttribute] +protected AccessMethodWarningsUserIdentityMissingPhoneNumber() { } + +public AccessMethodWarningsUserIdentityMissingPhoneNumber(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "user_identity_missing_phone_number"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_accessMethodWarningsUnrecognized_model")] +public class AccessMethodWarningsUnrecognized : AccessMethodWarnings +{ +[JsonConstructorAttribute] +protected AccessMethodWarningsUnrecognized() { } + +public AccessMethodWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// ID of the access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Token of the client session associated with the access method. +/// +[DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] +public string? ClientSessionToken { get; set; } + +/// +/// The actual PIN code for code access methods. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Date and time at which the access method was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the customization profile associated with the access method. +/// +[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomizationProfileId { get; set; } + +/// +/// Display name of the access method. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. +/// +[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] +public string DisplayStatus { get; set; } + +/// +/// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// URL of the Instant Key for mobile key access methods. +/// +[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] +public string? InstantKeyUrl { get; set; } + +/// +/// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. +/// +[DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] +public bool? IsAssignmentRequired { get; set; } + +/// +/// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. +/// +[DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] +public bool? IsEncodingRequired { get; set; } + +/// +/// Indicates whether the access method has been issued. +/// +[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] +public bool IsIssued { get; set; } + +/// +/// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. +/// +[DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] +public bool? IsReadyForAssignment { get; set; } + +/// +/// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. +/// +[DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] +public bool? IsReadyForEncoding { get; set; } + +/// +/// Date and time at which the access method was issued. +/// +[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] +public string? IssuedAt { get; set; } + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] +public AccessMethod.ModeEnum Mode { get; set; } + +/// +/// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. +/// +[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] +public List PendingMutations { get; set; } + +/// +/// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the Seam workspace associated with the access method. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/AcsAccessGroup.cs b/src/Seam/Model/AcsAccessGroup.cs index 3398e6e1..d06f7602 100644 --- a/src/Seam/Model/AcsAccessGroup.cs +++ b/src/Seam/Model/AcsAccessGroup.cs @@ -8,1448 +8,1296 @@ namespace Seam.Model { - /// - /// Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. - /// - /// Some access control systems use [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. - /// - /// To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). - /// - [DataContract(Name = "seamModel_acsAccessGroup_model")] - public class AcsAccessGroup - { - [JsonConstructorAttribute] - protected AcsAccessGroup() { } - - public AcsAccessGroup( - AcsAccessGroup.AccessGroupTypeEnum accessGroupType = default, - string accessGroupTypeDisplayName = default, - AcsAccessGroupAccessSchedule? accessSchedule = default, - string acsAccessGroupId = default, - string acsSystemId = default, - string connectedAccountId = default, - string createdAt = default, - string displayName = default, - List errors = default, - AcsAccessGroup.ExternalTypeEnum externalType = default, - string externalTypeDisplayName = default, - bool isManaged = default, - string name = default, - List pendingMutations = default, - List warnings = default, - string workspaceId = default - ) - { - AccessGroupType = accessGroupType; - AccessGroupTypeDisplayName = accessGroupTypeDisplayName; - AccessSchedule = accessSchedule; - AcsAccessGroupId = acsAccessGroupId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DisplayName = displayName; - Errors = errors; - ExternalType = externalType; - ExternalTypeDisplayName = externalTypeDisplayName; - IsManaged = isManaged; - Name = name; - PendingMutations = pendingMutations; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AccessGroupTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_unit")] - PtiUnit = 1, - - [EnumMember(Value = "pti_access_level")] - PtiAccessLevel = 2, - - [EnumMember(Value = "salto_ks_access_group")] - SaltoKsAccessGroup = 3, - - [EnumMember(Value = "brivo_group")] - BrivoGroup = 4, - - [EnumMember(Value = "salto_space_group")] - SaltoSpaceGroup = 5, - - [EnumMember(Value = "dormakaba_community_access_group")] - DormakabaCommunityAccessGroup = 6, - - [EnumMember(Value = "dormakaba_ambiance_access_group")] - DormakabaAmbianceAccessGroup = 7, - - [EnumMember(Value = "avigilon_alta_group")] - AvigilonAltaGroup = 8, - - [EnumMember(Value = "kisi_access_group")] - KisiAccessGroup = 9, - - [EnumMember(Value = "akiles_member_group")] - AkilesMemberGroup = 10, - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsAccessGroupErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AcsAccessGroupErrorsFailedToCreateOnAcsSystem), - "failed_to_create_on_acs_system" - )] - public abstract class AcsAccessGroupErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_acsAccessGroupErrorsFailedToCreateOnAcsSystem_model")] - public class AcsAccessGroupErrorsFailedToCreateOnAcsSystem : AcsAccessGroupErrors - { - [JsonConstructorAttribute] - protected AcsAccessGroupErrorsFailedToCreateOnAcsSystem() { } - - public AcsAccessGroupErrorsFailedToCreateOnAcsSystem( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_create_on_acs_system"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsAccessGroupErrorsUnrecognized_model")] - public class AcsAccessGroupErrorsUnrecognized : AcsAccessGroupErrors - { - [JsonConstructorAttribute] - protected AcsAccessGroupErrorsUnrecognized() { } - - public AcsAccessGroupErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Brand-specific terminology for the access group type. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExternalTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_unit")] - PtiUnit = 1, - - [EnumMember(Value = "pti_access_level")] - PtiAccessLevel = 2, - - [EnumMember(Value = "salto_ks_access_group")] - SaltoKsAccessGroup = 3, - - [EnumMember(Value = "brivo_group")] - BrivoGroup = 4, - - [EnumMember(Value = "salto_space_group")] - SaltoSpaceGroup = 5, - - [EnumMember(Value = "dormakaba_community_access_group")] - DormakabaCommunityAccessGroup = 6, - - [EnumMember(Value = "dormakaba_ambiance_access_group")] - DormakabaAmbianceAccessGroup = 7, - - [EnumMember(Value = "avigilon_alta_group")] - AvigilonAltaGroup = 8, - - [EnumMember(Value = "kisi_access_group")] - KisiAccessGroup = 9, - - [EnumMember(Value = "akiles_member_group")] - AkilesMemberGroup = 10, - } - - [JsonConverter(typeof(JsonSubtypes), "mutation_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsAccessGroupPendingMutationsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate), - "deferring_user_membership_update" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsAccessGroupPendingMutationsUpdatingEntranceMembership), - "updating_entrance_membership" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsAccessGroupPendingMutationsUpdatingUserMembership), - "updating_user_membership" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsAccessGroupPendingMutationsUpdatingAccessSchedule), - "updating_access_schedule" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsAccessGroupPendingMutationsUpdatingGroupInformation), - "updating_group_information" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsAccessGroupPendingMutationsDeferringDeletion), - "deferring_deletion" - )] - [JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsDeleting), "deleting")] - [JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsCreating), "creating")] - public abstract class AcsAccessGroupPendingMutations - { - public abstract string MutationCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_acsAccessGroupPendingMutationsCreating_model")] - public class AcsAccessGroupPendingMutationsCreating : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsCreating() { } - - public AcsAccessGroupPendingMutationsCreating( - string createdAt = default, - string message = default, - string mutationCode = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "creating"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeleting_model")] - public class AcsAccessGroupPendingMutationsDeleting : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsDeleting() { } - - public AcsAccessGroupPendingMutationsDeleting( - string createdAt = default, - string message = default, - string mutationCode = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "deleting"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeferringDeletion_model")] - public class AcsAccessGroupPendingMutationsDeferringDeletion - : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsDeferringDeletion() { } - - public AcsAccessGroupPendingMutationsDeferringDeletion( - string createdAt = default, - string message = default, - string mutationCode = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "deferring_deletion"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformation_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingGroupInformation - : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingGroupInformation() { } - - public AcsAccessGroupPendingMutationsUpdatingGroupInformation( - string createdAt = default, - AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom from = default, - string message = default, - string mutationCode = default, - AcsAccessGroupPendingMutationsUpdatingGroupInformationTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Old access group information. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_group_information"; - - /// - /// New access group information. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsUpdatingGroupInformationTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformationFrom_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom() { } - - public AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom( - string? name = default - ) - { - Name = name; - } - - /// - /// Name of the access group. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformationTo_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingGroupInformationTo - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingGroupInformationTo() { } - - public AcsAccessGroupPendingMutationsUpdatingGroupInformationTo(string? name = default) - { - Name = name; - } - - /// - /// Name of the access group. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessSchedule_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingAccessSchedule - : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingAccessSchedule() { } - - public AcsAccessGroupPendingMutationsUpdatingAccessSchedule( - string createdAt = default, - AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom from = default, - string message = default, - string mutationCode = default, - AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Old access schedule information. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_access_schedule"; - - /// - /// New access schedule information. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessScheduleFrom_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom() { } - - public AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Ending time for the access schedule. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Starting time for the access schedule. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessScheduleTo_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo() { } - - public AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Ending time for the access schedule. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Starting time for the access schedule. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembership_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingUserMembership - : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingUserMembership() { } - - public AcsAccessGroupPendingMutationsUpdatingUserMembership( - string createdAt = default, - AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom from = default, - string message = default, - string mutationCode = default, - AcsAccessGroupPendingMutationsUpdatingUserMembershipTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Old user membership. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_user_membership"; - - /// - /// New user membership. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsUpdatingUserMembershipTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembershipFrom_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom() { } - - public AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom( - string? acsUserId = default - ) - { - AcsUserId = acsUserId; - } - - /// - /// Old user ID. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembershipTo_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingUserMembershipTo - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingUserMembershipTo() { } - - public AcsAccessGroupPendingMutationsUpdatingUserMembershipTo( - string? acsUserId = default - ) - { - AcsUserId = acsUserId; - } - - /// - /// New user ID. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembership_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingEntranceMembership - : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingEntranceMembership() { } - - public AcsAccessGroupPendingMutationsUpdatingEntranceMembership( - string createdAt = default, - AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom from = default, - string message = default, - string mutationCode = default, - AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Old entrance membership. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_entrance_membership"; - - /// - /// New entrance membership. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom() { } - - public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom( - string? acsEntranceId = default - ) - { - AcsEntranceId = acsEntranceId; - } - - /// - /// Old entrance ID. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembershipTo_model" - )] - public class AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo() { } - - public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo( - string? acsEntranceId = default - ) - { - AcsEntranceId = acsEntranceId; - } - - /// - /// New entrance ID. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsEntranceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsAccessGroupPendingMutationsDeferringUserMembershipUpdate_model" - )] - public class AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate - : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate() { } - - public AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate( - string acsUserId = default, - string createdAt = default, - string message = default, - string mutationCode = default, - AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate.VariantEnum variant = - default - ) - { - AcsUserId = acsUserId; - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - Variant = variant; - } - - /// - /// Whether the user is scheduled to be added to or removed from this access group. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum VariantEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "adding")] - Adding = 1, - - [EnumMember(Value = "removing")] - Removing = 2, - } - - /// - /// ID of the user involved in the scheduled change. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsUserId { get; set; } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "deferring_user_membership_update"; - - /// - /// Whether the user is scheduled to be added to or removed from this access group. - /// - [DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate.VariantEnum Variant { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUnrecognized_model")] - public class AcsAccessGroupPendingMutationsUnrecognized : AcsAccessGroupPendingMutations - { - [JsonConstructorAttribute] - protected AcsAccessGroupPendingMutationsUnrecognized() { } - - public AcsAccessGroupPendingMutationsUnrecognized( - string mutationCode = default, - string createdAt = default, - string message = default - ) - { - MutationCode = mutationCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "unrecognized"; - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [Obsolete("Use `external_type`.")] - [DataMember(Name = "access_group_type", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroup.AccessGroupTypeEnum AccessGroupType { get; set; } - - [Obsolete("Use `external_type_display_name`.")] - [DataMember( - Name = "access_group_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string AccessGroupTypeDisplayName { get; set; } - - /// - /// `starts_at` and `ends_at` timestamps for the access group's access. - /// - [DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupAccessSchedule? AccessSchedule { get; set; } - - /// - /// ID of the access group. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - /// - /// ID of the access control system that contains the access group. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account that contains the access group. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the access group was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name for the access group. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Errors associated with the `acs_access_group`. - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Brand-specific terminology for the access group type. - /// - [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroup.ExternalTypeEnum ExternalType { get; set; } - - /// - /// Display name that corresponds to the brand-specific terminology for the access group type. - /// - [DataMember( - Name = "external_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string ExternalTypeDisplayName { get; set; } - - /// - /// Indicates whether Seam manages the access group. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Name of the access group. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Collection of pending mutations for the access group. Represents operations that have been requested but not yet completed on the integrated access system. - /// - [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] - public List PendingMutations { get; set; } - - /// - /// Warnings associated with the `acs_access_group`. - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the access group. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsAccessGroupAccessSchedule_model")] - public class AcsAccessGroupAccessSchedule - { - [JsonConstructorAttribute] - protected AcsAccessGroupAccessSchedule() { } - - public AcsAccessGroupAccessSchedule(string? endsAt = default, string startsAt = default) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsAccessGroupWarnings_model")] - public class AcsAccessGroupWarnings - { - [JsonConstructorAttribute] - protected AcsAccessGroupWarnings() { } - - public AcsAccessGroupWarnings( - string createdAt = default, - string message = default, - AcsAccessGroupWarnings.WarningCodeEnum warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum WarningCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "unknown_issue_with_acs_access_group")] - UnknownIssueWithAcsAccessGroup = 1, - - [EnumMember(Value = "being_deleted")] - BeingDeleted = 2, - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public AcsAccessGroupWarnings.WarningCodeEnum WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. +/// +/// Some access control systems use [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. +/// +/// To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). +/// +[DataContract(Name = "seamModel_acsAccessGroup_model")] +public class AcsAccessGroup +{ +[JsonConstructorAttribute] +protected AcsAccessGroup() { } + +public AcsAccessGroup(AcsAccessGroup.AccessGroupTypeEnum accessGroupType = default, string accessGroupTypeDisplayName = default, AcsAccessGroupAccessSchedule? accessSchedule = default, string acsAccessGroupId = default, string acsSystemId = default, string connectedAccountId = default, string createdAt = default, string displayName = default, List errors = default, AcsAccessGroup.ExternalTypeEnum externalType = default, string externalTypeDisplayName = default, bool isManaged = default, string name = default, List pendingMutations = default, List warnings = default, string workspaceId = default) +{ +AccessGroupType = accessGroupType; +AccessGroupTypeDisplayName = accessGroupTypeDisplayName; +AccessSchedule = accessSchedule; +AcsAccessGroupId = acsAccessGroupId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DisplayName = displayName; +Errors = errors; +ExternalType = externalType; +ExternalTypeDisplayName = externalTypeDisplayName; +IsManaged = isManaged; +Name = name; +PendingMutations = pendingMutations; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AccessGroupTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_unit")] +PtiUnit = 1, + +[EnumMember(Value = "pti_access_level")] +PtiAccessLevel = 2, + +[EnumMember(Value = "salto_ks_access_group")] +SaltoKsAccessGroup = 3, + +[EnumMember(Value = "brivo_group")] +BrivoGroup = 4, + +[EnumMember(Value = "salto_space_group")] +SaltoSpaceGroup = 5, + +[EnumMember(Value = "dormakaba_community_access_group")] +DormakabaCommunityAccessGroup = 6, + +[EnumMember(Value = "dormakaba_ambiance_access_group")] +DormakabaAmbianceAccessGroup = 7, + +[EnumMember(Value = "avigilon_alta_group")] +AvigilonAltaGroup = 8, + +[EnumMember(Value = "kisi_access_group")] +KisiAccessGroup = 9, + +[EnumMember(Value = "akiles_member_group")] +AkilesMemberGroup = 10, +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsAccessGroupErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupErrorsFailedToCreateOnAcsSystem), "failed_to_create_on_acs_system")] +public abstract class AcsAccessGroupErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsAccessGroupErrorsFailedToCreateOnAcsSystem_model")] +public class AcsAccessGroupErrorsFailedToCreateOnAcsSystem : AcsAccessGroupErrors +{ +[JsonConstructorAttribute] +protected AcsAccessGroupErrorsFailedToCreateOnAcsSystem() { } + +public AcsAccessGroupErrorsFailedToCreateOnAcsSystem(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_create_on_acs_system"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupErrorsUnrecognized_model")] +public class AcsAccessGroupErrorsUnrecognized : AcsAccessGroupErrors +{ +[JsonConstructorAttribute] +protected AcsAccessGroupErrorsUnrecognized() { } + +public AcsAccessGroupErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Brand-specific terminology for the access group type. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExternalTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_unit")] +PtiUnit = 1, + +[EnumMember(Value = "pti_access_level")] +PtiAccessLevel = 2, + +[EnumMember(Value = "salto_ks_access_group")] +SaltoKsAccessGroup = 3, + +[EnumMember(Value = "brivo_group")] +BrivoGroup = 4, + +[EnumMember(Value = "salto_space_group")] +SaltoSpaceGroup = 5, + +[EnumMember(Value = "dormakaba_community_access_group")] +DormakabaCommunityAccessGroup = 6, + +[EnumMember(Value = "dormakaba_ambiance_access_group")] +DormakabaAmbianceAccessGroup = 7, + +[EnumMember(Value = "avigilon_alta_group")] +AvigilonAltaGroup = 8, + +[EnumMember(Value = "kisi_access_group")] +KisiAccessGroup = 9, + +[EnumMember(Value = "akiles_member_group")] +AkilesMemberGroup = 10, +} + +[JsonConverter(typeof(JsonSubtypes), "mutation_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsAccessGroupPendingMutationsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate), "deferring_user_membership_update")] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsUpdatingEntranceMembership), "updating_entrance_membership")] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsUpdatingUserMembership), "updating_user_membership")] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsUpdatingAccessSchedule), "updating_access_schedule")] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsUpdatingGroupInformation), "updating_group_information")] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsDeferringDeletion), "deferring_deletion")] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsDeleting), "deleting")] +[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsCreating), "creating")] +public abstract class AcsAccessGroupPendingMutations +{ +public abstract string MutationCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsCreating_model")] +public class AcsAccessGroupPendingMutationsCreating : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsCreating() { } + +public AcsAccessGroupPendingMutationsCreating(string createdAt = default, string message = default, string mutationCode = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "creating"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeleting_model")] +public class AcsAccessGroupPendingMutationsDeleting : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsDeleting() { } + +public AcsAccessGroupPendingMutationsDeleting(string createdAt = default, string message = default, string mutationCode = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "deleting"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeferringDeletion_model")] +public class AcsAccessGroupPendingMutationsDeferringDeletion : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsDeferringDeletion() { } + +public AcsAccessGroupPendingMutationsDeferringDeletion(string createdAt = default, string message = default, string mutationCode = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "deferring_deletion"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformation_model")] +public class AcsAccessGroupPendingMutationsUpdatingGroupInformation : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingGroupInformation() { } + +public AcsAccessGroupPendingMutationsUpdatingGroupInformation(string createdAt = default, AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom from = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsUpdatingGroupInformationTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Old access group information. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_group_information"; + +/// +/// New access group information. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsUpdatingGroupInformationTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformationFrom_model")] +public class AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom() { } + +public AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom(string? name = default) +{ +Name = name; +} + +/// +/// Name of the access group. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformationTo_model")] +public class AcsAccessGroupPendingMutationsUpdatingGroupInformationTo +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingGroupInformationTo() { } + +public AcsAccessGroupPendingMutationsUpdatingGroupInformationTo(string? name = default) +{ +Name = name; +} + +/// +/// Name of the access group. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessSchedule_model")] +public class AcsAccessGroupPendingMutationsUpdatingAccessSchedule : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingAccessSchedule() { } + +public AcsAccessGroupPendingMutationsUpdatingAccessSchedule(string createdAt = default, AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom from = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Old access schedule information. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_access_schedule"; + +/// +/// New access schedule information. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessScheduleFrom_model")] +public class AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom() { } + +public AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Ending time for the access schedule. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Starting time for the access schedule. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessScheduleTo_model")] +public class AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo() { } + +public AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Ending time for the access schedule. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Starting time for the access schedule. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembership_model")] +public class AcsAccessGroupPendingMutationsUpdatingUserMembership : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingUserMembership() { } + +public AcsAccessGroupPendingMutationsUpdatingUserMembership(string createdAt = default, AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom from = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsUpdatingUserMembershipTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Old user membership. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_user_membership"; + +/// +/// New user membership. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsUpdatingUserMembershipTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembershipFrom_model")] +public class AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom() { } + +public AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom(string? acsUserId = default) +{ +AcsUserId = acsUserId; +} + +/// +/// Old user ID. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembershipTo_model")] +public class AcsAccessGroupPendingMutationsUpdatingUserMembershipTo +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingUserMembershipTo() { } + +public AcsAccessGroupPendingMutationsUpdatingUserMembershipTo(string? acsUserId = default) +{ +AcsUserId = acsUserId; +} + +/// +/// New user ID. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembership_model")] +public class AcsAccessGroupPendingMutationsUpdatingEntranceMembership : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingEntranceMembership() { } + +public AcsAccessGroupPendingMutationsUpdatingEntranceMembership(string createdAt = default, AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom from = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Old entrance membership. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_entrance_membership"; + +/// +/// New entrance membership. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom_model")] +public class AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom() { } + +public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom(string? acsEntranceId = default) +{ +AcsEntranceId = acsEntranceId; +} + +/// +/// Old entrance ID. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsEntranceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembershipTo_model")] +public class AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo() { } + +public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo(string? acsEntranceId = default) +{ +AcsEntranceId = acsEntranceId; +} + +/// +/// New entrance ID. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsEntranceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeferringUserMembershipUpdate_model")] +public class AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate() { } + +public AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate(string acsUserId = default, string createdAt = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate.VariantEnum variant = default) +{ +AcsUserId = acsUserId; +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +Variant = variant; +} + +/// +/// Whether the user is scheduled to be added to or removed from this access group. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum VariantEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "adding")] +Adding = 1, + +[EnumMember(Value = "removing")] +Removing = 2, +} + +/// +/// ID of the user involved in the scheduled change. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsUserId { get; set; } + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "deferring_user_membership_update"; + +/// +/// Whether the user is scheduled to be added to or removed from this access group. +/// +[DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate.VariantEnum Variant { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUnrecognized_model")] +public class AcsAccessGroupPendingMutationsUnrecognized : AcsAccessGroupPendingMutations +{ +[JsonConstructorAttribute] +protected AcsAccessGroupPendingMutationsUnrecognized() { } + +public AcsAccessGroupPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) +{ +MutationCode = mutationCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "unrecognized"; + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[Obsolete("Use `external_type`.")] +[DataMember(Name = "access_group_type", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroup.AccessGroupTypeEnum AccessGroupType { get; set; } + +[Obsolete("Use `external_type_display_name`.")] +[DataMember(Name = "access_group_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string AccessGroupTypeDisplayName { get; set; } + +/// +/// `starts_at` and `ends_at` timestamps for the access group's access. +/// +[DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupAccessSchedule? AccessSchedule { get; set; } + +/// +/// ID of the access group. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +/// +/// ID of the access control system that contains the access group. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account that contains the access group. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the access group was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name for the access group. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Errors associated with the `acs_access_group`. +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Brand-specific terminology for the access group type. +/// +[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroup.ExternalTypeEnum ExternalType { get; set; } + +/// +/// Display name that corresponds to the brand-specific terminology for the access group type. +/// +[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string ExternalTypeDisplayName { get; set; } + +/// +/// Indicates whether Seam manages the access group. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Name of the access group. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// Collection of pending mutations for the access group. Represents operations that have been requested but not yet completed on the integrated access system. +/// +[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] +public List PendingMutations { get; set; } + +/// +/// Warnings associated with the `acs_access_group`. +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the access group. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupAccessSchedule_model")] +public class AcsAccessGroupAccessSchedule +{ +[JsonConstructorAttribute] +protected AcsAccessGroupAccessSchedule() { } + +public AcsAccessGroupAccessSchedule(string? endsAt = default, string startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsAccessGroupWarnings_model")] +public class AcsAccessGroupWarnings +{ +[JsonConstructorAttribute] +protected AcsAccessGroupWarnings() { } + +public AcsAccessGroupWarnings(string createdAt = default, string message = default, AcsAccessGroupWarnings.WarningCodeEnum warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum WarningCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "unknown_issue_with_acs_access_group")] +UnknownIssueWithAcsAccessGroup = 1, + +[EnumMember(Value = "being_deleted")] +BeingDeleted = 2, +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public AcsAccessGroupWarnings.WarningCodeEnum WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/AcsCredential.cs b/src/Seam/Model/AcsCredential.cs index 6d821eb1..f8f4693a 100644 --- a/src/Seam/Model/AcsCredential.cs +++ b/src/Seam/Model/AcsCredential.cs @@ -8,1127 +8,994 @@ namespace Seam.Model { - /// - /// Means by which an [access control system user](https://docs.seam.co/low-level-apis/access-systems/user-management) gains access at an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. - /// - /// For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. - /// - /// For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. - /// - [DataContract(Name = "seamModel_acsCredential_model")] - public class AcsCredential - { - [JsonConstructorAttribute] - protected AcsCredential() { } - - public AcsCredential( - AcsCredential.AccessMethodEnum accessMethod = default, - string acsCredentialId = default, - string? acsCredentialPoolId = default, - string acsSystemId = default, - string? acsUserId = default, - AcsCredentialAkilesMetadata? akilesMetadata = default, - AcsCredentialAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, - string? cardNumber = default, - string? code = default, - string connectedAccountId = default, - string createdAt = default, - string displayName = default, - string? endsAt = default, - List errors = default, - AcsCredential.ExternalTypeEnum? externalType = default, - string? externalTypeDisplayName = default, - bool? isIssued = default, - bool? isLatestDesiredStateSyncedWithProvider = default, - bool isManaged = default, - bool? isMultiPhoneSyncCredential = default, - bool? isOneTimeUse = default, - string? issuedAt = default, - string? latestDesiredStateSyncedWithProviderAt = default, - string? parentAcsCredentialId = default, - string? startsAt = default, - string? userIdentityId = default, - AcsCredentialVisionlineMetadata? visionlineMetadata = default, - List warnings = default, - string workspaceId = default - ) - { - AccessMethod = accessMethod; - AcsCredentialId = acsCredentialId; - AcsCredentialPoolId = acsCredentialPoolId; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - AkilesMetadata = akilesMetadata; - AssaAbloyVostioMetadata = assaAbloyVostioMetadata; - CardNumber = cardNumber; - Code = code; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DisplayName = displayName; - EndsAt = endsAt; - Errors = errors; - ExternalType = externalType; - ExternalTypeDisplayName = externalTypeDisplayName; - IsIssued = isIssued; - IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; - IsManaged = isManaged; - IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; - IsOneTimeUse = isOneTimeUse; - IssuedAt = issuedAt; - LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; - ParentAcsCredentialId = parentAcsCredentialId; - StartsAt = startsAt; - UserIdentityId = userIdentityId; - VisionlineMetadata = visionlineMetadata; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - /// - /// Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AccessMethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExternalTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_card")] - PtiCard = 1, - - [EnumMember(Value = "brivo_credential")] - BrivoCredential = 2, - - [EnumMember(Value = "hid_credential")] - HidCredential = 3, - - [EnumMember(Value = "visionline_card")] - VisionlineCard = 4, - - [EnumMember(Value = "salto_ks_credential")] - SaltoKsCredential = 5, - - [EnumMember(Value = "assa_abloy_vostio_key")] - AssaAbloyVostioKey = 6, - - [EnumMember(Value = "salto_space_key")] - SaltoSpaceKey = 7, - - [EnumMember(Value = "latch_access")] - LatchAccess = 8, - - [EnumMember(Value = "dormakaba_ambiance_credential")] - DormakabaAmbianceCredential = 9, - - [EnumMember(Value = "hotek_card")] - HotekCard = 10, - - [EnumMember(Value = "salto_ks_tag")] - SaltoKsTag = 11, - - [EnumMember(Value = "avigilon_alta_credential")] - AvigilonAltaCredential = 12, - - [EnumMember(Value = "kisi_credential")] - KisiCredential = 13, - - [EnumMember(Value = "akiles_credential")] - AkilesCredential = 14, - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsCredentialWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AcsCredentialWarningsRequestedCodeUnavailable), - "requested_code_unavailable" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsCredentialWarningsNeedsToBeReissued), - "needs_to_be_reissued" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsCredentialWarningsUnknownIssueWithAcsCredential), - "unknown_issue_with_acs_credential" - )] - [JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsBeingDeleted), "being_deleted")] - [JsonSubtypes.KnownSubType( - typeof(AcsCredentialWarningsScheduleModified), - "schedule_modified" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsCredentialWarningsScheduleExternallyModified), - "schedule_externally_modified" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsCredentialWarningsWaitingToBeIssued), - "waiting_to_be_issued" - )] - public abstract class AcsCredentialWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_acsCredentialWarningsWaitingToBeIssued_model")] - public class AcsCredentialWarningsWaitingToBeIssued : AcsCredentialWarnings - { - [JsonConstructorAttribute] - protected AcsCredentialWarningsWaitingToBeIssued() { } - - public AcsCredentialWarningsWaitingToBeIssued( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "waiting_to_be_issued"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialWarningsScheduleExternallyModified_model")] - public class AcsCredentialWarningsScheduleExternallyModified : AcsCredentialWarnings - { - [JsonConstructorAttribute] - protected AcsCredentialWarningsScheduleExternallyModified() { } - - public AcsCredentialWarningsScheduleExternallyModified( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "schedule_externally_modified"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialWarningsScheduleModified_model")] - public class AcsCredentialWarningsScheduleModified : AcsCredentialWarnings - { - [JsonConstructorAttribute] - protected AcsCredentialWarningsScheduleModified() { } - - public AcsCredentialWarningsScheduleModified( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "schedule_modified"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialWarningsBeingDeleted_model")] - public class AcsCredentialWarningsBeingDeleted : AcsCredentialWarnings - { - [JsonConstructorAttribute] - protected AcsCredentialWarningsBeingDeleted() { } - - public AcsCredentialWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialWarningsUnknownIssueWithAcsCredential_model")] - public class AcsCredentialWarningsUnknownIssueWithAcsCredential : AcsCredentialWarnings - { - [JsonConstructorAttribute] - protected AcsCredentialWarningsUnknownIssueWithAcsCredential() { } - - public AcsCredentialWarningsUnknownIssueWithAcsCredential( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unknown_issue_with_acs_credential"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialWarningsNeedsToBeReissued_model")] - public class AcsCredentialWarningsNeedsToBeReissued : AcsCredentialWarnings - { - [JsonConstructorAttribute] - protected AcsCredentialWarningsNeedsToBeReissued() { } - - public AcsCredentialWarningsNeedsToBeReissued( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "needs_to_be_reissued"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialWarningsRequestedCodeUnavailable_model")] - public class AcsCredentialWarningsRequestedCodeUnavailable : AcsCredentialWarnings - { - [JsonConstructorAttribute] - protected AcsCredentialWarningsRequestedCodeUnavailable() { } - - public AcsCredentialWarningsRequestedCodeUnavailable( - string createdAt = default, - string message = default, - string newCode = default, - string originalCode = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - NewCode = newCode; - OriginalCode = originalCode; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// The PIN code that was assigned instead. - /// - [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] - public string NewCode { get; set; } - - /// - /// The originally requested PIN code that could not be used. - /// - [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] - public string OriginalCode { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "requested_code_unavailable"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialWarningsUnrecognized_model")] - public class AcsCredentialWarningsUnrecognized : AcsCredentialWarnings - { - [JsonConstructorAttribute] - protected AcsCredentialWarningsUnrecognized() { } - - public AcsCredentialWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] - public AcsCredential.AccessMethodEnum AccessMethod { get; set; } - - /// - /// ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the credential pool to which the credential belongs. - /// - [DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialPoolId { get; set; } - - /// - /// ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsCredentialAkilesMetadata? AkilesMetadata { get; set; } - - /// - /// Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember( - Name = "assa_abloy_vostio_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public AcsCredentialAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - - /// - /// Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] - public string? CardNumber { get; set; } - - /// - /// Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. - /// - [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] - public AcsCredential.ExternalTypeEnum? ExternalType { get; set; } - - /// - /// Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - /// - [DataMember( - Name = "external_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ExternalTypeDisplayName { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. - /// - [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] - public bool? IsIssued { get; set; } - - /// - /// Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. - /// - [DataMember( - Name = "is_latest_desired_state_synced_with_provider", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } - - /// - /// Indicates whether Seam manages the credential. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). - /// - [DataMember( - Name = "is_multi_phone_sync_credential", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsMultiPhoneSyncCredential { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. - /// - [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOneTimeUse { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card. - /// - [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] - public string? IssuedAt { get; set; } - - /// - /// Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. - /// - [DataMember( - Name = "latest_desired_state_synced_with_provider_at", - IsRequired = false, - EmitDefaultValue = false - )] - public string? LatestDesiredStateSyncedWithProviderAt { get; set; } - - /// - /// ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember( - Name = "parent_acs_credential_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ParentAcsCredentialId { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsCredentialVisionlineMetadata? VisionlineMetadata { get; set; } - - /// - /// Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialAkilesMetadata_model")] - public class AcsCredentialAkilesMetadata - { - [JsonConstructorAttribute] - protected AcsCredentialAkilesMetadata() { } - - public AcsCredentialAkilesMetadata(string? memberPinId = default) - { - MemberPinId = memberPinId; - } - - /// - /// ID of the Akiles member PIN. - /// - [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] - public string? MemberPinId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialAssaAbloyVostioMetadata_model")] - public class AcsCredentialAssaAbloyVostioMetadata - { - [JsonConstructorAttribute] - protected AcsCredentialAssaAbloyVostioMetadata() { } - - public AcsCredentialAssaAbloyVostioMetadata( - bool? autoJoin = default, - List? doorNames = default, - string? endpointId = default, - string? keyId = default, - string? keyIssuingRequestId = default, - List? overrideGuestAcsEntranceIds = default - ) - { - AutoJoin = autoJoin; - DoorNames = doorNames; - EndpointId = endpointId; - KeyId = keyId; - KeyIssuingRequestId = keyIssuingRequestId; - OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; - } - - /// - /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. - /// - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - /// - /// Names of the doors to which to grant access in the Vostio access system. - /// - [DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] - public List? DoorNames { get; set; } - - /// - /// Endpoint ID in the Vostio access system. - /// - [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] - public string? EndpointId { get; set; } - - /// - /// Key ID in the Vostio access system. - /// - [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyId { get; set; } - - /// - /// Key issuing request ID in the Vostio access system. - /// - [DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyIssuingRequestId { get; set; } - - /// - /// IDs of the guest entrances to override in the Vostio access system. - /// - [DataMember( - Name = "override_guest_acs_entrance_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? OverrideGuestAcsEntranceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialErrors_model")] - public class AcsCredentialErrors - { - [JsonConstructorAttribute] - protected AcsCredentialErrors() { } - - public AcsCredentialErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsCredentialVisionlineMetadata_model")] - public class AcsCredentialVisionlineMetadata - { - [JsonConstructorAttribute] - protected AcsCredentialVisionlineMetadata() { } - - public AcsCredentialVisionlineMetadata( - bool? autoJoin = default, - AcsCredentialVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, - string? cardId = default, - List? commonAcsEntranceIds = default, - string? credentialId = default, - List? guestAcsEntranceIds = default, - bool? isValid = default, - List? joinerAcsCredentialIds = default - ) - { - AutoJoin = autoJoin; - CardFunctionType = cardFunctionType; - CardId = cardId; - CommonAcsEntranceIds = commonAcsEntranceIds; - CredentialId = credentialId; - GuestAcsEntranceIds = guestAcsEntranceIds; - IsValid = isValid; - JoinerAcsCredentialIds = joinerAcsCredentialIds; - } - - /// - /// Card function type in the Visionline access system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CardFunctionTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "guest")] - Guest = 1, - - [EnumMember(Value = "staff")] - Staff = 2, - } - - /// - /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. - /// - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - /// - /// Card function type in the Visionline access system. - /// - [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] - public AcsCredentialVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - - /// - /// ID of the card in the Visionline access system. - /// - [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] - public string? CardId { get; set; } - - /// - /// Common entrance IDs in the Visionline access system. - /// - [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAcsEntranceIds { get; set; } - - /// - /// ID of the credential in the Visionline access system. - /// - [DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? CredentialId { get; set; } - - /// - /// Guest entrance IDs in the Visionline access system. - /// - [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? GuestAcsEntranceIds { get; set; } - - /// - /// Indicates whether the credential is valid. - /// - [DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] - public bool? IsValid { get; set; } - - /// - /// IDs of the credentials to which you want to join. - /// - [DataMember( - Name = "joiner_acs_credential_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? JoinerAcsCredentialIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Means by which an [access control system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) gains access at an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. +/// +/// For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. +/// +/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. +/// +[DataContract(Name = "seamModel_acsCredential_model")] +public class AcsCredential +{ +[JsonConstructorAttribute] +protected AcsCredential() { } + +public AcsCredential(AcsCredential.AccessMethodEnum accessMethod = default, string acsCredentialId = default, string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, AcsCredentialAkilesMetadata? akilesMetadata = default, AcsCredentialAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, AcsCredential.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, bool? isIssued = default, bool? isLatestDesiredStateSyncedWithProvider = default, bool isManaged = default, bool? isMultiPhoneSyncCredential = default, bool? isOneTimeUse = default, string? issuedAt = default, string? latestDesiredStateSyncedWithProviderAt = default, string? parentAcsCredentialId = default, string? startsAt = default, string? userIdentityId = default, AcsCredentialVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) +{ +AccessMethod = accessMethod; +AcsCredentialId = acsCredentialId; +AcsCredentialPoolId = acsCredentialPoolId; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +AkilesMetadata = akilesMetadata; +AssaAbloyVostioMetadata = assaAbloyVostioMetadata; +CardNumber = cardNumber; +Code = code; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DisplayName = displayName; +EndsAt = endsAt; +Errors = errors; +ExternalType = externalType; +ExternalTypeDisplayName = externalTypeDisplayName; +IsIssued = isIssued; +IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; +IsManaged = isManaged; +IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; +IsOneTimeUse = isOneTimeUse; +IssuedAt = issuedAt; +LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; +ParentAcsCredentialId = parentAcsCredentialId; +StartsAt = startsAt; +UserIdentityId = userIdentityId; +VisionlineMetadata = visionlineMetadata; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +/// +/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AccessMethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExternalTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_card")] +PtiCard = 1, + +[EnumMember(Value = "brivo_credential")] +BrivoCredential = 2, + +[EnumMember(Value = "hid_credential")] +HidCredential = 3, + +[EnumMember(Value = "visionline_card")] +VisionlineCard = 4, + +[EnumMember(Value = "salto_ks_credential")] +SaltoKsCredential = 5, + +[EnumMember(Value = "assa_abloy_vostio_key")] +AssaAbloyVostioKey = 6, + +[EnumMember(Value = "salto_space_key")] +SaltoSpaceKey = 7, + +[EnumMember(Value = "latch_access")] +LatchAccess = 8, + +[EnumMember(Value = "dormakaba_ambiance_credential")] +DormakabaAmbianceCredential = 9, + +[EnumMember(Value = "hotek_card")] +HotekCard = 10, + +[EnumMember(Value = "salto_ks_tag")] +SaltoKsTag = 11, + +[EnumMember(Value = "avigilon_alta_credential")] +AvigilonAltaCredential = 12, + +[EnumMember(Value = "kisi_credential")] +KisiCredential = 13, + +[EnumMember(Value = "akiles_credential")] +AkilesCredential = 14, +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsCredentialWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsRequestedCodeUnavailable), "requested_code_unavailable")] +[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsNeedsToBeReissued), "needs_to_be_reissued")] +[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsUnknownIssueWithAcsCredential), "unknown_issue_with_acs_credential")] +[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsBeingDeleted), "being_deleted")] +[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsScheduleModified), "schedule_modified")] +[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsScheduleExternallyModified), "schedule_externally_modified")] +[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsWaitingToBeIssued), "waiting_to_be_issued")] +public abstract class AcsCredentialWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsCredentialWarningsWaitingToBeIssued_model")] +public class AcsCredentialWarningsWaitingToBeIssued : AcsCredentialWarnings +{ +[JsonConstructorAttribute] +protected AcsCredentialWarningsWaitingToBeIssued() { } + +public AcsCredentialWarningsWaitingToBeIssued(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "waiting_to_be_issued"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialWarningsScheduleExternallyModified_model")] +public class AcsCredentialWarningsScheduleExternallyModified : AcsCredentialWarnings +{ +[JsonConstructorAttribute] +protected AcsCredentialWarningsScheduleExternallyModified() { } + +public AcsCredentialWarningsScheduleExternallyModified(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "schedule_externally_modified"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialWarningsScheduleModified_model")] +public class AcsCredentialWarningsScheduleModified : AcsCredentialWarnings +{ +[JsonConstructorAttribute] +protected AcsCredentialWarningsScheduleModified() { } + +public AcsCredentialWarningsScheduleModified(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "schedule_modified"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialWarningsBeingDeleted_model")] +public class AcsCredentialWarningsBeingDeleted : AcsCredentialWarnings +{ +[JsonConstructorAttribute] +protected AcsCredentialWarningsBeingDeleted() { } + +public AcsCredentialWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialWarningsUnknownIssueWithAcsCredential_model")] +public class AcsCredentialWarningsUnknownIssueWithAcsCredential : AcsCredentialWarnings +{ +[JsonConstructorAttribute] +protected AcsCredentialWarningsUnknownIssueWithAcsCredential() { } + +public AcsCredentialWarningsUnknownIssueWithAcsCredential(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unknown_issue_with_acs_credential"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialWarningsNeedsToBeReissued_model")] +public class AcsCredentialWarningsNeedsToBeReissued : AcsCredentialWarnings +{ +[JsonConstructorAttribute] +protected AcsCredentialWarningsNeedsToBeReissued() { } + +public AcsCredentialWarningsNeedsToBeReissued(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "needs_to_be_reissued"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialWarningsRequestedCodeUnavailable_model")] +public class AcsCredentialWarningsRequestedCodeUnavailable : AcsCredentialWarnings +{ +[JsonConstructorAttribute] +protected AcsCredentialWarningsRequestedCodeUnavailable() { } + +public AcsCredentialWarningsRequestedCodeUnavailable(string createdAt = default, string message = default, string newCode = default, string originalCode = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +NewCode = newCode; +OriginalCode = originalCode; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// The PIN code that was assigned instead. +/// +[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] +public string NewCode { get; set; } + +/// +/// The originally requested PIN code that could not be used. +/// +[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] +public string OriginalCode { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "requested_code_unavailable"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialWarningsUnrecognized_model")] +public class AcsCredentialWarningsUnrecognized : AcsCredentialWarnings +{ +[JsonConstructorAttribute] +protected AcsCredentialWarningsUnrecognized() { } + +public AcsCredentialWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] +public AcsCredential.AccessMethodEnum AccessMethod { get; set; } + +/// +/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the credential pool to which the credential belongs. +/// +[DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialPoolId { get; set; } + +/// +/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsCredentialAkilesMetadata? AkilesMetadata { get; set; } + +/// +/// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsCredentialAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + +/// +/// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] +public string? CardNumber { get; set; } + +/// +/// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. +/// +[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] +public AcsCredential.ExternalTypeEnum? ExternalType { get; set; } + +/// +/// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. +/// +[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string? ExternalTypeDisplayName { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. +/// +[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] +public bool? IsIssued { get; set; } + +/// +/// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. +/// +[DataMember(Name = "is_latest_desired_state_synced_with_provider", IsRequired = false, EmitDefaultValue = false)] +public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } + +/// +/// Indicates whether Seam manages the credential. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). +/// +[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] +public bool? IsMultiPhoneSyncCredential { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. +/// +[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOneTimeUse { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. +/// +[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] +public string? IssuedAt { get; set; } + +/// +/// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. +/// +[DataMember(Name = "latest_desired_state_synced_with_provider_at", IsRequired = false, EmitDefaultValue = false)] +public string? LatestDesiredStateSyncedWithProviderAt { get; set; } + +/// +/// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "parent_acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? ParentAcsCredentialId { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsCredentialVisionlineMetadata? VisionlineMetadata { get; set; } + +/// +/// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialAkilesMetadata_model")] +public class AcsCredentialAkilesMetadata +{ +[JsonConstructorAttribute] +protected AcsCredentialAkilesMetadata() { } + +public AcsCredentialAkilesMetadata(string? memberPinId = default) +{ +MemberPinId = memberPinId; +} + +/// +/// ID of the Akiles member PIN. +/// +[DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] +public string? MemberPinId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialAssaAbloyVostioMetadata_model")] +public class AcsCredentialAssaAbloyVostioMetadata +{ +[JsonConstructorAttribute] +protected AcsCredentialAssaAbloyVostioMetadata() { } + +public AcsCredentialAssaAbloyVostioMetadata(bool? autoJoin = default, List? doorNames = default, string? endpointId = default, string? keyId = default, string? keyIssuingRequestId = default, List? overrideGuestAcsEntranceIds = default) +{ +AutoJoin = autoJoin; +DoorNames = doorNames; +EndpointId = endpointId; +KeyId = keyId; +KeyIssuingRequestId = keyIssuingRequestId; +OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; +} + +/// +/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. +/// +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +/// +/// Names of the doors to which to grant access in the Vostio access system. +/// +[DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] +public List? DoorNames { get; set; } + +/// +/// Endpoint ID in the Vostio access system. +/// +[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] +public string? EndpointId { get; set; } + +/// +/// Key ID in the Vostio access system. +/// +[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyId { get; set; } + +/// +/// Key issuing request ID in the Vostio access system. +/// +[DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyIssuingRequestId { get; set; } + +/// +/// IDs of the guest entrances to override in the Vostio access system. +/// +[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? OverrideGuestAcsEntranceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialErrors_model")] +public class AcsCredentialErrors +{ +[JsonConstructorAttribute] +protected AcsCredentialErrors() { } + +public AcsCredentialErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsCredentialVisionlineMetadata_model")] +public class AcsCredentialVisionlineMetadata +{ +[JsonConstructorAttribute] +protected AcsCredentialVisionlineMetadata() { } + +public AcsCredentialVisionlineMetadata(bool? autoJoin = default, AcsCredentialVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, string? cardId = default, List? commonAcsEntranceIds = default, string? credentialId = default, List? guestAcsEntranceIds = default, bool? isValid = default, List? joinerAcsCredentialIds = default) +{ +AutoJoin = autoJoin; +CardFunctionType = cardFunctionType; +CardId = cardId; +CommonAcsEntranceIds = commonAcsEntranceIds; +CredentialId = credentialId; +GuestAcsEntranceIds = guestAcsEntranceIds; +IsValid = isValid; +JoinerAcsCredentialIds = joinerAcsCredentialIds; +} + +/// +/// Card function type in the Visionline access system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CardFunctionTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "guest")] +Guest = 1, + +[EnumMember(Value = "staff")] +Staff = 2, +} + +/// +/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. +/// +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +/// +/// Card function type in the Visionline access system. +/// +[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] +public AcsCredentialVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + +/// +/// ID of the card in the Visionline access system. +/// +[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] +public string? CardId { get; set; } + +/// +/// Common entrance IDs in the Visionline access system. +/// +[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAcsEntranceIds { get; set; } + +/// +/// ID of the credential in the Visionline access system. +/// +[DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? CredentialId { get; set; } + +/// +/// Guest entrance IDs in the Visionline access system. +/// +[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? GuestAcsEntranceIds { get; set; } + +/// +/// Indicates whether the credential is valid. +/// +[DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] +public bool? IsValid { get; set; } + +/// +/// IDs of the credentials to which you want to join. +/// +[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] +public List? JoinerAcsCredentialIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/AcsEncoder.cs b/src/Seam/Model/AcsEncoder.cs index 196d35b7..6d27e417 100644 --- a/src/Seam/Model/AcsEncoder.cs +++ b/src/Seam/Model/AcsEncoder.cs @@ -8,174 +8,163 @@ namespace Seam.Model { - /// - /// Represents a hardware device that encodes [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: - /// - /// 1. Credential creation - /// Configure the access parameters for the credential. - /// 2. Card encoding - /// Write the credential data onto the card using a compatible card encoder. - /// - /// Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. - /// - /// See [Working with Card Encoders and Scanners](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - /// To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). - /// - [DataContract(Name = "seamModel_acsEncoder_model")] - public class AcsEncoder - { - [JsonConstructorAttribute] - protected AcsEncoder() { } - - public AcsEncoder( - string acsEncoderId = default, - string acsSystemId = default, - string connectedAccountId = default, - string createdAt = default, - string displayName = default, - List errors = default, - string workspaceId = default - ) - { - AcsEncoderId = acsEncoderId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DisplayName = displayName; - Errors = errors; - WorkspaceId = workspaceId; - } - - /// - /// ID of the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - [DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - /// - /// ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name for the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Errors associated with the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// ID of the workspace that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEncoderErrors_model")] - public class AcsEncoderErrors - { - [JsonConstructorAttribute] - protected AcsEncoderErrors() { } - - public AcsEncoderErrors( - string createdAt = default, - AcsEncoderErrors.ErrorCodeEnum errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ErrorCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "acs_encoder_removed")] - AcsEncoderRemoved = 1, - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public AcsEncoderErrors.ErrorCodeEnum ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a hardware device that encodes [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: +/// +/// 1. Credential creation +/// Configure the access parameters for the credential. +/// 2. Card encoding +/// Write the credential data onto the card using a compatible card encoder. +/// +/// Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. +/// +/// See [Working with Card Encoders and Scanners](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +/// To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). +/// +[DataContract(Name = "seamModel_acsEncoder_model")] +public class AcsEncoder +{ +[JsonConstructorAttribute] +protected AcsEncoder() { } + +public AcsEncoder(string acsEncoderId = default, string acsSystemId = default, string connectedAccountId = default, string createdAt = default, string displayName = default, List errors = default, string workspaceId = default) +{ +AcsEncoderId = acsEncoderId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DisplayName = displayName; +Errors = errors; +WorkspaceId = workspaceId; +} + +/// +/// ID of the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +[DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +/// +/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name for the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Errors associated with the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// ID of the workspace that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEncoderErrors_model")] +public class AcsEncoderErrors +{ +[JsonConstructorAttribute] +protected AcsEncoderErrors() { } + +public AcsEncoderErrors(string createdAt = default, AcsEncoderErrors.ErrorCodeEnum errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ErrorCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "acs_encoder_removed")] +AcsEncoderRemoved = 1, +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public AcsEncoderErrors.ErrorCodeEnum ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/AcsEntrance.cs b/src/Seam/Model/AcsEntrance.cs index 26ce81fd..d754ab2c 100644 --- a/src/Seam/Model/AcsEntrance.cs +++ b/src/Seam/Model/AcsEntrance.cs @@ -8,1531 +8,1370 @@ namespace Seam.Model { - /// - /// Represents an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. - /// - [DataContract(Name = "seamModel_acsEntrance_model")] - public class AcsEntrance - { - [JsonConstructorAttribute] - protected AcsEntrance() { } - - public AcsEntrance( - string acsEntranceId = default, - string acsSystemId = default, - AcsEntranceAkilesMetadata? akilesMetadata = default, - AcsEntranceAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, - AcsEntranceAvigilonAltaMetadata? avigilonAltaMetadata = default, - AcsEntranceBrivoMetadata? brivoMetadata = default, - bool? canBelongToReservation = default, - bool? canUnlockWithCard = default, - bool? canUnlockWithCloudKey = default, - bool? canUnlockWithCode = default, - bool? canUnlockWithMobileKey = default, - string connectedAccountId = default, - string createdAt = default, - string displayName = default, - AcsEntranceDormakabaAmbianceMetadata? dormakabaAmbianceMetadata = default, - AcsEntranceDormakabaCommunityMetadata? dormakabaCommunityMetadata = default, - List errors = default, - AcsEntranceHotekMetadata? hotekMetadata = default, - bool? isLocked = default, - AcsEntranceLatchMetadata? latchMetadata = default, - AcsEntranceSaltoKsMetadata? saltoKsMetadata = default, - AcsEntranceSaltoSpaceMetadata? saltoSpaceMetadata = default, - List spaceIds = default, - AcsEntranceVisionlineMetadata? visionlineMetadata = default, - List warnings = default - ) - { - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - AkilesMetadata = akilesMetadata; - AssaAbloyVostioMetadata = assaAbloyVostioMetadata; - AvigilonAltaMetadata = avigilonAltaMetadata; - BrivoMetadata = brivoMetadata; - CanBelongToReservation = canBelongToReservation; - CanUnlockWithCard = canUnlockWithCard; - CanUnlockWithCloudKey = canUnlockWithCloudKey; - CanUnlockWithCode = canUnlockWithCode; - CanUnlockWithMobileKey = canUnlockWithMobileKey; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DisplayName = displayName; - DormakabaAmbianceMetadata = dormakabaAmbianceMetadata; - DormakabaCommunityMetadata = dormakabaCommunityMetadata; - Errors = errors; - HotekMetadata = hotekMetadata; - IsLocked = isLocked; - LatchMetadata = latchMetadata; - SaltoKsMetadata = saltoKsMetadata; - SaltoSpaceMetadata = saltoSpaceMetadata; - SpaceIds = spaceIds; - VisionlineMetadata = visionlineMetadata; - Warnings = warnings; - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsEntranceWarningsUnrecognized))] - [JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsPrivacyMode), "privacy_mode")] - [JsonSubtypes.KnownSubType( - typeof(AcsEntranceWarningsSaltoKsPrivacyMode), - "salto_ks_privacy_mode" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsEntranceWarningsEntranceSetupRequired), - "entrance_setup_required" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsEntranceWarningsEntranceSharesZone), - "entrance_shares_zone" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved), - "salto_ks_entrance_access_code_support_removed" - )] - public abstract class AcsEntranceWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract( - Name = "seamModel_acsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved_model" - )] - public class AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved - : AcsEntranceWarnings - { - [JsonConstructorAttribute] - protected AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved() { } - - public AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "salto_ks_entrance_access_code_support_removed"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceWarningsEntranceSharesZone_model")] - public class AcsEntranceWarningsEntranceSharesZone : AcsEntranceWarnings - { - [JsonConstructorAttribute] - protected AcsEntranceWarningsEntranceSharesZone() { } - - public AcsEntranceWarningsEntranceSharesZone( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "entrance_shares_zone"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceWarningsEntranceSetupRequired_model")] - public class AcsEntranceWarningsEntranceSetupRequired : AcsEntranceWarnings - { - [JsonConstructorAttribute] - protected AcsEntranceWarningsEntranceSetupRequired() { } - - public AcsEntranceWarningsEntranceSetupRequired( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "entrance_setup_required"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceWarningsSaltoKsPrivacyMode_model")] - public class AcsEntranceWarningsSaltoKsPrivacyMode : AcsEntranceWarnings - { - [JsonConstructorAttribute] - protected AcsEntranceWarningsSaltoKsPrivacyMode() { } - - public AcsEntranceWarningsSaltoKsPrivacyMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "salto_ks_privacy_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceWarningsPrivacyMode_model")] - public class AcsEntranceWarningsPrivacyMode : AcsEntranceWarnings - { - [JsonConstructorAttribute] - protected AcsEntranceWarningsPrivacyMode() { } - - public AcsEntranceWarningsPrivacyMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "privacy_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceWarningsUnrecognized_model")] - public class AcsEntranceWarningsUnrecognized : AcsEntranceWarnings - { - [JsonConstructorAttribute] - protected AcsEntranceWarningsUnrecognized() { } - - public AcsEntranceWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// ID of the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - /// - /// ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// Akiles-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceAkilesMetadata? AkilesMetadata { get; set; } - - /// - /// ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember( - Name = "assa_abloy_vostio_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public AcsEntranceAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - - /// - /// Avigilon Alta-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "avigilon_alta_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceAvigilonAltaMetadata? AvigilonAltaMetadata { get; set; } - - /// - /// Brivo-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "brivo_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceBrivoMetadata? BrivoMetadata { get; set; } - - /// - /// Indicates whether the ACS entrance can belong to a reservation via an access_grant.reservation_key. - /// - [DataMember( - Name = "can_belong_to_reservation", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanBelongToReservation { get; set; } - - /// - /// Indicates whether the ACS entrance can be unlocked with card credentials. - /// - [DataMember(Name = "can_unlock_with_card", IsRequired = false, EmitDefaultValue = false)] - public bool? CanUnlockWithCard { get; set; } - - /// - /// Indicates whether the ACS entrance can be unlocked with cloud key credentials. - /// - [DataMember( - Name = "can_unlock_with_cloud_key", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanUnlockWithCloudKey { get; set; } - - /// - /// Indicates whether the ACS entrance can be unlocked with pin codes. - /// - [DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] - public bool? CanUnlockWithCode { get; set; } - - /// - /// Indicates whether the ACS entrance can be unlocked with mobile key credentials. - /// - [DataMember( - Name = "can_unlock_with_mobile_key", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanUnlockWithMobileKey { get; set; } - - /// - /// ID of the [connected account](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name for the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// dormakaba Ambiance-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember( - Name = "dormakaba_ambiance_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public AcsEntranceDormakabaAmbianceMetadata? DormakabaAmbianceMetadata { get; set; } - - /// - /// dormakaba Community-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember( - Name = "dormakaba_community_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public AcsEntranceDormakabaCommunityMetadata? DormakabaCommunityMetadata { get; set; } - - /// - /// Errors associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Hotek-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceHotekMetadata? HotekMetadata { get; set; } - - /// - /// Indicates whether the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) is currently locked. - /// - [DataMember(Name = "is_locked", IsRequired = false, EmitDefaultValue = false)] - public bool? IsLocked { get; set; } - - /// - /// Latch-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "latch_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceLatchMetadata? LatchMetadata { get; set; } - - /// - /// Salto KS-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceSaltoKsMetadata? SaltoKsMetadata { get; set; } - - /// - /// Salto Space-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } - - /// - /// IDs of the spaces that the entrance is in. - /// - [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] - public List SpaceIds { get; set; } - - /// - /// Visionline-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceVisionlineMetadata? VisionlineMetadata { get; set; } - - /// - /// Warnings associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceAkilesMetadata_model")] - public class AcsEntranceAkilesMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceAkilesMetadata() { } - - public AcsEntranceAkilesMetadata( - List? actions = default, - string? gadgetId = default, - string? siteId = default, - string? siteName = default - ) - { - Actions = actions; - GadgetId = gadgetId; - SiteId = siteId; - SiteName = siteName; - } - - /// - /// Actions the gadget exposes (for example, open). - /// - [DataMember(Name = "actions", IsRequired = false, EmitDefaultValue = false)] - public List? Actions { get; set; } - - /// - /// ID of the Akiles gadget. - /// - [DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] - public string? GadgetId { get; set; } - - /// - /// ID of the Akiles site the gadget belongs to. - /// - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public string? SiteId { get; set; } - - /// - /// Name of the Akiles site the gadget belongs to. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceAkilesMetadataActions_model")] - public class AcsEntranceAkilesMetadataActions - { - [JsonConstructorAttribute] - protected AcsEntranceAkilesMetadataActions() { } - - public AcsEntranceAkilesMetadataActions(string? id = default, string? name = default) - { - Id = id; - Name = name; - } - - /// - /// ID of the gadget action. - /// - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string? Id { get; set; } - - /// - /// Name of the gadget action. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceAssaAbloyVostioMetadata_model")] - public class AcsEntranceAssaAbloyVostioMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceAssaAbloyVostioMetadata() { } - - public AcsEntranceAssaAbloyVostioMetadata( - string? doorName = default, - float? doorNumber = default, - AcsEntranceAssaAbloyVostioMetadata.DoorTypeEnum? doorType = default, - string? pmsId = default, - bool? standOpen = default - ) - { - DoorName = doorName; - DoorNumber = doorNumber; - DoorType = doorType; - PmsId = pmsId; - StandOpen = standOpen; - } - - /// - /// Type of the door in the Vostio access system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DoorTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "CommonDoor")] - CommonDoor = 1, - - [EnumMember(Value = "EntranceDoor")] - EntranceDoor = 2, - - [EnumMember(Value = "GuestDoor")] - GuestDoor = 3, - - [EnumMember(Value = "Elevator")] - Elevator = 4, - } - - /// - /// Name of the door in the Vostio access system. - /// - [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] - public string? DoorName { get; set; } - - /// - /// Number of the door in the Vostio access system. - /// - [DataMember(Name = "door_number", IsRequired = false, EmitDefaultValue = false)] - public float? DoorNumber { get; set; } - - /// - /// Type of the door in the Vostio access system. - /// - [DataMember(Name = "door_type", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceAssaAbloyVostioMetadata.DoorTypeEnum? DoorType { get; set; } - - /// - /// PMS ID of the door in the Vostio access system. - /// - [DataMember(Name = "pms_id", IsRequired = false, EmitDefaultValue = false)] - public string? PmsId { get; set; } - - /// - /// Indicates whether keys are allowed to set the door in stand open mode in the Vostio access system. - /// - [DataMember(Name = "stand_open", IsRequired = false, EmitDefaultValue = false)] - public bool? StandOpen { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceAvigilonAltaMetadata_model")] - public class AcsEntranceAvigilonAltaMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceAvigilonAltaMetadata() { } - - public AcsEntranceAvigilonAltaMetadata( - string? entryName = default, - float? entryRelaysTotalCount = default, - string? orgName = default, - float? siteId = default, - string? siteName = default, - float? zoneId = default, - string? zoneName = default - ) - { - EntryName = entryName; - EntryRelaysTotalCount = entryRelaysTotalCount; - OrgName = orgName; - SiteId = siteId; - SiteName = siteName; - ZoneId = zoneId; - ZoneName = zoneName; - } - - /// - /// Entry name for an Avigilon Alta system. - /// - [DataMember(Name = "entry_name", IsRequired = false, EmitDefaultValue = false)] - public string? EntryName { get; set; } - - /// - /// Total count of entry relays for an Avigilon Alta system. - /// - [DataMember( - Name = "entry_relays_total_count", - IsRequired = false, - EmitDefaultValue = false - )] - public float? EntryRelaysTotalCount { get; set; } - - /// - /// Organization name for an Avigilon Alta system. - /// - [DataMember(Name = "org_name", IsRequired = false, EmitDefaultValue = false)] - public string? OrgName { get; set; } - - /// - /// Site ID for an Avigilon Alta system. - /// - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public float? SiteId { get; set; } - - /// - /// Site name for an Avigilon Alta system. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - /// - /// Zone ID for an Avigilon Alta system. - /// - [DataMember(Name = "zone_id", IsRequired = false, EmitDefaultValue = false)] - public float? ZoneId { get; set; } - - /// - /// Zone name for an Avigilon Alta system. - /// - [DataMember(Name = "zone_name", IsRequired = false, EmitDefaultValue = false)] - public string? ZoneName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceBrivoMetadata_model")] - public class AcsEntranceBrivoMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceBrivoMetadata() { } - - public AcsEntranceBrivoMetadata( - string? accessPointId = default, - float? siteId = default, - string? siteName = default - ) - { - AccessPointId = accessPointId; - SiteId = siteId; - SiteName = siteName; - } - - /// - /// ID of the access point in the Brivo access system. - /// - [DataMember(Name = "access_point_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessPointId { get; set; } - - /// - /// ID of the site that the access point belongs to. - /// - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public float? SiteId { get; set; } - - /// - /// Name of the site that the access point belongs to. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceDormakabaAmbianceMetadata_model")] - public class AcsEntranceDormakabaAmbianceMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceDormakabaAmbianceMetadata() { } - - public AcsEntranceDormakabaAmbianceMetadata(string? accessPointName = default) - { - AccessPointName = accessPointName; - } - - /// - /// Name of the access point in the dormakaba Ambiance access system. - /// - [DataMember(Name = "access_point_name", IsRequired = false, EmitDefaultValue = false)] - public string? AccessPointName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceDormakabaCommunityMetadata_model")] - public class AcsEntranceDormakabaCommunityMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceDormakabaCommunityMetadata() { } - - public AcsEntranceDormakabaCommunityMetadata(string? accessPointProfile = default) - { - AccessPointProfile = accessPointProfile; - } - - /// - /// Type of access point profile in the dormakaba Community access system. - /// - [DataMember(Name = "access_point_profile", IsRequired = false, EmitDefaultValue = false)] - public string? AccessPointProfile { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceErrors_model")] - public class AcsEntranceErrors - { - [JsonConstructorAttribute] - protected AcsEntranceErrors() { } - - public AcsEntranceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceHotekMetadata_model")] - public class AcsEntranceHotekMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceHotekMetadata() { } - - public AcsEntranceHotekMetadata( - string? commonAreaName = default, - string? commonAreaNumber = default, - string? roomNumber = default - ) - { - CommonAreaName = commonAreaName; - CommonAreaNumber = commonAreaNumber; - RoomNumber = roomNumber; - } - - /// - /// Display name of the entrance. - /// - [DataMember(Name = "common_area_name", IsRequired = false, EmitDefaultValue = false)] - public string? CommonAreaName { get; set; } - - /// - /// Display name of the entrance. - /// - [DataMember(Name = "common_area_number", IsRequired = false, EmitDefaultValue = false)] - public string? CommonAreaNumber { get; set; } - - /// - /// Room number of the entrance. - /// - [DataMember(Name = "room_number", IsRequired = false, EmitDefaultValue = false)] - public string? RoomNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceLatchMetadata_model")] - public class AcsEntranceLatchMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceLatchMetadata() { } - - public AcsEntranceLatchMetadata( - string? accessibilityType = default, - string? doorName = default, - string? doorType = default, - bool? isConnected = default - ) - { - AccessibilityType = accessibilityType; - DoorName = doorName; - DoorType = doorType; - IsConnected = isConnected; - } - - /// - /// Accessibility type in the Latch access system. - /// - [DataMember(Name = "accessibility_type", IsRequired = false, EmitDefaultValue = false)] - public string? AccessibilityType { get; set; } - - /// - /// Name of the door in the Latch access system. - /// - [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] - public string? DoorName { get; set; } - - /// - /// Type of the door in the Latch access system. - /// - [DataMember(Name = "door_type", IsRequired = false, EmitDefaultValue = false)] - public string? DoorType { get; set; } - - /// - /// Indicates whether the entrance is connected. - /// - [DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] - public bool? IsConnected { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceSaltoKsMetadata_model")] - public class AcsEntranceSaltoKsMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceSaltoKsMetadata() { } - - public AcsEntranceSaltoKsMetadata( - string? batteryLevel = default, - string? doorName = default, - bool? intrusionAlarm = default, - bool? leftOpenAlarm = default, - string? lockType = default, - string? lockedState = default, - bool? online = default, - bool? privacyMode = default - ) - { - BatteryLevel = batteryLevel; - DoorName = doorName; - IntrusionAlarm = intrusionAlarm; - LeftOpenAlarm = leftOpenAlarm; - LockType = lockType; - LockedState = lockedState; - Online = online; - PrivacyMode = privacyMode; - } - - /// - /// Battery level of the door access device. - /// - [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] - public string? BatteryLevel { get; set; } - - /// - /// Name of the door in the Salto KS access system. - /// - [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] - public string? DoorName { get; set; } - - /// - /// Indicates whether an intrusion alarm is active on the door. - /// - [DataMember(Name = "intrusion_alarm", IsRequired = false, EmitDefaultValue = false)] - public bool? IntrusionAlarm { get; set; } - - /// - /// Indicates whether the door is left open. - /// - [DataMember(Name = "left_open_alarm", IsRequired = false, EmitDefaultValue = false)] - public bool? LeftOpenAlarm { get; set; } - - /// - /// Type of the lock in the Salto KS access system. - /// - [DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] - public string? LockType { get; set; } - - /// - /// Locked state of the door in the Salto KS access system. - /// - [DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] - public string? LockedState { get; set; } - - /// - /// Indicates whether the door access device is online. - /// - [DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] - public bool? Online { get; set; } - - /// - /// Indicates whether privacy mode is enabled for the lock. - /// - [DataMember(Name = "privacy_mode", IsRequired = false, EmitDefaultValue = false)] - public bool? PrivacyMode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceSaltoSpaceMetadata_model")] - public class AcsEntranceSaltoSpaceMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceSaltoSpaceMetadata() { } - - public AcsEntranceSaltoSpaceMetadata( - bool? auditOnKeys = default, - string? doorDescription = default, - string? doorId = default, - string? doorName = default, - string? roomDescription = default, - string? roomName = default - ) - { - AuditOnKeys = auditOnKeys; - DoorDescription = doorDescription; - DoorId = doorId; - DoorName = doorName; - RoomDescription = roomDescription; - RoomName = roomName; - } - - /// - /// Indicates whether AuditOnKeys is enabled for the door in the Salto Space access system. - /// - [DataMember(Name = "audit_on_keys", IsRequired = false, EmitDefaultValue = false)] - public bool? AuditOnKeys { get; set; } - - /// - /// Description of the door in the Salto Space access system. - /// - [DataMember(Name = "door_description", IsRequired = false, EmitDefaultValue = false)] - public string? DoorDescription { get; set; } - - /// - /// Door ID in the Salto Space access system. - /// - [DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] - public string? DoorId { get; set; } - - /// - /// Name of the door in the Salto Space access system. - /// - [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] - public string? DoorName { get; set; } - - /// - /// Description of the room in the Salto Space access system. - /// - [DataMember(Name = "room_description", IsRequired = false, EmitDefaultValue = false)] - public string? RoomDescription { get; set; } - - /// - /// Name of the room in the Salto Space access system. - /// - [DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] - public string? RoomName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceVisionlineMetadata_model")] - public class AcsEntranceVisionlineMetadata - { - [JsonConstructorAttribute] - protected AcsEntranceVisionlineMetadata() { } - - public AcsEntranceVisionlineMetadata( - AcsEntranceVisionlineMetadata.DoorCategoryEnum? doorCategory = default, - string? doorName = default, - List? profiles = default - ) - { - DoorCategory = doorCategory; - DoorName = doorName; - Profiles = profiles; - } - - /// - /// Category of the door in the Visionline access system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DoorCategoryEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "entrance")] - Entrance = 1, - - [EnumMember(Value = "guest")] - Guest = 2, - - [EnumMember(Value = "elevator reader")] - ElevatorReader = 3, - - [EnumMember(Value = "common")] - Common = 4, - - [EnumMember(Value = "common (PMS)")] - CommonPms = 5, - } - - /// - /// Category of the door in the Visionline access system. - /// - [DataMember(Name = "door_category", IsRequired = false, EmitDefaultValue = false)] - public AcsEntranceVisionlineMetadata.DoorCategoryEnum? DoorCategory { get; set; } - - /// - /// Name of the door in the Visionline access system. - /// - [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] - public string? DoorName { get; set; } - - /// - /// Profile for the door in the Visionline access system. - /// - [DataMember(Name = "profiles", IsRequired = false, EmitDefaultValue = false)] - public List? Profiles { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsEntranceVisionlineMetadataProfiles_model")] - public class AcsEntranceVisionlineMetadataProfiles - { - [JsonConstructorAttribute] - protected AcsEntranceVisionlineMetadataProfiles() { } - - public AcsEntranceVisionlineMetadataProfiles( - string? visionlineDoorProfileId = default, - AcsEntranceVisionlineMetadataProfiles.VisionlineDoorProfileTypeEnum? visionlineDoorProfileType = - default - ) - { - VisionlineDoorProfileId = visionlineDoorProfileId; - VisionlineDoorProfileType = visionlineDoorProfileType; - } - - /// - /// Door profile type in the Visionline access system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum VisionlineDoorProfileTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "BLE")] - Ble = 1, - - [EnumMember(Value = "commonDoor")] - CommonDoor = 2, - - [EnumMember(Value = "touch")] - Touch = 3, - } - - /// - /// Door profile ID in the Visionline access system. - /// - [DataMember( - Name = "visionline_door_profile_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? VisionlineDoorProfileId { get; set; } - - /// - /// Door profile type in the Visionline access system. - /// - [DataMember( - Name = "visionline_door_profile_type", - IsRequired = false, - EmitDefaultValue = false - )] - public AcsEntranceVisionlineMetadataProfiles.VisionlineDoorProfileTypeEnum? VisionlineDoorProfileType { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. +/// +[DataContract(Name = "seamModel_acsEntrance_model")] +public class AcsEntrance +{ +[JsonConstructorAttribute] +protected AcsEntrance() { } + +public AcsEntrance(string acsEntranceId = default, string acsSystemId = default, AcsEntranceAkilesMetadata? akilesMetadata = default, AcsEntranceAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, AcsEntranceAvigilonAltaMetadata? avigilonAltaMetadata = default, AcsEntranceBrivoMetadata? brivoMetadata = default, bool? canBelongToReservation = default, bool? canUnlockWithCard = default, bool? canUnlockWithCloudKey = default, bool? canUnlockWithCode = default, bool? canUnlockWithMobileKey = default, string connectedAccountId = default, string createdAt = default, string displayName = default, AcsEntranceDormakabaAmbianceMetadata? dormakabaAmbianceMetadata = default, AcsEntranceDormakabaCommunityMetadata? dormakabaCommunityMetadata = default, List errors = default, AcsEntranceHotekMetadata? hotekMetadata = default, bool? isLocked = default, AcsEntranceLatchMetadata? latchMetadata = default, AcsEntranceSaltoKsMetadata? saltoKsMetadata = default, AcsEntranceSaltoSpaceMetadata? saltoSpaceMetadata = default, List spaceIds = default, AcsEntranceVisionlineMetadata? visionlineMetadata = default, List warnings = default) +{ +AcsEntranceId = acsEntranceId; +AcsSystemId = acsSystemId; +AkilesMetadata = akilesMetadata; +AssaAbloyVostioMetadata = assaAbloyVostioMetadata; +AvigilonAltaMetadata = avigilonAltaMetadata; +BrivoMetadata = brivoMetadata; +CanBelongToReservation = canBelongToReservation; +CanUnlockWithCard = canUnlockWithCard; +CanUnlockWithCloudKey = canUnlockWithCloudKey; +CanUnlockWithCode = canUnlockWithCode; +CanUnlockWithMobileKey = canUnlockWithMobileKey; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DisplayName = displayName; +DormakabaAmbianceMetadata = dormakabaAmbianceMetadata; +DormakabaCommunityMetadata = dormakabaCommunityMetadata; +Errors = errors; +HotekMetadata = hotekMetadata; +IsLocked = isLocked; +LatchMetadata = latchMetadata; +SaltoKsMetadata = saltoKsMetadata; +SaltoSpaceMetadata = saltoSpaceMetadata; +SpaceIds = spaceIds; +VisionlineMetadata = visionlineMetadata; +Warnings = warnings; +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsEntranceWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsPrivacyMode), "privacy_mode")] +[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsSaltoKsPrivacyMode), "salto_ks_privacy_mode")] +[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsEntranceSetupRequired), "entrance_setup_required")] +[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsEntranceSharesZone), "entrance_shares_zone")] +[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved), "salto_ks_entrance_access_code_support_removed")] +public abstract class AcsEntranceWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved_model")] +public class AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved : AcsEntranceWarnings +{ +[JsonConstructorAttribute] +protected AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved() { } + +public AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_entrance_access_code_support_removed"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceWarningsEntranceSharesZone_model")] +public class AcsEntranceWarningsEntranceSharesZone : AcsEntranceWarnings +{ +[JsonConstructorAttribute] +protected AcsEntranceWarningsEntranceSharesZone() { } + +public AcsEntranceWarningsEntranceSharesZone(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "entrance_shares_zone"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceWarningsEntranceSetupRequired_model")] +public class AcsEntranceWarningsEntranceSetupRequired : AcsEntranceWarnings +{ +[JsonConstructorAttribute] +protected AcsEntranceWarningsEntranceSetupRequired() { } + +public AcsEntranceWarningsEntranceSetupRequired(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "entrance_setup_required"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceWarningsSaltoKsPrivacyMode_model")] +public class AcsEntranceWarningsSaltoKsPrivacyMode : AcsEntranceWarnings +{ +[JsonConstructorAttribute] +protected AcsEntranceWarningsSaltoKsPrivacyMode() { } + +public AcsEntranceWarningsSaltoKsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_privacy_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceWarningsPrivacyMode_model")] +public class AcsEntranceWarningsPrivacyMode : AcsEntranceWarnings +{ +[JsonConstructorAttribute] +protected AcsEntranceWarningsPrivacyMode() { } + +public AcsEntranceWarningsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "privacy_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceWarningsUnrecognized_model")] +public class AcsEntranceWarningsUnrecognized : AcsEntranceWarnings +{ +[JsonConstructorAttribute] +protected AcsEntranceWarningsUnrecognized() { } + +public AcsEntranceWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// ID of the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +/// +/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// Akiles-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceAkilesMetadata? AkilesMetadata { get; set; } + +/// +/// ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + +/// +/// Avigilon Alta-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "avigilon_alta_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceAvigilonAltaMetadata? AvigilonAltaMetadata { get; set; } + +/// +/// Brivo-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "brivo_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceBrivoMetadata? BrivoMetadata { get; set; } + +/// +/// Indicates whether the ACS entrance can belong to a reservation via an access_grant.reservation_key. +/// +[DataMember(Name = "can_belong_to_reservation", IsRequired = false, EmitDefaultValue = false)] +public bool? CanBelongToReservation { get; set; } + +/// +/// Indicates whether the ACS entrance can be unlocked with card credentials. +/// +[DataMember(Name = "can_unlock_with_card", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUnlockWithCard { get; set; } + +/// +/// Indicates whether the ACS entrance can be unlocked with cloud key credentials. +/// +[DataMember(Name = "can_unlock_with_cloud_key", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUnlockWithCloudKey { get; set; } + +/// +/// Indicates whether the ACS entrance can be unlocked with pin codes. +/// +[DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUnlockWithCode { get; set; } + +/// +/// Indicates whether the ACS entrance can be unlocked with mobile key credentials. +/// +[DataMember(Name = "can_unlock_with_mobile_key", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUnlockWithMobileKey { get; set; } + +/// +/// ID of the [connected account](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name for the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// dormakaba Ambiance-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "dormakaba_ambiance_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceDormakabaAmbianceMetadata? DormakabaAmbianceMetadata { get; set; } + +/// +/// dormakaba Community-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "dormakaba_community_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceDormakabaCommunityMetadata? DormakabaCommunityMetadata { get; set; } + +/// +/// Errors associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Hotek-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceHotekMetadata? HotekMetadata { get; set; } + +/// +/// Indicates whether the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) is currently locked. +/// +[DataMember(Name = "is_locked", IsRequired = false, EmitDefaultValue = false)] +public bool? IsLocked { get; set; } + +/// +/// Latch-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "latch_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceLatchMetadata? LatchMetadata { get; set; } + +/// +/// Salto KS-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceSaltoKsMetadata? SaltoKsMetadata { get; set; } + +/// +/// Salto Space-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } + +/// +/// IDs of the spaces that the entrance is in. +/// +[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] +public List SpaceIds { get; set; } + +/// +/// Visionline-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceVisionlineMetadata? VisionlineMetadata { get; set; } + +/// +/// Warnings associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceAkilesMetadata_model")] +public class AcsEntranceAkilesMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceAkilesMetadata() { } + +public AcsEntranceAkilesMetadata(List? actions = default, string? gadgetId = default, string? siteId = default, string? siteName = default) +{ +Actions = actions; +GadgetId = gadgetId; +SiteId = siteId; +SiteName = siteName; +} + +/// +/// Actions the gadget exposes (for example, open). +/// +[DataMember(Name = "actions", IsRequired = false, EmitDefaultValue = false)] +public List? Actions { get; set; } + +/// +/// ID of the Akiles gadget. +/// +[DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] +public string? GadgetId { get; set; } + +/// +/// ID of the Akiles site the gadget belongs to. +/// +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public string? SiteId { get; set; } + +/// +/// Name of the Akiles site the gadget belongs to. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceAkilesMetadataActions_model")] +public class AcsEntranceAkilesMetadataActions +{ +[JsonConstructorAttribute] +protected AcsEntranceAkilesMetadataActions() { } + +public AcsEntranceAkilesMetadataActions(string? id = default, string? name = default) +{ +Id = id; +Name = name; +} + +/// +/// ID of the gadget action. +/// +[DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] +public string? Id { get; set; } + +/// +/// Name of the gadget action. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceAssaAbloyVostioMetadata_model")] +public class AcsEntranceAssaAbloyVostioMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceAssaAbloyVostioMetadata() { } + +public AcsEntranceAssaAbloyVostioMetadata(string? doorName = default, float? doorNumber = default, AcsEntranceAssaAbloyVostioMetadata.DoorTypeEnum? doorType = default, string? pmsId = default, bool? standOpen = default) +{ +DoorName = doorName; +DoorNumber = doorNumber; +DoorType = doorType; +PmsId = pmsId; +StandOpen = standOpen; +} + +/// +/// Type of the door in the Vostio access system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DoorTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "CommonDoor")] +CommonDoor = 1, + +[EnumMember(Value = "EntranceDoor")] +EntranceDoor = 2, + +[EnumMember(Value = "GuestDoor")] +GuestDoor = 3, + +[EnumMember(Value = "Elevator")] +Elevator = 4, +} + +/// +/// Name of the door in the Vostio access system. +/// +[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] +public string? DoorName { get; set; } + +/// +/// Number of the door in the Vostio access system. +/// +[DataMember(Name = "door_number", IsRequired = false, EmitDefaultValue = false)] +public float? DoorNumber { get; set; } + +/// +/// Type of the door in the Vostio access system. +/// +[DataMember(Name = "door_type", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceAssaAbloyVostioMetadata.DoorTypeEnum? DoorType { get; set; } + +/// +/// PMS ID of the door in the Vostio access system. +/// +[DataMember(Name = "pms_id", IsRequired = false, EmitDefaultValue = false)] +public string? PmsId { get; set; } + +/// +/// Indicates whether keys are allowed to set the door in stand open mode in the Vostio access system. +/// +[DataMember(Name = "stand_open", IsRequired = false, EmitDefaultValue = false)] +public bool? StandOpen { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceAvigilonAltaMetadata_model")] +public class AcsEntranceAvigilonAltaMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceAvigilonAltaMetadata() { } + +public AcsEntranceAvigilonAltaMetadata(string? entryName = default, float? entryRelaysTotalCount = default, string? orgName = default, float? siteId = default, string? siteName = default, float? zoneId = default, string? zoneName = default) +{ +EntryName = entryName; +EntryRelaysTotalCount = entryRelaysTotalCount; +OrgName = orgName; +SiteId = siteId; +SiteName = siteName; +ZoneId = zoneId; +ZoneName = zoneName; +} + +/// +/// Entry name for an Avigilon Alta system. +/// +[DataMember(Name = "entry_name", IsRequired = false, EmitDefaultValue = false)] +public string? EntryName { get; set; } + +/// +/// Total count of entry relays for an Avigilon Alta system. +/// +[DataMember(Name = "entry_relays_total_count", IsRequired = false, EmitDefaultValue = false)] +public float? EntryRelaysTotalCount { get; set; } + +/// +/// Organization name for an Avigilon Alta system. +/// +[DataMember(Name = "org_name", IsRequired = false, EmitDefaultValue = false)] +public string? OrgName { get; set; } + +/// +/// Site ID for an Avigilon Alta system. +/// +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public float? SiteId { get; set; } + +/// +/// Site name for an Avigilon Alta system. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +/// +/// Zone ID for an Avigilon Alta system. +/// +[DataMember(Name = "zone_id", IsRequired = false, EmitDefaultValue = false)] +public float? ZoneId { get; set; } + +/// +/// Zone name for an Avigilon Alta system. +/// +[DataMember(Name = "zone_name", IsRequired = false, EmitDefaultValue = false)] +public string? ZoneName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceBrivoMetadata_model")] +public class AcsEntranceBrivoMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceBrivoMetadata() { } + +public AcsEntranceBrivoMetadata(string? accessPointId = default, float? siteId = default, string? siteName = default) +{ +AccessPointId = accessPointId; +SiteId = siteId; +SiteName = siteName; +} + +/// +/// ID of the access point in the Brivo access system. +/// +[DataMember(Name = "access_point_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessPointId { get; set; } + +/// +/// ID of the site that the access point belongs to. +/// +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public float? SiteId { get; set; } + +/// +/// Name of the site that the access point belongs to. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceDormakabaAmbianceMetadata_model")] +public class AcsEntranceDormakabaAmbianceMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceDormakabaAmbianceMetadata() { } + +public AcsEntranceDormakabaAmbianceMetadata(string? accessPointName = default) +{ +AccessPointName = accessPointName; +} + +/// +/// Name of the access point in the dormakaba Ambiance access system. +/// +[DataMember(Name = "access_point_name", IsRequired = false, EmitDefaultValue = false)] +public string? AccessPointName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceDormakabaCommunityMetadata_model")] +public class AcsEntranceDormakabaCommunityMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceDormakabaCommunityMetadata() { } + +public AcsEntranceDormakabaCommunityMetadata(string? accessPointProfile = default) +{ +AccessPointProfile = accessPointProfile; +} + +/// +/// Type of access point profile in the dormakaba Community access system. +/// +[DataMember(Name = "access_point_profile", IsRequired = false, EmitDefaultValue = false)] +public string? AccessPointProfile { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceErrors_model")] +public class AcsEntranceErrors +{ +[JsonConstructorAttribute] +protected AcsEntranceErrors() { } + +public AcsEntranceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceHotekMetadata_model")] +public class AcsEntranceHotekMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceHotekMetadata() { } + +public AcsEntranceHotekMetadata(string? commonAreaName = default, string? commonAreaNumber = default, string? roomNumber = default) +{ +CommonAreaName = commonAreaName; +CommonAreaNumber = commonAreaNumber; +RoomNumber = roomNumber; +} + +/// +/// Display name of the entrance. +/// +[DataMember(Name = "common_area_name", IsRequired = false, EmitDefaultValue = false)] +public string? CommonAreaName { get; set; } + +/// +/// Display name of the entrance. +/// +[DataMember(Name = "common_area_number", IsRequired = false, EmitDefaultValue = false)] +public string? CommonAreaNumber { get; set; } + +/// +/// Room number of the entrance. +/// +[DataMember(Name = "room_number", IsRequired = false, EmitDefaultValue = false)] +public string? RoomNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceLatchMetadata_model")] +public class AcsEntranceLatchMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceLatchMetadata() { } + +public AcsEntranceLatchMetadata(string? accessibilityType = default, string? doorName = default, string? doorType = default, bool? isConnected = default) +{ +AccessibilityType = accessibilityType; +DoorName = doorName; +DoorType = doorType; +IsConnected = isConnected; +} + +/// +/// Accessibility type in the Latch access system. +/// +[DataMember(Name = "accessibility_type", IsRequired = false, EmitDefaultValue = false)] +public string? AccessibilityType { get; set; } + +/// +/// Name of the door in the Latch access system. +/// +[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] +public string? DoorName { get; set; } + +/// +/// Type of the door in the Latch access system. +/// +[DataMember(Name = "door_type", IsRequired = false, EmitDefaultValue = false)] +public string? DoorType { get; set; } + +/// +/// Indicates whether the entrance is connected. +/// +[DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] +public bool? IsConnected { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceSaltoKsMetadata_model")] +public class AcsEntranceSaltoKsMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceSaltoKsMetadata() { } + +public AcsEntranceSaltoKsMetadata(string? batteryLevel = default, string? doorName = default, bool? intrusionAlarm = default, bool? leftOpenAlarm = default, string? lockType = default, string? lockedState = default, bool? online = default, bool? privacyMode = default) +{ +BatteryLevel = batteryLevel; +DoorName = doorName; +IntrusionAlarm = intrusionAlarm; +LeftOpenAlarm = leftOpenAlarm; +LockType = lockType; +LockedState = lockedState; +Online = online; +PrivacyMode = privacyMode; +} + +/// +/// Battery level of the door access device. +/// +[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] +public string? BatteryLevel { get; set; } + +/// +/// Name of the door in the Salto KS access system. +/// +[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] +public string? DoorName { get; set; } + +/// +/// Indicates whether an intrusion alarm is active on the door. +/// +[DataMember(Name = "intrusion_alarm", IsRequired = false, EmitDefaultValue = false)] +public bool? IntrusionAlarm { get; set; } + +/// +/// Indicates whether the door is left open. +/// +[DataMember(Name = "left_open_alarm", IsRequired = false, EmitDefaultValue = false)] +public bool? LeftOpenAlarm { get; set; } + +/// +/// Type of the lock in the Salto KS access system. +/// +[DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] +public string? LockType { get; set; } + +/// +/// Locked state of the door in the Salto KS access system. +/// +[DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] +public string? LockedState { get; set; } + +/// +/// Indicates whether the door access device is online. +/// +[DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] +public bool? Online { get; set; } + +/// +/// Indicates whether privacy mode is enabled for the lock. +/// +[DataMember(Name = "privacy_mode", IsRequired = false, EmitDefaultValue = false)] +public bool? PrivacyMode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceSaltoSpaceMetadata_model")] +public class AcsEntranceSaltoSpaceMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceSaltoSpaceMetadata() { } + +public AcsEntranceSaltoSpaceMetadata(bool? auditOnKeys = default, string? doorDescription = default, string? doorId = default, string? doorName = default, string? roomDescription = default, string? roomName = default) +{ +AuditOnKeys = auditOnKeys; +DoorDescription = doorDescription; +DoorId = doorId; +DoorName = doorName; +RoomDescription = roomDescription; +RoomName = roomName; +} + +/// +/// Indicates whether AuditOnKeys is enabled for the door in the Salto Space access system. +/// +[DataMember(Name = "audit_on_keys", IsRequired = false, EmitDefaultValue = false)] +public bool? AuditOnKeys { get; set; } + +/// +/// Description of the door in the Salto Space access system. +/// +[DataMember(Name = "door_description", IsRequired = false, EmitDefaultValue = false)] +public string? DoorDescription { get; set; } + +/// +/// Door ID in the Salto Space access system. +/// +[DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] +public string? DoorId { get; set; } + +/// +/// Name of the door in the Salto Space access system. +/// +[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] +public string? DoorName { get; set; } + +/// +/// Description of the room in the Salto Space access system. +/// +[DataMember(Name = "room_description", IsRequired = false, EmitDefaultValue = false)] +public string? RoomDescription { get; set; } + +/// +/// Name of the room in the Salto Space access system. +/// +[DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] +public string? RoomName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceVisionlineMetadata_model")] +public class AcsEntranceVisionlineMetadata +{ +[JsonConstructorAttribute] +protected AcsEntranceVisionlineMetadata() { } + +public AcsEntranceVisionlineMetadata(AcsEntranceVisionlineMetadata.DoorCategoryEnum? doorCategory = default, string? doorName = default, List? profiles = default) +{ +DoorCategory = doorCategory; +DoorName = doorName; +Profiles = profiles; +} + +/// +/// Category of the door in the Visionline access system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DoorCategoryEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "entrance")] +Entrance = 1, + +[EnumMember(Value = "guest")] +Guest = 2, + +[EnumMember(Value = "elevator reader")] +ElevatorReader = 3, + +[EnumMember(Value = "common")] +Common = 4, + +[EnumMember(Value = "common (PMS)")] +CommonPms = 5, +} + +/// +/// Category of the door in the Visionline access system. +/// +[DataMember(Name = "door_category", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceVisionlineMetadata.DoorCategoryEnum? DoorCategory { get; set; } + +/// +/// Name of the door in the Visionline access system. +/// +[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] +public string? DoorName { get; set; } + +/// +/// Profile for the door in the Visionline access system. +/// +[DataMember(Name = "profiles", IsRequired = false, EmitDefaultValue = false)] +public List? Profiles { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsEntranceVisionlineMetadataProfiles_model")] +public class AcsEntranceVisionlineMetadataProfiles +{ +[JsonConstructorAttribute] +protected AcsEntranceVisionlineMetadataProfiles() { } + +public AcsEntranceVisionlineMetadataProfiles(string? visionlineDoorProfileId = default, AcsEntranceVisionlineMetadataProfiles.VisionlineDoorProfileTypeEnum? visionlineDoorProfileType = default) +{ +VisionlineDoorProfileId = visionlineDoorProfileId; +VisionlineDoorProfileType = visionlineDoorProfileType; +} + +/// +/// Door profile type in the Visionline access system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum VisionlineDoorProfileTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "BLE")] +Ble = 1, + +[EnumMember(Value = "commonDoor")] +CommonDoor = 2, + +[EnumMember(Value = "touch")] +Touch = 3, +} + +/// +/// Door profile ID in the Visionline access system. +/// +[DataMember(Name = "visionline_door_profile_id", IsRequired = false, EmitDefaultValue = false)] +public string? VisionlineDoorProfileId { get; set; } + +/// +/// Door profile type in the Visionline access system. +/// +[DataMember(Name = "visionline_door_profile_type", IsRequired = false, EmitDefaultValue = false)] +public AcsEntranceVisionlineMetadataProfiles.VisionlineDoorProfileTypeEnum? VisionlineDoorProfileType { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/AcsSystem.cs b/src/Seam/Model/AcsSystem.cs index 364eb5e0..970f03fd 100644 --- a/src/Seam/Model/AcsSystem.cs +++ b/src/Seam/Model/AcsSystem.cs @@ -8,1297 +8,1156 @@ namespace Seam.Model { - /// - /// Represents an [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// Within an `acs_system`, create [`acs_user`s](https://docs.seam.co/api/acs/users/object) and [`acs_credential`s](https://docs.seam.co/api/acs/credentials/object) to grant access to the `acs_user`s. - /// - /// For details about the resources associated with an access control system, see the [access control systems namespace](https://docs.seam.co/api/acs). - /// - [DataContract(Name = "seamModel_acsSystem_model")] - public class AcsSystem - { - [JsonConstructorAttribute] - protected AcsSystem() { } - - public AcsSystem( - float? acsAccessGroupCount = default, - string acsSystemId = default, - float? acsUserCount = default, - string connectedAccountId = default, - List connectedAccountIds = default, - string createdAt = default, - string? defaultCredentialManagerAcsSystemId = default, - List errors = default, - AcsSystem.ExternalTypeEnum? externalType = default, - string? externalTypeDisplayName = default, - string imageAltText = default, - string imageUrl = default, - bool isCredentialManager = default, - AcsSystemLocation location = default, - string name = default, - AcsSystem.SystemTypeEnum? systemType = default, - string? systemTypeDisplayName = default, - AcsSystemVisionlineMetadata? visionlineMetadata = default, - List warnings = default, - string workspaceId = default - ) - { - AcsAccessGroupCount = acsAccessGroupCount; - AcsSystemId = acsSystemId; - AcsUserCount = acsUserCount; - ConnectedAccountId = connectedAccountId; - ConnectedAccountIds = connectedAccountIds; - CreatedAt = createdAt; - DefaultCredentialManagerAcsSystemId = defaultCredentialManagerAcsSystemId; - Errors = errors; - ExternalType = externalType; - ExternalTypeDisplayName = externalTypeDisplayName; - ImageAltText = imageAltText; - ImageUrl = imageUrl; - IsCredentialManager = isCredentialManager; - Location = location; - Name = name; - SystemType = systemType; - SystemTypeDisplayName = systemTypeDisplayName; - VisionlineMetadata = visionlineMetadata; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsSystemErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsProviderServiceUnavailable), - "provider_service_unavailable" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsSaltoKsCertificationExpired), - "salto_ks_certification_expired" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsAccountDisconnected), - "account_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsAcsSystemDisconnected), - "acs_system_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsInsufficientPermissions), - "insufficient_permissions" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsSaltoKsSubscriptionLimitExceeded), - "salto_ks_subscription_limit_exceeded" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsVisionlineInstanceUnreachable), - "visionline_instance_unreachable" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsBridgeDisconnected), - "bridge_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemErrorsSeamBridgeDisconnected), - "seam_bridge_disconnected" - )] - public abstract class AcsSystemErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_acsSystemErrorsSeamBridgeDisconnected_model")] - public class AcsSystemErrorsSeamBridgeDisconnected : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsSeamBridgeDisconnected() { } - - public AcsSystemErrorsSeamBridgeDisconnected( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "seam_bridge_disconnected"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsBridgeDisconnected_model")] - public class AcsSystemErrorsBridgeDisconnected : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsBridgeDisconnected() { } - - public AcsSystemErrorsBridgeDisconnected( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "bridge_disconnected"; - - /// - /// Indicates whether the error is related to the [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBridgeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsVisionlineInstanceUnreachable_model")] - public class AcsSystemErrorsVisionlineInstanceUnreachable : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsVisionlineInstanceUnreachable() { } - - public AcsSystemErrorsVisionlineInstanceUnreachable( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "visionline_instance_unreachable"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsSaltoKsSubscriptionLimitExceeded_model")] - public class AcsSystemErrorsSaltoKsSubscriptionLimitExceeded : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsSaltoKsSubscriptionLimitExceeded() { } - - public AcsSystemErrorsSaltoKsSubscriptionLimitExceeded( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsInsufficientPermissions_model")] - public class AcsSystemErrorsInsufficientPermissions : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsInsufficientPermissions() { } - - public AcsSystemErrorsInsufficientPermissions( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "insufficient_permissions"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsAcsSystemDisconnected_model")] - public class AcsSystemErrorsAcsSystemDisconnected : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsAcsSystemDisconnected() { } - - public AcsSystemErrorsAcsSystemDisconnected( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "acs_system_disconnected"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsAccountDisconnected_model")] - public class AcsSystemErrorsAccountDisconnected : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsAccountDisconnected() { } - - public AcsSystemErrorsAccountDisconnected( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "account_disconnected"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsSaltoKsCertificationExpired_model")] - public class AcsSystemErrorsSaltoKsCertificationExpired : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsSaltoKsCertificationExpired() { } - - public AcsSystemErrorsSaltoKsCertificationExpired( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "salto_ks_certification_expired"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsProviderServiceUnavailable_model")] - public class AcsSystemErrorsProviderServiceUnavailable : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsProviderServiceUnavailable() { } - - public AcsSystemErrorsProviderServiceUnavailable( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "provider_service_unavailable"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemErrorsUnrecognized_model")] - public class AcsSystemErrorsUnrecognized : AcsSystemErrors - { - [JsonConstructorAttribute] - protected AcsSystemErrorsUnrecognized() { } - - public AcsSystemErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExternalTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_site")] - PtiSite = 1, - - [EnumMember(Value = "avigilon_alta_org")] - AvigilonAltaOrg = 2, - - [EnumMember(Value = "salto_ks_site")] - SaltoKsSite = 3, - - [EnumMember(Value = "salto_space_system")] - SaltoSpaceSystem = 4, - - [EnumMember(Value = "brivo_account")] - BrivoAccount = 5, - - [EnumMember(Value = "hid_credential_manager_organization")] - HidCredentialManagerOrganization = 6, - - [EnumMember(Value = "visionline_system")] - VisionlineSystem = 7, - - [EnumMember(Value = "assa_abloy_credential_service")] - AssaAbloyCredentialService = 8, - - [EnumMember(Value = "latch_building")] - LatchBuilding = 9, - - [EnumMember(Value = "dormakaba_community_site")] - DormakabaCommunitySite = 10, - - [EnumMember(Value = "dormakaba_ambiance_site")] - DormakabaAmbianceSite = 11, - - [EnumMember(Value = "legic_connect_credential_service")] - LegicConnectCredentialService = 12, - - [EnumMember(Value = "assa_abloy_vostio")] - AssaAbloyVostio = 13, - - [EnumMember(Value = "assa_abloy_vostio_credential_service")] - AssaAbloyVostioCredentialService = 14, - - [EnumMember(Value = "hotek_site")] - HotekSite = 15, - - [EnumMember(Value = "kisi_organization")] - KisiOrganization = 16, - - [EnumMember(Value = "akiles_organization")] - AkilesOrganization = 17, - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum SystemTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_site")] - PtiSite = 1, - - [EnumMember(Value = "avigilon_alta_org")] - AvigilonAltaOrg = 2, - - [EnumMember(Value = "salto_ks_site")] - SaltoKsSite = 3, - - [EnumMember(Value = "salto_space_system")] - SaltoSpaceSystem = 4, - - [EnumMember(Value = "brivo_account")] - BrivoAccount = 5, - - [EnumMember(Value = "hid_credential_manager_organization")] - HidCredentialManagerOrganization = 6, - - [EnumMember(Value = "visionline_system")] - VisionlineSystem = 7, - - [EnumMember(Value = "assa_abloy_credential_service")] - AssaAbloyCredentialService = 8, - - [EnumMember(Value = "latch_building")] - LatchBuilding = 9, - - [EnumMember(Value = "dormakaba_community_site")] - DormakabaCommunitySite = 10, - - [EnumMember(Value = "dormakaba_ambiance_site")] - DormakabaAmbianceSite = 11, - - [EnumMember(Value = "legic_connect_credential_service")] - LegicConnectCredentialService = 12, - - [EnumMember(Value = "assa_abloy_vostio")] - AssaAbloyVostio = 13, - - [EnumMember(Value = "assa_abloy_vostio_credential_service")] - AssaAbloyVostioCredentialService = 14, - - [EnumMember(Value = "hotek_site")] - HotekSite = 15, - - [EnumMember(Value = "kisi_organization")] - KisiOrganization = 16, - - [EnumMember(Value = "akiles_organization")] - AkilesOrganization = 17, - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsSystemWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemWarningsUnknownIssueWithAcsSystem), - "unknown_issue_with_acs_system" - )] - [JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsSetupRequired), "setup_required")] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemWarningsTimeZoneDoesNotMatchLocation), - "time_zone_does_not_match_location" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached), - "salto_ks_subscription_limit_almost_reached" - )] - public abstract class AcsSystemWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract( - Name = "seamModel_acsSystemWarningsSaltoKsSubscriptionLimitAlmostReached_model" - )] - public class AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached : AcsSystemWarnings - { - [JsonConstructorAttribute] - protected AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached() { } - - public AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "salto_ks_subscription_limit_almost_reached"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemWarningsTimeZoneDoesNotMatchLocation_model")] - public class AcsSystemWarningsTimeZoneDoesNotMatchLocation : AcsSystemWarnings - { - [JsonConstructorAttribute] - protected AcsSystemWarningsTimeZoneDoesNotMatchLocation() { } - - public AcsSystemWarningsTimeZoneDoesNotMatchLocation( - string createdAt = default, - string message = default, - List? misconfiguredAcsEntranceIds = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - MisconfiguredAcsEntranceIds = misconfiguredAcsEntranceIds; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [Obsolete("this field is deprecated.")] - [DataMember( - Name = "misconfigured_acs_entrance_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? MisconfiguredAcsEntranceIds { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "time_zone_does_not_match_location"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemWarningsSetupRequired_model")] - public class AcsSystemWarningsSetupRequired : AcsSystemWarnings - { - [JsonConstructorAttribute] - protected AcsSystemWarningsSetupRequired() { } - - public AcsSystemWarningsSetupRequired( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "setup_required"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemWarningsUnknownIssueWithAcsSystem_model")] - public class AcsSystemWarningsUnknownIssueWithAcsSystem : AcsSystemWarnings - { - [JsonConstructorAttribute] - protected AcsSystemWarningsUnknownIssueWithAcsSystem() { } - - public AcsSystemWarningsUnknownIssueWithAcsSystem( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unknown_issue_with_acs_system"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemWarningsUnrecognized_model")] - public class AcsSystemWarningsUnrecognized : AcsSystemWarnings - { - [JsonConstructorAttribute] - protected AcsSystemWarningsUnrecognized() { } - - public AcsSystemWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Number of access groups in the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "acs_access_group_count", IsRequired = false, EmitDefaultValue = false)] - public float? AcsAccessGroupCount { get; set; } - - /// - /// ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// Number of users in the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "acs_user_count", IsRequired = false, EmitDefaultValue = false)] - public float? AcsUserCount { get; set; } - - /// - /// ID of the connected account associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [Obsolete("Use `connected_account_id`.")] - [DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] - public List ConnectedAccountIds { get; set; } - - /// - /// Date and time at which the [access control system](https://docs.seam.co/low-level-apis/access-systems) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the default credential manager `acs_system` for this [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember( - Name = "default_credential_manager_acs_system_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DefaultCredentialManagerAcsSystemId { get; set; } - - /// - /// Errors associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. - /// - [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] - public AcsSystem.ExternalTypeEnum? ExternalType { get; set; } - - /// - /// Display name that corresponds to the brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. - /// - [DataMember( - Name = "external_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ExternalTypeDisplayName { get; set; } - - /// - /// Alternative text for the [access control system](https://docs.seam.co/low-level-apis/access-systems) image. - /// - [DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] - public string ImageAltText { get; set; } - - /// - /// URL for the image that represents the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string ImageUrl { get; set; } - - /// - /// Indicates whether the `acs_system` is a credential manager. - /// - [DataMember(Name = "is_credential_manager", IsRequired = false, EmitDefaultValue = false)] - public bool IsCredentialManager { get; set; } - - /// - /// Location information for the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] - public AcsSystemLocation Location { get; set; } - - /// - /// Name of the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - [Obsolete("Use `external_type`.")] - [DataMember(Name = "system_type", IsRequired = false, EmitDefaultValue = false)] - public AcsSystem.SystemTypeEnum? SystemType { get; set; } - - [Obsolete("Use `external_type_display_name`.")] - [DataMember( - Name = "system_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? SystemTypeDisplayName { get; set; } - - /// - /// Visionline-specific metadata for the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsSystemVisionlineMetadata? VisionlineMetadata { get; set; } - - /// - /// Warnings associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemLocation_model")] - public class AcsSystemLocation - { - [JsonConstructorAttribute] - protected AcsSystemLocation() { } - - public AcsSystemLocation(string? timeZone = default) - { - TimeZone = timeZone; - } - - /// - /// Time zone in which the [access control system](https://docs.seam.co/low-level-apis/access-systems) is located. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsSystemVisionlineMetadata_model")] - public class AcsSystemVisionlineMetadata - { - [JsonConstructorAttribute] - protected AcsSystemVisionlineMetadata() { } - - public AcsSystemVisionlineMetadata( - string? lanAddress = default, - string? mobileAccessUuid = default, - string? systemId = default - ) - { - LanAddress = lanAddress; - MobileAccessUuid = mobileAccessUuid; - SystemId = systemId; - } - - /// - /// IP address or hostname of the main Visionline server relative to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge) on the local network. - /// - [DataMember(Name = "lan_address", IsRequired = false, EmitDefaultValue = false)] - public string? LanAddress { get; set; } - - /// - /// Keyset loaded into a reader. Mobile keys and reader administration tools securely authenticate only with readers programmed with a matching keyset. - /// - [DataMember(Name = "mobile_access_uuid", IsRequired = false, EmitDefaultValue = false)] - public string? MobileAccessUuid { get; set; } - - /// - /// Unique ID assigned by the ASSA ABLOY licensing team that identifies each hotel in your credential manager. - /// - [DataMember(Name = "system_id", IsRequired = false, EmitDefaultValue = false)] - public string? SystemId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// Within an `acs_system`, create [`acs_user`s](https://www.seam.co/docs/api/acs/users/object) and [`acs_credential`s](https://www.seam.co/docs/api/acs/credentials/object) to grant access to the `acs_user`s. +/// +/// For details about the resources associated with an access control system, see the [access control systems namespace](https://www.seam.co/docs/api/acs/object). +/// +[DataContract(Name = "seamModel_acsSystem_model")] +public class AcsSystem +{ +[JsonConstructorAttribute] +protected AcsSystem() { } + +public AcsSystem(float? acsAccessGroupCount = default, string acsSystemId = default, float? acsUserCount = default, string connectedAccountId = default, List connectedAccountIds = default, string createdAt = default, string? defaultCredentialManagerAcsSystemId = default, List errors = default, AcsSystem.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, string imageAltText = default, string imageUrl = default, bool isCredentialManager = default, AcsSystemLocation location = default, string name = default, AcsSystem.SystemTypeEnum? systemType = default, string? systemTypeDisplayName = default, AcsSystemVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) +{ +AcsAccessGroupCount = acsAccessGroupCount; +AcsSystemId = acsSystemId; +AcsUserCount = acsUserCount; +ConnectedAccountId = connectedAccountId; +ConnectedAccountIds = connectedAccountIds; +CreatedAt = createdAt; +DefaultCredentialManagerAcsSystemId = defaultCredentialManagerAcsSystemId; +Errors = errors; +ExternalType = externalType; +ExternalTypeDisplayName = externalTypeDisplayName; +ImageAltText = imageAltText; +ImageUrl = imageUrl; +IsCredentialManager = isCredentialManager; +Location = location; +Name = name; +SystemType = systemType; +SystemTypeDisplayName = systemTypeDisplayName; +VisionlineMetadata = visionlineMetadata; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsSystemErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsProviderServiceUnavailable), "provider_service_unavailable")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsSaltoKsCertificationExpired), "salto_ks_certification_expired")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsAccountDisconnected), "account_disconnected")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsAcsSystemDisconnected), "acs_system_disconnected")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsInsufficientPermissions), "insufficient_permissions")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsVisionlineInstanceUnreachable), "visionline_instance_unreachable")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsBridgeDisconnected), "bridge_disconnected")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsSeamBridgeDisconnected), "seam_bridge_disconnected")] +public abstract class AcsSystemErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsSystemErrorsSeamBridgeDisconnected_model")] +public class AcsSystemErrorsSeamBridgeDisconnected : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsSeamBridgeDisconnected() { } + +public AcsSystemErrorsSeamBridgeDisconnected(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "seam_bridge_disconnected"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsBridgeDisconnected_model")] +public class AcsSystemErrorsBridgeDisconnected : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsBridgeDisconnected() { } + +public AcsSystemErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "bridge_disconnected"; + +/// +/// Indicates whether the error is related to the [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBridgeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsVisionlineInstanceUnreachable_model")] +public class AcsSystemErrorsVisionlineInstanceUnreachable : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsVisionlineInstanceUnreachable() { } + +public AcsSystemErrorsVisionlineInstanceUnreachable(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "visionline_instance_unreachable"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsSaltoKsSubscriptionLimitExceeded_model")] +public class AcsSystemErrorsSaltoKsSubscriptionLimitExceeded : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsSaltoKsSubscriptionLimitExceeded() { } + +public AcsSystemErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsInsufficientPermissions_model")] +public class AcsSystemErrorsInsufficientPermissions : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsInsufficientPermissions() { } + +public AcsSystemErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "insufficient_permissions"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsAcsSystemDisconnected_model")] +public class AcsSystemErrorsAcsSystemDisconnected : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsAcsSystemDisconnected() { } + +public AcsSystemErrorsAcsSystemDisconnected(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "acs_system_disconnected"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsAccountDisconnected_model")] +public class AcsSystemErrorsAccountDisconnected : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsAccountDisconnected() { } + +public AcsSystemErrorsAccountDisconnected(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "account_disconnected"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsSaltoKsCertificationExpired_model")] +public class AcsSystemErrorsSaltoKsCertificationExpired : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsSaltoKsCertificationExpired() { } + +public AcsSystemErrorsSaltoKsCertificationExpired(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "salto_ks_certification_expired"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsProviderServiceUnavailable_model")] +public class AcsSystemErrorsProviderServiceUnavailable : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsProviderServiceUnavailable() { } + +public AcsSystemErrorsProviderServiceUnavailable(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "provider_service_unavailable"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemErrorsUnrecognized_model")] +public class AcsSystemErrorsUnrecognized : AcsSystemErrors +{ +[JsonConstructorAttribute] +protected AcsSystemErrorsUnrecognized() { } + +public AcsSystemErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExternalTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_site")] +PtiSite = 1, + +[EnumMember(Value = "avigilon_alta_org")] +AvigilonAltaOrg = 2, + +[EnumMember(Value = "salto_ks_site")] +SaltoKsSite = 3, + +[EnumMember(Value = "salto_space_system")] +SaltoSpaceSystem = 4, + +[EnumMember(Value = "brivo_account")] +BrivoAccount = 5, + +[EnumMember(Value = "hid_credential_manager_organization")] +HidCredentialManagerOrganization = 6, + +[EnumMember(Value = "visionline_system")] +VisionlineSystem = 7, + +[EnumMember(Value = "assa_abloy_credential_service")] +AssaAbloyCredentialService = 8, + +[EnumMember(Value = "latch_building")] +LatchBuilding = 9, + +[EnumMember(Value = "dormakaba_community_site")] +DormakabaCommunitySite = 10, + +[EnumMember(Value = "dormakaba_ambiance_site")] +DormakabaAmbianceSite = 11, + +[EnumMember(Value = "legic_connect_credential_service")] +LegicConnectCredentialService = 12, + +[EnumMember(Value = "assa_abloy_vostio")] +AssaAbloyVostio = 13, + +[EnumMember(Value = "assa_abloy_vostio_credential_service")] +AssaAbloyVostioCredentialService = 14, + +[EnumMember(Value = "hotek_site")] +HotekSite = 15, + +[EnumMember(Value = "kisi_organization")] +KisiOrganization = 16, + +[EnumMember(Value = "akiles_organization")] +AkilesOrganization = 17, +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum SystemTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_site")] +PtiSite = 1, + +[EnumMember(Value = "avigilon_alta_org")] +AvigilonAltaOrg = 2, + +[EnumMember(Value = "salto_ks_site")] +SaltoKsSite = 3, + +[EnumMember(Value = "salto_space_system")] +SaltoSpaceSystem = 4, + +[EnumMember(Value = "brivo_account")] +BrivoAccount = 5, + +[EnumMember(Value = "hid_credential_manager_organization")] +HidCredentialManagerOrganization = 6, + +[EnumMember(Value = "visionline_system")] +VisionlineSystem = 7, + +[EnumMember(Value = "assa_abloy_credential_service")] +AssaAbloyCredentialService = 8, + +[EnumMember(Value = "latch_building")] +LatchBuilding = 9, + +[EnumMember(Value = "dormakaba_community_site")] +DormakabaCommunitySite = 10, + +[EnumMember(Value = "dormakaba_ambiance_site")] +DormakabaAmbianceSite = 11, + +[EnumMember(Value = "legic_connect_credential_service")] +LegicConnectCredentialService = 12, + +[EnumMember(Value = "assa_abloy_vostio")] +AssaAbloyVostio = 13, + +[EnumMember(Value = "assa_abloy_vostio_credential_service")] +AssaAbloyVostioCredentialService = 14, + +[EnumMember(Value = "hotek_site")] +HotekSite = 15, + +[EnumMember(Value = "kisi_organization")] +KisiOrganization = 16, + +[EnumMember(Value = "akiles_organization")] +AkilesOrganization = 17, +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsSystemWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsUnknownIssueWithAcsSystem), "unknown_issue_with_acs_system")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsSetupRequired), "setup_required")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsTimeZoneDoesNotMatchLocation), "time_zone_does_not_match_location")] +[JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached), "salto_ks_subscription_limit_almost_reached")] +public abstract class AcsSystemWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsSystemWarningsSaltoKsSubscriptionLimitAlmostReached_model")] +public class AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached : AcsSystemWarnings +{ +[JsonConstructorAttribute] +protected AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached() { } + +public AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_subscription_limit_almost_reached"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemWarningsTimeZoneDoesNotMatchLocation_model")] +public class AcsSystemWarningsTimeZoneDoesNotMatchLocation : AcsSystemWarnings +{ +[JsonConstructorAttribute] +protected AcsSystemWarningsTimeZoneDoesNotMatchLocation() { } + +public AcsSystemWarningsTimeZoneDoesNotMatchLocation(string createdAt = default, string message = default, List? misconfiguredAcsEntranceIds = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +MisconfiguredAcsEntranceIds = misconfiguredAcsEntranceIds; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[Obsolete("this field is deprecated.")] +[DataMember(Name = "misconfigured_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? MisconfiguredAcsEntranceIds { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "time_zone_does_not_match_location"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemWarningsSetupRequired_model")] +public class AcsSystemWarningsSetupRequired : AcsSystemWarnings +{ +[JsonConstructorAttribute] +protected AcsSystemWarningsSetupRequired() { } + +public AcsSystemWarningsSetupRequired(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "setup_required"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemWarningsUnknownIssueWithAcsSystem_model")] +public class AcsSystemWarningsUnknownIssueWithAcsSystem : AcsSystemWarnings +{ +[JsonConstructorAttribute] +protected AcsSystemWarningsUnknownIssueWithAcsSystem() { } + +public AcsSystemWarningsUnknownIssueWithAcsSystem(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unknown_issue_with_acs_system"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemWarningsUnrecognized_model")] +public class AcsSystemWarningsUnrecognized : AcsSystemWarnings +{ +[JsonConstructorAttribute] +protected AcsSystemWarningsUnrecognized() { } + +public AcsSystemWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Number of access groups in the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "acs_access_group_count", IsRequired = false, EmitDefaultValue = false)] +public float? AcsAccessGroupCount { get; set; } + +/// +/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// Number of users in the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "acs_user_count", IsRequired = false, EmitDefaultValue = false)] +public float? AcsUserCount { get; set; } + +/// +/// ID of the connected account associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[Obsolete("Use `connected_account_id`.")] +[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountIds { get; set; } + +/// +/// Date and time at which the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the default credential manager `acs_system` for this [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "default_credential_manager_acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCredentialManagerAcsSystemId { get; set; } + +/// +/// Errors associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. +/// +[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] +public AcsSystem.ExternalTypeEnum? ExternalType { get; set; } + +/// +/// Display name that corresponds to the brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. +/// +[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string? ExternalTypeDisplayName { get; set; } + +/// +/// Alternative text for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) image. +/// +[DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] +public string ImageAltText { get; set; } + +/// +/// URL for the image that represents the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string ImageUrl { get; set; } + +/// +/// Indicates whether the `acs_system` is a credential manager. +/// +[DataMember(Name = "is_credential_manager", IsRequired = false, EmitDefaultValue = false)] +public bool IsCredentialManager { get; set; } + +/// +/// Location information for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] +public AcsSystemLocation Location { get; set; } + +/// +/// Name of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string Name { get; set; } + +[Obsolete("Use `external_type`.")] +[DataMember(Name = "system_type", IsRequired = false, EmitDefaultValue = false)] +public AcsSystem.SystemTypeEnum? SystemType { get; set; } + +[Obsolete("Use `external_type_display_name`.")] +[DataMember(Name = "system_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string? SystemTypeDisplayName { get; set; } + +/// +/// Visionline-specific metadata for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsSystemVisionlineMetadata? VisionlineMetadata { get; set; } + +/// +/// Warnings associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemLocation_model")] +public class AcsSystemLocation +{ +[JsonConstructorAttribute] +protected AcsSystemLocation() { } + +public AcsSystemLocation(string? timeZone = default) +{ +TimeZone = timeZone; +} + +/// +/// Time zone in which the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) is located. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsSystemVisionlineMetadata_model")] +public class AcsSystemVisionlineMetadata +{ +[JsonConstructorAttribute] +protected AcsSystemVisionlineMetadata() { } + +public AcsSystemVisionlineMetadata(string? lanAddress = default, string? mobileAccessUuid = default, string? systemId = default) +{ +LanAddress = lanAddress; +MobileAccessUuid = mobileAccessUuid; +SystemId = systemId; +} + +/// +/// IP address or hostname of the main Visionline server relative to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge) on the local network. +/// +[DataMember(Name = "lan_address", IsRequired = false, EmitDefaultValue = false)] +public string? LanAddress { get; set; } + +/// +/// Keyset loaded into a reader. Mobile keys and reader administration tools securely authenticate only with readers programmed with a matching keyset. +/// +[DataMember(Name = "mobile_access_uuid", IsRequired = false, EmitDefaultValue = false)] +public string? MobileAccessUuid { get; set; } + +/// +/// Unique ID assigned by the ASSA ABLOY licensing team that identifies each hotel in your credential manager. +/// +[DataMember(Name = "system_id", IsRequired = false, EmitDefaultValue = false)] +public string? SystemId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/AcsUser.cs b/src/Seam/Model/AcsUser.cs index 9df18f7b..bf452c2a 100644 --- a/src/Seam/Model/AcsUser.cs +++ b/src/Seam/Model/AcsUser.cs @@ -8,2264 +8,2052 @@ namespace Seam.Model { - /// - /// Represents a [user](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. - /// - /// For details about how to configure users in your access system, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). - /// - [DataContract(Name = "seamModel_acsUser_model")] - public class AcsUser - { - [JsonConstructorAttribute] - protected AcsUser() { } - - public AcsUser( - AcsUserAccessSchedule? accessSchedule = default, - string acsSystemId = default, - string acsUserId = default, - string connectedAccountId = default, - string createdAt = default, - string displayName = default, - string? email = default, - string? emailAddress = default, - List errors = default, - AcsUser.ExternalTypeEnum? externalType = default, - string? externalTypeDisplayName = default, - string? fullName = default, - string? hidAcsSystemId = default, - bool isManaged = default, - bool? isSuspended = default, - List? pendingMutations = default, - string? phoneNumber = default, - AcsUserSaltoKsMetadata? saltoKsMetadata = default, - AcsUserSaltoSpaceMetadata? saltoSpaceMetadata = default, - string? userIdentityEmailAddress = default, - string? userIdentityFullName = default, - string? userIdentityId = default, - string? userIdentityPhoneNumber = default, - List warnings = default, - string workspaceId = default - ) - { - AccessSchedule = accessSchedule; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DisplayName = displayName; - Email = email; - EmailAddress = emailAddress; - Errors = errors; - ExternalType = externalType; - ExternalTypeDisplayName = externalTypeDisplayName; - FullName = fullName; - HidAcsSystemId = hidAcsSystemId; - IsManaged = isManaged; - IsSuspended = isSuspended; - PendingMutations = pendingMutations; - PhoneNumber = phoneNumber; - SaltoKsMetadata = saltoKsMetadata; - SaltoSpaceMetadata = saltoSpaceMetadata; - UserIdentityEmailAddress = userIdentityEmailAddress; - UserIdentityFullName = userIdentityFullName; - UserIdentityId = userIdentityId; - UserIdentityPhoneNumber = userIdentityPhoneNumber; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsUserErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AcsUserErrorsLatchConflictWithResidentUser), - "latch_conflict_with_resident_user" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserErrorsFailedToDeleteOnAcsSystem), - "failed_to_delete_on_acs_system" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserErrorsFailedToUpdateOnAcsSystem), - "failed_to_update_on_acs_system" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserErrorsFailedToCreateOnAcsSystem), - "failed_to_create_on_acs_system" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserErrorsSaltoKsSubscriptionLimitExceeded), - "salto_ks_subscription_limit_exceeded" - )] - [JsonSubtypes.KnownSubType(typeof(AcsUserErrorsDeletedExternally), "deleted_externally")] - public abstract class AcsUserErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_acsUserErrorsDeletedExternally_model")] - public class AcsUserErrorsDeletedExternally : AcsUserErrors - { - [JsonConstructorAttribute] - protected AcsUserErrorsDeletedExternally() { } - - public AcsUserErrorsDeletedExternally( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "deleted_externally"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserErrorsSaltoKsSubscriptionLimitExceeded_model")] - public class AcsUserErrorsSaltoKsSubscriptionLimitExceeded : AcsUserErrors - { - [JsonConstructorAttribute] - protected AcsUserErrorsSaltoKsSubscriptionLimitExceeded() { } - - public AcsUserErrorsSaltoKsSubscriptionLimitExceeded( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserErrorsFailedToCreateOnAcsSystem_model")] - public class AcsUserErrorsFailedToCreateOnAcsSystem : AcsUserErrors - { - [JsonConstructorAttribute] - protected AcsUserErrorsFailedToCreateOnAcsSystem() { } - - public AcsUserErrorsFailedToCreateOnAcsSystem( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_create_on_acs_system"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserErrorsFailedToUpdateOnAcsSystem_model")] - public class AcsUserErrorsFailedToUpdateOnAcsSystem : AcsUserErrors - { - [JsonConstructorAttribute] - protected AcsUserErrorsFailedToUpdateOnAcsSystem() { } - - public AcsUserErrorsFailedToUpdateOnAcsSystem( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_update_on_acs_system"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserErrorsFailedToDeleteOnAcsSystem_model")] - public class AcsUserErrorsFailedToDeleteOnAcsSystem : AcsUserErrors - { - [JsonConstructorAttribute] - protected AcsUserErrorsFailedToDeleteOnAcsSystem() { } - - public AcsUserErrorsFailedToDeleteOnAcsSystem( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_delete_on_acs_system"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserErrorsLatchConflictWithResidentUser_model")] - public class AcsUserErrorsLatchConflictWithResidentUser : AcsUserErrors - { - [JsonConstructorAttribute] - protected AcsUserErrorsLatchConflictWithResidentUser() { } - - public AcsUserErrorsLatchConflictWithResidentUser( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "latch_conflict_with_resident_user"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserErrorsUnrecognized_model")] - public class AcsUserErrorsUnrecognized : AcsUserErrors - { - [JsonConstructorAttribute] - protected AcsUserErrorsUnrecognized() { } - - public AcsUserErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Brand-specific terminology for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) type. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExternalTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_user")] - PtiUser = 1, - - [EnumMember(Value = "brivo_user")] - BrivoUser = 2, - - [EnumMember(Value = "hid_credential_manager_user")] - HidCredentialManagerUser = 3, - - [EnumMember(Value = "salto_site_user")] - SaltoSiteUser = 4, - - [EnumMember(Value = "latch_user")] - LatchUser = 5, - - [EnumMember(Value = "dormakaba_community_user")] - DormakabaCommunityUser = 6, - - [EnumMember(Value = "salto_space_user")] - SaltoSpaceUser = 7, - - [EnumMember(Value = "avigilon_alta_user")] - AvigilonAltaUser = 8, - - [EnumMember(Value = "kisi_user")] - KisiUser = 9, - } - - [JsonConverter(typeof(JsonSubtypes), "mutation_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsUserPendingMutationsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(AcsUserPendingMutationsUpdatingCredentialAssignment), - "updating_credential_assignment" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserPendingMutationsDeferringGroupMembershipUpdate), - "deferring_group_membership_update" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserPendingMutationsUpdatingGroupMembership), - "updating_group_membership" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserPendingMutationsUpdatingSuspensionState), - "updating_suspension_state" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserPendingMutationsUpdatingAccessSchedule), - "updating_access_schedule" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserPendingMutationsUpdatingUserInformation), - "updating_user_information" - )] - [JsonSubtypes.KnownSubType( - typeof(AcsUserPendingMutationsDeferringCreation), - "deferring_creation" - )] - [JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsDeleting), "deleting")] - [JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsCreating), "creating")] - public abstract class AcsUserPendingMutations - { - public abstract string MutationCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsCreating_model")] - public class AcsUserPendingMutationsCreating : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsCreating() { } - - public AcsUserPendingMutationsCreating( - string createdAt = default, - string message = default, - string mutationCode = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "creating"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsDeleting_model")] - public class AcsUserPendingMutationsDeleting : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsDeleting() { } - - public AcsUserPendingMutationsDeleting( - string createdAt = default, - string message = default, - string mutationCode = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "deleting"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsDeferringCreation_model")] - public class AcsUserPendingMutationsDeferringCreation : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsDeferringCreation() { } - - public AcsUserPendingMutationsDeferringCreation( - string createdAt = default, - string message = default, - string mutationCode = default, - string? scheduledAt = default - ) - { - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - ScheduledAt = scheduledAt; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "deferring_creation"; - - /// - /// Optional: When the user creation is scheduled to occur. - /// - [DataMember(Name = "scheduled_at", IsRequired = false, EmitDefaultValue = false)] - public string? ScheduledAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformation_model")] - public class AcsUserPendingMutationsUpdatingUserInformation : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingUserInformation() { } - - public AcsUserPendingMutationsUpdatingUserInformation( - string createdAt = default, - AcsUserPendingMutationsUpdatingUserInformationFrom from = default, - string message = default, - string mutationCode = default, - AcsUserPendingMutationsUpdatingUserInformationTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Old access system user information. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingUserInformationFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_user_information"; - - /// - /// New access system user information. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingUserInformationTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformationFrom_model")] - public class AcsUserPendingMutationsUpdatingUserInformationFrom - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingUserInformationFrom() { } - - public AcsUserPendingMutationsUpdatingUserInformationFrom( - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default - ) - { - EmailAddress = emailAddress; - FullName = fullName; - PhoneNumber = phoneNumber; - } - - /// - /// Email address of the access system user. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Full name of the access system user. - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// Phone number of the access system user. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformationTo_model")] - public class AcsUserPendingMutationsUpdatingUserInformationTo - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingUserInformationTo() { } - - public AcsUserPendingMutationsUpdatingUserInformationTo( - string? emailAddress = default, - string? fullName = default, - string? phoneNumber = default - ) - { - EmailAddress = emailAddress; - FullName = fullName; - PhoneNumber = phoneNumber; - } - - /// - /// Email address of the access system user. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Full name of the access system user. - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// Phone number of the access system user. - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessSchedule_model")] - public class AcsUserPendingMutationsUpdatingAccessSchedule : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingAccessSchedule() { } - - public AcsUserPendingMutationsUpdatingAccessSchedule( - string createdAt = default, - AcsUserPendingMutationsUpdatingAccessScheduleFrom from = default, - string message = default, - string mutationCode = default, - AcsUserPendingMutationsUpdatingAccessScheduleTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Old access schedule information. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingAccessScheduleFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_access_schedule"; - - /// - /// New access schedule information. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingAccessScheduleTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessScheduleFrom_model")] - public class AcsUserPendingMutationsUpdatingAccessScheduleFrom - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingAccessScheduleFrom() { } - - public AcsUserPendingMutationsUpdatingAccessScheduleFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Starting time for the access schedule. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Starting time for the access schedule. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessScheduleTo_model")] - public class AcsUserPendingMutationsUpdatingAccessScheduleTo - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingAccessScheduleTo() { } - - public AcsUserPendingMutationsUpdatingAccessScheduleTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Starting time for the access schedule. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Starting time for the access schedule. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionState_model")] - public class AcsUserPendingMutationsUpdatingSuspensionState : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingSuspensionState() { } - - public AcsUserPendingMutationsUpdatingSuspensionState( - string createdAt = default, - AcsUserPendingMutationsUpdatingSuspensionStateFrom from = default, - string message = default, - string mutationCode = default, - AcsUserPendingMutationsUpdatingSuspensionStateTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Old user suspension state information. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingSuspensionStateFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_suspension_state"; - - /// - /// New user suspension state information. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingSuspensionStateTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionStateFrom_model")] - public class AcsUserPendingMutationsUpdatingSuspensionStateFrom - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingSuspensionStateFrom() { } - - public AcsUserPendingMutationsUpdatingSuspensionStateFrom(bool isSuspended = default) - { - IsSuspended = isSuspended; - } - - [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] - public bool IsSuspended { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionStateTo_model")] - public class AcsUserPendingMutationsUpdatingSuspensionStateTo - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingSuspensionStateTo() { } - - public AcsUserPendingMutationsUpdatingSuspensionStateTo(bool isSuspended = default) - { - IsSuspended = isSuspended; - } - - [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] - public bool IsSuspended { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembership_model")] - public class AcsUserPendingMutationsUpdatingGroupMembership : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingGroupMembership() { } - - public AcsUserPendingMutationsUpdatingGroupMembership( - string createdAt = default, - AcsUserPendingMutationsUpdatingGroupMembershipFrom from = default, - string message = default, - string mutationCode = default, - AcsUserPendingMutationsUpdatingGroupMembershipTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Old access group membership. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingGroupMembershipFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_group_membership"; - - /// - /// New access group membership. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingGroupMembershipTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembershipFrom_model")] - public class AcsUserPendingMutationsUpdatingGroupMembershipFrom - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingGroupMembershipFrom() { } - - public AcsUserPendingMutationsUpdatingGroupMembershipFrom( - string? acsAccessGroupId = default - ) - { - AcsAccessGroupId = acsAccessGroupId; - } - - /// - /// Old access group ID. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsAccessGroupId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembershipTo_model")] - public class AcsUserPendingMutationsUpdatingGroupMembershipTo - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingGroupMembershipTo() { } - - public AcsUserPendingMutationsUpdatingGroupMembershipTo( - string? acsAccessGroupId = default - ) - { - AcsAccessGroupId = acsAccessGroupId; - } - - /// - /// New access group ID. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsAccessGroupId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsUserPendingMutationsDeferringGroupMembershipUpdate_model" - )] - public class AcsUserPendingMutationsDeferringGroupMembershipUpdate : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsDeferringGroupMembershipUpdate() { } - - public AcsUserPendingMutationsDeferringGroupMembershipUpdate( - string acsAccessGroupId = default, - string createdAt = default, - string message = default, - string mutationCode = default, - AcsUserPendingMutationsDeferringGroupMembershipUpdate.VariantEnum variant = default - ) - { - AcsAccessGroupId = acsAccessGroupId; - CreatedAt = createdAt; - Message = message; - MutationCode = mutationCode; - Variant = variant; - } - - /// - /// Whether the user is scheduled to be added to or removed from the access group. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum VariantEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "adding")] - Adding = 1, - - [EnumMember(Value = "removing")] - Removing = 2, - } - - /// - /// ID of the access group involved in the scheduled change. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "deferring_group_membership_update"; - - /// - /// Whether the user is scheduled to be added to or removed from the access group. - /// - [DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsDeferringGroupMembershipUpdate.VariantEnum Variant { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignment_model")] - public class AcsUserPendingMutationsUpdatingCredentialAssignment : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingCredentialAssignment() { } - - public AcsUserPendingMutationsUpdatingCredentialAssignment( - string createdAt = default, - AcsUserPendingMutationsUpdatingCredentialAssignmentFrom from = default, - string message = default, - string mutationCode = default, - AcsUserPendingMutationsUpdatingCredentialAssignmentTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous credential assignment. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingCredentialAssignmentFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_credential_assignment"; - - /// - /// New credential assignment. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public AcsUserPendingMutationsUpdatingCredentialAssignmentTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignmentFrom_model" - )] - public class AcsUserPendingMutationsUpdatingCredentialAssignmentFrom - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingCredentialAssignmentFrom() { } - - public AcsUserPendingMutationsUpdatingCredentialAssignmentFrom( - string? acsCredentialId = default - ) - { - AcsCredentialId = acsCredentialId; - } - - /// - /// Previous credential ID. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignmentTo_model" - )] - public class AcsUserPendingMutationsUpdatingCredentialAssignmentTo - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUpdatingCredentialAssignmentTo() { } - - public AcsUserPendingMutationsUpdatingCredentialAssignmentTo( - string? acsCredentialId = default - ) - { - AcsCredentialId = acsCredentialId; - } - - /// - /// New credential ID. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserPendingMutationsUnrecognized_model")] - public class AcsUserPendingMutationsUnrecognized : AcsUserPendingMutations - { - [JsonConstructorAttribute] - protected AcsUserPendingMutationsUnrecognized() { } - - public AcsUserPendingMutationsUnrecognized( - string mutationCode = default, - string createdAt = default, - string message = default - ) - { - MutationCode = mutationCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "unrecognized"; - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(AcsUserWarningsUnrecognized))] - [JsonSubtypes.KnownSubType(typeof(AcsUserWarningsLatchResidentUser), "latch_resident_user")] - [JsonSubtypes.KnownSubType( - typeof(AcsUserWarningsUnknownIssueWithAcsUser), - "unknown_issue_with_acs_user" - )] - [JsonSubtypes.KnownSubType(typeof(AcsUserWarningsAcsUserInactive), "acs_user_inactive")] - [JsonSubtypes.KnownSubType( - typeof(AcsUserWarningsSaltoKsUserNotSubscribed), - "salto_ks_user_not_subscribed" - )] - [JsonSubtypes.KnownSubType(typeof(AcsUserWarningsBeingDeleted), "being_deleted")] - public abstract class AcsUserWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_acsUserWarningsBeingDeleted_model")] - public class AcsUserWarningsBeingDeleted : AcsUserWarnings - { - [JsonConstructorAttribute] - protected AcsUserWarningsBeingDeleted() { } - - public AcsUserWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserWarningsSaltoKsUserNotSubscribed_model")] - public class AcsUserWarningsSaltoKsUserNotSubscribed : AcsUserWarnings - { - [JsonConstructorAttribute] - protected AcsUserWarningsSaltoKsUserNotSubscribed() { } - - public AcsUserWarningsSaltoKsUserNotSubscribed( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "salto_ks_user_not_subscribed"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserWarningsAcsUserInactive_model")] - public class AcsUserWarningsAcsUserInactive : AcsUserWarnings - { - [JsonConstructorAttribute] - protected AcsUserWarningsAcsUserInactive() { } - - public AcsUserWarningsAcsUserInactive( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "acs_user_inactive"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserWarningsUnknownIssueWithAcsUser_model")] - public class AcsUserWarningsUnknownIssueWithAcsUser : AcsUserWarnings - { - [JsonConstructorAttribute] - protected AcsUserWarningsUnknownIssueWithAcsUser() { } - - public AcsUserWarningsUnknownIssueWithAcsUser( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unknown_issue_with_acs_user"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserWarningsLatchResidentUser_model")] - public class AcsUserWarningsLatchResidentUser : AcsUserWarnings - { - [JsonConstructorAttribute] - protected AcsUserWarningsLatchResidentUser() { } - - public AcsUserWarningsLatchResidentUser( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "latch_resident_user"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserWarningsUnrecognized_model")] - public class AcsUserWarningsUnrecognized : AcsUserWarnings - { - [JsonConstructorAttribute] - protected AcsUserWarningsUnrecognized() { } - - public AcsUserWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// `starts_at` and `ends_at` timestamps for the [access system user's](https://docs.seam.co/low-level-apis/access-systems/user-management) access. - /// - [DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] - public AcsUserAccessSchedule? AccessSchedule { get; set; } - - /// - /// ID of the [access system](https://docs.seam.co/low-level-apis/access-systems) that contains the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsUserId { get; set; } - - /// - /// The ID of the connected account that is associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - [Obsolete("use email_address.")] - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string? Email { get; set; } - - /// - /// Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Errors associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Brand-specific terminology for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) type. - /// - [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] - public AcsUser.ExternalTypeEnum? ExternalType { get; set; } - - /// - /// Display name that corresponds to the brand-specific terminology for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) type. - /// - [DataMember( - Name = "external_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ExternalTypeDisplayName { get; set; } - - /// - /// Full name of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// ID of the HID access control system associated with the user. - /// - [DataMember(Name = "hid_acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string? HidAcsSystemId { get; set; } - - /// - /// Indicates whether Seam manages the access system user. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Indicates whether the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) is currently [suspended](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users). - /// - [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] - public bool? IsSuspended { get; set; } - - /// - /// Pending mutations associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Seam is in the process of pushing these mutations to the integrated access system. - /// - [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] - public List? PendingMutations { get; set; } - - /// - /// Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// Salto KS-specific metadata associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsUserSaltoKsMetadata? SaltoKsMetadata { get; set; } - - /// - /// Salto Space-specific metadata associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] - public AcsUserSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } - - /// - /// Email address of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember( - Name = "user_identity_email_address", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UserIdentityEmailAddress { get; set; } - - /// - /// Full name of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "user_identity_full_name", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityFullName { get; set; } - - /// - /// ID of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Phone number of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). - /// - [DataMember( - Name = "user_identity_phone_number", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UserIdentityPhoneNumber { get; set; } - - /// - /// Warnings associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserAccessSchedule_model")] - public class AcsUserAccessSchedule - { - [JsonConstructorAttribute] - protected AcsUserAccessSchedule() { } - - public AcsUserAccessSchedule(string? endsAt = default, string startsAt = default) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserSaltoKsMetadata_model")] - public class AcsUserSaltoKsMetadata - { - [JsonConstructorAttribute] - protected AcsUserSaltoKsMetadata() { } - - public AcsUserSaltoKsMetadata(bool? isSubscribed = default) - { - IsSubscribed = isSubscribed; - } - - /// - /// Indicates whether the user holds an active subscription slot on the Salto KS site. Only subscribed users can unlock doors and count against the site's user-subscription limit. A user may not be subscribed because their access schedule has not started or has ended, the site has reached its subscription limit, or they were manually unsubscribed. This is distinct from `is_suspended`, which reflects whether the user has been explicitly blocked. - /// - [DataMember(Name = "is_subscribed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsSubscribed { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_acsUserSaltoSpaceMetadata_model")] - public class AcsUserSaltoSpaceMetadata - { - [JsonConstructorAttribute] - protected AcsUserSaltoSpaceMetadata() { } - - public AcsUserSaltoSpaceMetadata(bool? auditOpenings = default, string? userId = default) - { - AuditOpenings = auditOpenings; - UserId = userId; - } - - /// - /// Indicates whether AuditOpenings is enabled for the user in the Salto Space access system. - /// - [DataMember(Name = "audit_openings", IsRequired = false, EmitDefaultValue = false)] - public bool? AuditOpenings { get; set; } - - /// - /// User ID in the Salto Space access system. - /// - [DataMember(Name = "user_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a [user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. +/// +/// For details about how to configure users in your access system, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). +/// +[DataContract(Name = "seamModel_acsUser_model")] +public class AcsUser +{ +[JsonConstructorAttribute] +protected AcsUser() { } + +public AcsUser(AcsUserAccessSchedule? accessSchedule = default, string acsSystemId = default, string acsUserId = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? email = default, string? emailAddress = default, List errors = default, AcsUser.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, string? fullName = default, string? hidAcsSystemId = default, bool isManaged = default, bool? isSuspended = default, List? pendingMutations = default, string? phoneNumber = default, AcsUserSaltoKsMetadata? saltoKsMetadata = default, AcsUserSaltoSpaceMetadata? saltoSpaceMetadata = default, string? userIdentityEmailAddress = default, string? userIdentityFullName = default, string? userIdentityId = default, string? userIdentityPhoneNumber = default, List warnings = default, string workspaceId = default) +{ +AccessSchedule = accessSchedule; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DisplayName = displayName; +Email = email; +EmailAddress = emailAddress; +Errors = errors; +ExternalType = externalType; +ExternalTypeDisplayName = externalTypeDisplayName; +FullName = fullName; +HidAcsSystemId = hidAcsSystemId; +IsManaged = isManaged; +IsSuspended = isSuspended; +PendingMutations = pendingMutations; +PhoneNumber = phoneNumber; +SaltoKsMetadata = saltoKsMetadata; +SaltoSpaceMetadata = saltoSpaceMetadata; +UserIdentityEmailAddress = userIdentityEmailAddress; +UserIdentityFullName = userIdentityFullName; +UserIdentityId = userIdentityId; +UserIdentityPhoneNumber = userIdentityPhoneNumber; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsUserErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsLatchConflictWithResidentUser), "latch_conflict_with_resident_user")] +[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsFailedToDeleteOnAcsSystem), "failed_to_delete_on_acs_system")] +[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsFailedToUpdateOnAcsSystem), "failed_to_update_on_acs_system")] +[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsFailedToCreateOnAcsSystem), "failed_to_create_on_acs_system")] +[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] +[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsDeletedExternally), "deleted_externally")] +public abstract class AcsUserErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsUserErrorsDeletedExternally_model")] +public class AcsUserErrorsDeletedExternally : AcsUserErrors +{ +[JsonConstructorAttribute] +protected AcsUserErrorsDeletedExternally() { } + +public AcsUserErrorsDeletedExternally(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "deleted_externally"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserErrorsSaltoKsSubscriptionLimitExceeded_model")] +public class AcsUserErrorsSaltoKsSubscriptionLimitExceeded : AcsUserErrors +{ +[JsonConstructorAttribute] +protected AcsUserErrorsSaltoKsSubscriptionLimitExceeded() { } + +public AcsUserErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserErrorsFailedToCreateOnAcsSystem_model")] +public class AcsUserErrorsFailedToCreateOnAcsSystem : AcsUserErrors +{ +[JsonConstructorAttribute] +protected AcsUserErrorsFailedToCreateOnAcsSystem() { } + +public AcsUserErrorsFailedToCreateOnAcsSystem(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_create_on_acs_system"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserErrorsFailedToUpdateOnAcsSystem_model")] +public class AcsUserErrorsFailedToUpdateOnAcsSystem : AcsUserErrors +{ +[JsonConstructorAttribute] +protected AcsUserErrorsFailedToUpdateOnAcsSystem() { } + +public AcsUserErrorsFailedToUpdateOnAcsSystem(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_update_on_acs_system"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserErrorsFailedToDeleteOnAcsSystem_model")] +public class AcsUserErrorsFailedToDeleteOnAcsSystem : AcsUserErrors +{ +[JsonConstructorAttribute] +protected AcsUserErrorsFailedToDeleteOnAcsSystem() { } + +public AcsUserErrorsFailedToDeleteOnAcsSystem(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_delete_on_acs_system"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserErrorsLatchConflictWithResidentUser_model")] +public class AcsUserErrorsLatchConflictWithResidentUser : AcsUserErrors +{ +[JsonConstructorAttribute] +protected AcsUserErrorsLatchConflictWithResidentUser() { } + +public AcsUserErrorsLatchConflictWithResidentUser(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "latch_conflict_with_resident_user"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserErrorsUnrecognized_model")] +public class AcsUserErrorsUnrecognized : AcsUserErrors +{ +[JsonConstructorAttribute] +protected AcsUserErrorsUnrecognized() { } + +public AcsUserErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExternalTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_user")] +PtiUser = 1, + +[EnumMember(Value = "brivo_user")] +BrivoUser = 2, + +[EnumMember(Value = "hid_credential_manager_user")] +HidCredentialManagerUser = 3, + +[EnumMember(Value = "salto_site_user")] +SaltoSiteUser = 4, + +[EnumMember(Value = "latch_user")] +LatchUser = 5, + +[EnumMember(Value = "dormakaba_community_user")] +DormakabaCommunityUser = 6, + +[EnumMember(Value = "salto_space_user")] +SaltoSpaceUser = 7, + +[EnumMember(Value = "avigilon_alta_user")] +AvigilonAltaUser = 8, + +[EnumMember(Value = "kisi_user")] +KisiUser = 9, +} + +[JsonConverter(typeof(JsonSubtypes), "mutation_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsUserPendingMutationsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingCredentialAssignment), "updating_credential_assignment")] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsDeferringGroupMembershipUpdate), "deferring_group_membership_update")] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingGroupMembership), "updating_group_membership")] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingSuspensionState), "updating_suspension_state")] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingAccessSchedule), "updating_access_schedule")] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingUserInformation), "updating_user_information")] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsDeferringCreation), "deferring_creation")] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsDeleting), "deleting")] +[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsCreating), "creating")] +public abstract class AcsUserPendingMutations +{ +public abstract string MutationCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsCreating_model")] +public class AcsUserPendingMutationsCreating : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsCreating() { } + +public AcsUserPendingMutationsCreating(string createdAt = default, string message = default, string mutationCode = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "creating"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsDeleting_model")] +public class AcsUserPendingMutationsDeleting : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsDeleting() { } + +public AcsUserPendingMutationsDeleting(string createdAt = default, string message = default, string mutationCode = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "deleting"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsDeferringCreation_model")] +public class AcsUserPendingMutationsDeferringCreation : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsDeferringCreation() { } + +public AcsUserPendingMutationsDeferringCreation(string createdAt = default, string message = default, string mutationCode = default, string? scheduledAt = default) +{ +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +ScheduledAt = scheduledAt; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "deferring_creation"; + +/// +/// Optional: When the user creation is scheduled to occur. +/// +[DataMember(Name = "scheduled_at", IsRequired = false, EmitDefaultValue = false)] +public string? ScheduledAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformation_model")] +public class AcsUserPendingMutationsUpdatingUserInformation : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingUserInformation() { } + +public AcsUserPendingMutationsUpdatingUserInformation(string createdAt = default, AcsUserPendingMutationsUpdatingUserInformationFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingUserInformationTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Old access system user information. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingUserInformationFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_user_information"; + +/// +/// New access system user information. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingUserInformationTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformationFrom_model")] +public class AcsUserPendingMutationsUpdatingUserInformationFrom +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingUserInformationFrom() { } + +public AcsUserPendingMutationsUpdatingUserInformationFrom(string? emailAddress = default, string? fullName = default, string? phoneNumber = default) +{ +EmailAddress = emailAddress; +FullName = fullName; +PhoneNumber = phoneNumber; +} + +/// +/// Email address of the access system user. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Full name of the access system user. +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// Phone number of the access system user. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformationTo_model")] +public class AcsUserPendingMutationsUpdatingUserInformationTo +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingUserInformationTo() { } + +public AcsUserPendingMutationsUpdatingUserInformationTo(string? emailAddress = default, string? fullName = default, string? phoneNumber = default) +{ +EmailAddress = emailAddress; +FullName = fullName; +PhoneNumber = phoneNumber; +} + +/// +/// Email address of the access system user. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Full name of the access system user. +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// Phone number of the access system user. +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessSchedule_model")] +public class AcsUserPendingMutationsUpdatingAccessSchedule : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingAccessSchedule() { } + +public AcsUserPendingMutationsUpdatingAccessSchedule(string createdAt = default, AcsUserPendingMutationsUpdatingAccessScheduleFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingAccessScheduleTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Old access schedule information. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingAccessScheduleFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_access_schedule"; + +/// +/// New access schedule information. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingAccessScheduleTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessScheduleFrom_model")] +public class AcsUserPendingMutationsUpdatingAccessScheduleFrom +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingAccessScheduleFrom() { } + +public AcsUserPendingMutationsUpdatingAccessScheduleFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Starting time for the access schedule. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Starting time for the access schedule. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessScheduleTo_model")] +public class AcsUserPendingMutationsUpdatingAccessScheduleTo +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingAccessScheduleTo() { } + +public AcsUserPendingMutationsUpdatingAccessScheduleTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Starting time for the access schedule. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Starting time for the access schedule. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionState_model")] +public class AcsUserPendingMutationsUpdatingSuspensionState : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingSuspensionState() { } + +public AcsUserPendingMutationsUpdatingSuspensionState(string createdAt = default, AcsUserPendingMutationsUpdatingSuspensionStateFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingSuspensionStateTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Old user suspension state information. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingSuspensionStateFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_suspension_state"; + +/// +/// New user suspension state information. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingSuspensionStateTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionStateFrom_model")] +public class AcsUserPendingMutationsUpdatingSuspensionStateFrom +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingSuspensionStateFrom() { } + +public AcsUserPendingMutationsUpdatingSuspensionStateFrom(bool isSuspended = default) +{ +IsSuspended = isSuspended; +} + +[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] +public bool IsSuspended { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionStateTo_model")] +public class AcsUserPendingMutationsUpdatingSuspensionStateTo +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingSuspensionStateTo() { } + +public AcsUserPendingMutationsUpdatingSuspensionStateTo(bool isSuspended = default) +{ +IsSuspended = isSuspended; +} + +[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] +public bool IsSuspended { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembership_model")] +public class AcsUserPendingMutationsUpdatingGroupMembership : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingGroupMembership() { } + +public AcsUserPendingMutationsUpdatingGroupMembership(string createdAt = default, AcsUserPendingMutationsUpdatingGroupMembershipFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingGroupMembershipTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Old access group membership. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingGroupMembershipFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_group_membership"; + +/// +/// New access group membership. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingGroupMembershipTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembershipFrom_model")] +public class AcsUserPendingMutationsUpdatingGroupMembershipFrom +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingGroupMembershipFrom() { } + +public AcsUserPendingMutationsUpdatingGroupMembershipFrom(string? acsAccessGroupId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +} + +/// +/// Old access group ID. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsAccessGroupId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembershipTo_model")] +public class AcsUserPendingMutationsUpdatingGroupMembershipTo +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingGroupMembershipTo() { } + +public AcsUserPendingMutationsUpdatingGroupMembershipTo(string? acsAccessGroupId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +} + +/// +/// New access group ID. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsAccessGroupId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsDeferringGroupMembershipUpdate_model")] +public class AcsUserPendingMutationsDeferringGroupMembershipUpdate : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsDeferringGroupMembershipUpdate() { } + +public AcsUserPendingMutationsDeferringGroupMembershipUpdate(string acsAccessGroupId = default, string createdAt = default, string message = default, string mutationCode = default, AcsUserPendingMutationsDeferringGroupMembershipUpdate.VariantEnum variant = default) +{ +AcsAccessGroupId = acsAccessGroupId; +CreatedAt = createdAt; +Message = message; +MutationCode = mutationCode; +Variant = variant; +} + +/// +/// Whether the user is scheduled to be added to or removed from the access group. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum VariantEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "adding")] +Adding = 1, + +[EnumMember(Value = "removing")] +Removing = 2, +} + +/// +/// ID of the access group involved in the scheduled change. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "deferring_group_membership_update"; + +/// +/// Whether the user is scheduled to be added to or removed from the access group. +/// +[DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsDeferringGroupMembershipUpdate.VariantEnum Variant { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignment_model")] +public class AcsUserPendingMutationsUpdatingCredentialAssignment : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingCredentialAssignment() { } + +public AcsUserPendingMutationsUpdatingCredentialAssignment(string createdAt = default, AcsUserPendingMutationsUpdatingCredentialAssignmentFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingCredentialAssignmentTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous credential assignment. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingCredentialAssignmentFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_credential_assignment"; + +/// +/// New credential assignment. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public AcsUserPendingMutationsUpdatingCredentialAssignmentTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignmentFrom_model")] +public class AcsUserPendingMutationsUpdatingCredentialAssignmentFrom +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingCredentialAssignmentFrom() { } + +public AcsUserPendingMutationsUpdatingCredentialAssignmentFrom(string? acsCredentialId = default) +{ +AcsCredentialId = acsCredentialId; +} + +/// +/// Previous credential ID. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignmentTo_model")] +public class AcsUserPendingMutationsUpdatingCredentialAssignmentTo +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUpdatingCredentialAssignmentTo() { } + +public AcsUserPendingMutationsUpdatingCredentialAssignmentTo(string? acsCredentialId = default) +{ +AcsCredentialId = acsCredentialId; +} + +/// +/// New credential ID. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserPendingMutationsUnrecognized_model")] +public class AcsUserPendingMutationsUnrecognized : AcsUserPendingMutations +{ +[JsonConstructorAttribute] +protected AcsUserPendingMutationsUnrecognized() { } + +public AcsUserPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) +{ +MutationCode = mutationCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "unrecognized"; + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(AcsUserWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsLatchResidentUser), "latch_resident_user")] +[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsUnknownIssueWithAcsUser), "unknown_issue_with_acs_user")] +[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsAcsUserInactive), "acs_user_inactive")] +[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsSaltoKsUserNotSubscribed), "salto_ks_user_not_subscribed")] +[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsBeingDeleted), "being_deleted")] +public abstract class AcsUserWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_acsUserWarningsBeingDeleted_model")] +public class AcsUserWarningsBeingDeleted : AcsUserWarnings +{ +[JsonConstructorAttribute] +protected AcsUserWarningsBeingDeleted() { } + +public AcsUserWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserWarningsSaltoKsUserNotSubscribed_model")] +public class AcsUserWarningsSaltoKsUserNotSubscribed : AcsUserWarnings +{ +[JsonConstructorAttribute] +protected AcsUserWarningsSaltoKsUserNotSubscribed() { } + +public AcsUserWarningsSaltoKsUserNotSubscribed(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_user_not_subscribed"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserWarningsAcsUserInactive_model")] +public class AcsUserWarningsAcsUserInactive : AcsUserWarnings +{ +[JsonConstructorAttribute] +protected AcsUserWarningsAcsUserInactive() { } + +public AcsUserWarningsAcsUserInactive(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "acs_user_inactive"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserWarningsUnknownIssueWithAcsUser_model")] +public class AcsUserWarningsUnknownIssueWithAcsUser : AcsUserWarnings +{ +[JsonConstructorAttribute] +protected AcsUserWarningsUnknownIssueWithAcsUser() { } + +public AcsUserWarningsUnknownIssueWithAcsUser(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unknown_issue_with_acs_user"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserWarningsLatchResidentUser_model")] +public class AcsUserWarningsLatchResidentUser : AcsUserWarnings +{ +[JsonConstructorAttribute] +protected AcsUserWarningsLatchResidentUser() { } + +public AcsUserWarningsLatchResidentUser(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "latch_resident_user"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserWarningsUnrecognized_model")] +public class AcsUserWarningsUnrecognized : AcsUserWarnings +{ +[JsonConstructorAttribute] +protected AcsUserWarningsUnrecognized() { } + +public AcsUserWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// `starts_at` and `ends_at` timestamps for the [access system user's](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access. +/// +[DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] +public AcsUserAccessSchedule? AccessSchedule { get; set; } + +/// +/// ID of the [access system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsUserId { get; set; } + +/// +/// The ID of the connected account that is associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +[Obsolete("use email_address.")] +[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] +public string? Email { get; set; } + +/// +/// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Errors associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. +/// +[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] +public AcsUser.ExternalTypeEnum? ExternalType { get; set; } + +/// +/// Display name that corresponds to the brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. +/// +[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string? ExternalTypeDisplayName { get; set; } + +/// +/// Full name of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// ID of the HID access control system associated with the user. +/// +[DataMember(Name = "hid_acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string? HidAcsSystemId { get; set; } + +/// +/// Indicates whether Seam manages the access system user. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Indicates whether the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) is currently [suspended](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users). +/// +[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] +public bool? IsSuspended { get; set; } + +/// +/// Pending mutations associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Seam is in the process of pushing these mutations to the integrated access system. +/// +[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] +public List? PendingMutations { get; set; } + +/// +/// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// Salto KS-specific metadata associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsUserSaltoKsMetadata? SaltoKsMetadata { get; set; } + +/// +/// Salto Space-specific metadata associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] +public AcsUserSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } + +/// +/// Email address of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "user_identity_email_address", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityEmailAddress { get; set; } + +/// +/// Full name of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "user_identity_full_name", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityFullName { get; set; } + +/// +/// ID of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Phone number of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). +/// +[DataMember(Name = "user_identity_phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityPhoneNumber { get; set; } + +/// +/// Warnings associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserAccessSchedule_model")] +public class AcsUserAccessSchedule +{ +[JsonConstructorAttribute] +protected AcsUserAccessSchedule() { } + +public AcsUserAccessSchedule(string? endsAt = default, string startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserSaltoKsMetadata_model")] +public class AcsUserSaltoKsMetadata +{ +[JsonConstructorAttribute] +protected AcsUserSaltoKsMetadata() { } + +public AcsUserSaltoKsMetadata(bool? isSubscribed = default) +{ +IsSubscribed = isSubscribed; +} + +/// +/// Indicates whether the user holds an active subscription slot on the Salto KS site. Only subscribed users can unlock doors and count against the site's user-subscription limit. A user may not be subscribed because their access schedule has not started or has ended, the site has reached its subscription limit, or they were manually unsubscribed. This is distinct from `is_suspended`, which reflects whether the user has been explicitly blocked. +/// +[DataMember(Name = "is_subscribed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsSubscribed { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_acsUserSaltoSpaceMetadata_model")] +public class AcsUserSaltoSpaceMetadata +{ +[JsonConstructorAttribute] +protected AcsUserSaltoSpaceMetadata() { } + +public AcsUserSaltoSpaceMetadata(bool? auditOpenings = default, string? userId = default) +{ +AuditOpenings = auditOpenings; +UserId = userId; +} + +/// +/// Indicates whether AuditOpenings is enabled for the user in the Salto Space access system. +/// +[DataMember(Name = "audit_openings", IsRequired = false, EmitDefaultValue = false)] +public bool? AuditOpenings { get; set; } + +/// +/// User ID in the Salto Space access system. +/// +[DataMember(Name = "user_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/ActionAttempt.cs b/src/Seam/Model/ActionAttempt.cs index 5387e6fb..55ec0bfe 100644 --- a/src/Seam/Model/ActionAttempt.cs +++ b/src/Seam/Model/ActionAttempt.cs @@ -8,6569 +8,6160 @@ namespace Seam.Model { - [JsonConverter(typeof(JsonSubtypes), "action_type")] - [JsonSubtypes.FallBackSubType(typeof(ActionAttemptUnrecognized))] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptUpdateNoiseThreshold), "UPDATE_NOISE_THRESHOLD")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptDeleteNoiseThreshold), "DELETE_NOISE_THRESHOLD")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptCreateNoiseThreshold), "CREATE_NOISE_THRESHOLD")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptUpdateAccessCode), "UPDATE_ACCESS_CODE")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptDeleteAccessCode), "DELETE_ACCESS_CODE")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptCreateAccessCode), "CREATE_ACCESS_CODE")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptSyncAccessCodes), "SYNC_ACCESS_CODES")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptConfigureAutoLock), "CONFIGURE_AUTO_LOCK")] - [JsonSubtypes.KnownSubType( - typeof(ActionAttemptPushThermostatPrograms), - "PUSH_THERMOSTAT_PROGRAMS" - )] - [JsonSubtypes.KnownSubType( - typeof(ActionAttemptSimulateManualLockViaKeypad), - "SIMULATE_MANUAL_LOCK_VIA_KEYPAD" - )] - [JsonSubtypes.KnownSubType( - typeof(ActionAttemptSimulateKeypadCodeEntry), - "SIMULATE_KEYPAD_CODE_ENTRY" - )] - [JsonSubtypes.KnownSubType( - typeof(ActionAttemptActivateClimatePreset), - "ACTIVATE_CLIMATE_PRESET" - )] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptSetHvacMode), "SET_HVAC_MODE")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptSetFanMode), "SET_FAN_MODE")] - [JsonSubtypes.KnownSubType( - typeof(ActionAttemptResetSandboxWorkspace), - "RESET_SANDBOX_WORKSPACE" - )] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptAssignCredential), "ASSIGN_CREDENTIAL")] - [JsonSubtypes.KnownSubType( - typeof(ActionAttemptScanToAssignCredential), - "SCAN_TO_ASSIGN_CREDENTIAL" - )] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptEncodeCredential), "ENCODE_CREDENTIAL")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptScanCredential), "SCAN_CREDENTIAL")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptUnlockDoor), "UNLOCK_DOOR")] - [JsonSubtypes.KnownSubType(typeof(ActionAttemptLockDoor), "LOCK_DOOR")] - public abstract class ActionAttempt - { - public abstract string ActionType { get; } - - public abstract string ActionAttemptId { get; set; } - - public abstract override string ToString(); - } - - /// - /// Locking a door is pending. - /// - [DataContract(Name = "seamModel_actionAttemptLockDoor_model")] - public class ActionAttemptLockDoor : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptLockDoor() { } - - public ActionAttemptLockDoor( - string actionAttemptId = default, - string actionType = default, - ActionAttemptLockDoorError error = default, - ActionAttemptLockDoorResult result = default, - ActionAttemptLockDoor.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "LOCK_DOOR"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptLockDoorError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptLockDoorResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptLockDoor.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptLockDoorError_model")] - public class ActionAttemptLockDoorError - { - [JsonConstructorAttribute] - protected ActionAttemptLockDoorError() { } - - public ActionAttemptLockDoorError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptLockDoorResult_model")] - public class ActionAttemptLockDoorResult - { - [JsonConstructorAttribute] - protected ActionAttemptLockDoorResult() { } - - public ActionAttemptLockDoorResult(bool? wasConfirmedByDevice = default) - { - WasConfirmedByDevice = wasConfirmedByDevice; - } - - /// - /// Indicates whether the device confirmed that the lock action occurred. - /// - [DataMember(Name = "was_confirmed_by_device", IsRequired = false, EmitDefaultValue = false)] - public bool? WasConfirmedByDevice { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Unlocking a door is pending. - /// - [DataContract(Name = "seamModel_actionAttemptUnlockDoor_model")] - public class ActionAttemptUnlockDoor : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptUnlockDoor() { } - - public ActionAttemptUnlockDoor( - string actionAttemptId = default, - string actionType = default, - ActionAttemptUnlockDoorError error = default, - ActionAttemptUnlockDoorResult result = default, - ActionAttemptUnlockDoor.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "UNLOCK_DOOR"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUnlockDoorError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUnlockDoorResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUnlockDoor.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUnlockDoorError_model")] - public class ActionAttemptUnlockDoorError - { - [JsonConstructorAttribute] - protected ActionAttemptUnlockDoorError() { } - - public ActionAttemptUnlockDoorError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUnlockDoorResult_model")] - public class ActionAttemptUnlockDoorResult - { - [JsonConstructorAttribute] - protected ActionAttemptUnlockDoorResult() { } - - public ActionAttemptUnlockDoorResult(bool? wasConfirmedByDevice = default) - { - WasConfirmedByDevice = wasConfirmedByDevice; - } - - /// - /// Indicates whether the device confirmed that the unlock action occurred. - /// - [DataMember(Name = "was_confirmed_by_device", IsRequired = false, EmitDefaultValue = false)] - public bool? WasConfirmedByDevice { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Reading credential data from the physical encoder is pending. - /// - [DataContract(Name = "seamModel_actionAttemptScanCredential_model")] - public class ActionAttemptScanCredential : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredential() { } - - public ActionAttemptScanCredential( - string actionAttemptId = default, - string actionType = default, - ActionAttemptScanCredentialError error = default, - ActionAttemptScanCredentialResult result = default, - ActionAttemptScanCredential.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "SCAN_CREDENTIAL"; - - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialError Error { get; set; } - - /// - /// Result of scanning a card. If the attempt was successful, includes a snapshot of credential data read from the physical encoder, the corresponding data stored on Seam and the access system, and any associated warnings. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredential.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanCredentialError_model")] - public class ActionAttemptScanCredentialError - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialError() { } - - public ActionAttemptScanCredentialError( - string message = default, - ActionAttemptScanCredentialError.TypeEnum type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "uncategorized_error")] - UncategorizedError = 1, - - [EnumMember(Value = "action_attempt_expired")] - ActionAttemptExpired = 2, - - [EnumMember(Value = "no_credential_on_encoder")] - NoCredentialOnEncoder = 3, - - [EnumMember(Value = "encoder_not_online")] - EncoderNotOnline = 4, - - [EnumMember(Value = "encoder_communication_timeout")] - EncoderCommunicationTimeout = 5, - - [EnumMember(Value = "bridge_disconnected")] - BridgeDisconnected = 6, - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialError.TypeEnum Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanCredentialResult_model")] - public class ActionAttemptScanCredentialResult - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResult() { } - - public ActionAttemptScanCredentialResult( - ActionAttemptScanCredentialResultAcsCredentialOnEncoder? acsCredentialOnEncoder = - default, - ActionAttemptScanCredentialResultAcsCredentialOnSeam? acsCredentialOnSeam = default, - List warnings = default - ) - { - AcsCredentialOnEncoder = acsCredentialOnEncoder; - AcsCredentialOnSeam = acsCredentialOnSeam; - Warnings = warnings; - } - - /// - /// Snapshot of credential data read from the physical encoder. - /// - [DataMember( - Name = "acs_credential_on_encoder", - IsRequired = false, - EmitDefaultValue = false - )] - public ActionAttemptScanCredentialResultAcsCredentialOnEncoder? AcsCredentialOnEncoder { get; set; } - - /// - /// Corresponding credential data as stored on Seam and the access system. - /// - [DataMember(Name = "acs_credential_on_seam", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnSeam? AcsCredentialOnSeam { get; set; } - - /// - /// Warnings related to scanning the credential, such as mismatches between the credential data currently encoded on the card and the corresponding data stored on Seam and the access system. - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnEncoder_model")] - public class ActionAttemptScanCredentialResultAcsCredentialOnEncoder - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultAcsCredentialOnEncoder() { } - - public ActionAttemptScanCredentialResultAcsCredentialOnEncoder( - string? cardNumber = default, - string? createdAt = default, - string? endsAt = default, - bool? isIssued = default, - string? startsAt = default, - ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata? visionlineMetadata = - default - ) - { - CardNumber = cardNumber; - CreatedAt = createdAt; - EndsAt = endsAt; - IsIssued = isIssued; - StartsAt = startsAt; - VisionlineMetadata = visionlineMetadata; - } - - /// - /// A number or string that physically identifies the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] - public string? CardNumber { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) will stop being usable. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Indicates whether the credential has been issued (encoded onto a card). - /// - [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] - public bool? IsIssued { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) becomes usable. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata? VisionlineMetadata { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata_model" - )] - public class ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata() { } - - public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata( - bool? cancelled = default, - ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata.CardFormatEnum? cardFormat = - default, - string? cardHolder = default, - string? cardId = default, - List? commonAcsEntranceIds = default, - bool? discarded = default, - bool? expired = default, - List? guestAcsEntranceIds = default, - float? numberOfIssuedCards = default, - bool? overridden = default, - bool? overwritten = default, - bool? pendingAutoUpdate = default - ) - { - Cancelled = cancelled; - CardFormat = cardFormat; - CardHolder = cardHolder; - CardId = cardId; - CommonAcsEntranceIds = commonAcsEntranceIds; - Discarded = discarded; - Expired = expired; - GuestAcsEntranceIds = guestAcsEntranceIds; - NumberOfIssuedCards = numberOfIssuedCards; - Overridden = overridden; - Overwritten = overwritten; - PendingAutoUpdate = pendingAutoUpdate; - } - - /// - /// Format of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CardFormatEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "TLCode")] - TlCode = 1, - - [EnumMember(Value = "rfid48")] - Rfid48 = 2, - } - - /// - /// Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is cancelled. - /// - [DataMember(Name = "cancelled", IsRequired = false, EmitDefaultValue = false)] - public bool? Cancelled { get; set; } - - /// - /// Format of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "card_format", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata.CardFormatEnum? CardFormat { get; set; } - - /// - /// Holder of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "card_holder", IsRequired = false, EmitDefaultValue = false)] - public string? CardHolder { get; set; } - - /// - /// Card ID for the Visionline card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] - public string? CardId { get; set; } - - /// - /// IDs of the common [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAcsEntranceIds { get; set; } - - /// - /// Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is discarded. - /// - [DataMember(Name = "discarded", IsRequired = false, EmitDefaultValue = false)] - public bool? Discarded { get; set; } - - /// - /// Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is expired. - /// - [DataMember(Name = "expired", IsRequired = false, EmitDefaultValue = false)] - public bool? Expired { get; set; } - - /// - /// IDs of the guest [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? GuestAcsEntranceIds { get; set; } - - /// - /// Number of issued cards associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "number_of_issued_cards", IsRequired = false, EmitDefaultValue = false)] - public float? NumberOfIssuedCards { get; set; } - - /// - /// Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is overridden. - /// - [DataMember(Name = "overridden", IsRequired = false, EmitDefaultValue = false)] - public bool? Overridden { get; set; } - - /// - /// Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is overwritten. - /// - [DataMember(Name = "overwritten", IsRequired = false, EmitDefaultValue = false)] - public bool? Overwritten { get; set; } - - /// - /// Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is pending auto-update. - /// - [DataMember(Name = "pending_auto_update", IsRequired = false, EmitDefaultValue = false)] - public bool? PendingAutoUpdate { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeam_model")] - public class ActionAttemptScanCredentialResultAcsCredentialOnSeam - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultAcsCredentialOnSeam() { } - - public ActionAttemptScanCredentialResultAcsCredentialOnSeam( - ActionAttemptScanCredentialResultAcsCredentialOnSeam.AccessMethodEnum accessMethod = - default, - string acsCredentialId = default, - string? acsCredentialPoolId = default, - string acsSystemId = default, - string? acsUserId = default, - ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? akilesMetadata = - default, - ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? assaAbloyVostioMetadata = - default, - string? cardNumber = default, - string? code = default, - string connectedAccountId = default, - string createdAt = default, - string displayName = default, - string? endsAt = default, - List errors = default, - ActionAttemptScanCredentialResultAcsCredentialOnSeam.ExternalTypeEnum? externalType = - default, - string? externalTypeDisplayName = default, - bool? isIssued = default, - bool? isLatestDesiredStateSyncedWithProvider = default, - bool isManaged = default, - bool? isMultiPhoneSyncCredential = default, - bool? isOneTimeUse = default, - string? issuedAt = default, - string? latestDesiredStateSyncedWithProviderAt = default, - string? parentAcsCredentialId = default, - string? startsAt = default, - string? userIdentityId = default, - ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata? visionlineMetadata = - default, - List warnings = default, - string workspaceId = default - ) - { - AccessMethod = accessMethod; - AcsCredentialId = acsCredentialId; - AcsCredentialPoolId = acsCredentialPoolId; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - AkilesMetadata = akilesMetadata; - AssaAbloyVostioMetadata = assaAbloyVostioMetadata; - CardNumber = cardNumber; - Code = code; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DisplayName = displayName; - EndsAt = endsAt; - Errors = errors; - ExternalType = externalType; - ExternalTypeDisplayName = externalTypeDisplayName; - IsIssued = isIssued; - IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; - IsManaged = isManaged; - IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; - IsOneTimeUse = isOneTimeUse; - IssuedAt = issuedAt; - LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; - ParentAcsCredentialId = parentAcsCredentialId; - StartsAt = startsAt; - UserIdentityId = userIdentityId; - VisionlineMetadata = visionlineMetadata; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - /// - /// Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AccessMethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExternalTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_card")] - PtiCard = 1, - - [EnumMember(Value = "brivo_credential")] - BrivoCredential = 2, - - [EnumMember(Value = "hid_credential")] - HidCredential = 3, - - [EnumMember(Value = "visionline_card")] - VisionlineCard = 4, - - [EnumMember(Value = "salto_ks_credential")] - SaltoKsCredential = 5, - - [EnumMember(Value = "assa_abloy_vostio_key")] - AssaAbloyVostioKey = 6, - - [EnumMember(Value = "salto_space_key")] - SaltoSpaceKey = 7, - - [EnumMember(Value = "latch_access")] - LatchAccess = 8, - - [EnumMember(Value = "dormakaba_ambiance_credential")] - DormakabaAmbianceCredential = 9, - - [EnumMember(Value = "hotek_card")] - HotekCard = 10, - - [EnumMember(Value = "salto_ks_tag")] - SaltoKsTag = 11, - - [EnumMember(Value = "avigilon_alta_credential")] - AvigilonAltaCredential = 12, - - [EnumMember(Value = "kisi_credential")] - KisiCredential = 13, - - [EnumMember(Value = "akiles_credential")] - AkilesCredential = 14, - } - - /// - /// Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnSeam.AccessMethodEnum AccessMethod { get; set; } - - /// - /// ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the credential pool to which the credential belongs. - /// - [DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialPoolId { get; set; } - - /// - /// ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? AkilesMetadata { get; set; } - - /// - /// Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember( - Name = "assa_abloy_vostio_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - - /// - /// Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] - public string? CardNumber { get; set; } - - /// - /// Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. - /// - [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnSeam.ExternalTypeEnum? ExternalType { get; set; } - - /// - /// Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - /// - [DataMember( - Name = "external_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ExternalTypeDisplayName { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. - /// - [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] - public bool? IsIssued { get; set; } - - /// - /// Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. - /// - [DataMember( - Name = "is_latest_desired_state_synced_with_provider", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } - - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). - /// - [DataMember( - Name = "is_multi_phone_sync_credential", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsMultiPhoneSyncCredential { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. - /// - [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOneTimeUse { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card. - /// - [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] - public string? IssuedAt { get; set; } - - /// - /// Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. - /// - [DataMember( - Name = "latest_desired_state_synced_with_provider_at", - IsRequired = false, - EmitDefaultValue = false - )] - public string? LatestDesiredStateSyncedWithProviderAt { get; set; } - - /// - /// ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember( - Name = "parent_acs_credential_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ParentAcsCredentialId { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata? VisionlineMetadata { get; set; } - - /// - /// Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata_model" - )] - public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata() { } - - public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata( - string? memberPinId = default - ) - { - MemberPinId = memberPinId; - } - - /// - /// ID of the Akiles member PIN. - /// - [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] - public string? MemberPinId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata_model" - )] - public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata() { } - - public ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata( - bool? autoJoin = default, - List? doorNames = default, - string? endpointId = default, - string? keyId = default, - string? keyIssuingRequestId = default, - List? overrideGuestAcsEntranceIds = default - ) - { - AutoJoin = autoJoin; - DoorNames = doorNames; - EndpointId = endpointId; - KeyId = keyId; - KeyIssuingRequestId = keyIssuingRequestId; - OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; - } - - /// - /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. - /// - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - /// - /// Names of the doors to which to grant access in the Vostio access system. - /// - [DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] - public List? DoorNames { get; set; } - - /// - /// Endpoint ID in the Vostio access system. - /// - [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] - public string? EndpointId { get; set; } - - /// - /// Key ID in the Vostio access system. - /// - [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyId { get; set; } - - /// - /// Key issuing request ID in the Vostio access system. - /// - [DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyIssuingRequestId { get; set; } - - /// - /// IDs of the guest entrances to override in the Vostio access system. - /// - [DataMember( - Name = "override_guest_acs_entrance_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? OverrideGuestAcsEntranceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamErrors_model" - )] - public class ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors() { } - - public ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata_model" - )] - public class ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata() { } - - public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata( - bool? autoJoin = default, - ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = - default, - string? cardId = default, - List? commonAcsEntranceIds = default, - string? credentialId = default, - List? guestAcsEntranceIds = default, - bool? isValid = default, - List? joinerAcsCredentialIds = default - ) - { - AutoJoin = autoJoin; - CardFunctionType = cardFunctionType; - CardId = cardId; - CommonAcsEntranceIds = commonAcsEntranceIds; - CredentialId = credentialId; - GuestAcsEntranceIds = guestAcsEntranceIds; - IsValid = isValid; - JoinerAcsCredentialIds = joinerAcsCredentialIds; - } - - /// - /// Card function type in the Visionline access system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CardFunctionTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "guest")] - Guest = 1, - - [EnumMember(Value = "staff")] - Staff = 2, - } - - /// - /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. - /// - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - /// - /// Card function type in the Visionline access system. - /// - [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - - /// - /// ID of the card in the Visionline access system. - /// - [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] - public string? CardId { get; set; } - - /// - /// Common entrance IDs in the Visionline access system. - /// - [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAcsEntranceIds { get; set; } - - /// - /// ID of the credential in the Visionline access system. - /// - [DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? CredentialId { get; set; } - - /// - /// Guest entrance IDs in the Visionline access system. - /// - [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? GuestAcsEntranceIds { get; set; } - - /// - /// Indicates whether the credential is valid. - /// - [DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] - public bool? IsValid { get; set; } - - /// - /// IDs of the credentials to which you want to join. - /// - [DataMember( - Name = "joiner_acs_credential_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? JoinerAcsCredentialIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamWarnings_model" - )] - public class ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings() { } - - public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings( - string createdAt = default, - string message = default, - ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum warningCode = - default, - string? newCode = default, - string? originalCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - NewCode = newCode; - OriginalCode = originalCode; - } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum WarningCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "waiting_to_be_issued")] - WaitingToBeIssued = 1, - - [EnumMember(Value = "schedule_externally_modified")] - ScheduleExternallyModified = 2, - - [EnumMember(Value = "schedule_modified")] - ScheduleModified = 3, - - [EnumMember(Value = "being_deleted")] - BeingDeleted = 4, - - [EnumMember(Value = "unknown_issue_with_acs_credential")] - UnknownIssueWithAcsCredential = 5, - - [EnumMember(Value = "needs_to_be_reissued")] - NeedsToBeReissued = 6, - - [EnumMember(Value = "requested_code_unavailable")] - RequestedCodeUnavailable = 7, - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum WarningCode { get; set; } - - /// - /// The PIN code that was assigned instead. - /// - [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] - public string? NewCode { get; set; } - - /// - /// The originally requested PIN code that could not be used. - /// - [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] - public string? OriginalCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanCredentialResultWarnings_model")] - public class ActionAttemptScanCredentialResultWarnings - { - [JsonConstructorAttribute] - protected ActionAttemptScanCredentialResultWarnings() { } - - public ActionAttemptScanCredentialResultWarnings( - ActionAttemptScanCredentialResultWarnings.WarningCodeEnum warningCode = default, - string warningMessage = default - ) - { - WarningCode = warningCode; - WarningMessage = warningMessage; - } - - /// - /// Indicates a warning related to scanning a credential. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum WarningCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "acs_credential_on_encoder_out_of_sync")] - AcsCredentialOnEncoderOutOfSync = 1, - - [EnumMember(Value = "acs_credential_on_seam_not_found")] - AcsCredentialOnSeamNotFound = 2, - } - - /// - /// Indicates a warning related to scanning a credential. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "warning_message", IsRequired = false, EmitDefaultValue = false)] - public string WarningMessage { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Encoding credential data from the physical encoder onto a card is pending. - /// - [DataContract(Name = "seamModel_actionAttemptEncodeCredential_model")] - public class ActionAttemptEncodeCredential : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptEncodeCredential() { } - - public ActionAttemptEncodeCredential( - string actionAttemptId = default, - string actionType = default, - ActionAttemptEncodeCredentialError error = default, - ActionAttemptEncodeCredentialResult result = default, - ActionAttemptEncodeCredential.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "ENCODE_CREDENTIAL"; - - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialError Error { get; set; } - - /// - /// Result of an encoding attempt. If the attempt was successful, includes the credential data that was encoded onto the card. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredential.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptEncodeCredentialError_model")] - public class ActionAttemptEncodeCredentialError - { - [JsonConstructorAttribute] - protected ActionAttemptEncodeCredentialError() { } - - public ActionAttemptEncodeCredentialError( - string message = default, - ActionAttemptEncodeCredentialError.TypeEnum type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Error type to indicate that the credential was deleted and can no longer be encoded. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "uncategorized_error")] - UncategorizedError = 1, - - [EnumMember(Value = "action_attempt_expired")] - ActionAttemptExpired = 2, - - [EnumMember(Value = "no_credential_on_encoder")] - NoCredentialOnEncoder = 3, - - [EnumMember(Value = "incompatible_card_format")] - IncompatibleCardFormat = 4, - - [EnumMember(Value = "credential_cannot_be_reissued")] - CredentialCannotBeReissued = 5, - - [EnumMember(Value = "encoder_not_online")] - EncoderNotOnline = 6, - - [EnumMember(Value = "encoder_communication_timeout")] - EncoderCommunicationTimeout = 7, - - [EnumMember(Value = "bridge_disconnected")] - BridgeDisconnected = 8, - - [EnumMember(Value = "encoding_interrupted")] - EncodingInterrupted = 9, - - [EnumMember(Value = "credential_deleted")] - CredentialDeleted = 10, - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Error type to indicate that the credential was deleted and can no longer be encoded. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialError.TypeEnum Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResult_model")] - public class ActionAttemptEncodeCredentialResult - { - [JsonConstructorAttribute] - protected ActionAttemptEncodeCredentialResult() { } - - public ActionAttemptEncodeCredentialResult( - ActionAttemptEncodeCredentialResult.AccessMethodEnum accessMethod = default, - string acsCredentialId = default, - string? acsCredentialPoolId = default, - string acsSystemId = default, - string? acsUserId = default, - ActionAttemptEncodeCredentialResultAkilesMetadata? akilesMetadata = default, - ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = - default, - string? cardNumber = default, - string? code = default, - string connectedAccountId = default, - string createdAt = default, - string displayName = default, - string? endsAt = default, - List errors = default, - ActionAttemptEncodeCredentialResult.ExternalTypeEnum? externalType = default, - string? externalTypeDisplayName = default, - bool? isIssued = default, - bool? isLatestDesiredStateSyncedWithProvider = default, - bool isManaged = default, - bool? isMultiPhoneSyncCredential = default, - bool? isOneTimeUse = default, - string? issuedAt = default, - string? latestDesiredStateSyncedWithProviderAt = default, - string? parentAcsCredentialId = default, - string? startsAt = default, - string? userIdentityId = default, - ActionAttemptEncodeCredentialResultVisionlineMetadata? visionlineMetadata = default, - List warnings = default, - string workspaceId = default - ) - { - AccessMethod = accessMethod; - AcsCredentialId = acsCredentialId; - AcsCredentialPoolId = acsCredentialPoolId; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - AkilesMetadata = akilesMetadata; - AssaAbloyVostioMetadata = assaAbloyVostioMetadata; - CardNumber = cardNumber; - Code = code; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DisplayName = displayName; - EndsAt = endsAt; - Errors = errors; - ExternalType = externalType; - ExternalTypeDisplayName = externalTypeDisplayName; - IsIssued = isIssued; - IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; - IsManaged = isManaged; - IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; - IsOneTimeUse = isOneTimeUse; - IssuedAt = issuedAt; - LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; - ParentAcsCredentialId = parentAcsCredentialId; - StartsAt = startsAt; - UserIdentityId = userIdentityId; - VisionlineMetadata = visionlineMetadata; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - /// - /// Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AccessMethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExternalTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_card")] - PtiCard = 1, - - [EnumMember(Value = "brivo_credential")] - BrivoCredential = 2, - - [EnumMember(Value = "hid_credential")] - HidCredential = 3, - - [EnumMember(Value = "visionline_card")] - VisionlineCard = 4, - - [EnumMember(Value = "salto_ks_credential")] - SaltoKsCredential = 5, - - [EnumMember(Value = "assa_abloy_vostio_key")] - AssaAbloyVostioKey = 6, - - [EnumMember(Value = "salto_space_key")] - SaltoSpaceKey = 7, - - [EnumMember(Value = "latch_access")] - LatchAccess = 8, - - [EnumMember(Value = "dormakaba_ambiance_credential")] - DormakabaAmbianceCredential = 9, - - [EnumMember(Value = "hotek_card")] - HotekCard = 10, - - [EnumMember(Value = "salto_ks_tag")] - SaltoKsTag = 11, - - [EnumMember(Value = "avigilon_alta_credential")] - AvigilonAltaCredential = 12, - - [EnumMember(Value = "kisi_credential")] - KisiCredential = 13, - - [EnumMember(Value = "akiles_credential")] - AkilesCredential = 14, - } - - /// - /// Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialResult.AccessMethodEnum AccessMethod { get; set; } - - /// - /// ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the credential pool to which the credential belongs. - /// - [DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialPoolId { get; set; } - - /// - /// ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialResultAkilesMetadata? AkilesMetadata { get; set; } - - /// - /// Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember( - Name = "assa_abloy_vostio_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - - /// - /// Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] - public string? CardNumber { get; set; } - - /// - /// Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. - /// - [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialResult.ExternalTypeEnum? ExternalType { get; set; } - - /// - /// Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - /// - [DataMember( - Name = "external_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ExternalTypeDisplayName { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. - /// - [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] - public bool? IsIssued { get; set; } - - /// - /// Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. - /// - [DataMember( - Name = "is_latest_desired_state_synced_with_provider", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } - - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). - /// - [DataMember( - Name = "is_multi_phone_sync_credential", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsMultiPhoneSyncCredential { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. - /// - [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOneTimeUse { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card. - /// - [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] - public string? IssuedAt { get; set; } - - /// - /// Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. - /// - [DataMember( - Name = "latest_desired_state_synced_with_provider_at", - IsRequired = false, - EmitDefaultValue = false - )] - public string? LatestDesiredStateSyncedWithProviderAt { get; set; } - - /// - /// ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember( - Name = "parent_acs_credential_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ParentAcsCredentialId { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialResultVisionlineMetadata? VisionlineMetadata { get; set; } - - /// - /// Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultAkilesMetadata_model")] - public class ActionAttemptEncodeCredentialResultAkilesMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptEncodeCredentialResultAkilesMetadata() { } - - public ActionAttemptEncodeCredentialResultAkilesMetadata(string? memberPinId = default) - { - MemberPinId = memberPinId; - } - - /// - /// ID of the Akiles member PIN. - /// - [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] - public string? MemberPinId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptEncodeCredentialResultAssaAbloyVostioMetadata_model" - )] - public class ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata() { } - - public ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata( - bool? autoJoin = default, - List? doorNames = default, - string? endpointId = default, - string? keyId = default, - string? keyIssuingRequestId = default, - List? overrideGuestAcsEntranceIds = default - ) - { - AutoJoin = autoJoin; - DoorNames = doorNames; - EndpointId = endpointId; - KeyId = keyId; - KeyIssuingRequestId = keyIssuingRequestId; - OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; - } - - /// - /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. - /// - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - /// - /// Names of the doors to which to grant access in the Vostio access system. - /// - [DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] - public List? DoorNames { get; set; } - - /// - /// Endpoint ID in the Vostio access system. - /// - [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] - public string? EndpointId { get; set; } - - /// - /// Key ID in the Vostio access system. - /// - [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyId { get; set; } - - /// - /// Key issuing request ID in the Vostio access system. - /// - [DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyIssuingRequestId { get; set; } - - /// - /// IDs of the guest entrances to override in the Vostio access system. - /// - [DataMember( - Name = "override_guest_acs_entrance_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? OverrideGuestAcsEntranceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultErrors_model")] - public class ActionAttemptEncodeCredentialResultErrors - { - [JsonConstructorAttribute] - protected ActionAttemptEncodeCredentialResultErrors() { } - - public ActionAttemptEncodeCredentialResultErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultVisionlineMetadata_model")] - public class ActionAttemptEncodeCredentialResultVisionlineMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptEncodeCredentialResultVisionlineMetadata() { } - - public ActionAttemptEncodeCredentialResultVisionlineMetadata( - bool? autoJoin = default, - ActionAttemptEncodeCredentialResultVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = - default, - string? cardId = default, - List? commonAcsEntranceIds = default, - string? credentialId = default, - List? guestAcsEntranceIds = default, - bool? isValid = default, - List? joinerAcsCredentialIds = default - ) - { - AutoJoin = autoJoin; - CardFunctionType = cardFunctionType; - CardId = cardId; - CommonAcsEntranceIds = commonAcsEntranceIds; - CredentialId = credentialId; - GuestAcsEntranceIds = guestAcsEntranceIds; - IsValid = isValid; - JoinerAcsCredentialIds = joinerAcsCredentialIds; - } - - /// - /// Card function type in the Visionline access system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CardFunctionTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "guest")] - Guest = 1, - - [EnumMember(Value = "staff")] - Staff = 2, - } - - /// - /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. - /// - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - /// - /// Card function type in the Visionline access system. - /// - [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialResultVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - - /// - /// ID of the card in the Visionline access system. - /// - [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] - public string? CardId { get; set; } - - /// - /// Common entrance IDs in the Visionline access system. - /// - [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAcsEntranceIds { get; set; } - - /// - /// ID of the credential in the Visionline access system. - /// - [DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? CredentialId { get; set; } - - /// - /// Guest entrance IDs in the Visionline access system. - /// - [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? GuestAcsEntranceIds { get; set; } - - /// - /// Indicates whether the credential is valid. - /// - [DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] - public bool? IsValid { get; set; } - - /// - /// IDs of the credentials to which you want to join. - /// - [DataMember( - Name = "joiner_acs_credential_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? JoinerAcsCredentialIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultWarnings_model")] - public class ActionAttemptEncodeCredentialResultWarnings - { - [JsonConstructorAttribute] - protected ActionAttemptEncodeCredentialResultWarnings() { } - - public ActionAttemptEncodeCredentialResultWarnings( - string createdAt = default, - string message = default, - ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum warningCode = default, - string? newCode = default, - string? originalCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - NewCode = newCode; - OriginalCode = originalCode; - } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum WarningCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "waiting_to_be_issued")] - WaitingToBeIssued = 1, - - [EnumMember(Value = "schedule_externally_modified")] - ScheduleExternallyModified = 2, - - [EnumMember(Value = "schedule_modified")] - ScheduleModified = 3, - - [EnumMember(Value = "being_deleted")] - BeingDeleted = 4, - - [EnumMember(Value = "unknown_issue_with_acs_credential")] - UnknownIssueWithAcsCredential = 5, - - [EnumMember(Value = "needs_to_be_reissued")] - NeedsToBeReissued = 6, - - [EnumMember(Value = "requested_code_unavailable")] - RequestedCodeUnavailable = 7, - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } - - /// - /// The PIN code that was assigned instead. - /// - [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] - public string? NewCode { get; set; } - - /// - /// The originally requested PIN code that could not be used. - /// - [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] - public string? OriginalCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Scanning a physical card and assigning the credential is pending. - /// - [DataContract(Name = "seamModel_actionAttemptScanToAssignCredential_model")] - public class ActionAttemptScanToAssignCredential : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptScanToAssignCredential() { } - - public ActionAttemptScanToAssignCredential( - string actionAttemptId = default, - string actionType = default, - ActionAttemptScanToAssignCredentialError error = default, - ActionAttemptScanToAssignCredentialResult result = default, - ActionAttemptScanToAssignCredential.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "SCAN_TO_ASSIGN_CREDENTIAL"; - - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialError Error { get; set; } - - /// - /// Result of a scan to assign attempt. If the attempt was successful, includes the credential data that was scanned and assigned. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredential.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialError_model")] - public class ActionAttemptScanToAssignCredentialError - { - [JsonConstructorAttribute] - protected ActionAttemptScanToAssignCredentialError() { } - - public ActionAttemptScanToAssignCredentialError( - string message = default, - ActionAttemptScanToAssignCredentialError.TypeEnum type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Error type to indicate that there is no credential on the encoder. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "uncategorized_error")] - UncategorizedError = 1, - - [EnumMember(Value = "action_attempt_expired")] - ActionAttemptExpired = 2, - - [EnumMember(Value = "no_credential_on_encoder")] - NoCredentialOnEncoder = 3, - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Error type to indicate that there is no credential on the encoder. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialError.TypeEnum Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResult_model")] - public class ActionAttemptScanToAssignCredentialResult - { - [JsonConstructorAttribute] - protected ActionAttemptScanToAssignCredentialResult() { } - - public ActionAttemptScanToAssignCredentialResult( - ActionAttemptScanToAssignCredentialResult.AccessMethodEnum accessMethod = default, - string acsCredentialId = default, - string? acsCredentialPoolId = default, - string acsSystemId = default, - string? acsUserId = default, - ActionAttemptScanToAssignCredentialResultAkilesMetadata? akilesMetadata = default, - ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = - default, - string? cardNumber = default, - string? code = default, - string connectedAccountId = default, - string createdAt = default, - string displayName = default, - string? endsAt = default, - List errors = default, - ActionAttemptScanToAssignCredentialResult.ExternalTypeEnum? externalType = default, - string? externalTypeDisplayName = default, - bool? isIssued = default, - bool? isLatestDesiredStateSyncedWithProvider = default, - bool isManaged = default, - bool? isMultiPhoneSyncCredential = default, - bool? isOneTimeUse = default, - string? issuedAt = default, - string? latestDesiredStateSyncedWithProviderAt = default, - string? parentAcsCredentialId = default, - string? startsAt = default, - string? userIdentityId = default, - ActionAttemptScanToAssignCredentialResultVisionlineMetadata? visionlineMetadata = - default, - List warnings = default, - string workspaceId = default - ) - { - AccessMethod = accessMethod; - AcsCredentialId = acsCredentialId; - AcsCredentialPoolId = acsCredentialPoolId; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - AkilesMetadata = akilesMetadata; - AssaAbloyVostioMetadata = assaAbloyVostioMetadata; - CardNumber = cardNumber; - Code = code; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DisplayName = displayName; - EndsAt = endsAt; - Errors = errors; - ExternalType = externalType; - ExternalTypeDisplayName = externalTypeDisplayName; - IsIssued = isIssued; - IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; - IsManaged = isManaged; - IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; - IsOneTimeUse = isOneTimeUse; - IssuedAt = issuedAt; - LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; - ParentAcsCredentialId = parentAcsCredentialId; - StartsAt = startsAt; - UserIdentityId = userIdentityId; - VisionlineMetadata = visionlineMetadata; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - /// - /// Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AccessMethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ExternalTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pti_card")] - PtiCard = 1, - - [EnumMember(Value = "brivo_credential")] - BrivoCredential = 2, - - [EnumMember(Value = "hid_credential")] - HidCredential = 3, - - [EnumMember(Value = "visionline_card")] - VisionlineCard = 4, - - [EnumMember(Value = "salto_ks_credential")] - SaltoKsCredential = 5, - - [EnumMember(Value = "assa_abloy_vostio_key")] - AssaAbloyVostioKey = 6, - - [EnumMember(Value = "salto_space_key")] - SaltoSpaceKey = 7, - - [EnumMember(Value = "latch_access")] - LatchAccess = 8, - - [EnumMember(Value = "dormakaba_ambiance_credential")] - DormakabaAmbianceCredential = 9, - - [EnumMember(Value = "hotek_card")] - HotekCard = 10, - - [EnumMember(Value = "salto_ks_tag")] - SaltoKsTag = 11, - - [EnumMember(Value = "avigilon_alta_credential")] - AvigilonAltaCredential = 12, - - [EnumMember(Value = "kisi_credential")] - KisiCredential = 13, - - [EnumMember(Value = "akiles_credential")] - AkilesCredential = 14, - } - - /// - /// Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialResult.AccessMethodEnum AccessMethod { get; set; } - - /// - /// ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the credential pool to which the credential belongs. - /// - [DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsCredentialPoolId { get; set; } - - /// - /// ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string? AcsUserId { get; set; } - - /// - /// Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialResultAkilesMetadata? AkilesMetadata { get; set; } - - /// - /// Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember( - Name = "assa_abloy_vostio_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - - /// - /// Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] - public string? CardNumber { get; set; } - - /// - /// Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. - /// - [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialResult.ExternalTypeEnum? ExternalType { get; set; } - - /// - /// Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. - /// - [DataMember( - Name = "external_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ExternalTypeDisplayName { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. - /// - [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] - public bool? IsIssued { get; set; } - - /// - /// Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. - /// - [DataMember( - Name = "is_latest_desired_state_synced_with_provider", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } - - /// - /// Indicates whether Seam manages the credential. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). - /// - [DataMember( - Name = "is_multi_phone_sync_credential", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsMultiPhoneSyncCredential { get; set; } - - /// - /// Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. - /// - [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOneTimeUse { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card. - /// - [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] - public string? IssuedAt { get; set; } - - /// - /// Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. - /// - [DataMember( - Name = "latest_desired_state_synced_with_provider_at", - IsRequired = false, - EmitDefaultValue = false - )] - public string? LatestDesiredStateSyncedWithProviderAt { get; set; } - - /// - /// ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember( - Name = "parent_acs_credential_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ParentAcsCredentialId { get; set; } - - /// - /// Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialResultVisionlineMetadata? VisionlineMetadata { get; set; } - - /// - /// Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultAkilesMetadata_model")] - public class ActionAttemptScanToAssignCredentialResultAkilesMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptScanToAssignCredentialResultAkilesMetadata() { } - - public ActionAttemptScanToAssignCredentialResultAkilesMetadata( - string? memberPinId = default - ) - { - MemberPinId = memberPinId; - } - - /// - /// ID of the Akiles member PIN. - /// - [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] - public string? MemberPinId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata_model" - )] - public class ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata() { } - - public ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata( - bool? autoJoin = default, - List? doorNames = default, - string? endpointId = default, - string? keyId = default, - string? keyIssuingRequestId = default, - List? overrideGuestAcsEntranceIds = default - ) - { - AutoJoin = autoJoin; - DoorNames = doorNames; - EndpointId = endpointId; - KeyId = keyId; - KeyIssuingRequestId = keyIssuingRequestId; - OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; - } - - /// - /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. - /// - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - /// - /// Names of the doors to which to grant access in the Vostio access system. - /// - [DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] - public List? DoorNames { get; set; } - - /// - /// Endpoint ID in the Vostio access system. - /// - [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] - public string? EndpointId { get; set; } - - /// - /// Key ID in the Vostio access system. - /// - [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyId { get; set; } - - /// - /// Key issuing request ID in the Vostio access system. - /// - [DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyIssuingRequestId { get; set; } - - /// - /// IDs of the guest entrances to override in the Vostio access system. - /// - [DataMember( - Name = "override_guest_acs_entrance_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? OverrideGuestAcsEntranceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultErrors_model")] - public class ActionAttemptScanToAssignCredentialResultErrors - { - [JsonConstructorAttribute] - protected ActionAttemptScanToAssignCredentialResultErrors() { } - - public ActionAttemptScanToAssignCredentialResultErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_actionAttemptScanToAssignCredentialResultVisionlineMetadata_model" - )] - public class ActionAttemptScanToAssignCredentialResultVisionlineMetadata - { - [JsonConstructorAttribute] - protected ActionAttemptScanToAssignCredentialResultVisionlineMetadata() { } - - public ActionAttemptScanToAssignCredentialResultVisionlineMetadata( - bool? autoJoin = default, - ActionAttemptScanToAssignCredentialResultVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = - default, - string? cardId = default, - List? commonAcsEntranceIds = default, - string? credentialId = default, - List? guestAcsEntranceIds = default, - bool? isValid = default, - List? joinerAcsCredentialIds = default - ) - { - AutoJoin = autoJoin; - CardFunctionType = cardFunctionType; - CardId = cardId; - CommonAcsEntranceIds = commonAcsEntranceIds; - CredentialId = credentialId; - GuestAcsEntranceIds = guestAcsEntranceIds; - IsValid = isValid; - JoinerAcsCredentialIds = joinerAcsCredentialIds; - } - - /// - /// Card function type in the Visionline access system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CardFunctionTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "guest")] - Guest = 1, - - [EnumMember(Value = "staff")] - Staff = 2, - } - - /// - /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. - /// - [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoJoin { get; set; } - - /// - /// Card function type in the Visionline access system. - /// - [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialResultVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - - /// - /// ID of the card in the Visionline access system. - /// - [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] - public string? CardId { get; set; } - - /// - /// Common entrance IDs in the Visionline access system. - /// - [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? CommonAcsEntranceIds { get; set; } - - /// - /// ID of the credential in the Visionline access system. - /// - [DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] - public string? CredentialId { get; set; } - - /// - /// Guest entrance IDs in the Visionline access system. - /// - [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List? GuestAcsEntranceIds { get; set; } - - /// - /// Indicates whether the credential is valid. - /// - [DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] - public bool? IsValid { get; set; } - - /// - /// IDs of the credentials to which you want to join. - /// - [DataMember( - Name = "joiner_acs_credential_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? JoinerAcsCredentialIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultWarnings_model")] - public class ActionAttemptScanToAssignCredentialResultWarnings - { - [JsonConstructorAttribute] - protected ActionAttemptScanToAssignCredentialResultWarnings() { } - - public ActionAttemptScanToAssignCredentialResultWarnings( - string createdAt = default, - string message = default, - ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, - string? newCode = default, - string? originalCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - NewCode = newCode; - OriginalCode = originalCode; - } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum WarningCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "waiting_to_be_issued")] - WaitingToBeIssued = 1, - - [EnumMember(Value = "schedule_externally_modified")] - ScheduleExternallyModified = 2, - - [EnumMember(Value = "schedule_modified")] - ScheduleModified = 3, - - [EnumMember(Value = "being_deleted")] - BeingDeleted = 4, - - [EnumMember(Value = "unknown_issue_with_acs_credential")] - UnknownIssueWithAcsCredential = 5, - - [EnumMember(Value = "needs_to_be_reissued")] - NeedsToBeReissued = 6, - - [EnumMember(Value = "requested_code_unavailable")] - RequestedCodeUnavailable = 7, - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } - - /// - /// The PIN code that was assigned instead. - /// - [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] - public string? NewCode { get; set; } - - /// - /// The originally requested PIN code that could not be used. - /// - [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] - public string? OriginalCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Assigning a credential to an access method is pending. - /// - [DataContract(Name = "seamModel_actionAttemptAssignCredential_model")] - public class ActionAttemptAssignCredential : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptAssignCredential() { } - - public ActionAttemptAssignCredential( - string actionAttemptId = default, - string actionType = default, - ActionAttemptAssignCredentialError error = default, - ActionAttemptAssignCredentialResult result = default, - ActionAttemptAssignCredential.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "ASSIGN_CREDENTIAL"; - - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialError Error { get; set; } - - /// - /// Result of assigning a credential. If successful, includes the updated access method with the assigned credential. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredential.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptAssignCredentialError_model")] - public class ActionAttemptAssignCredentialError - { - [JsonConstructorAttribute] - protected ActionAttemptAssignCredentialError() { } - - public ActionAttemptAssignCredentialError( - string message = default, - ActionAttemptAssignCredentialError.TypeEnum type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Error type to indicate that no matching credential was found. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "uncategorized_error")] - UncategorizedError = 1, - - [EnumMember(Value = "action_attempt_expired")] - ActionAttemptExpired = 2, - - [EnumMember(Value = "credential_not_found")] - CredentialNotFound = 3, - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Error type to indicate that no matching credential was found. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialError.TypeEnum Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptAssignCredentialResult_model")] - public class ActionAttemptAssignCredentialResult - { - [JsonConstructorAttribute] - protected ActionAttemptAssignCredentialResult() { } - - public ActionAttemptAssignCredentialResult( - string accessMethodId = default, - string? clientSessionToken = default, - string? code = default, - string createdAt = default, - string? customizationProfileId = default, - string displayName = default, - string displayStatus = default, - List errors = default, - string? instantKeyUrl = default, - bool? isAssignmentRequired = default, - bool? isEncodingRequired = default, - bool isIssued = default, - bool? isReadyForAssignment = default, - bool? isReadyForEncoding = default, - string? issuedAt = default, - ActionAttemptAssignCredentialResult.ModeEnum mode = default, - List pendingMutations = default, - List warnings = default, - string workspaceId = default - ) - { - AccessMethodId = accessMethodId; - ClientSessionToken = clientSessionToken; - Code = code; - CreatedAt = createdAt; - CustomizationProfileId = customizationProfileId; - DisplayName = displayName; - DisplayStatus = displayStatus; - Errors = errors; - InstantKeyUrl = instantKeyUrl; - IsAssignmentRequired = isAssignmentRequired; - IsEncodingRequired = isEncodingRequired; - IsIssued = isIssued; - IsReadyForAssignment = isReadyForAssignment; - IsReadyForEncoding = isReadyForEncoding; - IssuedAt = issuedAt; - Mode = mode; - PendingMutations = pendingMutations; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// ID of the access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Token of the client session associated with the access method. - /// - [DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] - public string? ClientSessionToken { get; set; } - - /// - /// The actual PIN code for code access methods. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Date and time at which the access method was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the customization profile associated with the access method. - /// - [DataMember( - Name = "customization_profile_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomizationProfileId { get; set; } - - /// - /// Display name of the access method. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. - /// - [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] - public string DisplayStatus { get; set; } - - /// - /// Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// URL of the Instant Key for mobile key access methods. - /// - [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] - public string? InstantKeyUrl { get; set; } - - /// - /// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. - /// - [DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] - public bool? IsAssignmentRequired { get; set; } - - /// - /// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. - /// - [DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] - public bool? IsEncodingRequired { get; set; } - - /// - /// Indicates whether the access method has been issued. - /// - [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] - public bool IsIssued { get; set; } - - /// - /// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. - /// - [DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] - public bool? IsReadyForAssignment { get; set; } - - /// - /// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. - /// - [DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] - public bool? IsReadyForEncoding { get; set; } - - /// - /// Date and time at which the access method was issued. - /// - [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] - public string? IssuedAt { get; set; } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialResult.ModeEnum Mode { get; set; } - - /// - /// Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. - /// - [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] - public List PendingMutations { get; set; } - - /// - /// Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the Seam workspace associated with the access method. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultErrors_model")] - public class ActionAttemptAssignCredentialResultErrors - { - [JsonConstructorAttribute] - protected ActionAttemptAssignCredentialResultErrors() { } - - public ActionAttemptAssignCredentialResultErrors( - string createdAt = default, - ActionAttemptAssignCredentialResultErrors.ErrorCodeEnum errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ErrorCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "failed_to_issue")] - FailedToIssue = 1, - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialResultErrors.ErrorCodeEnum ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutations_model")] - public class ActionAttemptAssignCredentialResultPendingMutations - { - [JsonConstructorAttribute] - protected ActionAttemptAssignCredentialResultPendingMutations() { } - - public ActionAttemptAssignCredentialResultPendingMutations( - string createdAt = default, - ActionAttemptAssignCredentialResultPendingMutationsFrom from = default, - string message = default, - ActionAttemptAssignCredentialResultPendingMutations.MutationCodeEnum mutationCode = - default, - ActionAttemptAssignCredentialResultPendingMutationsTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Mutation code to indicate that Seam is in the process of updating the access times for this access method. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum MutationCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "provisioning_access")] - ProvisioningAccess = 1, - - [EnumMember(Value = "revoking_access")] - RevokingAccess = 2, - - [EnumMember(Value = "updating_access_times")] - UpdatingAccessTimes = 3, - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Previous access time configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialResultPendingMutationsFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Mutation code to indicate that Seam is in the process of updating the access times for this access method. - /// - [DataMember(Name = "mutation_code", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialResultPendingMutations.MutationCodeEnum MutationCode { get; set; } - - /// - /// New access time configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialResultPendingMutationsTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutationsFrom_model")] - public class ActionAttemptAssignCredentialResultPendingMutationsFrom - { - [JsonConstructorAttribute] - protected ActionAttemptAssignCredentialResultPendingMutationsFrom() { } - - public ActionAttemptAssignCredentialResultPendingMutationsFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Previous end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Previous start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutationsTo_model")] - public class ActionAttemptAssignCredentialResultPendingMutationsTo - { - [JsonConstructorAttribute] - protected ActionAttemptAssignCredentialResultPendingMutationsTo() { } - - public ActionAttemptAssignCredentialResultPendingMutationsTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// New end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// New start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultWarnings_model")] - public class ActionAttemptAssignCredentialResultWarnings - { - [JsonConstructorAttribute] - protected ActionAttemptAssignCredentialResultWarnings() { } - - public ActionAttemptAssignCredentialResultWarnings( - string createdAt = default, - string message = default, - ActionAttemptAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, - string? originalAccessMethodId = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - OriginalAccessMethodId = originalAccessMethodId; - } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum WarningCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "being_deleted")] - BeingDeleted = 1, - - [EnumMember(Value = "updating_access_times")] - UpdatingAccessTimes = 2, - - [EnumMember(Value = "pulled_backup_access_code")] - PulledBackupAccessCode = 3, - - [EnumMember(Value = "delay_in_issuing")] - DelayInIssuing = 4, - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } - - /// - /// ID of the original access method from which this backup access method was split, if applicable. - /// - [DataMember( - Name = "original_access_method_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? OriginalAccessMethodId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Resetting a sandbox workspace is pending. - /// - [DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspace_model")] - public class ActionAttemptResetSandboxWorkspace : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptResetSandboxWorkspace() { } - - public ActionAttemptResetSandboxWorkspace( - string actionAttemptId = default, - string actionType = default, - ActionAttemptResetSandboxWorkspaceError error = default, - ActionAttemptResetSandboxWorkspaceResult result = default, - ActionAttemptResetSandboxWorkspace.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "RESET_SANDBOX_WORKSPACE"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptResetSandboxWorkspaceError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptResetSandboxWorkspaceResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptResetSandboxWorkspace.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspaceError_model")] - public class ActionAttemptResetSandboxWorkspaceError - { - [JsonConstructorAttribute] - protected ActionAttemptResetSandboxWorkspaceError() { } - - public ActionAttemptResetSandboxWorkspaceError( - string message = default, - string type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspaceResult_model")] - public class ActionAttemptResetSandboxWorkspaceResult - { - [JsonConstructorAttribute] - public ActionAttemptResetSandboxWorkspaceResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Setting the fan mode is pending. - /// - [DataContract(Name = "seamModel_actionAttemptSetFanMode_model")] - public class ActionAttemptSetFanMode : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptSetFanMode() { } - - public ActionAttemptSetFanMode( - string actionAttemptId = default, - string actionType = default, - ActionAttemptSetFanModeError error = default, - ActionAttemptSetFanModeResult result = default, - ActionAttemptSetFanMode.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "SET_FAN_MODE"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSetFanModeError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSetFanModeResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSetFanMode.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSetFanModeError_model")] - public class ActionAttemptSetFanModeError - { - [JsonConstructorAttribute] - protected ActionAttemptSetFanModeError() { } - - public ActionAttemptSetFanModeError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSetFanModeResult_model")] - public class ActionAttemptSetFanModeResult - { - [JsonConstructorAttribute] - public ActionAttemptSetFanModeResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Setting the HVAC mode is pending. - /// - [DataContract(Name = "seamModel_actionAttemptSetHvacMode_model")] - public class ActionAttemptSetHvacMode : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptSetHvacMode() { } - - public ActionAttemptSetHvacMode( - string actionAttemptId = default, - string actionType = default, - ActionAttemptSetHvacModeError error = default, - ActionAttemptSetHvacModeResult result = default, - ActionAttemptSetHvacMode.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "SET_HVAC_MODE"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSetHvacModeError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSetHvacModeResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSetHvacMode.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSetHvacModeError_model")] - public class ActionAttemptSetHvacModeError - { - [JsonConstructorAttribute] - protected ActionAttemptSetHvacModeError() { } - - public ActionAttemptSetHvacModeError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSetHvacModeResult_model")] - public class ActionAttemptSetHvacModeResult - { - [JsonConstructorAttribute] - public ActionAttemptSetHvacModeResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Activating a climate preset is pending. - /// - [DataContract(Name = "seamModel_actionAttemptActivateClimatePreset_model")] - public class ActionAttemptActivateClimatePreset : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptActivateClimatePreset() { } - - public ActionAttemptActivateClimatePreset( - string actionAttemptId = default, - string actionType = default, - ActionAttemptActivateClimatePresetError error = default, - ActionAttemptActivateClimatePresetResult result = default, - ActionAttemptActivateClimatePreset.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "ACTIVATE_CLIMATE_PRESET"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptActivateClimatePresetError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptActivateClimatePresetResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptActivateClimatePreset.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptActivateClimatePresetError_model")] - public class ActionAttemptActivateClimatePresetError - { - [JsonConstructorAttribute] - protected ActionAttemptActivateClimatePresetError() { } - - public ActionAttemptActivateClimatePresetError( - string message = default, - string type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptActivateClimatePresetResult_model")] - public class ActionAttemptActivateClimatePresetResult - { - [JsonConstructorAttribute] - public ActionAttemptActivateClimatePresetResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulating a keypad code entry is pending. - /// - [DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntry_model")] - public class ActionAttemptSimulateKeypadCodeEntry : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptSimulateKeypadCodeEntry() { } - - public ActionAttemptSimulateKeypadCodeEntry( - string actionAttemptId = default, - string actionType = default, - ActionAttemptSimulateKeypadCodeEntryError error = default, - ActionAttemptSimulateKeypadCodeEntryResult result = default, - ActionAttemptSimulateKeypadCodeEntry.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "SIMULATE_KEYPAD_CODE_ENTRY"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSimulateKeypadCodeEntryError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSimulateKeypadCodeEntryResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSimulateKeypadCodeEntry.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntryError_model")] - public class ActionAttemptSimulateKeypadCodeEntryError - { - [JsonConstructorAttribute] - protected ActionAttemptSimulateKeypadCodeEntryError() { } - - public ActionAttemptSimulateKeypadCodeEntryError( - string message = default, - string type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntryResult_model")] - public class ActionAttemptSimulateKeypadCodeEntryResult - { - [JsonConstructorAttribute] - public ActionAttemptSimulateKeypadCodeEntryResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Simulating a manual lock action using a keypad is pending. - /// - [DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypad_model")] - public class ActionAttemptSimulateManualLockViaKeypad : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptSimulateManualLockViaKeypad() { } - - public ActionAttemptSimulateManualLockViaKeypad( - string actionAttemptId = default, - string actionType = default, - ActionAttemptSimulateManualLockViaKeypadError error = default, - ActionAttemptSimulateManualLockViaKeypadResult result = default, - ActionAttemptSimulateManualLockViaKeypad.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "SIMULATE_MANUAL_LOCK_VIA_KEYPAD"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSimulateManualLockViaKeypadError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSimulateManualLockViaKeypadResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSimulateManualLockViaKeypad.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypadError_model")] - public class ActionAttemptSimulateManualLockViaKeypadError - { - [JsonConstructorAttribute] - protected ActionAttemptSimulateManualLockViaKeypadError() { } - - public ActionAttemptSimulateManualLockViaKeypadError( - string message = default, - string type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypadResult_model")] - public class ActionAttemptSimulateManualLockViaKeypadResult - { - [JsonConstructorAttribute] - public ActionAttemptSimulateManualLockViaKeypadResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Pushing thermostat weekly programs is pending. - /// - [DataContract(Name = "seamModel_actionAttemptPushThermostatPrograms_model")] - public class ActionAttemptPushThermostatPrograms : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptPushThermostatPrograms() { } - - public ActionAttemptPushThermostatPrograms( - string actionAttemptId = default, - string actionType = default, - ActionAttemptPushThermostatProgramsError error = default, - ActionAttemptPushThermostatProgramsResult result = default, - ActionAttemptPushThermostatPrograms.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "PUSH_THERMOSTAT_PROGRAMS"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptPushThermostatProgramsError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptPushThermostatProgramsResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptPushThermostatPrograms.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptPushThermostatProgramsError_model")] - public class ActionAttemptPushThermostatProgramsError - { - [JsonConstructorAttribute] - protected ActionAttemptPushThermostatProgramsError() { } - - public ActionAttemptPushThermostatProgramsError( - string message = default, - string type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptPushThermostatProgramsResult_model")] - public class ActionAttemptPushThermostatProgramsResult - { - [JsonConstructorAttribute] - public ActionAttemptPushThermostatProgramsResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Configuring the auto-lock is pending. - /// - [DataContract(Name = "seamModel_actionAttemptConfigureAutoLock_model")] - public class ActionAttemptConfigureAutoLock : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptConfigureAutoLock() { } - - public ActionAttemptConfigureAutoLock( - string actionAttemptId = default, - string actionType = default, - ActionAttemptConfigureAutoLockError error = default, - ActionAttemptConfigureAutoLockResult result = default, - ActionAttemptConfigureAutoLock.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "CONFIGURE_AUTO_LOCK"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptConfigureAutoLockError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptConfigureAutoLockResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptConfigureAutoLock.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptConfigureAutoLockError_model")] - public class ActionAttemptConfigureAutoLockError - { - [JsonConstructorAttribute] - protected ActionAttemptConfigureAutoLockError() { } - - public ActionAttemptConfigureAutoLockError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptConfigureAutoLockResult_model")] - public class ActionAttemptConfigureAutoLockResult - { - [JsonConstructorAttribute] - public ActionAttemptConfigureAutoLockResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSyncAccessCodes_model")] - public class ActionAttemptSyncAccessCodes : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptSyncAccessCodes() { } - - public ActionAttemptSyncAccessCodes( - string actionAttemptId = default, - string actionType = default, - ActionAttemptSyncAccessCodesError error = default, - ActionAttemptSyncAccessCodesResult result = default, - ActionAttemptSyncAccessCodes.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "SYNC_ACCESS_CODES"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSyncAccessCodesError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSyncAccessCodesResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptSyncAccessCodes.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSyncAccessCodesError_model")] - public class ActionAttemptSyncAccessCodesError - { - [JsonConstructorAttribute] - protected ActionAttemptSyncAccessCodesError() { } - - public ActionAttemptSyncAccessCodesError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptSyncAccessCodesResult_model")] - public class ActionAttemptSyncAccessCodesResult - { - [JsonConstructorAttribute] - public ActionAttemptSyncAccessCodesResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptCreateAccessCode_model")] - public class ActionAttemptCreateAccessCode : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptCreateAccessCode() { } - - public ActionAttemptCreateAccessCode( - string actionAttemptId = default, - string actionType = default, - ActionAttemptCreateAccessCodeError error = default, - ActionAttemptCreateAccessCodeResult result = default, - ActionAttemptCreateAccessCode.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "CREATE_ACCESS_CODE"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptCreateAccessCodeError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptCreateAccessCodeResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptCreateAccessCode.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptCreateAccessCodeError_model")] - public class ActionAttemptCreateAccessCodeError - { - [JsonConstructorAttribute] - protected ActionAttemptCreateAccessCodeError() { } - - public ActionAttemptCreateAccessCodeError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptCreateAccessCodeResult_model")] - public class ActionAttemptCreateAccessCodeResult - { - [JsonConstructorAttribute] - protected ActionAttemptCreateAccessCodeResult() { } - - public ActionAttemptCreateAccessCodeResult(object accessCode = default) - { - AccessCode = accessCode; - } - - /// - /// Created access code. - /// - [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] - public object AccessCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptDeleteAccessCode_model")] - public class ActionAttemptDeleteAccessCode : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptDeleteAccessCode() { } - - public ActionAttemptDeleteAccessCode( - string actionAttemptId = default, - string actionType = default, - ActionAttemptDeleteAccessCodeError error = default, - ActionAttemptDeleteAccessCodeResult result = default, - ActionAttemptDeleteAccessCode.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "DELETE_ACCESS_CODE"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptDeleteAccessCodeError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptDeleteAccessCodeResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptDeleteAccessCode.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptDeleteAccessCodeError_model")] - public class ActionAttemptDeleteAccessCodeError - { - [JsonConstructorAttribute] - protected ActionAttemptDeleteAccessCodeError() { } - - public ActionAttemptDeleteAccessCodeError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptDeleteAccessCodeResult_model")] - public class ActionAttemptDeleteAccessCodeResult - { - [JsonConstructorAttribute] - public ActionAttemptDeleteAccessCodeResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUpdateAccessCode_model")] - public class ActionAttemptUpdateAccessCode : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptUpdateAccessCode() { } - - public ActionAttemptUpdateAccessCode( - string actionAttemptId = default, - string actionType = default, - ActionAttemptUpdateAccessCodeError error = default, - ActionAttemptUpdateAccessCodeResult result = default, - ActionAttemptUpdateAccessCode.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "UPDATE_ACCESS_CODE"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUpdateAccessCodeError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUpdateAccessCodeResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUpdateAccessCode.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUpdateAccessCodeError_model")] - public class ActionAttemptUpdateAccessCodeError - { - [JsonConstructorAttribute] - protected ActionAttemptUpdateAccessCodeError() { } - - public ActionAttemptUpdateAccessCodeError(string message = default, string type = default) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUpdateAccessCodeResult_model")] - public class ActionAttemptUpdateAccessCodeResult - { - [JsonConstructorAttribute] - protected ActionAttemptUpdateAccessCodeResult() { } - - public ActionAttemptUpdateAccessCodeResult(object? accessCode = default) - { - AccessCode = accessCode; - } - - /// - /// Updated access code. - /// - [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] - public object? AccessCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptCreateNoiseThreshold_model")] - public class ActionAttemptCreateNoiseThreshold : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptCreateNoiseThreshold() { } - - public ActionAttemptCreateNoiseThreshold( - string actionAttemptId = default, - string actionType = default, - ActionAttemptCreateNoiseThresholdError error = default, - ActionAttemptCreateNoiseThresholdResult result = default, - ActionAttemptCreateNoiseThreshold.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "CREATE_NOISE_THRESHOLD"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptCreateNoiseThresholdError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptCreateNoiseThresholdResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptCreateNoiseThreshold.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptCreateNoiseThresholdError_model")] - public class ActionAttemptCreateNoiseThresholdError - { - [JsonConstructorAttribute] - protected ActionAttemptCreateNoiseThresholdError() { } - - public ActionAttemptCreateNoiseThresholdError( - string message = default, - string type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptCreateNoiseThresholdResult_model")] - public class ActionAttemptCreateNoiseThresholdResult - { - [JsonConstructorAttribute] - protected ActionAttemptCreateNoiseThresholdResult() { } - - public ActionAttemptCreateNoiseThresholdResult(object noiseThreshold = default) - { - NoiseThreshold = noiseThreshold; - } - - /// - /// Created noise threshold. - /// - [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] - public object NoiseThreshold { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptDeleteNoiseThreshold_model")] - public class ActionAttemptDeleteNoiseThreshold : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptDeleteNoiseThreshold() { } - - public ActionAttemptDeleteNoiseThreshold( - string actionAttemptId = default, - string actionType = default, - ActionAttemptDeleteNoiseThresholdError error = default, - ActionAttemptDeleteNoiseThresholdResult result = default, - ActionAttemptDeleteNoiseThreshold.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "DELETE_NOISE_THRESHOLD"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptDeleteNoiseThresholdError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptDeleteNoiseThresholdResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptDeleteNoiseThreshold.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptDeleteNoiseThresholdError_model")] - public class ActionAttemptDeleteNoiseThresholdError - { - [JsonConstructorAttribute] - protected ActionAttemptDeleteNoiseThresholdError() { } - - public ActionAttemptDeleteNoiseThresholdError( - string message = default, - string type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptDeleteNoiseThresholdResult_model")] - public class ActionAttemptDeleteNoiseThresholdResult - { - [JsonConstructorAttribute] - public ActionAttemptDeleteNoiseThresholdResult() { } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUpdateNoiseThreshold_model")] - public class ActionAttemptUpdateNoiseThreshold : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptUpdateNoiseThreshold() { } - - public ActionAttemptUpdateNoiseThreshold( - string actionAttemptId = default, - string actionType = default, - ActionAttemptUpdateNoiseThresholdError error = default, - ActionAttemptUpdateNoiseThresholdResult result = default, - ActionAttemptUpdateNoiseThreshold.StatusEnum status = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - Error = error; - Result = result; - Status = status; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "success")] - Success = 1, - - [EnumMember(Value = "pending")] - Pending = 2, - - [EnumMember(Value = "error")] - Error = 3, - } - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "UPDATE_NOISE_THRESHOLD"; - - /// - /// Error associated with the action. - /// - [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUpdateNoiseThresholdError Error { get; set; } - - /// - /// Result of the action. - /// - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUpdateNoiseThresholdResult Result { get; set; } - - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ActionAttemptUpdateNoiseThreshold.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUpdateNoiseThresholdError_model")] - public class ActionAttemptUpdateNoiseThresholdError - { - [JsonConstructorAttribute] - protected ActionAttemptUpdateNoiseThresholdError() { } - - public ActionAttemptUpdateNoiseThresholdError( - string message = default, - string type = default - ) - { - Message = message; - Type = type; - } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Type of the error. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUpdateNoiseThresholdResult_model")] - public class ActionAttemptUpdateNoiseThresholdResult - { - [JsonConstructorAttribute] - protected ActionAttemptUpdateNoiseThresholdResult() { } - - public ActionAttemptUpdateNoiseThresholdResult(object noiseThreshold = default) - { - NoiseThreshold = noiseThreshold; - } - - /// - /// Updated noise threshold. - /// - [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] - public object NoiseThreshold { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_actionAttemptUnrecognized_model")] - public class ActionAttemptUnrecognized : ActionAttempt - { - [JsonConstructorAttribute] - protected ActionAttemptUnrecognized() { } - - public ActionAttemptUnrecognized( - string actionType = default, - string actionAttemptId = default - ) - { - ActionType = actionType; - ActionAttemptId = actionAttemptId; - } - - [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] - public override string ActionType { get; } = "unrecognized"; - - /// - /// ID of the action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public override string ActionAttemptId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +[JsonConverter(typeof(JsonSubtypes), "action_type")] +[JsonSubtypes.FallBackSubType(typeof(ActionAttemptUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptUpdateNoiseThreshold), "UPDATE_NOISE_THRESHOLD")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptDeleteNoiseThreshold), "DELETE_NOISE_THRESHOLD")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptCreateNoiseThreshold), "CREATE_NOISE_THRESHOLD")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptUpdateAccessCode), "UPDATE_ACCESS_CODE")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptDeleteAccessCode), "DELETE_ACCESS_CODE")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptCreateAccessCode), "CREATE_ACCESS_CODE")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptSyncAccessCodes), "SYNC_ACCESS_CODES")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptConfigureAutoLock), "CONFIGURE_AUTO_LOCK")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptPushThermostatPrograms), "PUSH_THERMOSTAT_PROGRAMS")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptSimulateManualLockViaKeypad), "SIMULATE_MANUAL_LOCK_VIA_KEYPAD")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptSimulateKeypadCodeEntry), "SIMULATE_KEYPAD_CODE_ENTRY")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptActivateWeeklyProgram), "ACTIVATE_WEEKLY_PROGRAM")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptActivateClimatePreset), "ACTIVATE_CLIMATE_PRESET")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptSetHvacMode), "SET_HVAC_MODE")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptSetFanMode), "SET_FAN_MODE")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptResetSandboxWorkspace), "RESET_SANDBOX_WORKSPACE")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptAssignCredential), "ASSIGN_CREDENTIAL")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptScanToAssignCredential), "SCAN_TO_ASSIGN_CREDENTIAL")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptEncodeCredential), "ENCODE_CREDENTIAL")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptScanCredential), "SCAN_CREDENTIAL")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptUnlockDoor), "UNLOCK_DOOR")] +[JsonSubtypes.KnownSubType(typeof(ActionAttemptLockDoor), "LOCK_DOOR")] +public abstract class ActionAttempt +{ +public abstract string ActionType { get; } + +public abstract string ActionAttemptId { get; set; } + +public abstract override string ToString(); +} + +/// +/// Locking a door is pending. +/// +[DataContract(Name = "seamModel_actionAttemptLockDoor_model")] +public class ActionAttemptLockDoor : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptLockDoor() { } + +public ActionAttemptLockDoor(string actionAttemptId = default, string actionType = default, ActionAttemptLockDoorError error = default, ActionAttemptLockDoorResult result = default, ActionAttemptLockDoor.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "LOCK_DOOR"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptLockDoorError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptLockDoorResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptLockDoor.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptLockDoorError_model")] +public class ActionAttemptLockDoorError +{ +[JsonConstructorAttribute] +protected ActionAttemptLockDoorError() { } + +public ActionAttemptLockDoorError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptLockDoorResult_model")] +public class ActionAttemptLockDoorResult +{ +[JsonConstructorAttribute] +protected ActionAttemptLockDoorResult() { } + +public ActionAttemptLockDoorResult(bool? wasConfirmedByDevice = default) +{ +WasConfirmedByDevice = wasConfirmedByDevice; +} + +/// +/// Indicates whether the device confirmed that the lock action occurred. +/// +[DataMember(Name = "was_confirmed_by_device", IsRequired = false, EmitDefaultValue = false)] +public bool? WasConfirmedByDevice { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Unlocking a door is pending. +/// +[DataContract(Name = "seamModel_actionAttemptUnlockDoor_model")] +public class ActionAttemptUnlockDoor : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptUnlockDoor() { } + +public ActionAttemptUnlockDoor(string actionAttemptId = default, string actionType = default, ActionAttemptUnlockDoorError error = default, ActionAttemptUnlockDoorResult result = default, ActionAttemptUnlockDoor.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "UNLOCK_DOOR"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUnlockDoorError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUnlockDoorResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUnlockDoor.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUnlockDoorError_model")] +public class ActionAttemptUnlockDoorError +{ +[JsonConstructorAttribute] +protected ActionAttemptUnlockDoorError() { } + +public ActionAttemptUnlockDoorError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUnlockDoorResult_model")] +public class ActionAttemptUnlockDoorResult +{ +[JsonConstructorAttribute] +protected ActionAttemptUnlockDoorResult() { } + +public ActionAttemptUnlockDoorResult(bool? wasConfirmedByDevice = default) +{ +WasConfirmedByDevice = wasConfirmedByDevice; +} + +/// +/// Indicates whether the device confirmed that the unlock action occurred. +/// +[DataMember(Name = "was_confirmed_by_device", IsRequired = false, EmitDefaultValue = false)] +public bool? WasConfirmedByDevice { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Reading credential data from the physical encoder is pending. +/// +[DataContract(Name = "seamModel_actionAttemptScanCredential_model")] +public class ActionAttemptScanCredential : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredential() { } + +public ActionAttemptScanCredential(string actionAttemptId = default, string actionType = default, ActionAttemptScanCredentialError error = default, ActionAttemptScanCredentialResult result = default, ActionAttemptScanCredential.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "SCAN_CREDENTIAL"; + +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialError Error { get; set; } + +/// +/// Result of scanning a card. If the attempt was successful, includes a snapshot of credential data read from the physical encoder, the corresponding data stored on Seam and the access system, and any associated warnings. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredential.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialError_model")] +public class ActionAttemptScanCredentialError +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialError() { } + +public ActionAttemptScanCredentialError(string message = default, ActionAttemptScanCredentialError.TypeEnum type = default) +{ +Message = message; +Type = type; +} + +/// +/// Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "uncategorized_error")] +UncategorizedError = 1, + +[EnumMember(Value = "action_attempt_expired")] +ActionAttemptExpired = 2, + +[EnumMember(Value = "no_credential_on_encoder")] +NoCredentialOnEncoder = 3, + +[EnumMember(Value = "encoder_not_online")] +EncoderNotOnline = 4, + +[EnumMember(Value = "encoder_communication_timeout")] +EncoderCommunicationTimeout = 5, + +[EnumMember(Value = "bridge_disconnected")] +BridgeDisconnected = 6, +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialError.TypeEnum Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResult_model")] +public class ActionAttemptScanCredentialResult +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResult() { } + +public ActionAttemptScanCredentialResult(ActionAttemptScanCredentialResultAcsCredentialOnEncoder? acsCredentialOnEncoder = default, ActionAttemptScanCredentialResultAcsCredentialOnSeam? acsCredentialOnSeam = default, List warnings = default) +{ +AcsCredentialOnEncoder = acsCredentialOnEncoder; +AcsCredentialOnSeam = acsCredentialOnSeam; +Warnings = warnings; +} + +/// +/// Snapshot of credential data read from the physical encoder. +/// +[DataMember(Name = "acs_credential_on_encoder", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnEncoder? AcsCredentialOnEncoder { get; set; } + +/// +/// Corresponding credential data as stored on Seam and the access system. +/// +[DataMember(Name = "acs_credential_on_seam", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnSeam? AcsCredentialOnSeam { get; set; } + +/// +/// Warnings related to scanning the credential, such as mismatches between the credential data currently encoded on the card and the corresponding data stored on Seam and the access system. +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnEncoder_model")] +public class ActionAttemptScanCredentialResultAcsCredentialOnEncoder +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultAcsCredentialOnEncoder() { } + +public ActionAttemptScanCredentialResultAcsCredentialOnEncoder(string? cardNumber = default, string? createdAt = default, string? endsAt = default, bool? isIssued = default, string? startsAt = default, ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata? visionlineMetadata = default) +{ +CardNumber = cardNumber; +CreatedAt = createdAt; +EndsAt = endsAt; +IsIssued = isIssued; +StartsAt = startsAt; +VisionlineMetadata = visionlineMetadata; +} + +/// +/// A number or string that physically identifies the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] +public string? CardNumber { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) will stop being usable. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Indicates whether the credential has been issued (encoded onto a card). +/// +[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] +public bool? IsIssued { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) becomes usable. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata? VisionlineMetadata { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata_model")] +public class ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata() { } + +public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata(bool? cancelled = default, ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata.CardFormatEnum? cardFormat = default, string? cardHolder = default, string? cardId = default, List? commonAcsEntranceIds = default, bool? discarded = default, bool? expired = default, List? guestAcsEntranceIds = default, float? numberOfIssuedCards = default, bool? overridden = default, bool? overwritten = default, bool? pendingAutoUpdate = default) +{ +Cancelled = cancelled; +CardFormat = cardFormat; +CardHolder = cardHolder; +CardId = cardId; +CommonAcsEntranceIds = commonAcsEntranceIds; +Discarded = discarded; +Expired = expired; +GuestAcsEntranceIds = guestAcsEntranceIds; +NumberOfIssuedCards = numberOfIssuedCards; +Overridden = overridden; +Overwritten = overwritten; +PendingAutoUpdate = pendingAutoUpdate; +} + +/// +/// Format of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CardFormatEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "TLCode")] +TlCode = 1, + +[EnumMember(Value = "rfid48")] +Rfid48 = 2, +} + +/// +/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is cancelled. +/// +[DataMember(Name = "cancelled", IsRequired = false, EmitDefaultValue = false)] +public bool? Cancelled { get; set; } + +/// +/// Format of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "card_format", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata.CardFormatEnum? CardFormat { get; set; } + +/// +/// Holder of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "card_holder", IsRequired = false, EmitDefaultValue = false)] +public string? CardHolder { get; set; } + +/// +/// Card ID for the Visionline card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] +public string? CardId { get; set; } + +/// +/// IDs of the common [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAcsEntranceIds { get; set; } + +/// +/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is discarded. +/// +[DataMember(Name = "discarded", IsRequired = false, EmitDefaultValue = false)] +public bool? Discarded { get; set; } + +/// +/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is expired. +/// +[DataMember(Name = "expired", IsRequired = false, EmitDefaultValue = false)] +public bool? Expired { get; set; } + +/// +/// IDs of the guest [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? GuestAcsEntranceIds { get; set; } + +/// +/// Number of issued cards associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "number_of_issued_cards", IsRequired = false, EmitDefaultValue = false)] +public float? NumberOfIssuedCards { get; set; } + +/// +/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is overridden. +/// +[DataMember(Name = "overridden", IsRequired = false, EmitDefaultValue = false)] +public bool? Overridden { get; set; } + +/// +/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is overwritten. +/// +[DataMember(Name = "overwritten", IsRequired = false, EmitDefaultValue = false)] +public bool? Overwritten { get; set; } + +/// +/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is pending auto-update. +/// +[DataMember(Name = "pending_auto_update", IsRequired = false, EmitDefaultValue = false)] +public bool? PendingAutoUpdate { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeam_model")] +public class ActionAttemptScanCredentialResultAcsCredentialOnSeam +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultAcsCredentialOnSeam() { } + +public ActionAttemptScanCredentialResultAcsCredentialOnSeam(ActionAttemptScanCredentialResultAcsCredentialOnSeam.AccessMethodEnum accessMethod = default, string acsCredentialId = default, string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? akilesMetadata = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, ActionAttemptScanCredentialResultAcsCredentialOnSeam.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, bool? isIssued = default, bool? isLatestDesiredStateSyncedWithProvider = default, bool isManaged = default, bool? isMultiPhoneSyncCredential = default, bool? isOneTimeUse = default, string? issuedAt = default, string? latestDesiredStateSyncedWithProviderAt = default, string? parentAcsCredentialId = default, string? startsAt = default, string? userIdentityId = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) +{ +AccessMethod = accessMethod; +AcsCredentialId = acsCredentialId; +AcsCredentialPoolId = acsCredentialPoolId; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +AkilesMetadata = akilesMetadata; +AssaAbloyVostioMetadata = assaAbloyVostioMetadata; +CardNumber = cardNumber; +Code = code; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DisplayName = displayName; +EndsAt = endsAt; +Errors = errors; +ExternalType = externalType; +ExternalTypeDisplayName = externalTypeDisplayName; +IsIssued = isIssued; +IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; +IsManaged = isManaged; +IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; +IsOneTimeUse = isOneTimeUse; +IssuedAt = issuedAt; +LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; +ParentAcsCredentialId = parentAcsCredentialId; +StartsAt = startsAt; +UserIdentityId = userIdentityId; +VisionlineMetadata = visionlineMetadata; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +/// +/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AccessMethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExternalTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_card")] +PtiCard = 1, + +[EnumMember(Value = "brivo_credential")] +BrivoCredential = 2, + +[EnumMember(Value = "hid_credential")] +HidCredential = 3, + +[EnumMember(Value = "visionline_card")] +VisionlineCard = 4, + +[EnumMember(Value = "salto_ks_credential")] +SaltoKsCredential = 5, + +[EnumMember(Value = "assa_abloy_vostio_key")] +AssaAbloyVostioKey = 6, + +[EnumMember(Value = "salto_space_key")] +SaltoSpaceKey = 7, + +[EnumMember(Value = "latch_access")] +LatchAccess = 8, + +[EnumMember(Value = "dormakaba_ambiance_credential")] +DormakabaAmbianceCredential = 9, + +[EnumMember(Value = "hotek_card")] +HotekCard = 10, + +[EnumMember(Value = "salto_ks_tag")] +SaltoKsTag = 11, + +[EnumMember(Value = "avigilon_alta_credential")] +AvigilonAltaCredential = 12, + +[EnumMember(Value = "kisi_credential")] +KisiCredential = 13, + +[EnumMember(Value = "akiles_credential")] +AkilesCredential = 14, +} + +/// +/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnSeam.AccessMethodEnum AccessMethod { get; set; } + +/// +/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the credential pool to which the credential belongs. +/// +[DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialPoolId { get; set; } + +/// +/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? AkilesMetadata { get; set; } + +/// +/// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + +/// +/// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] +public string? CardNumber { get; set; } + +/// +/// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. +/// +[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnSeam.ExternalTypeEnum? ExternalType { get; set; } + +/// +/// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. +/// +[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string? ExternalTypeDisplayName { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. +/// +[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] +public bool? IsIssued { get; set; } + +/// +/// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. +/// +[DataMember(Name = "is_latest_desired_state_synced_with_provider", IsRequired = false, EmitDefaultValue = false)] +public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } + +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). +/// +[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] +public bool? IsMultiPhoneSyncCredential { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. +/// +[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOneTimeUse { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. +/// +[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] +public string? IssuedAt { get; set; } + +/// +/// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. +/// +[DataMember(Name = "latest_desired_state_synced_with_provider_at", IsRequired = false, EmitDefaultValue = false)] +public string? LatestDesiredStateSyncedWithProviderAt { get; set; } + +/// +/// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "parent_acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? ParentAcsCredentialId { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata? VisionlineMetadata { get; set; } + +/// +/// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata_model")] +public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata() { } + +public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata(string? memberPinId = default) +{ +MemberPinId = memberPinId; +} + +/// +/// ID of the Akiles member PIN. +/// +[DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] +public string? MemberPinId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata_model")] +public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata() { } + +public ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata(bool? autoJoin = default, List? doorNames = default, string? endpointId = default, string? keyId = default, string? keyIssuingRequestId = default, List? overrideGuestAcsEntranceIds = default) +{ +AutoJoin = autoJoin; +DoorNames = doorNames; +EndpointId = endpointId; +KeyId = keyId; +KeyIssuingRequestId = keyIssuingRequestId; +OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; +} + +/// +/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. +/// +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +/// +/// Names of the doors to which to grant access in the Vostio access system. +/// +[DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] +public List? DoorNames { get; set; } + +/// +/// Endpoint ID in the Vostio access system. +/// +[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] +public string? EndpointId { get; set; } + +/// +/// Key ID in the Vostio access system. +/// +[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyId { get; set; } + +/// +/// Key issuing request ID in the Vostio access system. +/// +[DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyIssuingRequestId { get; set; } + +/// +/// IDs of the guest entrances to override in the Vostio access system. +/// +[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? OverrideGuestAcsEntranceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamErrors_model")] +public class ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors() { } + +public ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata_model")] +public class ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata() { } + +public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata(bool? autoJoin = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, string? cardId = default, List? commonAcsEntranceIds = default, string? credentialId = default, List? guestAcsEntranceIds = default, bool? isValid = default, List? joinerAcsCredentialIds = default) +{ +AutoJoin = autoJoin; +CardFunctionType = cardFunctionType; +CardId = cardId; +CommonAcsEntranceIds = commonAcsEntranceIds; +CredentialId = credentialId; +GuestAcsEntranceIds = guestAcsEntranceIds; +IsValid = isValid; +JoinerAcsCredentialIds = joinerAcsCredentialIds; +} + +/// +/// Card function type in the Visionline access system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CardFunctionTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "guest")] +Guest = 1, + +[EnumMember(Value = "staff")] +Staff = 2, +} + +/// +/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. +/// +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +/// +/// Card function type in the Visionline access system. +/// +[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + +/// +/// ID of the card in the Visionline access system. +/// +[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] +public string? CardId { get; set; } + +/// +/// Common entrance IDs in the Visionline access system. +/// +[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAcsEntranceIds { get; set; } + +/// +/// ID of the credential in the Visionline access system. +/// +[DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? CredentialId { get; set; } + +/// +/// Guest entrance IDs in the Visionline access system. +/// +[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? GuestAcsEntranceIds { get; set; } + +/// +/// Indicates whether the credential is valid. +/// +[DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] +public bool? IsValid { get; set; } + +/// +/// IDs of the credentials to which you want to join. +/// +[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] +public List? JoinerAcsCredentialIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamWarnings_model")] +public class ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings() { } + +public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings(string createdAt = default, string message = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum warningCode = default, string? newCode = default, string? originalCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +NewCode = newCode; +OriginalCode = originalCode; +} + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum WarningCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "waiting_to_be_issued")] +WaitingToBeIssued = 1, + +[EnumMember(Value = "schedule_externally_modified")] +ScheduleExternallyModified = 2, + +[EnumMember(Value = "schedule_modified")] +ScheduleModified = 3, + +[EnumMember(Value = "being_deleted")] +BeingDeleted = 4, + +[EnumMember(Value = "unknown_issue_with_acs_credential")] +UnknownIssueWithAcsCredential = 5, + +[EnumMember(Value = "needs_to_be_reissued")] +NeedsToBeReissued = 6, + +[EnumMember(Value = "requested_code_unavailable")] +RequestedCodeUnavailable = 7, +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum WarningCode { get; set; } + +/// +/// The PIN code that was assigned instead. +/// +[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] +public string? NewCode { get; set; } + +/// +/// The originally requested PIN code that could not be used. +/// +[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] +public string? OriginalCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanCredentialResultWarnings_model")] +public class ActionAttemptScanCredentialResultWarnings +{ +[JsonConstructorAttribute] +protected ActionAttemptScanCredentialResultWarnings() { } + +public ActionAttemptScanCredentialResultWarnings(ActionAttemptScanCredentialResultWarnings.WarningCodeEnum warningCode = default, string warningMessage = default) +{ +WarningCode = warningCode; +WarningMessage = warningMessage; +} + +/// +/// Indicates a warning related to scanning a credential. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum WarningCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "acs_credential_on_encoder_out_of_sync")] +AcsCredentialOnEncoderOutOfSync = 1, + +[EnumMember(Value = "acs_credential_on_seam_not_found")] +AcsCredentialOnSeamNotFound = 2, +} + +/// +/// Indicates a warning related to scanning a credential. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "warning_message", IsRequired = false, EmitDefaultValue = false)] +public string WarningMessage { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Encoding credential data from the physical encoder onto a card is pending. +/// +[DataContract(Name = "seamModel_actionAttemptEncodeCredential_model")] +public class ActionAttemptEncodeCredential : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptEncodeCredential() { } + +public ActionAttemptEncodeCredential(string actionAttemptId = default, string actionType = default, ActionAttemptEncodeCredentialError error = default, ActionAttemptEncodeCredentialResult result = default, ActionAttemptEncodeCredential.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "ENCODE_CREDENTIAL"; + +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialError Error { get; set; } + +/// +/// Result of an encoding attempt. If the attempt was successful, includes the credential data that was encoded onto the card. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredential.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptEncodeCredentialError_model")] +public class ActionAttemptEncodeCredentialError +{ +[JsonConstructorAttribute] +protected ActionAttemptEncodeCredentialError() { } + +public ActionAttemptEncodeCredentialError(string message = default, ActionAttemptEncodeCredentialError.TypeEnum type = default) +{ +Message = message; +Type = type; +} + +/// +/// Error type to indicate that the credential was deleted and can no longer be encoded. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "uncategorized_error")] +UncategorizedError = 1, + +[EnumMember(Value = "action_attempt_expired")] +ActionAttemptExpired = 2, + +[EnumMember(Value = "no_credential_on_encoder")] +NoCredentialOnEncoder = 3, + +[EnumMember(Value = "incompatible_card_format")] +IncompatibleCardFormat = 4, + +[EnumMember(Value = "credential_cannot_be_reissued")] +CredentialCannotBeReissued = 5, + +[EnumMember(Value = "encoder_not_online")] +EncoderNotOnline = 6, + +[EnumMember(Value = "encoder_communication_timeout")] +EncoderCommunicationTimeout = 7, + +[EnumMember(Value = "bridge_disconnected")] +BridgeDisconnected = 8, + +[EnumMember(Value = "encoding_interrupted")] +EncodingInterrupted = 9, + +[EnumMember(Value = "credential_deleted")] +CredentialDeleted = 10, +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Error type to indicate that the credential was deleted and can no longer be encoded. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialError.TypeEnum Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResult_model")] +public class ActionAttemptEncodeCredentialResult +{ +[JsonConstructorAttribute] +protected ActionAttemptEncodeCredentialResult() { } + +public ActionAttemptEncodeCredentialResult(ActionAttemptEncodeCredentialResult.AccessMethodEnum accessMethod = default, string acsCredentialId = default, string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, ActionAttemptEncodeCredentialResultAkilesMetadata? akilesMetadata = default, ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, ActionAttemptEncodeCredentialResult.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, bool? isIssued = default, bool? isLatestDesiredStateSyncedWithProvider = default, bool isManaged = default, bool? isMultiPhoneSyncCredential = default, bool? isOneTimeUse = default, string? issuedAt = default, string? latestDesiredStateSyncedWithProviderAt = default, string? parentAcsCredentialId = default, string? startsAt = default, string? userIdentityId = default, ActionAttemptEncodeCredentialResultVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) +{ +AccessMethod = accessMethod; +AcsCredentialId = acsCredentialId; +AcsCredentialPoolId = acsCredentialPoolId; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +AkilesMetadata = akilesMetadata; +AssaAbloyVostioMetadata = assaAbloyVostioMetadata; +CardNumber = cardNumber; +Code = code; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DisplayName = displayName; +EndsAt = endsAt; +Errors = errors; +ExternalType = externalType; +ExternalTypeDisplayName = externalTypeDisplayName; +IsIssued = isIssued; +IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; +IsManaged = isManaged; +IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; +IsOneTimeUse = isOneTimeUse; +IssuedAt = issuedAt; +LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; +ParentAcsCredentialId = parentAcsCredentialId; +StartsAt = startsAt; +UserIdentityId = userIdentityId; +VisionlineMetadata = visionlineMetadata; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +/// +/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AccessMethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExternalTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_card")] +PtiCard = 1, + +[EnumMember(Value = "brivo_credential")] +BrivoCredential = 2, + +[EnumMember(Value = "hid_credential")] +HidCredential = 3, + +[EnumMember(Value = "visionline_card")] +VisionlineCard = 4, + +[EnumMember(Value = "salto_ks_credential")] +SaltoKsCredential = 5, + +[EnumMember(Value = "assa_abloy_vostio_key")] +AssaAbloyVostioKey = 6, + +[EnumMember(Value = "salto_space_key")] +SaltoSpaceKey = 7, + +[EnumMember(Value = "latch_access")] +LatchAccess = 8, + +[EnumMember(Value = "dormakaba_ambiance_credential")] +DormakabaAmbianceCredential = 9, + +[EnumMember(Value = "hotek_card")] +HotekCard = 10, + +[EnumMember(Value = "salto_ks_tag")] +SaltoKsTag = 11, + +[EnumMember(Value = "avigilon_alta_credential")] +AvigilonAltaCredential = 12, + +[EnumMember(Value = "kisi_credential")] +KisiCredential = 13, + +[EnumMember(Value = "akiles_credential")] +AkilesCredential = 14, +} + +/// +/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialResult.AccessMethodEnum AccessMethod { get; set; } + +/// +/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the credential pool to which the credential belongs. +/// +[DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialPoolId { get; set; } + +/// +/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialResultAkilesMetadata? AkilesMetadata { get; set; } + +/// +/// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + +/// +/// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] +public string? CardNumber { get; set; } + +/// +/// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. +/// +[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialResult.ExternalTypeEnum? ExternalType { get; set; } + +/// +/// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. +/// +[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string? ExternalTypeDisplayName { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. +/// +[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] +public bool? IsIssued { get; set; } + +/// +/// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. +/// +[DataMember(Name = "is_latest_desired_state_synced_with_provider", IsRequired = false, EmitDefaultValue = false)] +public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } + +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). +/// +[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] +public bool? IsMultiPhoneSyncCredential { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. +/// +[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOneTimeUse { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. +/// +[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] +public string? IssuedAt { get; set; } + +/// +/// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. +/// +[DataMember(Name = "latest_desired_state_synced_with_provider_at", IsRequired = false, EmitDefaultValue = false)] +public string? LatestDesiredStateSyncedWithProviderAt { get; set; } + +/// +/// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "parent_acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? ParentAcsCredentialId { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialResultVisionlineMetadata? VisionlineMetadata { get; set; } + +/// +/// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultAkilesMetadata_model")] +public class ActionAttemptEncodeCredentialResultAkilesMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptEncodeCredentialResultAkilesMetadata() { } + +public ActionAttemptEncodeCredentialResultAkilesMetadata(string? memberPinId = default) +{ +MemberPinId = memberPinId; +} + +/// +/// ID of the Akiles member PIN. +/// +[DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] +public string? MemberPinId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultAssaAbloyVostioMetadata_model")] +public class ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata() { } + +public ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata(bool? autoJoin = default, List? doorNames = default, string? endpointId = default, string? keyId = default, string? keyIssuingRequestId = default, List? overrideGuestAcsEntranceIds = default) +{ +AutoJoin = autoJoin; +DoorNames = doorNames; +EndpointId = endpointId; +KeyId = keyId; +KeyIssuingRequestId = keyIssuingRequestId; +OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; +} + +/// +/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. +/// +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +/// +/// Names of the doors to which to grant access in the Vostio access system. +/// +[DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] +public List? DoorNames { get; set; } + +/// +/// Endpoint ID in the Vostio access system. +/// +[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] +public string? EndpointId { get; set; } + +/// +/// Key ID in the Vostio access system. +/// +[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyId { get; set; } + +/// +/// Key issuing request ID in the Vostio access system. +/// +[DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyIssuingRequestId { get; set; } + +/// +/// IDs of the guest entrances to override in the Vostio access system. +/// +[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? OverrideGuestAcsEntranceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultErrors_model")] +public class ActionAttemptEncodeCredentialResultErrors +{ +[JsonConstructorAttribute] +protected ActionAttemptEncodeCredentialResultErrors() { } + +public ActionAttemptEncodeCredentialResultErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultVisionlineMetadata_model")] +public class ActionAttemptEncodeCredentialResultVisionlineMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptEncodeCredentialResultVisionlineMetadata() { } + +public ActionAttemptEncodeCredentialResultVisionlineMetadata(bool? autoJoin = default, ActionAttemptEncodeCredentialResultVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, string? cardId = default, List? commonAcsEntranceIds = default, string? credentialId = default, List? guestAcsEntranceIds = default, bool? isValid = default, List? joinerAcsCredentialIds = default) +{ +AutoJoin = autoJoin; +CardFunctionType = cardFunctionType; +CardId = cardId; +CommonAcsEntranceIds = commonAcsEntranceIds; +CredentialId = credentialId; +GuestAcsEntranceIds = guestAcsEntranceIds; +IsValid = isValid; +JoinerAcsCredentialIds = joinerAcsCredentialIds; +} + +/// +/// Card function type in the Visionline access system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CardFunctionTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "guest")] +Guest = 1, + +[EnumMember(Value = "staff")] +Staff = 2, +} + +/// +/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. +/// +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +/// +/// Card function type in the Visionline access system. +/// +[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialResultVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + +/// +/// ID of the card in the Visionline access system. +/// +[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] +public string? CardId { get; set; } + +/// +/// Common entrance IDs in the Visionline access system. +/// +[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAcsEntranceIds { get; set; } + +/// +/// ID of the credential in the Visionline access system. +/// +[DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? CredentialId { get; set; } + +/// +/// Guest entrance IDs in the Visionline access system. +/// +[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? GuestAcsEntranceIds { get; set; } + +/// +/// Indicates whether the credential is valid. +/// +[DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] +public bool? IsValid { get; set; } + +/// +/// IDs of the credentials to which you want to join. +/// +[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] +public List? JoinerAcsCredentialIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultWarnings_model")] +public class ActionAttemptEncodeCredentialResultWarnings +{ +[JsonConstructorAttribute] +protected ActionAttemptEncodeCredentialResultWarnings() { } + +public ActionAttemptEncodeCredentialResultWarnings(string createdAt = default, string message = default, ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum warningCode = default, string? newCode = default, string? originalCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +NewCode = newCode; +OriginalCode = originalCode; +} + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum WarningCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "waiting_to_be_issued")] +WaitingToBeIssued = 1, + +[EnumMember(Value = "schedule_externally_modified")] +ScheduleExternallyModified = 2, + +[EnumMember(Value = "schedule_modified")] +ScheduleModified = 3, + +[EnumMember(Value = "being_deleted")] +BeingDeleted = 4, + +[EnumMember(Value = "unknown_issue_with_acs_credential")] +UnknownIssueWithAcsCredential = 5, + +[EnumMember(Value = "needs_to_be_reissued")] +NeedsToBeReissued = 6, + +[EnumMember(Value = "requested_code_unavailable")] +RequestedCodeUnavailable = 7, +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + +/// +/// The PIN code that was assigned instead. +/// +[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] +public string? NewCode { get; set; } + +/// +/// The originally requested PIN code that could not be used. +/// +[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] +public string? OriginalCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Scanning a physical card and assigning the credential is pending. +/// +[DataContract(Name = "seamModel_actionAttemptScanToAssignCredential_model")] +public class ActionAttemptScanToAssignCredential : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptScanToAssignCredential() { } + +public ActionAttemptScanToAssignCredential(string actionAttemptId = default, string actionType = default, ActionAttemptScanToAssignCredentialError error = default, ActionAttemptScanToAssignCredentialResult result = default, ActionAttemptScanToAssignCredential.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "SCAN_TO_ASSIGN_CREDENTIAL"; + +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialError Error { get; set; } + +/// +/// Result of a scan to assign attempt. If the attempt was successful, includes the credential data that was scanned and assigned. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredential.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialError_model")] +public class ActionAttemptScanToAssignCredentialError +{ +[JsonConstructorAttribute] +protected ActionAttemptScanToAssignCredentialError() { } + +public ActionAttemptScanToAssignCredentialError(string message = default, ActionAttemptScanToAssignCredentialError.TypeEnum type = default) +{ +Message = message; +Type = type; +} + +/// +/// Error type to indicate that there is no credential on the encoder. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "uncategorized_error")] +UncategorizedError = 1, + +[EnumMember(Value = "action_attempt_expired")] +ActionAttemptExpired = 2, + +[EnumMember(Value = "no_credential_on_encoder")] +NoCredentialOnEncoder = 3, +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Error type to indicate that there is no credential on the encoder. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialError.TypeEnum Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResult_model")] +public class ActionAttemptScanToAssignCredentialResult +{ +[JsonConstructorAttribute] +protected ActionAttemptScanToAssignCredentialResult() { } + +public ActionAttemptScanToAssignCredentialResult(ActionAttemptScanToAssignCredentialResult.AccessMethodEnum accessMethod = default, string acsCredentialId = default, string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, ActionAttemptScanToAssignCredentialResultAkilesMetadata? akilesMetadata = default, ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, ActionAttemptScanToAssignCredentialResult.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, bool? isIssued = default, bool? isLatestDesiredStateSyncedWithProvider = default, bool isManaged = default, bool? isMultiPhoneSyncCredential = default, bool? isOneTimeUse = default, string? issuedAt = default, string? latestDesiredStateSyncedWithProviderAt = default, string? parentAcsCredentialId = default, string? startsAt = default, string? userIdentityId = default, ActionAttemptScanToAssignCredentialResultVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) +{ +AccessMethod = accessMethod; +AcsCredentialId = acsCredentialId; +AcsCredentialPoolId = acsCredentialPoolId; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +AkilesMetadata = akilesMetadata; +AssaAbloyVostioMetadata = assaAbloyVostioMetadata; +CardNumber = cardNumber; +Code = code; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DisplayName = displayName; +EndsAt = endsAt; +Errors = errors; +ExternalType = externalType; +ExternalTypeDisplayName = externalTypeDisplayName; +IsIssued = isIssued; +IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; +IsManaged = isManaged; +IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; +IsOneTimeUse = isOneTimeUse; +IssuedAt = issuedAt; +LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; +ParentAcsCredentialId = parentAcsCredentialId; +StartsAt = startsAt; +UserIdentityId = userIdentityId; +VisionlineMetadata = visionlineMetadata; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +/// +/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AccessMethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ExternalTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pti_card")] +PtiCard = 1, + +[EnumMember(Value = "brivo_credential")] +BrivoCredential = 2, + +[EnumMember(Value = "hid_credential")] +HidCredential = 3, + +[EnumMember(Value = "visionline_card")] +VisionlineCard = 4, + +[EnumMember(Value = "salto_ks_credential")] +SaltoKsCredential = 5, + +[EnumMember(Value = "assa_abloy_vostio_key")] +AssaAbloyVostioKey = 6, + +[EnumMember(Value = "salto_space_key")] +SaltoSpaceKey = 7, + +[EnumMember(Value = "latch_access")] +LatchAccess = 8, + +[EnumMember(Value = "dormakaba_ambiance_credential")] +DormakabaAmbianceCredential = 9, + +[EnumMember(Value = "hotek_card")] +HotekCard = 10, + +[EnumMember(Value = "salto_ks_tag")] +SaltoKsTag = 11, + +[EnumMember(Value = "avigilon_alta_credential")] +AvigilonAltaCredential = 12, + +[EnumMember(Value = "kisi_credential")] +KisiCredential = 13, + +[EnumMember(Value = "akiles_credential")] +AkilesCredential = 14, +} + +/// +/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialResult.AccessMethodEnum AccessMethod { get; set; } + +/// +/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the credential pool to which the credential belongs. +/// +[DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsCredentialPoolId { get; set; } + +/// +/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string? AcsUserId { get; set; } + +/// +/// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialResultAkilesMetadata? AkilesMetadata { get; set; } + +/// +/// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + +/// +/// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] +public string? CardNumber { get; set; } + +/// +/// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. +/// +[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialResult.ExternalTypeEnum? ExternalType { get; set; } + +/// +/// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. +/// +[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string? ExternalTypeDisplayName { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. +/// +[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] +public bool? IsIssued { get; set; } + +/// +/// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. +/// +[DataMember(Name = "is_latest_desired_state_synced_with_provider", IsRequired = false, EmitDefaultValue = false)] +public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } + +/// +/// Indicates whether Seam manages the credential. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). +/// +[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] +public bool? IsMultiPhoneSyncCredential { get; set; } + +/// +/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. +/// +[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOneTimeUse { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. +/// +[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] +public string? IssuedAt { get; set; } + +/// +/// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. +/// +[DataMember(Name = "latest_desired_state_synced_with_provider_at", IsRequired = false, EmitDefaultValue = false)] +public string? LatestDesiredStateSyncedWithProviderAt { get; set; } + +/// +/// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "parent_acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? ParentAcsCredentialId { get; set; } + +/// +/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialResultVisionlineMetadata? VisionlineMetadata { get; set; } + +/// +/// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultAkilesMetadata_model")] +public class ActionAttemptScanToAssignCredentialResultAkilesMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptScanToAssignCredentialResultAkilesMetadata() { } + +public ActionAttemptScanToAssignCredentialResultAkilesMetadata(string? memberPinId = default) +{ +MemberPinId = memberPinId; +} + +/// +/// ID of the Akiles member PIN. +/// +[DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] +public string? MemberPinId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata_model")] +public class ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata() { } + +public ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata(bool? autoJoin = default, List? doorNames = default, string? endpointId = default, string? keyId = default, string? keyIssuingRequestId = default, List? overrideGuestAcsEntranceIds = default) +{ +AutoJoin = autoJoin; +DoorNames = doorNames; +EndpointId = endpointId; +KeyId = keyId; +KeyIssuingRequestId = keyIssuingRequestId; +OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; +} + +/// +/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. +/// +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +/// +/// Names of the doors to which to grant access in the Vostio access system. +/// +[DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] +public List? DoorNames { get; set; } + +/// +/// Endpoint ID in the Vostio access system. +/// +[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] +public string? EndpointId { get; set; } + +/// +/// Key ID in the Vostio access system. +/// +[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyId { get; set; } + +/// +/// Key issuing request ID in the Vostio access system. +/// +[DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyIssuingRequestId { get; set; } + +/// +/// IDs of the guest entrances to override in the Vostio access system. +/// +[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? OverrideGuestAcsEntranceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultErrors_model")] +public class ActionAttemptScanToAssignCredentialResultErrors +{ +[JsonConstructorAttribute] +protected ActionAttemptScanToAssignCredentialResultErrors() { } + +public ActionAttemptScanToAssignCredentialResultErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultVisionlineMetadata_model")] +public class ActionAttemptScanToAssignCredentialResultVisionlineMetadata +{ +[JsonConstructorAttribute] +protected ActionAttemptScanToAssignCredentialResultVisionlineMetadata() { } + +public ActionAttemptScanToAssignCredentialResultVisionlineMetadata(bool? autoJoin = default, ActionAttemptScanToAssignCredentialResultVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, string? cardId = default, List? commonAcsEntranceIds = default, string? credentialId = default, List? guestAcsEntranceIds = default, bool? isValid = default, List? joinerAcsCredentialIds = default) +{ +AutoJoin = autoJoin; +CardFunctionType = cardFunctionType; +CardId = cardId; +CommonAcsEntranceIds = commonAcsEntranceIds; +CredentialId = credentialId; +GuestAcsEntranceIds = guestAcsEntranceIds; +IsValid = isValid; +JoinerAcsCredentialIds = joinerAcsCredentialIds; +} + +/// +/// Card function type in the Visionline access system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CardFunctionTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "guest")] +Guest = 1, + +[EnumMember(Value = "staff")] +Staff = 2, +} + +/// +/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. +/// +[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoJoin { get; set; } + +/// +/// Card function type in the Visionline access system. +/// +[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialResultVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + +/// +/// ID of the card in the Visionline access system. +/// +[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] +public string? CardId { get; set; } + +/// +/// Common entrance IDs in the Visionline access system. +/// +[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? CommonAcsEntranceIds { get; set; } + +/// +/// ID of the credential in the Visionline access system. +/// +[DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] +public string? CredentialId { get; set; } + +/// +/// Guest entrance IDs in the Visionline access system. +/// +[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List? GuestAcsEntranceIds { get; set; } + +/// +/// Indicates whether the credential is valid. +/// +[DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] +public bool? IsValid { get; set; } + +/// +/// IDs of the credentials to which you want to join. +/// +[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] +public List? JoinerAcsCredentialIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultWarnings_model")] +public class ActionAttemptScanToAssignCredentialResultWarnings +{ +[JsonConstructorAttribute] +protected ActionAttemptScanToAssignCredentialResultWarnings() { } + +public ActionAttemptScanToAssignCredentialResultWarnings(string createdAt = default, string message = default, ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, string? newCode = default, string? originalCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +NewCode = newCode; +OriginalCode = originalCode; +} + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum WarningCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "waiting_to_be_issued")] +WaitingToBeIssued = 1, + +[EnumMember(Value = "schedule_externally_modified")] +ScheduleExternallyModified = 2, + +[EnumMember(Value = "schedule_modified")] +ScheduleModified = 3, + +[EnumMember(Value = "being_deleted")] +BeingDeleted = 4, + +[EnumMember(Value = "unknown_issue_with_acs_credential")] +UnknownIssueWithAcsCredential = 5, + +[EnumMember(Value = "needs_to_be_reissued")] +NeedsToBeReissued = 6, + +[EnumMember(Value = "requested_code_unavailable")] +RequestedCodeUnavailable = 7, +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + +/// +/// The PIN code that was assigned instead. +/// +[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] +public string? NewCode { get; set; } + +/// +/// The originally requested PIN code that could not be used. +/// +[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] +public string? OriginalCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Assigning a credential to an access method is pending. +/// +[DataContract(Name = "seamModel_actionAttemptAssignCredential_model")] +public class ActionAttemptAssignCredential : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptAssignCredential() { } + +public ActionAttemptAssignCredential(string actionAttemptId = default, string actionType = default, ActionAttemptAssignCredentialError error = default, ActionAttemptAssignCredentialResult result = default, ActionAttemptAssignCredential.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "ASSIGN_CREDENTIAL"; + +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialError Error { get; set; } + +/// +/// Result of assigning a credential. If successful, includes the updated access method with the assigned credential. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredential.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptAssignCredentialError_model")] +public class ActionAttemptAssignCredentialError +{ +[JsonConstructorAttribute] +protected ActionAttemptAssignCredentialError() { } + +public ActionAttemptAssignCredentialError(string message = default, ActionAttemptAssignCredentialError.TypeEnum type = default) +{ +Message = message; +Type = type; +} + +/// +/// Error type to indicate that no matching credential was found. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "uncategorized_error")] +UncategorizedError = 1, + +[EnumMember(Value = "action_attempt_expired")] +ActionAttemptExpired = 2, + +[EnumMember(Value = "credential_not_found")] +CredentialNotFound = 3, +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Error type to indicate that no matching credential was found. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialError.TypeEnum Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptAssignCredentialResult_model")] +public class ActionAttemptAssignCredentialResult +{ +[JsonConstructorAttribute] +protected ActionAttemptAssignCredentialResult() { } + +public ActionAttemptAssignCredentialResult(string accessMethodId = default, string? clientSessionToken = default, string? code = default, string createdAt = default, string? customizationProfileId = default, string displayName = default, string displayStatus = default, List errors = default, string? instantKeyUrl = default, bool? isAssignmentRequired = default, bool? isEncodingRequired = default, bool isIssued = default, bool? isReadyForAssignment = default, bool? isReadyForEncoding = default, string? issuedAt = default, ActionAttemptAssignCredentialResult.ModeEnum mode = default, List pendingMutations = default, List warnings = default, string workspaceId = default) +{ +AccessMethodId = accessMethodId; +ClientSessionToken = clientSessionToken; +Code = code; +CreatedAt = createdAt; +CustomizationProfileId = customizationProfileId; +DisplayName = displayName; +DisplayStatus = displayStatus; +Errors = errors; +InstantKeyUrl = instantKeyUrl; +IsAssignmentRequired = isAssignmentRequired; +IsEncodingRequired = isEncodingRequired; +IsIssued = isIssued; +IsReadyForAssignment = isReadyForAssignment; +IsReadyForEncoding = isReadyForEncoding; +IssuedAt = issuedAt; +Mode = mode; +PendingMutations = pendingMutations; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// ID of the access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Token of the client session associated with the access method. +/// +[DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] +public string? ClientSessionToken { get; set; } + +/// +/// The actual PIN code for code access methods. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Date and time at which the access method was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the customization profile associated with the access method. +/// +[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomizationProfileId { get; set; } + +/// +/// Display name of the access method. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. +/// +[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] +public string DisplayStatus { get; set; } + +/// +/// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// URL of the Instant Key for mobile key access methods. +/// +[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] +public string? InstantKeyUrl { get; set; } + +/// +/// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. +/// +[DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] +public bool? IsAssignmentRequired { get; set; } + +/// +/// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. +/// +[DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] +public bool? IsEncodingRequired { get; set; } + +/// +/// Indicates whether the access method has been issued. +/// +[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] +public bool IsIssued { get; set; } + +/// +/// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. +/// +[DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] +public bool? IsReadyForAssignment { get; set; } + +/// +/// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. +/// +[DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] +public bool? IsReadyForEncoding { get; set; } + +/// +/// Date and time at which the access method was issued. +/// +[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] +public string? IssuedAt { get; set; } + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialResult.ModeEnum Mode { get; set; } + +/// +/// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. +/// +[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] +public List PendingMutations { get; set; } + +/// +/// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the Seam workspace associated with the access method. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultErrors_model")] +public class ActionAttemptAssignCredentialResultErrors +{ +[JsonConstructorAttribute] +protected ActionAttemptAssignCredentialResultErrors() { } + +public ActionAttemptAssignCredentialResultErrors(string createdAt = default, ActionAttemptAssignCredentialResultErrors.ErrorCodeEnum errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ErrorCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "failed_to_issue")] +FailedToIssue = 1, +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialResultErrors.ErrorCodeEnum ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutations_model")] +public class ActionAttemptAssignCredentialResultPendingMutations +{ +[JsonConstructorAttribute] +protected ActionAttemptAssignCredentialResultPendingMutations() { } + +public ActionAttemptAssignCredentialResultPendingMutations(string createdAt = default, ActionAttemptAssignCredentialResultPendingMutationsFrom from = default, string message = default, ActionAttemptAssignCredentialResultPendingMutations.MutationCodeEnum mutationCode = default, ActionAttemptAssignCredentialResultPendingMutationsTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Mutation code to indicate that Seam is in the process of updating the access times for this access method. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum MutationCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "provisioning_access")] +ProvisioningAccess = 1, + +[EnumMember(Value = "revoking_access")] +RevokingAccess = 2, + +[EnumMember(Value = "updating_access_times")] +UpdatingAccessTimes = 3, +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Previous access time configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialResultPendingMutationsFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Mutation code to indicate that Seam is in the process of updating the access times for this access method. +/// +[DataMember(Name = "mutation_code", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialResultPendingMutations.MutationCodeEnum MutationCode { get; set; } + +/// +/// New access time configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialResultPendingMutationsTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutationsFrom_model")] +public class ActionAttemptAssignCredentialResultPendingMutationsFrom +{ +[JsonConstructorAttribute] +protected ActionAttemptAssignCredentialResultPendingMutationsFrom() { } + +public ActionAttemptAssignCredentialResultPendingMutationsFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Previous end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Previous start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutationsTo_model")] +public class ActionAttemptAssignCredentialResultPendingMutationsTo +{ +[JsonConstructorAttribute] +protected ActionAttemptAssignCredentialResultPendingMutationsTo() { } + +public ActionAttemptAssignCredentialResultPendingMutationsTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// New end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// New start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultWarnings_model")] +public class ActionAttemptAssignCredentialResultWarnings +{ +[JsonConstructorAttribute] +protected ActionAttemptAssignCredentialResultWarnings() { } + +public ActionAttemptAssignCredentialResultWarnings(string createdAt = default, string message = default, ActionAttemptAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, string? originalAccessMethodId = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +OriginalAccessMethodId = originalAccessMethodId; +} + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum WarningCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "being_deleted")] +BeingDeleted = 1, + +[EnumMember(Value = "updating_access_times")] +UpdatingAccessTimes = 2, + +[EnumMember(Value = "pulled_backup_access_code")] +PulledBackupAccessCode = 3, + +[EnumMember(Value = "delay_in_issuing")] +DelayInIssuing = 4, + +[EnumMember(Value = "user_identity_missing_email_address")] +UserIdentityMissingEmailAddress = 5, + +[EnumMember(Value = "user_identity_missing_phone_number")] +UserIdentityMissingPhoneNumber = 6, +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + +/// +/// ID of the original access method from which this backup access method was split, if applicable. +/// +[DataMember(Name = "original_access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string? OriginalAccessMethodId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Resetting a sandbox workspace is pending. +/// +[DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspace_model")] +public class ActionAttemptResetSandboxWorkspace : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptResetSandboxWorkspace() { } + +public ActionAttemptResetSandboxWorkspace(string actionAttemptId = default, string actionType = default, ActionAttemptResetSandboxWorkspaceError error = default, ActionAttemptResetSandboxWorkspaceResult result = default, ActionAttemptResetSandboxWorkspace.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "RESET_SANDBOX_WORKSPACE"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptResetSandboxWorkspaceError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptResetSandboxWorkspaceResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptResetSandboxWorkspace.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspaceError_model")] +public class ActionAttemptResetSandboxWorkspaceError +{ +[JsonConstructorAttribute] +protected ActionAttemptResetSandboxWorkspaceError() { } + +public ActionAttemptResetSandboxWorkspaceError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspaceResult_model")] +public class ActionAttemptResetSandboxWorkspaceResult +{ +[JsonConstructorAttribute] +public ActionAttemptResetSandboxWorkspaceResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Setting the fan mode is pending. +/// +[DataContract(Name = "seamModel_actionAttemptSetFanMode_model")] +public class ActionAttemptSetFanMode : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptSetFanMode() { } + +public ActionAttemptSetFanMode(string actionAttemptId = default, string actionType = default, ActionAttemptSetFanModeError error = default, ActionAttemptSetFanModeResult result = default, ActionAttemptSetFanMode.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "SET_FAN_MODE"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSetFanModeError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSetFanModeResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSetFanMode.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSetFanModeError_model")] +public class ActionAttemptSetFanModeError +{ +[JsonConstructorAttribute] +protected ActionAttemptSetFanModeError() { } + +public ActionAttemptSetFanModeError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSetFanModeResult_model")] +public class ActionAttemptSetFanModeResult +{ +[JsonConstructorAttribute] +public ActionAttemptSetFanModeResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Setting the HVAC mode is pending. +/// +[DataContract(Name = "seamModel_actionAttemptSetHvacMode_model")] +public class ActionAttemptSetHvacMode : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptSetHvacMode() { } + +public ActionAttemptSetHvacMode(string actionAttemptId = default, string actionType = default, ActionAttemptSetHvacModeError error = default, ActionAttemptSetHvacModeResult result = default, ActionAttemptSetHvacMode.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "SET_HVAC_MODE"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSetHvacModeError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSetHvacModeResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSetHvacMode.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSetHvacModeError_model")] +public class ActionAttemptSetHvacModeError +{ +[JsonConstructorAttribute] +protected ActionAttemptSetHvacModeError() { } + +public ActionAttemptSetHvacModeError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSetHvacModeResult_model")] +public class ActionAttemptSetHvacModeResult +{ +[JsonConstructorAttribute] +public ActionAttemptSetHvacModeResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Activating a climate preset is pending. +/// +[DataContract(Name = "seamModel_actionAttemptActivateClimatePreset_model")] +public class ActionAttemptActivateClimatePreset : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptActivateClimatePreset() { } + +public ActionAttemptActivateClimatePreset(string actionAttemptId = default, string actionType = default, ActionAttemptActivateClimatePresetError error = default, ActionAttemptActivateClimatePresetResult result = default, ActionAttemptActivateClimatePreset.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "ACTIVATE_CLIMATE_PRESET"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptActivateClimatePresetError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptActivateClimatePresetResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptActivateClimatePreset.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptActivateClimatePresetError_model")] +public class ActionAttemptActivateClimatePresetError +{ +[JsonConstructorAttribute] +protected ActionAttemptActivateClimatePresetError() { } + +public ActionAttemptActivateClimatePresetError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptActivateClimatePresetResult_model")] +public class ActionAttemptActivateClimatePresetResult +{ +[JsonConstructorAttribute] +public ActionAttemptActivateClimatePresetResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Activating the weekly program is pending. +/// +[DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgram_model")] +public class ActionAttemptActivateWeeklyProgram : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptActivateWeeklyProgram() { } + +public ActionAttemptActivateWeeklyProgram(string actionAttemptId = default, string actionType = default, ActionAttemptActivateWeeklyProgramError error = default, ActionAttemptActivateWeeklyProgramResult result = default, ActionAttemptActivateWeeklyProgram.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "ACTIVATE_WEEKLY_PROGRAM"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptActivateWeeklyProgramError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptActivateWeeklyProgramResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptActivateWeeklyProgram.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgramError_model")] +public class ActionAttemptActivateWeeklyProgramError +{ +[JsonConstructorAttribute] +protected ActionAttemptActivateWeeklyProgramError() { } + +public ActionAttemptActivateWeeklyProgramError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgramResult_model")] +public class ActionAttemptActivateWeeklyProgramResult +{ +[JsonConstructorAttribute] +public ActionAttemptActivateWeeklyProgramResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulating a keypad code entry is pending. +/// +[DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntry_model")] +public class ActionAttemptSimulateKeypadCodeEntry : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptSimulateKeypadCodeEntry() { } + +public ActionAttemptSimulateKeypadCodeEntry(string actionAttemptId = default, string actionType = default, ActionAttemptSimulateKeypadCodeEntryError error = default, ActionAttemptSimulateKeypadCodeEntryResult result = default, ActionAttemptSimulateKeypadCodeEntry.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "SIMULATE_KEYPAD_CODE_ENTRY"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSimulateKeypadCodeEntryError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSimulateKeypadCodeEntryResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSimulateKeypadCodeEntry.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntryError_model")] +public class ActionAttemptSimulateKeypadCodeEntryError +{ +[JsonConstructorAttribute] +protected ActionAttemptSimulateKeypadCodeEntryError() { } + +public ActionAttemptSimulateKeypadCodeEntryError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntryResult_model")] +public class ActionAttemptSimulateKeypadCodeEntryResult +{ +[JsonConstructorAttribute] +public ActionAttemptSimulateKeypadCodeEntryResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Simulating a manual lock action using a keypad is pending. +/// +[DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypad_model")] +public class ActionAttemptSimulateManualLockViaKeypad : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptSimulateManualLockViaKeypad() { } + +public ActionAttemptSimulateManualLockViaKeypad(string actionAttemptId = default, string actionType = default, ActionAttemptSimulateManualLockViaKeypadError error = default, ActionAttemptSimulateManualLockViaKeypadResult result = default, ActionAttemptSimulateManualLockViaKeypad.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "SIMULATE_MANUAL_LOCK_VIA_KEYPAD"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSimulateManualLockViaKeypadError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSimulateManualLockViaKeypadResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSimulateManualLockViaKeypad.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypadError_model")] +public class ActionAttemptSimulateManualLockViaKeypadError +{ +[JsonConstructorAttribute] +protected ActionAttemptSimulateManualLockViaKeypadError() { } + +public ActionAttemptSimulateManualLockViaKeypadError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypadResult_model")] +public class ActionAttemptSimulateManualLockViaKeypadResult +{ +[JsonConstructorAttribute] +public ActionAttemptSimulateManualLockViaKeypadResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Pushing thermostat weekly programs is pending. +/// +[DataContract(Name = "seamModel_actionAttemptPushThermostatPrograms_model")] +public class ActionAttemptPushThermostatPrograms : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptPushThermostatPrograms() { } + +public ActionAttemptPushThermostatPrograms(string actionAttemptId = default, string actionType = default, ActionAttemptPushThermostatProgramsError error = default, ActionAttemptPushThermostatProgramsResult result = default, ActionAttemptPushThermostatPrograms.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "PUSH_THERMOSTAT_PROGRAMS"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptPushThermostatProgramsError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptPushThermostatProgramsResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptPushThermostatPrograms.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptPushThermostatProgramsError_model")] +public class ActionAttemptPushThermostatProgramsError +{ +[JsonConstructorAttribute] +protected ActionAttemptPushThermostatProgramsError() { } + +public ActionAttemptPushThermostatProgramsError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptPushThermostatProgramsResult_model")] +public class ActionAttemptPushThermostatProgramsResult +{ +[JsonConstructorAttribute] +public ActionAttemptPushThermostatProgramsResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Configuring the auto-lock is pending. +/// +[DataContract(Name = "seamModel_actionAttemptConfigureAutoLock_model")] +public class ActionAttemptConfigureAutoLock : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptConfigureAutoLock() { } + +public ActionAttemptConfigureAutoLock(string actionAttemptId = default, string actionType = default, ActionAttemptConfigureAutoLockError error = default, ActionAttemptConfigureAutoLockResult result = default, ActionAttemptConfigureAutoLock.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "CONFIGURE_AUTO_LOCK"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptConfigureAutoLockError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptConfigureAutoLockResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptConfigureAutoLock.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptConfigureAutoLockError_model")] +public class ActionAttemptConfigureAutoLockError +{ +[JsonConstructorAttribute] +protected ActionAttemptConfigureAutoLockError() { } + +public ActionAttemptConfigureAutoLockError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptConfigureAutoLockResult_model")] +public class ActionAttemptConfigureAutoLockResult +{ +[JsonConstructorAttribute] +public ActionAttemptConfigureAutoLockResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSyncAccessCodes_model")] +public class ActionAttemptSyncAccessCodes : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptSyncAccessCodes() { } + +public ActionAttemptSyncAccessCodes(string actionAttemptId = default, string actionType = default, ActionAttemptSyncAccessCodesError error = default, ActionAttemptSyncAccessCodesResult result = default, ActionAttemptSyncAccessCodes.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "SYNC_ACCESS_CODES"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSyncAccessCodesError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSyncAccessCodesResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptSyncAccessCodes.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSyncAccessCodesError_model")] +public class ActionAttemptSyncAccessCodesError +{ +[JsonConstructorAttribute] +protected ActionAttemptSyncAccessCodesError() { } + +public ActionAttemptSyncAccessCodesError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptSyncAccessCodesResult_model")] +public class ActionAttemptSyncAccessCodesResult +{ +[JsonConstructorAttribute] +public ActionAttemptSyncAccessCodesResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptCreateAccessCode_model")] +public class ActionAttemptCreateAccessCode : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptCreateAccessCode() { } + +public ActionAttemptCreateAccessCode(string actionAttemptId = default, string actionType = default, ActionAttemptCreateAccessCodeError error = default, ActionAttemptCreateAccessCodeResult result = default, ActionAttemptCreateAccessCode.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "CREATE_ACCESS_CODE"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptCreateAccessCodeError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptCreateAccessCodeResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptCreateAccessCode.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptCreateAccessCodeError_model")] +public class ActionAttemptCreateAccessCodeError +{ +[JsonConstructorAttribute] +protected ActionAttemptCreateAccessCodeError() { } + +public ActionAttemptCreateAccessCodeError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptCreateAccessCodeResult_model")] +public class ActionAttemptCreateAccessCodeResult +{ +[JsonConstructorAttribute] +protected ActionAttemptCreateAccessCodeResult() { } + +public ActionAttemptCreateAccessCodeResult(object accessCode = default) +{ +AccessCode = accessCode; +} + +/// +/// Created access code. +/// +[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] +public object AccessCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptDeleteAccessCode_model")] +public class ActionAttemptDeleteAccessCode : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptDeleteAccessCode() { } + +public ActionAttemptDeleteAccessCode(string actionAttemptId = default, string actionType = default, ActionAttemptDeleteAccessCodeError error = default, ActionAttemptDeleteAccessCodeResult result = default, ActionAttemptDeleteAccessCode.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "DELETE_ACCESS_CODE"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptDeleteAccessCodeError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptDeleteAccessCodeResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptDeleteAccessCode.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptDeleteAccessCodeError_model")] +public class ActionAttemptDeleteAccessCodeError +{ +[JsonConstructorAttribute] +protected ActionAttemptDeleteAccessCodeError() { } + +public ActionAttemptDeleteAccessCodeError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptDeleteAccessCodeResult_model")] +public class ActionAttemptDeleteAccessCodeResult +{ +[JsonConstructorAttribute] +public ActionAttemptDeleteAccessCodeResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUpdateAccessCode_model")] +public class ActionAttemptUpdateAccessCode : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptUpdateAccessCode() { } + +public ActionAttemptUpdateAccessCode(string actionAttemptId = default, string actionType = default, ActionAttemptUpdateAccessCodeError error = default, ActionAttemptUpdateAccessCodeResult result = default, ActionAttemptUpdateAccessCode.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "UPDATE_ACCESS_CODE"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUpdateAccessCodeError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUpdateAccessCodeResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUpdateAccessCode.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUpdateAccessCodeError_model")] +public class ActionAttemptUpdateAccessCodeError +{ +[JsonConstructorAttribute] +protected ActionAttemptUpdateAccessCodeError() { } + +public ActionAttemptUpdateAccessCodeError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUpdateAccessCodeResult_model")] +public class ActionAttemptUpdateAccessCodeResult +{ +[JsonConstructorAttribute] +protected ActionAttemptUpdateAccessCodeResult() { } + +public ActionAttemptUpdateAccessCodeResult(object? accessCode = default) +{ +AccessCode = accessCode; +} + +/// +/// Updated access code. +/// +[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] +public object? AccessCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptCreateNoiseThreshold_model")] +public class ActionAttemptCreateNoiseThreshold : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptCreateNoiseThreshold() { } + +public ActionAttemptCreateNoiseThreshold(string actionAttemptId = default, string actionType = default, ActionAttemptCreateNoiseThresholdError error = default, ActionAttemptCreateNoiseThresholdResult result = default, ActionAttemptCreateNoiseThreshold.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "CREATE_NOISE_THRESHOLD"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptCreateNoiseThresholdError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptCreateNoiseThresholdResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptCreateNoiseThreshold.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptCreateNoiseThresholdError_model")] +public class ActionAttemptCreateNoiseThresholdError +{ +[JsonConstructorAttribute] +protected ActionAttemptCreateNoiseThresholdError() { } + +public ActionAttemptCreateNoiseThresholdError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptCreateNoiseThresholdResult_model")] +public class ActionAttemptCreateNoiseThresholdResult +{ +[JsonConstructorAttribute] +protected ActionAttemptCreateNoiseThresholdResult() { } + +public ActionAttemptCreateNoiseThresholdResult(object noiseThreshold = default) +{ +NoiseThreshold = noiseThreshold; +} + +/// +/// Created noise threshold. +/// +[DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] +public object NoiseThreshold { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptDeleteNoiseThreshold_model")] +public class ActionAttemptDeleteNoiseThreshold : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptDeleteNoiseThreshold() { } + +public ActionAttemptDeleteNoiseThreshold(string actionAttemptId = default, string actionType = default, ActionAttemptDeleteNoiseThresholdError error = default, ActionAttemptDeleteNoiseThresholdResult result = default, ActionAttemptDeleteNoiseThreshold.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "DELETE_NOISE_THRESHOLD"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptDeleteNoiseThresholdError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptDeleteNoiseThresholdResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptDeleteNoiseThreshold.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptDeleteNoiseThresholdError_model")] +public class ActionAttemptDeleteNoiseThresholdError +{ +[JsonConstructorAttribute] +protected ActionAttemptDeleteNoiseThresholdError() { } + +public ActionAttemptDeleteNoiseThresholdError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptDeleteNoiseThresholdResult_model")] +public class ActionAttemptDeleteNoiseThresholdResult +{ +[JsonConstructorAttribute] +public ActionAttemptDeleteNoiseThresholdResult() { } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUpdateNoiseThreshold_model")] +public class ActionAttemptUpdateNoiseThreshold : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptUpdateNoiseThreshold() { } + +public ActionAttemptUpdateNoiseThreshold(string actionAttemptId = default, string actionType = default, ActionAttemptUpdateNoiseThresholdError error = default, ActionAttemptUpdateNoiseThresholdResult result = default, ActionAttemptUpdateNoiseThreshold.StatusEnum status = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +Error = error; +Result = result; +Status = status; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "success")] +Success = 1, + +[EnumMember(Value = "pending")] +Pending = 2, + +[EnumMember(Value = "error")] +Error = 3, +} + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "UPDATE_NOISE_THRESHOLD"; + +/// +/// Error associated with the action. +/// +[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUpdateNoiseThresholdError Error { get; set; } + +/// +/// Result of the action. +/// +[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUpdateNoiseThresholdResult Result { get; set; } + +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ActionAttemptUpdateNoiseThreshold.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUpdateNoiseThresholdError_model")] +public class ActionAttemptUpdateNoiseThresholdError +{ +[JsonConstructorAttribute] +protected ActionAttemptUpdateNoiseThresholdError() { } + +public ActionAttemptUpdateNoiseThresholdError(string message = default, string type = default) +{ +Message = message; +Type = type; +} + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Type of the error. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public string Type { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUpdateNoiseThresholdResult_model")] +public class ActionAttemptUpdateNoiseThresholdResult +{ +[JsonConstructorAttribute] +protected ActionAttemptUpdateNoiseThresholdResult() { } + +public ActionAttemptUpdateNoiseThresholdResult(object noiseThreshold = default) +{ +NoiseThreshold = noiseThreshold; +} + +/// +/// Updated noise threshold. +/// +[DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] +public object NoiseThreshold { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_actionAttemptUnrecognized_model")] +public class ActionAttemptUnrecognized : ActionAttempt +{ +[JsonConstructorAttribute] +protected ActionAttemptUnrecognized() { } + +public ActionAttemptUnrecognized(string actionType = default, string actionAttemptId = default) +{ +ActionType = actionType; +ActionAttemptId = actionAttemptId; +} + +[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] +public override string ActionType { get; } = "unrecognized"; + +/// +/// ID of the action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public override string ActionAttemptId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/Batch.cs b/src/Seam/Model/Batch.cs index c50ae8cf..e7340782 100644 --- a/src/Seam/Model/Batch.cs +++ b/src/Seam/Model/Batch.cs @@ -8,310 +8,282 @@ namespace Seam.Model { - /// - /// A batch of workspace resources. - /// - [DataContract(Name = "seamModel_batch_model")] - public class Batch - { - [JsonConstructorAttribute] - protected Batch() { } +/// +/// A batch of workspace resources. +/// +[DataContract(Name = "seamModel_batch_model")] +public class Batch +{ +[JsonConstructorAttribute] +protected Batch() { } - public Batch( - object? accessCodes = default, - object? accessGrants = default, - object? accessMethods = default, - object? acsAccessGroups = default, - object? acsCredentials = default, - object? acsEncoders = default, - object? acsEntrances = default, - object? acsSystems = default, - object? acsUsers = default, - object? actionAttempts = default, - object? clientSessions = default, - object? connectWebviews = default, - object? connectedAccounts = default, - object? devices = default, - object? events = default, - object? instantKeys = default, - object? noiseThresholds = default, - object? spaces = default, - object? thermostatDailyPrograms = default, - object? thermostatSchedules = default, - object? unmanagedAccessCodes = default, - object? unmanagedDevices = default, - object? userIdentities = default, - object? workspaces = default - ) - { - AccessCodes = accessCodes; - AccessGrants = accessGrants; - AccessMethods = accessMethods; - AcsAccessGroups = acsAccessGroups; - AcsCredentials = acsCredentials; - AcsEncoders = acsEncoders; - AcsEntrances = acsEntrances; - AcsSystems = acsSystems; - AcsUsers = acsUsers; - ActionAttempts = actionAttempts; - ClientSessions = clientSessions; - ConnectWebviews = connectWebviews; - ConnectedAccounts = connectedAccounts; - Devices = devices; - Events = events; - InstantKeys = instantKeys; - NoiseThresholds = noiseThresholds; - Spaces = spaces; - ThermostatDailyPrograms = thermostatDailyPrograms; - ThermostatSchedules = thermostatSchedules; - UnmanagedAccessCodes = unmanagedAccessCodes; - UnmanagedDevices = unmanagedDevices; - UserIdentities = userIdentities; - Workspaces = workspaces; - } +public Batch(object? accessCodes = default, object? accessGrants = default, object? accessMethods = default, object? acsAccessGroups = default, object? acsCredentials = default, object? acsEncoders = default, object? acsEntrances = default, object? acsSystems = default, object? acsUsers = default, object? actionAttempts = default, object? clientSessions = default, object? connectWebviews = default, object? connectedAccounts = default, object? devices = default, object? events = default, object? instantKeys = default, object? noiseThresholds = default, object? spaces = default, object? thermostatDailyPrograms = default, object? thermostatSchedules = default, object? unmanagedAccessCodes = default, object? unmanagedDevices = default, object? userIdentities = default, object? workspaces = default) +{ +AccessCodes = accessCodes; +AccessGrants = accessGrants; +AccessMethods = accessMethods; +AcsAccessGroups = acsAccessGroups; +AcsCredentials = acsCredentials; +AcsEncoders = acsEncoders; +AcsEntrances = acsEntrances; +AcsSystems = acsSystems; +AcsUsers = acsUsers; +ActionAttempts = actionAttempts; +ClientSessions = clientSessions; +ConnectWebviews = connectWebviews; +ConnectedAccounts = connectedAccounts; +Devices = devices; +Events = events; +InstantKeys = instantKeys; +NoiseThresholds = noiseThresholds; +Spaces = spaces; +ThermostatDailyPrograms = thermostatDailyPrograms; +ThermostatSchedules = thermostatSchedules; +UnmanagedAccessCodes = unmanagedAccessCodes; +UnmanagedDevices = unmanagedDevices; +UserIdentities = userIdentities; +Workspaces = workspaces; +} - /// - /// Represents a smart lock [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - /// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. - /// - /// Seam supports programming two types of access codes: [ongoing](https://docs.seam.co/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://docs.seam.co/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. - /// - /// In addition, for certain devices, Seam also supports [offline access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. - /// - /// For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. - /// - [DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] - public object? AccessCodes { get; set; } +/// +/// Represents a smart lock [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +/// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. +/// +/// Seam supports programming two types of access codes: [ongoing](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. +/// +/// In addition, for certain devices, Seam also supports [offline access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. +/// +/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. +/// +[DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] +public object? AccessCodes { get; set; } - /// - /// Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. - /// - [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] - public object? AccessGrants { get; set; } +/// +/// Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. +/// +[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] +public object? AccessGrants { get; set; } - /// - /// Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. - /// - [DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] - public object? AccessMethods { get; set; } +/// +/// Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. +/// +[DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] +public object? AccessMethods { get; set; } - /// - /// Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. - /// - /// Some access control systems use [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. - /// - /// To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). - /// - [DataMember(Name = "acs_access_groups", IsRequired = false, EmitDefaultValue = false)] - public object? AcsAccessGroups { get; set; } +/// +/// Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. +/// +/// Some access control systems use [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. +/// +/// To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). +/// +[DataMember(Name = "acs_access_groups", IsRequired = false, EmitDefaultValue = false)] +public object? AcsAccessGroups { get; set; } - /// - /// Means by which an [access control system user](https://docs.seam.co/low-level-apis/access-systems/user-management) gains access at an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. - /// - /// For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. - /// - /// For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. - /// - [DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] - public object? AcsCredentials { get; set; } +/// +/// Means by which an [access control system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) gains access at an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. +/// +/// For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. +/// +/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. +/// +[DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] +public object? AcsCredentials { get; set; } - /// - /// Represents a hardware device that encodes [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: - /// - /// 1. Credential creation - /// Configure the access parameters for the credential. - /// 2. Card encoding - /// Write the credential data onto the card using a compatible card encoder. - /// - /// Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. - /// - /// See [Working with Card Encoders and Scanners](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). - /// - /// To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). - /// - [DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] - public object? AcsEncoders { get; set; } +/// +/// Represents a hardware device that encodes [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: +/// +/// 1. Credential creation +/// Configure the access parameters for the credential. +/// 2. Card encoding +/// Write the credential data onto the card using a compatible card encoder. +/// +/// Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. +/// +/// See [Working with Card Encoders and Scanners](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). +/// +/// To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). +/// +[DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] +public object? AcsEncoders { get; set; } - /// - /// Represents an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. - /// - [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] - public object? AcsEntrances { get; set; } +/// +/// Represents an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. +/// +[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] +public object? AcsEntrances { get; set; } - /// - /// Represents an [access control system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// Within an `acs_system`, create [`acs_user`s](https://docs.seam.co/api/acs/users/object) and [`acs_credential`s](https://docs.seam.co/api/acs/credentials/object) to grant access to the `acs_user`s. - /// - /// For details about the resources associated with an access control system, see the [access control systems namespace](https://docs.seam.co/api/acs). - /// - [DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] - public object? AcsSystems { get; set; } +/// +/// Represents an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// Within an `acs_system`, create [`acs_user`s](https://www.seam.co/docs/api/acs/users/object) and [`acs_credential`s](https://www.seam.co/docs/api/acs/credentials/object) to grant access to the `acs_user`s. +/// +/// For details about the resources associated with an access control system, see the [access control systems namespace](https://www.seam.co/docs/api/acs/object). +/// +[DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] +public object? AcsSystems { get; set; } - /// - /// Represents a [user](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access system](https://docs.seam.co/low-level-apis/access-systems). - /// - /// An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. - /// - /// For details about how to configure users in your access system, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). - /// - [DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] - public object? AcsUsers { get; set; } +/// +/// Represents a [user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access system](https://www.seam.co/docs/low-level-apis/access-systems). +/// +/// An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. +/// +/// For details about how to configure users in your access system, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). +/// +[DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] +public object? AcsUsers { get; set; } - /// - /// Represents an action attempt that enables you to keep track of the progress of your action that affects a physical device or system.actions against a device. Action attempts are useful because the physical world is intrinsically asynchronous. - /// - /// When you request for a device to perform an action, the Seam API immediately returns an action attempt object. In the background, the Seam API performs the action. - /// - /// See also [Action Attempts](https://docs.seam.co/core-concepts/action-attempts). - /// - [DataMember(Name = "action_attempts", IsRequired = false, EmitDefaultValue = false)] - public object? ActionAttempts { get; set; } +/// +/// Represents an action attempt that enables you to keep track of the progress of your action that affects a physical device or system.actions against a device. Action attempts are useful because the physical world is intrinsically asynchronous. +/// +/// When you request for a device to perform an action, the Seam API immediately returns an action attempt object. In the background, the Seam API performs the action. +/// +/// See also [Action Attempts](https://www.seam.co/docs/core-concepts/action-attempts). +/// +[DataMember(Name = "action_attempts", IsRequired = false, EmitDefaultValue = false)] +public object? ActionAttempts { get; set; } - /// - /// Represents a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. - /// - /// You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. - /// - /// When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. - /// - /// A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. - /// - /// See also [Get Started with React](https://docs.seam.co/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). - /// - [DataMember(Name = "client_sessions", IsRequired = false, EmitDefaultValue = false)] - public object? ClientSessions { get; set; } +/// +/// Represents a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. +/// +/// You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. +/// +/// When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. +/// +/// A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. +/// +/// See also [Get Started with React](https://www.seam.co/docs/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). +/// +[DataMember(Name = "client_sessions", IsRequired = false, EmitDefaultValue = false)] +public object? ClientSessions { get; set; } - /// - /// Represents a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. - /// - /// Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. - /// - /// To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. - /// - /// When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. - /// - /// To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. - /// - [DataMember(Name = "connect_webviews", IsRequired = false, EmitDefaultValue = false)] - public object? ConnectWebviews { get; set; } +/// +/// Represents a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. +/// +/// Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. +/// +/// To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. +/// +/// When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. +/// +/// To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. +/// +[DataMember(Name = "connect_webviews", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectWebviews { get; set; } - /// - /// Represents a [connected account](https://docs.seam.co/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. - /// - [DataMember(Name = "connected_accounts", IsRequired = false, EmitDefaultValue = false)] - public object? ConnectedAccounts { get; set; } +/// +/// Represents a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. +/// +[DataMember(Name = "connected_accounts", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccounts { get; set; } - /// - /// Represents a [device](https://docs.seam.co/core-concepts/devices) that has been connected to Seam. - /// - [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] - public object? Devices { get; set; } +/// +/// Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam. +/// +[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] +public object? Devices { get; set; } - /// - /// Represents an event. Events let you know when something interesting happens in your workspace. For example, when a lock is unlocked, Seam creates a `lock.unlocked` event. When a device's battery level is low, Seam creates a `device.battery_low` event. - /// - /// As with other API resources, you can retrieve an individual event or a list of events. Seam also provides a separate webhook system for sending the event objects directly to an endpoint on your sever. Manage webhooks through [Seam Console](https://console.seam.co). You can also use the webhooks sandbox in Seam Console to see the different payloads for each event and test them against your own endpoints. - /// - [DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] - public object? Events { get; set; } +/// +/// Represents an event. Events let you know when something interesting happens in your workspace. For example, when a lock is unlocked, Seam creates a `lock.unlocked` event. When a device's battery level is low, Seam creates a `device.battery_low` event. +/// +/// As with other API resources, you can retrieve an individual event or a list of events. Seam also provides a separate webhook system for sending the event objects directly to an endpoint on your sever. Manage webhooks through [Seam Console](https://console.seam.co). You can also use the webhooks sandbox in Seam Console to see the different payloads for each event and test them against your own endpoints. +/// +[DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] +public object? Events { get; set; } - /// - /// Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. - /// - /// There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. - /// - [DataMember(Name = "instant_keys", IsRequired = false, EmitDefaultValue = false)] - public object? InstantKeys { get; set; } +/// +/// Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. +/// +/// There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. +/// +[DataMember(Name = "instant_keys", IsRequired = false, EmitDefaultValue = false)] +public object? InstantKeys { get; set; } - /// - /// Represents a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. - /// - [DataMember(Name = "noise_thresholds", IsRequired = false, EmitDefaultValue = false)] - public object? NoiseThresholds { get; set; } +/// +/// Represents a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. +/// +[DataMember(Name = "noise_thresholds", IsRequired = false, EmitDefaultValue = false)] +public object? NoiseThresholds { get; set; } - /// - /// Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. - /// - [DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] - public object? Spaces { get; set; } +/// +/// Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. +/// +[DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] +public object? Spaces { get; set; } - /// - /// Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. - /// - [DataMember( - Name = "thermostat_daily_programs", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ThermostatDailyPrograms { get; set; } +/// +/// Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. +/// +[DataMember(Name = "thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] +public object? ThermostatDailyPrograms { get; set; } - /// - /// Represents a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://docs.seam.co/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. - /// - [DataMember(Name = "thermostat_schedules", IsRequired = false, EmitDefaultValue = false)] - public object? ThermostatSchedules { get; set; } +/// +/// Represents a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. +/// +[DataMember(Name = "thermostat_schedules", IsRequired = false, EmitDefaultValue = false)] +public object? ThermostatSchedules { get; set; } - /// - /// Represents an [unmanaged smart lock access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - /// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. - /// - /// When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. - /// - /// Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. - /// - /// Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: - /// - /// - [Kwikset](https://docs.seam.co/device-and-system-integration-guides/kwikset-locks) - /// - [DataMember(Name = "unmanaged_access_codes", IsRequired = false, EmitDefaultValue = false)] - public object? UnmanagedAccessCodes { get; set; } +/// +/// Represents an [unmanaged smart lock access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +/// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. +/// +/// When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. +/// +/// Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. +/// +/// Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: +/// +/// - [Kwikset](https://www.seam.co/docs/device-and-system-integration-guides/kwikset-locks) +/// +[DataMember(Name = "unmanaged_access_codes", IsRequired = false, EmitDefaultValue = false)] +public object? UnmanagedAccessCodes { get; set; } - /// - /// Represents an [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - [DataMember(Name = "unmanaged_devices", IsRequired = false, EmitDefaultValue = false)] - public object? UnmanagedDevices { get; set; } +/// +/// Represents an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +[DataMember(Name = "unmanaged_devices", IsRequired = false, EmitDefaultValue = false)] +public object? UnmanagedDevices { get; set; } - /// - /// Represents a [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. - /// - [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] - public object? UserIdentities { get; set; } +/// +/// Represents a [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. +/// +[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] +public object? UserIdentities { get; set; } - /// - /// Represents a Seam [workspace](https://docs.seam.co/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://docs.seam.co/core-concepts/workspaces#production-workspaces). - /// - [DataMember(Name = "workspaces", IsRequired = false, EmitDefaultValue = false)] - public object? Workspaces { get; set; } +/// +/// Represents a Seam [workspace](https://www.seam.co/docs/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://www.seam.co/docs/core-concepts/workspaces#production-workspaces). +/// +[DataMember(Name = "workspaces", IsRequired = false, EmitDefaultValue = false)] +public object? Workspaces { get; set; } - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} - return stringWriter.ToString(); - } - } } diff --git a/src/Seam/Model/CameraLiveViewAnswer.cs b/src/Seam/Model/CameraLiveViewAnswer.cs new file mode 100644 index 00000000..13157aa5 --- /dev/null +++ b/src/Seam/Model/CameraLiveViewAnswer.cs @@ -0,0 +1,51 @@ +using System.Runtime.Serialization; +using System.Text; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Seam.Model; + +namespace Seam.Model +{ +/// +/// Represents the WebRTC SDP answer that starts streaming video from a camera for a live view session. +/// +[DataContract(Name = "seamModel_cameraLiveViewAnswer_model")] +public class CameraLiveViewAnswer +{ +[JsonConstructorAttribute] +protected CameraLiveViewAnswer() { } + +public CameraLiveViewAnswer(string sdpAnswer = default) +{ +SdpAnswer = sdpAnswer; +} + +/// +/// WebRTC SDP answer for the offer, limited to 64 KiB of UTF-8 data. +/// +[DataMember(Name = "sdp_answer", IsRequired = false, EmitDefaultValue = false)] +public string SdpAnswer { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +} diff --git a/src/Seam/Model/CameraLiveViewSession.cs b/src/Seam/Model/CameraLiveViewSession.cs new file mode 100644 index 00000000..ddd58ee9 --- /dev/null +++ b/src/Seam/Model/CameraLiveViewSession.cs @@ -0,0 +1,72 @@ +using System.Runtime.Serialization; +using System.Text; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Seam.Model; + +namespace Seam.Model +{ +/// +/// Represents a short-lived live view session for a single camera. Use the session ID and token to start a WebRTC stream and to stop the session. +/// +[DataContract(Name = "seamModel_cameraLiveViewSession_model")] +public class CameraLiveViewSession +{ +[JsonConstructorAttribute] +protected CameraLiveViewSession() { } + +public CameraLiveViewSession(string cameraLiveViewSessionId = default, string deviceId = default, string expiresAt = default, string token = default) +{ +CameraLiveViewSessionId = cameraLiveViewSessionId; +DeviceId = deviceId; +ExpiresAt = expiresAt; +Token = token; +} + +/// +/// ID of the camera live view session. +/// +[DataMember(Name = "camera_live_view_session_id", IsRequired = false, EmitDefaultValue = false)] +public string CameraLiveViewSessionId { get; set; } + +/// +/// ID of the camera. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Date and time at which the live view session expires. +/// +[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] +public string ExpiresAt { get; set; } + +/// +/// Token that authorizes the offer and stop requests for this session. +/// +[DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] +public string Token { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +} diff --git a/src/Seam/Model/ClientSession.cs b/src/Seam/Model/ClientSession.cs index 578ad992..09f18c68 100644 --- a/src/Seam/Model/ClientSession.cs +++ b/src/Seam/Model/ClientSession.cs @@ -8,142 +8,130 @@ namespace Seam.Model { - /// - /// Represents a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. - /// - /// You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. - /// - /// When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. - /// - /// A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. - /// - /// See also [Get Started with React](https://docs.seam.co/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). - /// - [DataContract(Name = "seamModel_clientSession_model")] - public class ClientSession - { - [JsonConstructorAttribute] - protected ClientSession() { } - - public ClientSession( - string clientSessionId = default, - List connectWebviewIds = default, - List connectedAccountIds = default, - string createdAt = default, - string? customerKey = default, - float deviceCount = default, - string expiresAt = default, - string token = default, - string? userIdentifierKey = default, - string? userIdentityId = default, - List userIdentityIds = default, - string workspaceId = default - ) - { - ClientSessionId = clientSessionId; - ConnectWebviewIds = connectWebviewIds; - ConnectedAccountIds = connectedAccountIds; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCount = deviceCount; - ExpiresAt = expiresAt; - Token = token; - UserIdentifierKey = userIdentifierKey; - UserIdentityId = userIdentityId; - UserIdentityIds = userIdentityIds; - WorkspaceId = workspaceId; - } - - /// - /// ID of the client session. - /// - [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] - public string ClientSessionId { get; set; } - - /// - /// IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - [DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] - public List ConnectWebviewIds { get; set; } - - /// - /// IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - [DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] - public List ConnectedAccountIds { get; set; } - - /// - /// Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Customer key associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Number of devices associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - [DataMember(Name = "device_count", IsRequired = false, EmitDefaultValue = false)] - public float DeviceCount { get; set; } - - /// - /// Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) expires. - /// - [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] - public string ExpiresAt { get; set; } - - /// - /// Client session token associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - [DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] - public string Token { get; set; } - - /// - /// Your user ID for the user associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). - /// - [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentifierKey { get; set; } - - /// - /// ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. - /// - [Obsolete("Use `user_identity_id` instead.")] - [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] - public List UserIdentityIds { get; set; } - - /// - /// ID of the workspace associated with the client session. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. +/// +/// You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. +/// +/// When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. +/// +/// A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. +/// +/// See also [Get Started with React](https://www.seam.co/docs/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). +/// +[DataContract(Name = "seamModel_clientSession_model")] +public class ClientSession +{ +[JsonConstructorAttribute] +protected ClientSession() { } + +public ClientSession(string clientSessionId = default, List connectWebviewIds = default, List connectedAccountIds = default, string createdAt = default, string? customerKey = default, float deviceCount = default, string expiresAt = default, string token = default, string? userIdentifierKey = default, string? userIdentityId = default, List userIdentityIds = default, string workspaceId = default) +{ +ClientSessionId = clientSessionId; +ConnectWebviewIds = connectWebviewIds; +ConnectedAccountIds = connectedAccountIds; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCount = deviceCount; +ExpiresAt = expiresAt; +Token = token; +UserIdentifierKey = userIdentifierKey; +UserIdentityId = userIdentityId; +UserIdentityIds = userIdentityIds; +WorkspaceId = workspaceId; +} + +/// +/// ID of the client session. +/// +[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] +public string ClientSessionId { get; set; } + +/// +/// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +[DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] +public List ConnectWebviewIds { get; set; } + +/// +/// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountIds { get; set; } + +/// +/// Date and time at which the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Customer key associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Number of devices associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +[DataMember(Name = "device_count", IsRequired = false, EmitDefaultValue = false)] +public float DeviceCount { get; set; } + +/// +/// Date and time at which the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) expires. +/// +[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] +public string ExpiresAt { get; set; } + +/// +/// Client session token associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +[DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] +public string Token { get; set; } + +/// +/// Your user ID for the user associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). +/// +[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentifierKey { get; set; } + +/// +/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. +/// +[Obsolete("Use `user_identity_id` instead.")] +[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] +public List UserIdentityIds { get; set; } + +/// +/// ID of the workspace associated with the client session. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/ConnectWebview.cs b/src/Seam/Model/ConnectWebview.cs index 06bfd28f..09723fe2 100644 --- a/src/Seam/Model/ConnectWebview.cs +++ b/src/Seam/Model/ConnectWebview.cs @@ -8,274 +8,243 @@ namespace Seam.Model { - /// - /// Represents a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). - /// - /// Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. - /// - /// Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. - /// - /// To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. - /// - /// When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. - /// - /// To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. - /// - [DataContract(Name = "seamModel_connectWebview_model")] - public class ConnectWebview - { - [JsonConstructorAttribute] - protected ConnectWebview() { } - - public ConnectWebview( - List acceptedCapabilities = default, - List acceptedProviders = default, - bool anyProviderAllowed = default, - string? authorizedAt = default, - bool automaticallyManageNewDevices = default, - string connectWebviewId = default, - string? connectedAccountId = default, - string createdAt = default, - object customMetadata = default, - string? customRedirectFailureUrl = default, - string? customRedirectUrl = default, - string? customerKey = default, - ConnectWebview.DeviceSelectionModeEnum deviceSelectionMode = default, - bool loginSuccessful = default, - string? selectedProvider = default, - ConnectWebview.StatusEnum status = default, - string url = default, - bool waitForDeviceCreation = default, - string workspaceId = default - ) - { - AcceptedCapabilities = acceptedCapabilities; - AcceptedProviders = acceptedProviders; - AnyProviderAllowed = anyProviderAllowed; - AuthorizedAt = authorizedAt; - AutomaticallyManageNewDevices = automaticallyManageNewDevices; - ConnectWebviewId = connectWebviewId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomMetadata = customMetadata; - CustomRedirectFailureUrl = customRedirectFailureUrl; - CustomRedirectUrl = customRedirectUrl; - CustomerKey = customerKey; - DeviceSelectionMode = deviceSelectionMode; - LoginSuccessful = loginSuccessful; - SelectedProvider = selectedProvider; - Status = status; - Url = url; - WaitForDeviceCreation = waitForDeviceCreation; - WorkspaceId = workspaceId; - } - - /// - /// High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AcceptedCapabilitiesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "lock")] - Lock = 1, - - [EnumMember(Value = "thermostat")] - Thermostat = 2, - - [EnumMember(Value = "noise_sensor")] - NoiseSensor = 3, - - [EnumMember(Value = "access_control")] - AccessControl = 4, - - [EnumMember(Value = "camera")] - Camera = 5, - } - - /// - /// Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceSelectionModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "none")] - None = 1, - - [EnumMember(Value = "single")] - Single = 2, - - [EnumMember(Value = "multiple")] - Multiple = 3, - } - - /// - /// Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "pending")] - Pending = 1, - - [EnumMember(Value = "failed")] - Failed = 2, - - [EnumMember(Value = "authorized")] - Authorized = 3, - } - - /// - /// High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. - /// - [DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] - public List AcceptedCapabilities { get; set; } - - /// - /// List of accepted [provider keys](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). - /// - [DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] - public List AcceptedProviders { get; set; } - - /// - /// Indicates whether any provider is allowed. - /// - [DataMember(Name = "any_provider_allowed", IsRequired = false, EmitDefaultValue = false)] - public bool AnyProviderAllowed { get; set; } - - /// - /// Date and time at which the user authorized (through the Connect Webview) the management of their devices. - /// - [DataMember(Name = "authorized_at", IsRequired = false, EmitDefaultValue = false)] - public string? AuthorizedAt { get; set; } - - /// - /// Indicates whether Seam should [import all new devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for use and management by the Seam API. - /// - [DataMember( - Name = "automatically_manage_new_devices", - IsRequired = false, - EmitDefaultValue = false - )] - public bool AutomaticallyManageNewDevices { get; set; } - - /// - /// ID of the Connect Webview. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectWebviewId { get; set; } - - /// - /// ID of the connected account associated with the Connect Webview. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the Connect Webview was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object CustomMetadata { get; set; } - - /// - /// URL to which the Connect Webview should redirect when an unexpected error occurs. - /// - [DataMember( - Name = "custom_redirect_failure_url", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomRedirectFailureUrl { get; set; } - - /// - /// URL to which the Connect Webview should redirect when the user successfully pairs a device or system. If you do not set the `custom_redirect_failure_url`, the Connect Webview redirects to the `custom_redirect_url` when an unexpected error occurs. - /// - [DataMember(Name = "custom_redirect_url", IsRequired = false, EmitDefaultValue = false)] - public string? CustomRedirectUrl { get; set; } - - /// - /// The customer key associated with this webview, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. - /// - [DataMember(Name = "device_selection_mode", IsRequired = false, EmitDefaultValue = false)] - public ConnectWebview.DeviceSelectionModeEnum DeviceSelectionMode { get; set; } - - /// - /// Indicates whether the user logged in successfully using the Connect Webview. - /// - [DataMember(Name = "login_successful", IsRequired = false, EmitDefaultValue = false)] - public bool LoginSuccessful { get; set; } - - /// - /// Selected provider of the Connect Webview, one of the [provider keys](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). - /// - [DataMember(Name = "selected_provider", IsRequired = false, EmitDefaultValue = false)] - public string? SelectedProvider { get; set; } - - /// - /// Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public ConnectWebview.StatusEnum Status { get; set; } - - /// - /// URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. - /// - [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Indicates whether Seam should [finish syncing all devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#wait_for_device_creation) in a newly-connected account before completing the associated Connect Webview. - /// - [DataMember( - Name = "wait_for_device_creation", - IsRequired = false, - EmitDefaultValue = false - )] - public bool WaitForDeviceCreation { get; set; } - - /// - /// ID of the workspace that contains the Connect Webview. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). +/// +/// Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. +/// +/// Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. +/// +/// To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. +/// +/// When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. +/// +/// To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. +/// +[DataContract(Name = "seamModel_connectWebview_model")] +public class ConnectWebview +{ +[JsonConstructorAttribute] +protected ConnectWebview() { } + +public ConnectWebview(List acceptedCapabilities = default, List acceptedProviders = default, bool anyProviderAllowed = default, string? authorizedAt = default, bool automaticallyManageNewDevices = default, string connectWebviewId = default, string? connectedAccountId = default, string createdAt = default, object customMetadata = default, string? customRedirectFailureUrl = default, string? customRedirectUrl = default, string? customerKey = default, ConnectWebview.DeviceSelectionModeEnum deviceSelectionMode = default, bool loginSuccessful = default, string? selectedProvider = default, ConnectWebview.StatusEnum status = default, string url = default, bool waitForDeviceCreation = default, string workspaceId = default) +{ +AcceptedCapabilities = acceptedCapabilities; +AcceptedProviders = acceptedProviders; +AnyProviderAllowed = anyProviderAllowed; +AuthorizedAt = authorizedAt; +AutomaticallyManageNewDevices = automaticallyManageNewDevices; +ConnectWebviewId = connectWebviewId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomMetadata = customMetadata; +CustomRedirectFailureUrl = customRedirectFailureUrl; +CustomRedirectUrl = customRedirectUrl; +CustomerKey = customerKey; +DeviceSelectionMode = deviceSelectionMode; +LoginSuccessful = loginSuccessful; +SelectedProvider = selectedProvider; +Status = status; +Url = url; +WaitForDeviceCreation = waitForDeviceCreation; +WorkspaceId = workspaceId; +} + +/// +/// High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AcceptedCapabilitiesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "lock")] +Lock = 1, + +[EnumMember(Value = "thermostat")] +Thermostat = 2, + +[EnumMember(Value = "noise_sensor")] +NoiseSensor = 3, + +[EnumMember(Value = "access_control")] +AccessControl = 4, + +[EnumMember(Value = "camera")] +Camera = 5, +} + +/// +/// Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceSelectionModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "none")] +None = 1, + +[EnumMember(Value = "single")] +Single = 2, + +[EnumMember(Value = "multiple")] +Multiple = 3, +} + +/// +/// Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pending")] +Pending = 1, + +[EnumMember(Value = "failed")] +Failed = 2, + +[EnumMember(Value = "authorized")] +Authorized = 3, +} + +/// +/// High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. +/// +[DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] +public List AcceptedCapabilities { get; set; } + +/// +/// List of accepted [provider keys](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). +/// +[DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] +public List AcceptedProviders { get; set; } + +/// +/// Indicates whether any provider is allowed. +/// +[DataMember(Name = "any_provider_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool AnyProviderAllowed { get; set; } + +/// +/// Date and time at which the user authorized (through the Connect Webview) the management of their devices. +/// +[DataMember(Name = "authorized_at", IsRequired = false, EmitDefaultValue = false)] +public string? AuthorizedAt { get; set; } + +/// +/// Indicates whether Seam should [import all new devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for use and management by the Seam API. +/// +[DataMember(Name = "automatically_manage_new_devices", IsRequired = false, EmitDefaultValue = false)] +public bool AutomaticallyManageNewDevices { get; set; } + +/// +/// ID of the Connect Webview. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectWebviewId { get; set; } + +/// +/// ID of the connected account associated with the Connect Webview. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the Connect Webview was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object CustomMetadata { get; set; } + +/// +/// URL to which the Connect Webview should redirect when an unexpected error occurs. +/// +[DataMember(Name = "custom_redirect_failure_url", IsRequired = false, EmitDefaultValue = false)] +public string? CustomRedirectFailureUrl { get; set; } + +/// +/// URL to which the Connect Webview should redirect when the user successfully pairs a device or system. If you do not set the `custom_redirect_failure_url`, the Connect Webview redirects to the `custom_redirect_url` when an unexpected error occurs. +/// +[DataMember(Name = "custom_redirect_url", IsRequired = false, EmitDefaultValue = false)] +public string? CustomRedirectUrl { get; set; } + +/// +/// The customer key associated with this webview, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. +/// +[DataMember(Name = "device_selection_mode", IsRequired = false, EmitDefaultValue = false)] +public ConnectWebview.DeviceSelectionModeEnum DeviceSelectionMode { get; set; } + +/// +/// Indicates whether the user logged in successfully using the Connect Webview. +/// +[DataMember(Name = "login_successful", IsRequired = false, EmitDefaultValue = false)] +public bool LoginSuccessful { get; set; } + +/// +/// Selected provider of the Connect Webview, one of the [provider keys](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). +/// +[DataMember(Name = "selected_provider", IsRequired = false, EmitDefaultValue = false)] +public string? SelectedProvider { get; set; } + +/// +/// Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public ConnectWebview.StatusEnum Status { get; set; } + +/// +/// URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. +/// +[DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] +public string Url { get; set; } + +/// +/// Indicates whether Seam should [finish syncing all devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#wait_for_device_creation) in a newly-connected account before completing the associated Connect Webview. +/// +[DataMember(Name = "wait_for_device_creation", IsRequired = false, EmitDefaultValue = false)] +public bool WaitForDeviceCreation { get; set; } + +/// +/// ID of the workspace that contains the Connect Webview. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/ConnectedAccount.cs b/src/Seam/Model/ConnectedAccount.cs index e73c53dd..415b016c 100644 --- a/src/Seam/Model/ConnectedAccount.cs +++ b/src/Seam/Model/ConnectedAccount.cs @@ -8,1449 +8,1242 @@ namespace Seam.Model { - /// - /// Represents a [connected account](https://docs.seam.co/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. - /// - [DataContract(Name = "seamModel_connectedAccount_model")] - public class ConnectedAccount - { - [JsonConstructorAttribute] - protected ConnectedAccount() { } - - public ConnectedAccount( - List acceptedCapabilities = default, - string? accountType = default, - string accountTypeDisplayName = default, - bool automaticallyManageNewDevices = default, - string connectedAccountId = default, - string? createdAt = default, - object customMetadata = default, - string? customerKey = default, - string? defaultCheckinTime = default, - string? defaultCheckoutTime = default, - string displayName = default, - List errors = default, - string? icalFeedOrigin = default, - string? icalUrl = default, - string? imageUrl = default, - string? timeZone = default, - ConnectedAccountUserIdentifier? userIdentifier = default, - List warnings = default - ) - { - AcceptedCapabilities = acceptedCapabilities; - AccountType = accountType; - AccountTypeDisplayName = accountTypeDisplayName; - AutomaticallyManageNewDevices = automaticallyManageNewDevices; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomMetadata = customMetadata; - CustomerKey = customerKey; - DefaultCheckinTime = defaultCheckinTime; - DefaultCheckoutTime = defaultCheckoutTime; - DisplayName = displayName; - Errors = errors; - IcalFeedOrigin = icalFeedOrigin; - IcalUrl = icalUrl; - ImageUrl = imageUrl; - TimeZone = timeZone; - UserIdentifier = userIdentifier; - Warnings = warnings; - } - - /// - /// List of capabilities that were accepted during the account connection process. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AcceptedCapabilitiesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "lock")] - Lock = 1, - - [EnumMember(Value = "thermostat")] - Thermostat = 2, - - [EnumMember(Value = "noise_sensor")] - NoiseSensor = 3, - - [EnumMember(Value = "access_control")] - AccessControl = 4, - - [EnumMember(Value = "camera")] - Camera = 5, - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(ConnectedAccountErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountErrorsDormakabaSitesDisconnected), - "dormakaba_sites_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded), - "salto_ks_subscription_limit_exceeded" - )] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountErrorsBridgeDisconnected), - "bridge_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountErrorsAccountDisconnected), - "account_disconnected" - )] - public abstract class ConnectedAccountErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract bool? IsBridgeError { get; set; } - - public abstract bool? IsConnectedAccountError { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_connectedAccountErrorsAccountDisconnected_model")] - public class ConnectedAccountErrorsAccountDisconnected : ConnectedAccountErrors - { - [JsonConstructorAttribute] - protected ConnectedAccountErrorsAccountDisconnected() { } - - public ConnectedAccountErrorsAccountDisconnected( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "account_disconnected"; - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public override bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public override bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountErrorsBridgeDisconnected_model")] - public class ConnectedAccountErrorsBridgeDisconnected : ConnectedAccountErrors - { - [JsonConstructorAttribute] - protected ConnectedAccountErrorsBridgeDisconnected() { } - - public ConnectedAccountErrorsBridgeDisconnected( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "bridge_disconnected"; - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public override bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public override bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceeded_model" - )] - public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded : ConnectedAccountErrors - { - [JsonConstructorAttribute] - protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded() { } - - public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default, - ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata saltoKsMetadata = - default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - SaltoKsMetadata = saltoKsMetadata; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public override bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public override bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// Salto KS metadata associated with the connected account that has an error. - /// - [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] - public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata SaltoKsMetadata { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata_model" - )] - public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata - { - [JsonConstructorAttribute] - protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata() { } - - public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata( - List? sites = - default - ) - { - Sites = sites; - } - - /// - /// Salto sites associated with the connected account that has an error. - /// - [DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] - public List? Sites { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites_model" - )] - public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites - { - [JsonConstructorAttribute] - protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites() - { } - - public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites( - string? siteId = default, - string? siteName = default, - int? siteUserSubscriptionLimit = default, - int? subscribedSiteUserCount = default - ) - { - SiteId = siteId; - SiteName = siteName; - SiteUserSubscriptionLimit = siteUserSubscriptionLimit; - SubscribedSiteUserCount = subscribedSiteUserCount; - } - - /// - /// ID of a Salto site associated with the connected account that has an error. - /// - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public string? SiteId { get; set; } - - /// - /// Name of a Salto site associated with the connected account that has an error. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - /// - /// Subscription limit of site users for a Salto site associated with the connected account that has an error. - /// - [DataMember( - Name = "site_user_subscription_limit", - IsRequired = false, - EmitDefaultValue = false - )] - public int? SiteUserSubscriptionLimit { get; set; } - - /// - /// Count of subscribed site users for a Salto site associated with the connected account that has an error. - /// - [DataMember( - Name = "subscribed_site_user_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int? SubscribedSiteUserCount { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountErrorsDormakabaSitesDisconnected_model")] - public class ConnectedAccountErrorsDormakabaSitesDisconnected : ConnectedAccountErrors - { - [JsonConstructorAttribute] - protected ConnectedAccountErrorsDormakabaSitesDisconnected() { } - - public ConnectedAccountErrorsDormakabaSitesDisconnected( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public override bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public override bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountErrorsUnrecognized_model")] - public class ConnectedAccountErrorsUnrecognized : ConnectedAccountErrors - { - [JsonConstructorAttribute] - protected ConnectedAccountErrorsUnrecognized() { } - - public ConnectedAccountErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public override bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public override bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(ConnectedAccountWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountWarningsDormakabaSitesUnapproved), - "dormakaba_sites_unapproved" - )] - [JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsSetupRequired), "setup_required")] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountWarningsProviderServiceUnavailable), - "provider_service_unavailable" - )] - [JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsBeingDeleted), "being_deleted")] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountWarningsAccountReauthorizationRequested), - "account_reauthorization_requested" - )] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached), - "salto_ks_subscription_limit_almost_reached" - )] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountWarningsUnknownIssueWithConnectedAccount), - "unknown_issue_with_connected_account" - )] - [JsonSubtypes.KnownSubType( - typeof(ConnectedAccountWarningsScheduledMaintenanceWindow), - "scheduled_maintenance_window" - )] - public abstract class ConnectedAccountWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_connectedAccountWarningsScheduledMaintenanceWindow_model")] - public class ConnectedAccountWarningsScheduledMaintenanceWindow : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsScheduledMaintenanceWindow() { } - - public ConnectedAccountWarningsScheduledMaintenanceWindow( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "scheduled_maintenance_window"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_connectedAccountWarningsUnknownIssueWithConnectedAccount_model" - )] - public class ConnectedAccountWarningsUnknownIssueWithConnectedAccount - : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsUnknownIssueWithConnectedAccount() { } - - public ConnectedAccountWarningsUnknownIssueWithConnectedAccount( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unknown_issue_with_connected_account"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached_model" - )] - public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached - : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached() { } - - public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached( - string createdAt = default, - string message = default, - ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata saltoKsMetadata = - default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - SaltoKsMetadata = saltoKsMetadata; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// Salto KS metadata associated with the connected account that has a warning. - /// - [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] - public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata SaltoKsMetadata { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "salto_ks_subscription_limit_almost_reached"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata_model" - )] - public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata() - { } - - public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata( - List? sites = - default - ) - { - Sites = sites; - } - - /// - /// Salto sites associated with the connected account that has a warning. - /// - [DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] - public List? Sites { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites_model" - )] - public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites() - { } - - public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites( - string? siteId = default, - string? siteName = default, - int? siteUserSubscriptionLimit = default, - int? subscribedSiteUserCount = default - ) - { - SiteId = siteId; - SiteName = siteName; - SiteUserSubscriptionLimit = siteUserSubscriptionLimit; - SubscribedSiteUserCount = subscribedSiteUserCount; - } - - /// - /// ID of a Salto site associated with the connected account that has a warning. - /// - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public string? SiteId { get; set; } - - /// - /// Name of a Salto site associated with the connected account that has a warning. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - /// - /// Subscription limit of site users for a Salto site associated with the connected account that has a warning. - /// - [DataMember( - Name = "site_user_subscription_limit", - IsRequired = false, - EmitDefaultValue = false - )] - public int? SiteUserSubscriptionLimit { get; set; } - - /// - /// Count of subscribed site users for a Salto site associated with the connected account that has a warning. - /// - [DataMember( - Name = "subscribed_site_user_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int? SubscribedSiteUserCount { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_connectedAccountWarningsAccountReauthorizationRequested_model" - )] - public class ConnectedAccountWarningsAccountReauthorizationRequested - : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsAccountReauthorizationRequested() { } - - public ConnectedAccountWarningsAccountReauthorizationRequested( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "account_reauthorization_requested"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountWarningsBeingDeleted_model")] - public class ConnectedAccountWarningsBeingDeleted : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsBeingDeleted() { } - - public ConnectedAccountWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountWarningsProviderServiceUnavailable_model")] - public class ConnectedAccountWarningsProviderServiceUnavailable : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsProviderServiceUnavailable() { } - - public ConnectedAccountWarningsProviderServiceUnavailable( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "provider_service_unavailable"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountWarningsSetupRequired_model")] - public class ConnectedAccountWarningsSetupRequired : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsSetupRequired() { } - - public ConnectedAccountWarningsSetupRequired( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "setup_required"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountWarningsDormakabaSitesUnapproved_model")] - public class ConnectedAccountWarningsDormakabaSitesUnapproved : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsDormakabaSitesUnapproved() { } - - public ConnectedAccountWarningsDormakabaSitesUnapproved( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "dormakaba_sites_unapproved"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountWarningsUnrecognized_model")] - public class ConnectedAccountWarningsUnrecognized : ConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected ConnectedAccountWarningsUnrecognized() { } - - public ConnectedAccountWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// List of capabilities that were accepted during the account connection process. - /// - [DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] - public List AcceptedCapabilities { get; set; } - - /// - /// Type of connected account. - /// - [DataMember(Name = "account_type", IsRequired = false, EmitDefaultValue = false)] - public string? AccountType { get; set; } - - /// - /// Display name for the connected account type. - /// - [DataMember( - Name = "account_type_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string AccountTypeDisplayName { get; set; } - - /// - /// Indicates whether Seam should [import all new devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for management by the Seam API. - /// - [DataMember( - Name = "automatically_manage_new_devices", - IsRequired = false, - EmitDefaultValue = false - )] - public bool AutomaticallyManageNewDevices { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the connected account was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - /// - /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object CustomMetadata { get; set; } - - /// - /// Your unique key for the customer associated with this connected account. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Default reservation check-in time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration — set during the connect_webview for providers like Lodgify whose API does not expose check-in times. - /// - [DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] - public string? DefaultCheckinTime { get; set; } - - /// - /// Default reservation check-out time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration. - /// - [DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] - public string? DefaultCheckoutTime { get; set; } - - /// - /// Display name for the connected account. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// For iCal connected accounts, the platform that produced the feed (for example, `airbnb`, `vrbo`, or `booking`), or `unknown` when it could not be determined. Intended for rendering the source platform's logo. - /// - [DataMember(Name = "ical_feed_origin", IsRequired = false, EmitDefaultValue = false)] - public string? IcalFeedOrigin { get; set; } - - /// - /// For iCal connected accounts, the feed URL for the connection. Sourced from the connector configuration. - /// - [DataMember(Name = "ical_url", IsRequired = false, EmitDefaultValue = false)] - public string? IcalUrl { get; set; } - - /// - /// Logo URL for the connected account provider. - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string? ImageUrl { get; set; } - - /// - /// IANA time zone (e.g. America/Los_Angeles) for this connected account. Sourced from the connector configuration. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - /// - /// User identifier associated with the connected account. - /// - [Obsolete("Use `display_name` instead.")] - [DataMember(Name = "user_identifier", IsRequired = false, EmitDefaultValue = false)] - public ConnectedAccountUserIdentifier? UserIdentifier { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_connectedAccountUserIdentifier_model")] - public class ConnectedAccountUserIdentifier - { - [JsonConstructorAttribute] - protected ConnectedAccountUserIdentifier() { } - - public ConnectedAccountUserIdentifier( - string? apiUrl = default, - string? email = default, - bool? exclusive = default, - string? phone = default, - string? username = default - ) - { - ApiUrl = apiUrl; - Email = email; - Exclusive = exclusive; - Phone = phone; - Username = username; - } - - /// - /// API URL for the user identifier associated with the connected account. - /// - [DataMember(Name = "api_url", IsRequired = false, EmitDefaultValue = false)] - public string? ApiUrl { get; set; } - - /// - /// Email address of the user identifier associated with the connected account. - /// - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string? Email { get; set; } - - /// - /// Indicates whether the user identifier associated with the connected account is exclusive. - /// - [DataMember(Name = "exclusive", IsRequired = false, EmitDefaultValue = false)] - public bool? Exclusive { get; set; } - - /// - /// Phone number of the user identifier associated with the connected account. - /// - [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] - public string? Phone { get; set; } - - /// - /// Username of the user identifier associated with the connected account. - /// - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string? Username { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. +/// +[DataContract(Name = "seamModel_connectedAccount_model")] +public class ConnectedAccount +{ +[JsonConstructorAttribute] +protected ConnectedAccount() { } + +public ConnectedAccount(List acceptedCapabilities = default, string? accountType = default, string accountTypeDisplayName = default, bool automaticallyManageNewDevices = default, string connectedAccountId = default, string? createdAt = default, object customMetadata = default, string? customerKey = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string displayName = default, List errors = default, string? icalFeedOrigin = default, string? icalUrl = default, string? imageUrl = default, string? timeZone = default, ConnectedAccountUserIdentifier? userIdentifier = default, List warnings = default) +{ +AcceptedCapabilities = acceptedCapabilities; +AccountType = accountType; +AccountTypeDisplayName = accountTypeDisplayName; +AutomaticallyManageNewDevices = automaticallyManageNewDevices; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomMetadata = customMetadata; +CustomerKey = customerKey; +DefaultCheckinTime = defaultCheckinTime; +DefaultCheckoutTime = defaultCheckoutTime; +DisplayName = displayName; +Errors = errors; +IcalFeedOrigin = icalFeedOrigin; +IcalUrl = icalUrl; +ImageUrl = imageUrl; +TimeZone = timeZone; +UserIdentifier = userIdentifier; +Warnings = warnings; +} + +/// +/// List of capabilities that were accepted during the account connection process. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AcceptedCapabilitiesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "lock")] +Lock = 1, + +[EnumMember(Value = "thermostat")] +Thermostat = 2, + +[EnumMember(Value = "noise_sensor")] +NoiseSensor = 3, + +[EnumMember(Value = "access_control")] +AccessControl = 4, + +[EnumMember(Value = "camera")] +Camera = 5, +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(ConnectedAccountErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountErrorsBridgeDisconnected), "bridge_disconnected")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountErrorsAccountDisconnected), "account_disconnected")] +public abstract class ConnectedAccountErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract bool? IsBridgeError { get; set; } + +public abstract bool? IsConnectedAccountError { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_connectedAccountErrorsAccountDisconnected_model")] +public class ConnectedAccountErrorsAccountDisconnected : ConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected ConnectedAccountErrorsAccountDisconnected() { } + +public ConnectedAccountErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "account_disconnected"; + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountErrorsBridgeDisconnected_model")] +public class ConnectedAccountErrorsBridgeDisconnected : ConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected ConnectedAccountErrorsBridgeDisconnected() { } + +public ConnectedAccountErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "bridge_disconnected"; + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceeded_model")] +public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded : ConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded() { } + +public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default, ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata saltoKsMetadata = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +SaltoKsMetadata = saltoKsMetadata; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// Salto KS metadata associated with the connected account that has an error. +/// +[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] +public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata SaltoKsMetadata { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata_model")] +public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata +{ +[JsonConstructorAttribute] +protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata() { } + +public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata(List? sites = default) +{ +Sites = sites; +} + +/// +/// Salto sites associated with the connected account that has an error. +/// +[DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] +public List? Sites { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites_model")] +public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites +{ +[JsonConstructorAttribute] +protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites() { } + +public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites(string? siteId = default, string? siteName = default, int? siteUserSubscriptionLimit = default, int? subscribedSiteUserCount = default) +{ +SiteId = siteId; +SiteName = siteName; +SiteUserSubscriptionLimit = siteUserSubscriptionLimit; +SubscribedSiteUserCount = subscribedSiteUserCount; +} + +/// +/// ID of a Salto site associated with the connected account that has an error. +/// +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public string? SiteId { get; set; } + +/// +/// Name of a Salto site associated with the connected account that has an error. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +/// +/// Subscription limit of site users for a Salto site associated with the connected account that has an error. +/// +[DataMember(Name = "site_user_subscription_limit", IsRequired = false, EmitDefaultValue = false)] +public int? SiteUserSubscriptionLimit { get; set; } + +/// +/// Count of subscribed site users for a Salto site associated with the connected account that has an error. +/// +[DataMember(Name = "subscribed_site_user_count", IsRequired = false, EmitDefaultValue = false)] +public int? SubscribedSiteUserCount { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountErrorsDormakabaSitesDisconnected_model")] +public class ConnectedAccountErrorsDormakabaSitesDisconnected : ConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected ConnectedAccountErrorsDormakabaSitesDisconnected() { } + +public ConnectedAccountErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountErrorsUnrecognized_model")] +public class ConnectedAccountErrorsUnrecognized : ConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected ConnectedAccountErrorsUnrecognized() { } + +public ConnectedAccountErrorsUnrecognized(string errorCode = default, string createdAt = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public override bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(ConnectedAccountWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsDormakabaSitesUnapproved), "dormakaba_sites_unapproved")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsSetupRequired), "setup_required")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsProviderServiceUnavailable), "provider_service_unavailable")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsBeingDeleted), "being_deleted")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsAccountReauthorizationRequested), "account_reauthorization_requested")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached), "salto_ks_subscription_limit_almost_reached")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsUnknownIssueWithConnectedAccount), "unknown_issue_with_connected_account")] +[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsScheduledMaintenanceWindow), "scheduled_maintenance_window")] +public abstract class ConnectedAccountWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_connectedAccountWarningsScheduledMaintenanceWindow_model")] +public class ConnectedAccountWarningsScheduledMaintenanceWindow : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsScheduledMaintenanceWindow() { } + +public ConnectedAccountWarningsScheduledMaintenanceWindow(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "scheduled_maintenance_window"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsUnknownIssueWithConnectedAccount_model")] +public class ConnectedAccountWarningsUnknownIssueWithConnectedAccount : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsUnknownIssueWithConnectedAccount() { } + +public ConnectedAccountWarningsUnknownIssueWithConnectedAccount(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unknown_issue_with_connected_account"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached_model")] +public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached() { } + +public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached(string createdAt = default, string message = default, ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata saltoKsMetadata = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +SaltoKsMetadata = saltoKsMetadata; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// Salto KS metadata associated with the connected account that has a warning. +/// +[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] +public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata SaltoKsMetadata { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_subscription_limit_almost_reached"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata_model")] +public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata() { } + +public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata(List? sites = default) +{ +Sites = sites; +} + +/// +/// Salto sites associated with the connected account that has a warning. +/// +[DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] +public List? Sites { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites_model")] +public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites() { } + +public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites(string? siteId = default, string? siteName = default, int? siteUserSubscriptionLimit = default, int? subscribedSiteUserCount = default) +{ +SiteId = siteId; +SiteName = siteName; +SiteUserSubscriptionLimit = siteUserSubscriptionLimit; +SubscribedSiteUserCount = subscribedSiteUserCount; +} + +/// +/// ID of a Salto site associated with the connected account that has a warning. +/// +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public string? SiteId { get; set; } + +/// +/// Name of a Salto site associated with the connected account that has a warning. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +/// +/// Subscription limit of site users for a Salto site associated with the connected account that has a warning. +/// +[DataMember(Name = "site_user_subscription_limit", IsRequired = false, EmitDefaultValue = false)] +public int? SiteUserSubscriptionLimit { get; set; } + +/// +/// Count of subscribed site users for a Salto site associated with the connected account that has a warning. +/// +[DataMember(Name = "subscribed_site_user_count", IsRequired = false, EmitDefaultValue = false)] +public int? SubscribedSiteUserCount { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsAccountReauthorizationRequested_model")] +public class ConnectedAccountWarningsAccountReauthorizationRequested : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsAccountReauthorizationRequested() { } + +public ConnectedAccountWarningsAccountReauthorizationRequested(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "account_reauthorization_requested"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsBeingDeleted_model")] +public class ConnectedAccountWarningsBeingDeleted : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsBeingDeleted() { } + +public ConnectedAccountWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsProviderServiceUnavailable_model")] +public class ConnectedAccountWarningsProviderServiceUnavailable : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsProviderServiceUnavailable() { } + +public ConnectedAccountWarningsProviderServiceUnavailable(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "provider_service_unavailable"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsSetupRequired_model")] +public class ConnectedAccountWarningsSetupRequired : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsSetupRequired() { } + +public ConnectedAccountWarningsSetupRequired(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "setup_required"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsDormakabaSitesUnapproved_model")] +public class ConnectedAccountWarningsDormakabaSitesUnapproved : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsDormakabaSitesUnapproved() { } + +public ConnectedAccountWarningsDormakabaSitesUnapproved(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "dormakaba_sites_unapproved"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountWarningsUnrecognized_model")] +public class ConnectedAccountWarningsUnrecognized : ConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected ConnectedAccountWarningsUnrecognized() { } + +public ConnectedAccountWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// List of capabilities that were accepted during the account connection process. +/// +[DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] +public List AcceptedCapabilities { get; set; } + +/// +/// Type of connected account. +/// +[DataMember(Name = "account_type", IsRequired = false, EmitDefaultValue = false)] +public string? AccountType { get; set; } + +/// +/// Display name for the connected account type. +/// +[DataMember(Name = "account_type_display_name", IsRequired = false, EmitDefaultValue = false)] +public string AccountTypeDisplayName { get; set; } + +/// +/// Indicates whether Seam should [import all new devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for management by the Seam API. +/// +[DataMember(Name = "automatically_manage_new_devices", IsRequired = false, EmitDefaultValue = false)] +public bool AutomaticallyManageNewDevices { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the connected account was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +/// +/// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object CustomMetadata { get; set; } + +/// +/// Your unique key for the customer associated with this connected account. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Default reservation check-in time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration — set during the connect_webview for providers like Lodgify whose API does not expose check-in times. +/// +[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckinTime { get; set; } + +/// +/// Default reservation check-out time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration. +/// +[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckoutTime { get; set; } + +/// +/// Display name for the connected account. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// For iCal connected accounts, the platform that produced the feed (for example, `airbnb`, `vrbo`, or `booking`), or `unknown` when it could not be determined. Intended for rendering the source platform's logo. +/// +[DataMember(Name = "ical_feed_origin", IsRequired = false, EmitDefaultValue = false)] +public string? IcalFeedOrigin { get; set; } + +/// +/// For iCal connected accounts, the feed URL for the connection. Sourced from the connector configuration. +/// +[DataMember(Name = "ical_url", IsRequired = false, EmitDefaultValue = false)] +public string? IcalUrl { get; set; } + +/// +/// Logo URL for the connected account provider. +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string? ImageUrl { get; set; } + +/// +/// IANA time zone (e.g. America/Los_Angeles) for this connected account. Sourced from the connector configuration. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +/// +/// User identifier associated with the connected account. +/// +[Obsolete("Use `display_name` instead.")] +[DataMember(Name = "user_identifier", IsRequired = false, EmitDefaultValue = false)] +public ConnectedAccountUserIdentifier? UserIdentifier { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_connectedAccountUserIdentifier_model")] +public class ConnectedAccountUserIdentifier +{ +[JsonConstructorAttribute] +protected ConnectedAccountUserIdentifier() { } + +public ConnectedAccountUserIdentifier(string? apiUrl = default, string? email = default, bool? exclusive = default, string? phone = default, string? username = default) +{ +ApiUrl = apiUrl; +Email = email; +Exclusive = exclusive; +Phone = phone; +Username = username; +} + +/// +/// API URL for the user identifier associated with the connected account. +/// +[DataMember(Name = "api_url", IsRequired = false, EmitDefaultValue = false)] +public string? ApiUrl { get; set; } + +/// +/// Email address of the user identifier associated with the connected account. +/// +[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] +public string? Email { get; set; } + +/// +/// Indicates whether the user identifier associated with the connected account is exclusive. +/// +[DataMember(Name = "exclusive", IsRequired = false, EmitDefaultValue = false)] +public bool? Exclusive { get; set; } + +/// +/// Phone number of the user identifier associated with the connected account. +/// +[DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] +public string? Phone { get; set; } + +/// +/// Username of the user identifier associated with the connected account. +/// +[DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] +public string? Username { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/CustomerPortal.cs b/src/Seam/Model/CustomerPortal.cs index 6e0515ef..266f89c1 100644 --- a/src/Seam/Model/CustomerPortal.cs +++ b/src/Seam/Model/CustomerPortal.cs @@ -8,81 +8,76 @@ namespace Seam.Model { - /// - /// Represents a Customer Portal. Customer Portal is a hosted, customizable interface for managing device access. It enables you to embed secure, pre-authenticated access flows into your product—either by sharing a link with users or embedding a view in an iframe. - /// - /// With Customer Portal, you no longer need to build out frontend experiences for physical access, thermostats, and sensors. Instead, you can ship enterprise-grade access control experiences in a fraction of the time, while maintaining your product's branding and user experience. - /// - /// Seam hosts these flows, handling everything from account connection and device mapping to full-featured device control. - /// - [DataContract(Name = "seamModel_customerPortal_model")] - public class CustomerPortal - { - [JsonConstructorAttribute] - protected CustomerPortal() { } +/// +/// Represents a Customer Portal. Customer Portal is a hosted, customizable interface for managing device access. It enables you to embed secure, pre-authenticated access flows into your product—either by sharing a link with users or embedding a view in an iframe. +/// +/// With Customer Portal, you no longer need to build out frontend experiences for physical access, thermostats, and sensors. Instead, you can ship enterprise-grade access control experiences in a fraction of the time, while maintaining your product's branding and user experience. +/// +/// Seam hosts these flows, handling everything from account connection and device mapping to full-featured device control. +/// +[DataContract(Name = "seamModel_customerPortal_model")] +public class CustomerPortal +{ +[JsonConstructorAttribute] +protected CustomerPortal() { } - public CustomerPortal( - string createdAt = default, - string customerKey = default, - string expiresAt = default, - string url = default, - string workspaceId = default - ) - { - CreatedAt = createdAt; - CustomerKey = customerKey; - ExpiresAt = expiresAt; - Url = url; - WorkspaceId = workspaceId; - } +public CustomerPortal(string createdAt = default, string customerKey = default, string expiresAt = default, string url = default, string workspaceId = default) +{ +CreatedAt = createdAt; +CustomerKey = customerKey; +ExpiresAt = expiresAt; +Url = url; +WorkspaceId = workspaceId; +} - /// - /// Date and time at which the customer portal link was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } +/// +/// Date and time at which the customer portal link was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } - /// - /// Customer key for the customer portal. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string CustomerKey { get; set; } +/// +/// Customer key for the customer portal. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string CustomerKey { get; set; } - /// - /// Date and time at which the customer portal link expires. - /// - [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] - public string ExpiresAt { get; set; } +/// +/// Date and time at which the customer portal link expires. +/// +[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] +public string ExpiresAt { get; set; } - /// - /// URL for the customer portal. - /// - [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] - public string Url { get; set; } +/// +/// URL for the customer portal. +/// +[DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] +public string Url { get; set; } - /// - /// ID of the workspace associated with the customer portal. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } +/// +/// ID of the workspace associated with the customer portal. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} - return stringWriter.ToString(); - } - } } diff --git a/src/Seam/Model/Device.cs b/src/Seam/Model/Device.cs index f9ef260c..2a3ce407 100644 --- a/src/Seam/Model/Device.cs +++ b/src/Seam/Model/Device.cs @@ -8,10130 +8,9198 @@ namespace Seam.Model { - /// - /// Represents a [device](https://docs.seam.co/core-concepts/devices) that has been connected to Seam. - /// - [DataContract(Name = "seamModel_device_model")] - public class Device - { - [JsonConstructorAttribute] - protected Device() { } - - public Device( - bool? canConfigureAutoLock = default, - bool? canHvacCool = default, - bool? canHvacHeat = default, - bool? canHvacHeatCool = default, - bool? canProgramOfflineAccessCodes = default, - bool? canProgramOnlineAccessCodes = default, - bool? canProgramThermostatProgramsAsDifferentEachDay = default, - bool? canProgramThermostatProgramsAsSameEachDay = default, - bool? canProgramThermostatProgramsAsWeekdayWeekend = default, - bool? canRemotelyLock = default, - bool? canRemotelyUnlock = default, - bool? canRunThermostatPrograms = default, - bool? canSimulateConnection = default, - bool? canSimulateDisconnection = default, - bool? canSimulateHubConnection = default, - bool? canSimulateHubDisconnection = default, - bool? canSimulatePaidSubscription = default, - bool? canSimulateRemoval = default, - bool? canTurnOffHvac = default, - bool? canUnlockWithCode = default, - List capabilitiesSupported = default, - string connectedAccountId = default, - string createdAt = default, - object customMetadata = default, - string deviceId = default, - DeviceDeviceManufacturer? deviceManufacturer = default, - DeviceDeviceProvider? deviceProvider = default, - Device.DeviceTypeEnum deviceType = default, - string displayName = default, - List errors = default, - bool isManaged = default, - DeviceLocation? location = default, - string? nickname = default, - DeviceProperties properties = default, - List spaceIds = default, - List warnings = default, - string workspaceId = default - ) - { - CanConfigureAutoLock = canConfigureAutoLock; - CanHvacCool = canHvacCool; - CanHvacHeat = canHvacHeat; - CanHvacHeatCool = canHvacHeatCool; - CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; - CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; - CanProgramThermostatProgramsAsDifferentEachDay = - canProgramThermostatProgramsAsDifferentEachDay; - CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; - CanProgramThermostatProgramsAsWeekdayWeekend = - canProgramThermostatProgramsAsWeekdayWeekend; - CanRemotelyLock = canRemotelyLock; - CanRemotelyUnlock = canRemotelyUnlock; - CanRunThermostatPrograms = canRunThermostatPrograms; - CanSimulateConnection = canSimulateConnection; - CanSimulateDisconnection = canSimulateDisconnection; - CanSimulateHubConnection = canSimulateHubConnection; - CanSimulateHubDisconnection = canSimulateHubDisconnection; - CanSimulatePaidSubscription = canSimulatePaidSubscription; - CanSimulateRemoval = canSimulateRemoval; - CanTurnOffHvac = canTurnOffHvac; - CanUnlockWithCode = canUnlockWithCode; - CapabilitiesSupported = capabilitiesSupported; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomMetadata = customMetadata; - DeviceId = deviceId; - DeviceManufacturer = deviceManufacturer; - DeviceProvider = deviceProvider; - DeviceType = deviceType; - DisplayName = displayName; - Errors = errors; - IsManaged = isManaged; - Location = location; - Nickname = nickname; - Properties = properties; - SpaceIds = spaceIds; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - /// - /// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CapabilitiesSupportedEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "access_code")] - AccessCode = 1, - - [EnumMember(Value = "lock")] - Lock = 2, - - [EnumMember(Value = "noise_detection")] - NoiseDetection = 3, - - [EnumMember(Value = "thermostat")] - Thermostat = 4, - - [EnumMember(Value = "battery")] - Battery = 5, - - [EnumMember(Value = "phone")] - Phone = 6, - } - - /// - /// Type of the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "akuvox_lock")] - AkuvoxLock = 1, - - [EnumMember(Value = "august_lock")] - AugustLock = 2, - - [EnumMember(Value = "brivo_access_point")] - BrivoAccessPoint = 3, - - [EnumMember(Value = "butterflymx_panel")] - ButterflymxPanel = 4, - - [EnumMember(Value = "avigilon_alta_entry")] - AvigilonAltaEntry = 5, - - [EnumMember(Value = "doorking_lock")] - DoorkingLock = 6, - - [EnumMember(Value = "genie_door")] - GenieDoor = 7, - - [EnumMember(Value = "igloo_lock")] - IglooLock = 8, +/// +/// Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam. +/// +[DataContract(Name = "seamModel_device_model")] +public class Device +{ +[JsonConstructorAttribute] +protected Device() { } + +public Device(bool? canActivateWeeklyProgram = default, bool? canConfigureAutoLock = default, bool? canHvacCool = default, bool? canHvacHeat = default, bool? canHvacHeatCool = default, bool? canProgramOfflineAccessCodes = default, bool? canProgramOnlineAccessCodes = default, bool? canProgramThermostatProgramsAsDifferentEachDay = default, bool? canProgramThermostatProgramsAsSameEachDay = default, bool? canProgramThermostatProgramsAsWeekdayWeekend = default, bool? canRemotelyLock = default, bool? canRemotelyUnlock = default, bool? canRunThermostatPrograms = default, bool? canSimulateConnection = default, bool? canSimulateDisconnection = default, bool? canSimulateHubConnection = default, bool? canSimulateHubDisconnection = default, bool? canSimulatePaidSubscription = default, bool? canSimulateRemoval = default, bool? canStreamLiveVideo = default, bool? canTurnOffHvac = default, bool? canUnlockWithCode = default, List capabilitiesSupported = default, string connectedAccountId = default, string createdAt = default, object customMetadata = default, string deviceId = default, DeviceDeviceManufacturer? deviceManufacturer = default, DeviceDeviceProvider? deviceProvider = default, Device.DeviceTypeEnum deviceType = default, string displayName = default, List errors = default, bool isManaged = default, DeviceLocation? location = default, string? nickname = default, DeviceProperties properties = default, List spaceIds = default, List warnings = default, string workspaceId = default) +{ +CanActivateWeeklyProgram = canActivateWeeklyProgram; +CanConfigureAutoLock = canConfigureAutoLock; +CanHvacCool = canHvacCool; +CanHvacHeat = canHvacHeat; +CanHvacHeatCool = canHvacHeatCool; +CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; +CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; +CanProgramThermostatProgramsAsDifferentEachDay = canProgramThermostatProgramsAsDifferentEachDay; +CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; +CanProgramThermostatProgramsAsWeekdayWeekend = canProgramThermostatProgramsAsWeekdayWeekend; +CanRemotelyLock = canRemotelyLock; +CanRemotelyUnlock = canRemotelyUnlock; +CanRunThermostatPrograms = canRunThermostatPrograms; +CanSimulateConnection = canSimulateConnection; +CanSimulateDisconnection = canSimulateDisconnection; +CanSimulateHubConnection = canSimulateHubConnection; +CanSimulateHubDisconnection = canSimulateHubDisconnection; +CanSimulatePaidSubscription = canSimulatePaidSubscription; +CanSimulateRemoval = canSimulateRemoval; +CanStreamLiveVideo = canStreamLiveVideo; +CanTurnOffHvac = canTurnOffHvac; +CanUnlockWithCode = canUnlockWithCode; +CapabilitiesSupported = capabilitiesSupported; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomMetadata = customMetadata; +DeviceId = deviceId; +DeviceManufacturer = deviceManufacturer; +DeviceProvider = deviceProvider; +DeviceType = deviceType; +DisplayName = displayName; +Errors = errors; +IsManaged = isManaged; +Location = location; +Nickname = nickname; +Properties = properties; +SpaceIds = spaceIds; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +/// +/// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CapabilitiesSupportedEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "access_code")] +AccessCode = 1, + +[EnumMember(Value = "lock")] +Lock = 2, + +[EnumMember(Value = "noise_detection")] +NoiseDetection = 3, + +[EnumMember(Value = "thermostat")] +Thermostat = 4, + +[EnumMember(Value = "battery")] +Battery = 5, + +[EnumMember(Value = "phone")] +Phone = 6, +} + +/// +/// Type of the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "akuvox_lock")] +AkuvoxLock = 1, + +[EnumMember(Value = "august_lock")] +AugustLock = 2, + +[EnumMember(Value = "brivo_access_point")] +BrivoAccessPoint = 3, + +[EnumMember(Value = "butterflymx_panel")] +ButterflymxPanel = 4, + +[EnumMember(Value = "avigilon_alta_entry")] +AvigilonAltaEntry = 5, + +[EnumMember(Value = "doorking_lock")] +DoorkingLock = 6, + +[EnumMember(Value = "genie_door")] +GenieDoor = 7, + +[EnumMember(Value = "igloo_lock")] +IglooLock = 8, + +[EnumMember(Value = "linear_lock")] +LinearLock = 9, + +[EnumMember(Value = "lockly_lock")] +LocklyLock = 10, + +[EnumMember(Value = "kwikset_lock")] +KwiksetLock = 11, + +[EnumMember(Value = "nuki_lock")] +NukiLock = 12, + +[EnumMember(Value = "salto_lock")] +SaltoLock = 13, + +[EnumMember(Value = "schlage_lock")] +SchlageLock = 14, + +[EnumMember(Value = "smartthings_lock")] +SmartthingsLock = 15, + +[EnumMember(Value = "wyze_lock")] +WyzeLock = 16, + +[EnumMember(Value = "yale_lock")] +YaleLock = 17, + +[EnumMember(Value = "two_n_intercom")] +TwoNIntercom = 18, + +[EnumMember(Value = "controlbyweb_device")] +ControlbywebDevice = 19, + +[EnumMember(Value = "ttlock_lock")] +TtlockLock = 20, + +[EnumMember(Value = "igloohome_lock")] +IgloohomeLock = 21, + +[EnumMember(Value = "four_suites_door")] +FourSuitesDoor = 22, + +[EnumMember(Value = "dormakaba_oracode_door")] +DormakabaOracodeDoor = 23, + +[EnumMember(Value = "tedee_lock")] +TedeeLock = 24, + +[EnumMember(Value = "akiles_lock")] +AkilesLock = 25, + +[EnumMember(Value = "ultraloq_lock")] +UltraloqLock = 26, + +[EnumMember(Value = "yacan_lock")] +YacanLock = 27, + +[EnumMember(Value = "keyincode_lock")] +KeyincodeLock = 28, + +[EnumMember(Value = "omnitec_lock")] +OmnitecLock = 29, + +[EnumMember(Value = "kisi_lock")] +KisiLock = 30, + +[EnumMember(Value = "aqara_lock")] +AqaraLock = 31, + +[EnumMember(Value = "keynest_key")] +KeynestKey = 32, + +[EnumMember(Value = "noiseaware_activity_zone")] +NoiseawareActivityZone = 33, + +[EnumMember(Value = "minut_sensor")] +MinutSensor = 34, + +[EnumMember(Value = "ecobee_thermostat")] +EcobeeThermostat = 35, + +[EnumMember(Value = "nest_thermostat")] +NestThermostat = 36, + +[EnumMember(Value = "honeywell_resideo_thermostat")] +HoneywellResideoThermostat = 37, + +[EnumMember(Value = "tado_thermostat")] +TadoThermostat = 38, + +[EnumMember(Value = "sensi_thermostat")] +SensiThermostat = 39, + +[EnumMember(Value = "smartthings_thermostat")] +SmartthingsThermostat = 40, + +[EnumMember(Value = "ios_phone")] +IosPhone = 41, + +[EnumMember(Value = "android_phone")] +AndroidPhone = 42, + +[EnumMember(Value = "ring_camera")] +RingCamera = 43, + +[EnumMember(Value = "tapo_camera")] +TapoCamera = 44, + +[EnumMember(Value = "arlo_camera")] +ArloCamera = 45, + +[EnumMember(Value = "reolink_camera")] +ReolinkCamera = 46, +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(DeviceErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsBridgeDisconnected), "bridge_disconnected")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsSubscriptionRequired), "subscription_required")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsAuxiliaryHeatRunning), "auxiliary_heat_running")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsMissingDeviceCredentials), "missing_device_credentials")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsAugustLockNotAuthorized), "august_lock_not_authorized")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsEmptyBackupAccessCodePool), "empty_backup_access_code_pool")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceDisconnected), "device_disconnected")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsHubDisconnected), "hub_disconnected")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceRemoved), "device_removed")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceOffline), "device_offline")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsInsufficientPermissions), "insufficient_permissions")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] +[JsonSubtypes.KnownSubType(typeof(DeviceErrorsAccountDisconnected), "account_disconnected")] +public abstract class DeviceErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_deviceErrorsAccountDisconnected_model")] +public class DeviceErrorsAccountDisconnected : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsAccountDisconnected() { } + +public DeviceErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "account_disconnected"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsSaltoKsSubscriptionLimitExceeded_model")] +public class DeviceErrorsSaltoKsSubscriptionLimitExceeded : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsSaltoKsSubscriptionLimitExceeded() { } + +public DeviceErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsInsufficientPermissions_model")] +public class DeviceErrorsInsufficientPermissions : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsInsufficientPermissions() { } + +public DeviceErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "insufficient_permissions"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsDormakabaSitesDisconnected_model")] +public class DeviceErrorsDormakabaSitesDisconnected : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsDormakabaSitesDisconnected() { } + +public DeviceErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsDeviceOffline_model")] +public class DeviceErrorsDeviceOffline : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsDeviceOffline() { } + +public DeviceErrorsDeviceOffline(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_offline"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsDeviceRemoved_model")] +public class DeviceErrorsDeviceRemoved : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsDeviceRemoved() { } + +public DeviceErrorsDeviceRemoved(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_removed"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsHubDisconnected_model")] +public class DeviceErrorsHubDisconnected : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsHubDisconnected() { } + +public DeviceErrorsHubDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "hub_disconnected"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsDeviceDisconnected_model")] +public class DeviceErrorsDeviceDisconnected : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsDeviceDisconnected() { } + +public DeviceErrorsDeviceDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_disconnected"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsEmptyBackupAccessCodePool_model")] +public class DeviceErrorsEmptyBackupAccessCodePool : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsEmptyBackupAccessCodePool() { } + +public DeviceErrorsEmptyBackupAccessCodePool(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "empty_backup_access_code_pool"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsAugustLockNotAuthorized_model")] +public class DeviceErrorsAugustLockNotAuthorized : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsAugustLockNotAuthorized() { } + +public DeviceErrorsAugustLockNotAuthorized(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "august_lock_not_authorized"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsMissingDeviceCredentials_model")] +public class DeviceErrorsMissingDeviceCredentials : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsMissingDeviceCredentials() { } + +public DeviceErrorsMissingDeviceCredentials(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "missing_device_credentials"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsAuxiliaryHeatRunning_model")] +public class DeviceErrorsAuxiliaryHeatRunning : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsAuxiliaryHeatRunning() { } + +public DeviceErrorsAuxiliaryHeatRunning(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "auxiliary_heat_running"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsSubscriptionRequired_model")] +public class DeviceErrorsSubscriptionRequired : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsSubscriptionRequired() { } + +public DeviceErrorsSubscriptionRequired(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "subscription_required"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsBridgeDisconnected_model")] +public class DeviceErrorsBridgeDisconnected : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsBridgeDisconnected() { } + +public DeviceErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "bridge_disconnected"; + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceErrorsUnrecognized_model")] +public class DeviceErrorsUnrecognized : DeviceErrors +{ +[JsonConstructorAttribute] +protected DeviceErrorsUnrecognized() { } + +public DeviceErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(DeviceWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsMaxAccessCodesReached), "max_access_codes_reached")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsUnreliableOnlineStatus), "unreliable_online_status")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsAccessoryKeypadLowBattery), "accessory_keypad_low_battery")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsAccessoryKeypadSetupRequired), "accessory_keypad_setup_required")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsKeynestUnsupportedLocker), "keynest_unsupported_locker")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsProviderIssue), "provider_issue")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsHubRequiredForAdditionalCapabilities), "hub_required_for_additional_capabilities")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTwoNDeviceMissingTimezone), "two_n_device_missing_timezone")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTimeZoneMismatch), "time_zone_mismatch")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTimeZoneUnknown), "time_zone_unknown")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsUltraloqTimeZoneUnknown), "ultraloq_time_zone_unknown")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsLocklyTimeZoneNotConfigured), "lockly_time_zone_not_configured")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsUnknownIssueWithPhone), "unknown_issue_with_phone")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsLockAccessCodeSupportRemoved), "salto_ks_lock_access_code_support_removed")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsSubscriptionLimitAlmostReached), "salto_ks_subscription_limit_almost_reached")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsPrivacyMode), "privacy_mode")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsPrivacyMode), "salto_ks_privacy_mode")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsOfficeMode), "salto_ks_office_mode")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsDeviceHasFlakyConnection), "device_has_flaky_connection")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsScheduledMaintenanceWindow), "scheduled_maintenance_window")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsDeviceCommunicationDegraded), "device_communication_degraded")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTemperatureThresholdExceeded), "temperature_threshold_exceeded")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsPowerSavingMode), "power_saving_mode")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTtlockWeakGatewaySignal), "ttlock_weak_gateway_signal")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTtlockLockGatewayUnlockingNotEnabled), "ttlock_lock_gateway_unlocking_not_enabled")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsThirdPartyIntegrationDetected), "third_party_integration_detected")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsManyActiveBackupCodes), "many_active_backup_codes")] +[JsonSubtypes.KnownSubType(typeof(DeviceWarningsPartialBackupAccessCodePool), "partial_backup_access_code_pool")] +public abstract class DeviceWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_deviceWarningsPartialBackupAccessCodePool_model")] +public class DeviceWarningsPartialBackupAccessCodePool : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsPartialBackupAccessCodePool() { } + +public DeviceWarningsPartialBackupAccessCodePool(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "partial_backup_access_code_pool"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsManyActiveBackupCodes_model")] +public class DeviceWarningsManyActiveBackupCodes : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsManyActiveBackupCodes() { } + +public DeviceWarningsManyActiveBackupCodes(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "many_active_backup_codes"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsThirdPartyIntegrationDetected_model")] +public class DeviceWarningsThirdPartyIntegrationDetected : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsThirdPartyIntegrationDetected() { } + +public DeviceWarningsThirdPartyIntegrationDetected(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "third_party_integration_detected"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsTtlockLockGatewayUnlockingNotEnabled_model")] +public class DeviceWarningsTtlockLockGatewayUnlockingNotEnabled : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsTtlockLockGatewayUnlockingNotEnabled() { } + +public DeviceWarningsTtlockLockGatewayUnlockingNotEnabled(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "ttlock_lock_gateway_unlocking_not_enabled"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsTtlockWeakGatewaySignal_model")] +public class DeviceWarningsTtlockWeakGatewaySignal : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsTtlockWeakGatewaySignal() { } + +public DeviceWarningsTtlockWeakGatewaySignal(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "ttlock_weak_gateway_signal"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsPowerSavingMode_model")] +public class DeviceWarningsPowerSavingMode : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsPowerSavingMode() { } + +public DeviceWarningsPowerSavingMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "power_saving_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsTemperatureThresholdExceeded_model")] +public class DeviceWarningsTemperatureThresholdExceeded : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsTemperatureThresholdExceeded() { } + +public DeviceWarningsTemperatureThresholdExceeded(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "temperature_threshold_exceeded"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsDeviceCommunicationDegraded_model")] +public class DeviceWarningsDeviceCommunicationDegraded : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsDeviceCommunicationDegraded() { } + +public DeviceWarningsDeviceCommunicationDegraded(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "device_communication_degraded"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsScheduledMaintenanceWindow_model")] +public class DeviceWarningsScheduledMaintenanceWindow : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsScheduledMaintenanceWindow() { } + +public DeviceWarningsScheduledMaintenanceWindow(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "scheduled_maintenance_window"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsDeviceHasFlakyConnection_model")] +public class DeviceWarningsDeviceHasFlakyConnection : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsDeviceHasFlakyConnection() { } + +public DeviceWarningsDeviceHasFlakyConnection(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "device_has_flaky_connection"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsSaltoKsOfficeMode_model")] +public class DeviceWarningsSaltoKsOfficeMode : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsSaltoKsOfficeMode() { } + +public DeviceWarningsSaltoKsOfficeMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_office_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsSaltoKsPrivacyMode_model")] +public class DeviceWarningsSaltoKsPrivacyMode : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsSaltoKsPrivacyMode() { } + +public DeviceWarningsSaltoKsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_privacy_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsPrivacyMode_model")] +public class DeviceWarningsPrivacyMode : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsPrivacyMode() { } + +public DeviceWarningsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "privacy_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsSaltoKsSubscriptionLimitAlmostReached_model")] +public class DeviceWarningsSaltoKsSubscriptionLimitAlmostReached : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsSaltoKsSubscriptionLimitAlmostReached() { } + +public DeviceWarningsSaltoKsSubscriptionLimitAlmostReached(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_subscription_limit_almost_reached"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsSaltoKsLockAccessCodeSupportRemoved_model")] +public class DeviceWarningsSaltoKsLockAccessCodeSupportRemoved : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsSaltoKsLockAccessCodeSupportRemoved() { } + +public DeviceWarningsSaltoKsLockAccessCodeSupportRemoved(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_lock_access_code_support_removed"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsUnknownIssueWithPhone_model")] +public class DeviceWarningsUnknownIssueWithPhone : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsUnknownIssueWithPhone() { } + +public DeviceWarningsUnknownIssueWithPhone(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unknown_issue_with_phone"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsLocklyTimeZoneNotConfigured_model")] +public class DeviceWarningsLocklyTimeZoneNotConfigured : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsLocklyTimeZoneNotConfigured() { } + +public DeviceWarningsLocklyTimeZoneNotConfigured(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "lockly_time_zone_not_configured"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsUltraloqTimeZoneUnknown_model")] +public class DeviceWarningsUltraloqTimeZoneUnknown : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsUltraloqTimeZoneUnknown() { } + +public DeviceWarningsUltraloqTimeZoneUnknown(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "ultraloq_time_zone_unknown"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsTimeZoneUnknown_model")] +public class DeviceWarningsTimeZoneUnknown : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsTimeZoneUnknown() { } + +public DeviceWarningsTimeZoneUnknown(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "time_zone_unknown"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsTimeZoneMismatch_model")] +public class DeviceWarningsTimeZoneMismatch : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsTimeZoneMismatch() { } + +public DeviceWarningsTimeZoneMismatch(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "time_zone_mismatch"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsTwoNDeviceMissingTimezone_model")] +public class DeviceWarningsTwoNDeviceMissingTimezone : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsTwoNDeviceMissingTimezone() { } + +public DeviceWarningsTwoNDeviceMissingTimezone(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "two_n_device_missing_timezone"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsHubRequiredForAdditionalCapabilities_model")] +public class DeviceWarningsHubRequiredForAdditionalCapabilities : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsHubRequiredForAdditionalCapabilities() { } + +public DeviceWarningsHubRequiredForAdditionalCapabilities(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "hub_required_for_additional_capabilities"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsProviderIssue_model")] +public class DeviceWarningsProviderIssue : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsProviderIssue() { } + +public DeviceWarningsProviderIssue(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "provider_issue"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsKeynestUnsupportedLocker_model")] +public class DeviceWarningsKeynestUnsupportedLocker : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsKeynestUnsupportedLocker() { } + +public DeviceWarningsKeynestUnsupportedLocker(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "keynest_unsupported_locker"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsAccessoryKeypadSetupRequired_model")] +public class DeviceWarningsAccessoryKeypadSetupRequired : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsAccessoryKeypadSetupRequired() { } + +public DeviceWarningsAccessoryKeypadSetupRequired(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "accessory_keypad_setup_required"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsAccessoryKeypadLowBattery_model")] +public class DeviceWarningsAccessoryKeypadLowBattery : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsAccessoryKeypadLowBattery() { } + +public DeviceWarningsAccessoryKeypadLowBattery(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "accessory_keypad_low_battery"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsUnreliableOnlineStatus_model")] +public class DeviceWarningsUnreliableOnlineStatus : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsUnreliableOnlineStatus() { } + +public DeviceWarningsUnreliableOnlineStatus(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unreliable_online_status"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsMaxAccessCodesReached_model")] +public class DeviceWarningsMaxAccessCodesReached : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsMaxAccessCodesReached() { } + +public DeviceWarningsMaxAccessCodesReached(int activeAccessCodeCount = default, string createdAt = default, int maxActiveAccessCodeCount = default, string message = default, string warningCode = default) +{ +ActiveAccessCodeCount = activeAccessCodeCount; +CreatedAt = createdAt; +MaxActiveAccessCodeCount = maxActiveAccessCodeCount; +Message = message; +WarningCode = warningCode; +} + +/// +/// Number of active access codes on the device when the warning was set. +/// +[DataMember(Name = "active_access_code_count", IsRequired = false, EmitDefaultValue = false)] +public int ActiveAccessCodeCount { get; set; } + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Maximum number of active access codes supported by the device. +/// +[DataMember(Name = "max_active_access_code_count", IsRequired = false, EmitDefaultValue = false)] +public int MaxActiveAccessCodeCount { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "max_access_codes_reached"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceWarningsUnrecognized_model")] +public class DeviceWarningsUnrecognized : DeviceWarnings +{ +[JsonConstructorAttribute] +protected DeviceWarningsUnrecognized() { } + +public DeviceWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. +/// +[DataMember(Name = "can_activate_weekly_program", IsRequired = false, EmitDefaultValue = false)] +public bool? CanActivateWeeklyProgram { get; set; } + +/// +/// Indicates whether the lock supports configuring automatic locking. +/// +[DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanConfigureAutoLock { get; set; } + +/// +/// Indicates whether the thermostat supports cooling. +/// +[DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacCool { get; set; } + +/// +/// Indicates whether the thermostat supports heating. +/// +[DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacHeat { get; set; } + +/// +/// Indicates whether the thermostat supports simultaneous heating and cooling. +/// +[DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacHeatCool { get; set; } + +/// +/// Indicates whether the device supports programming offline access codes. +/// +[DataMember(Name = "can_program_offline_access_codes", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramOfflineAccessCodes { get; set; } + +/// +/// Indicates whether the device supports programming online access codes. +/// +[DataMember(Name = "can_program_online_access_codes", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramOnlineAccessCodes { get; set; } + +/// +/// Indicates whether the thermostat supports different climate programs for each day of the week. +/// +[DataMember(Name = "can_program_thermostat_programs_as_different_each_day", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } + +/// +/// Indicates whether the thermostat supports a single climate program applied to every day. +/// +[DataMember(Name = "can_program_thermostat_programs_as_same_each_day", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } + +/// +/// Indicates whether the thermostat supports weekday/weekend climate programs. +/// +[DataMember(Name = "can_program_thermostat_programs_as_weekday_weekend", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } + +/// +/// Indicates whether the device supports remote locking. +/// +[DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRemotelyLock { get; set; } + +/// +/// Indicates whether the device supports remote unlocking. +/// +[DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRemotelyUnlock { get; set; } + +/// +/// Indicates whether the thermostat supports running climate programs. +/// +[DataMember(Name = "can_run_thermostat_programs", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRunThermostatPrograms { get; set; } + +/// +/// Indicates whether the device supports simulating connection in a sandbox. +/// +[DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateConnection { get; set; } + +/// +/// Indicates whether the device supports simulating disconnection in a sandbox. +/// +[DataMember(Name = "can_simulate_disconnection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateDisconnection { get; set; } + +/// +/// Indicates whether the hub supports simulating connection in a sandbox. +/// +[DataMember(Name = "can_simulate_hub_connection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateHubConnection { get; set; } + +/// +/// Indicates whether the hub supports simulating disconnection in a sandbox. +/// +[DataMember(Name = "can_simulate_hub_disconnection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateHubDisconnection { get; set; } + +/// +/// Indicates whether the device supports simulating a paid subscription in a sandbox. +/// +[DataMember(Name = "can_simulate_paid_subscription", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulatePaidSubscription { get; set; } + +/// +/// Indicates whether the device supports simulating removal in a sandbox. +/// +[DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateRemoval { get; set; } + +/// +/// Indicates whether the camera supports streaming live video through a camera live view session. +/// +[DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] +public bool? CanStreamLiveVideo { get; set; } + +/// +/// Indicates whether the thermostat can be turned off. +/// +[DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] +public bool? CanTurnOffHvac { get; set; } + +/// +/// Indicates whether the lock supports unlocking with an access code. +/// +[DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUnlockWithCode { get; set; } + +/// +/// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). +/// +[DataMember(Name = "capabilities_supported", IsRequired = false, EmitDefaultValue = false)] +public List CapabilitiesSupported { get; set; } + +/// +/// Unique identifier for the account associated with the device. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the device object was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object CustomMetadata { get; set; } + +/// +/// ID of the device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Manufacturer of the device. Represents the hardware brand, which may differ from the provider. +/// +[DataMember(Name = "device_manufacturer", IsRequired = false, EmitDefaultValue = false)] +public DeviceDeviceManufacturer? DeviceManufacturer { get; set; } + +/// +/// Provider of the device. Represents the third-party service through which the device is controlled. +/// +[DataMember(Name = "device_provider", IsRequired = false, EmitDefaultValue = false)] +public DeviceDeviceProvider? DeviceProvider { get; set; } + +/// +/// Type of the device. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public Device.DeviceTypeEnum DeviceType { get; set; } + +/// +/// Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Location information for the device. +/// +[DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] +public DeviceLocation? Location { get; set; } + +/// +/// Optional nickname to describe the device, settable through Seam. +/// +[DataMember(Name = "nickname", IsRequired = false, EmitDefaultValue = false)] +public string? Nickname { get; set; } + +/// +/// Properties of the device. +/// +[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] +public DeviceProperties Properties { get; set; } + +/// +/// IDs of the spaces the device is in. +/// +[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] +public List SpaceIds { get; set; } + +/// +/// Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// Unique identifier for the Seam workspace associated with the device. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceDeviceManufacturer_model")] +public class DeviceDeviceManufacturer +{ +[JsonConstructorAttribute] +protected DeviceDeviceManufacturer() { } + +public DeviceDeviceManufacturer(string displayName = default, string? imageUrl = default, string manufacturer = default) +{ +DisplayName = displayName; +ImageUrl = imageUrl; +Manufacturer = manufacturer; +} + +/// +/// Display name for the manufacturer, such as `August`, `Yale`, `Salto`, and so on. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Image URL for the manufacturer logo. +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string? ImageUrl { get; set; } + +/// +/// Manufacturer identifier, such as `august`, `yale`, `salto`, and so on. +/// +[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] +public string Manufacturer { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceDeviceProvider_model")] +public class DeviceDeviceProvider +{ +[JsonConstructorAttribute] +protected DeviceDeviceProvider() { } + +public DeviceDeviceProvider(string deviceProviderName = default, string displayName = default, string? imageUrl = default, string providerCategory = default) +{ +DeviceProviderName = deviceProviderName; +DisplayName = displayName; +ImageUrl = imageUrl; +ProviderCategory = providerCategory; +} + +/// +/// Device provider name. Corresponds to the integration type, such as `august`, `schlage`, `yale_access`, and so on. +/// +[DataMember(Name = "device_provider_name", IsRequired = false, EmitDefaultValue = false)] +public string DeviceProviderName { get; set; } + +/// +/// Display name for the device provider type. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Image URL for the device provider. +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string? ImageUrl { get; set; } + +/// +/// Provider category. Indicates the third-party provider type, such as `stable`, for stable integrations, or `internal`, for internal integrations. +/// +[DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] +public string ProviderCategory { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceLocation_model")] +public class DeviceLocation +{ +[JsonConstructorAttribute] +protected DeviceLocation() { } + +public DeviceLocation(string? locationName = default, string? roomName = default, string? timeZone = default, string? timezone = default) +{ +LocationName = locationName; +RoomName = roomName; +TimeZone = timeZone; +Timezone = timezone; +} + +/// +/// Name of the device location. +/// +[DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] +public string? LocationName { get; set; } + +/// +/// Name of the room within the device location, when the provider reports one. +/// +[DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] +public string? RoomName { get; set; } + +/// +/// Time zone of the device location. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +/// +/// Time zone of the device location. +/// +[Obsolete("Use `time_zone` instead.")] +[DataMember(Name = "timezone", IsRequired = false, EmitDefaultValue = false)] +public string? Timezone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_deviceProperties_model")] +public class DeviceProperties +{ +[JsonConstructorAttribute] +protected DeviceProperties() { } + +public DeviceProperties(DevicePropertiesAccessoryKeypad? accessoryKeypad = default, DevicePropertiesAppearance appearance = default, DevicePropertiesBattery? battery = default, float? batteryLevel = default, List? currentlyTriggeringNoiseThresholdIds = default, bool? hasDirectPower = default, string? imageAltText = default, string? imageUrl = default, string? manufacturer = default, DevicePropertiesModel model = default, string name = default, float? noiseLevelDecibels = default, bool? offlineAccessCodesEnabled = default, bool online = default, bool? onlineAccessCodesEnabled = default, string? serialNumber = default, bool? supportsAccessoryKeypad = default, bool? supportsOfflineAccessCodes = default, DevicePropertiesAssaAbloyCredentialServiceMetadata? assaAbloyCredentialServiceMetadata = default, DevicePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = default, DevicePropertiesAkilesMetadata? akilesMetadata = default, DevicePropertiesAqaraMetadata? aqaraMetadata = default, DevicePropertiesArloMetadata? arloMetadata = default, DevicePropertiesAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, DevicePropertiesAugustMetadata? augustMetadata = default, DevicePropertiesAvigilonAltaMetadata? avigilonAltaMetadata = default, DevicePropertiesBrivoMetadata? brivoMetadata = default, DevicePropertiesControlbywebMetadata? controlbywebMetadata = default, DevicePropertiesDormakabaOracodeIhoMetadata? dormakabaOracodeIhoMetadata = default, DevicePropertiesDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, DevicePropertiesEcobeeMetadata? ecobeeMetadata = default, DevicePropertiesFourSuitesMetadata? fourSuitesMetadata = default, DevicePropertiesGenieMetadata? genieMetadata = default, DevicePropertiesHoneywellResideoMetadata? honeywellResideoMetadata = default, DevicePropertiesIglooMetadata? iglooMetadata = default, DevicePropertiesIgloohomeMetadata? igloohomeMetadata = default, DevicePropertiesKeynestMetadata? keynestMetadata = default, DevicePropertiesKisiMetadata? kisiMetadata = default, DevicePropertiesKorelockMetadata? korelockMetadata = default, DevicePropertiesKwiksetMetadata? kwiksetMetadata = default, DevicePropertiesLocklyMetadata? locklyMetadata = default, DevicePropertiesMinutMetadata? minutMetadata = default, DevicePropertiesNestMetadata? nestMetadata = default, DevicePropertiesNoiseawareMetadata? noiseawareMetadata = default, DevicePropertiesNukiMetadata? nukiMetadata = default, DevicePropertiesOmnitecMetadata? omnitecMetadata = default, DevicePropertiesReolinkMetadata? reolinkMetadata = default, DevicePropertiesRingMetadata? ringMetadata = default, DevicePropertiesSaltoKsMetadata? saltoKsMetadata = default, DevicePropertiesSaltoMetadata? saltoMetadata = default, DevicePropertiesSchlageMetadata? schlageMetadata = default, DevicePropertiesSeamBridgeMetadata? seamBridgeMetadata = default, DevicePropertiesSensiMetadata? sensiMetadata = default, DevicePropertiesSmartthingsMetadata? smartthingsMetadata = default, DevicePropertiesTadoMetadata? tadoMetadata = default, DevicePropertiesTapoMetadata? tapoMetadata = default, DevicePropertiesTedeeMetadata? tedeeMetadata = default, DevicePropertiesTtlockMetadata? ttlockMetadata = default, DevicePropertiesTwoNMetadata? twoNMetadata = default, DevicePropertiesUltraloqMetadata? ultraloqMetadata = default, DevicePropertiesVisionlineMetadata? visionlineMetadata = default, DevicePropertiesWyzeMetadata? wyzeMetadata = default, DevicePropertiesYacanMetadata? yacanMetadata = default, float? autoLockDelaySeconds = default, bool? autoLockEnabled = default, bool? backupAccessCodePoolEnabled = default, List? codeConstraints = default, bool? doorOpen = default, bool? hasNativeEntryEvents = default, DevicePropertiesKeypadBattery? keypadBattery = default, bool? locked = default, float? maxActiveCodesSupported = default, List? offlineTimeFrameOptions = default, List? onlineTimeFrameOptions = default, List? supportedCodeLengths = default, bool? supportsBackupAccessCodePool = default, DevicePropertiesActiveThermostatSchedule? activeThermostatSchedule = default, string? activeThermostatScheduleId = default, List? availableClimatePresetModes = default, List? availableClimatePresets = default, List? availableFanModeSettings = default, List? availableHvacModeSettings = default, DevicePropertiesCurrentClimateSetting? currentClimateSetting = default, DevicePropertiesDefaultClimateSetting? defaultClimateSetting = default, string? fallbackClimatePresetKey = default, DeviceProperties.FanModeSettingEnum? fanModeSetting = default, bool? isCooling = default, bool? isFanRunning = default, bool? isHeating = default, bool? isTemporaryManualOverrideActive = default, float? maxCoolingSetPointCelsius = default, float? maxCoolingSetPointFahrenheit = default, float? maxHeatingSetPointCelsius = default, float? maxHeatingSetPointFahrenheit = default, float? maxThermostatDailyProgramPeriodsPerDay = default, float? maxUniqueClimatePresetsPerThermostatWeeklyProgram = default, float? minCoolingSetPointCelsius = default, float? minCoolingSetPointFahrenheit = default, float? minHeatingCoolingDeltaCelsius = default, float? minHeatingCoolingDeltaFahrenheit = default, float? minHeatingSetPointCelsius = default, float? minHeatingSetPointFahrenheit = default, float? relativeHumidity = default, float? temperatureCelsius = default, float? temperatureFahrenheit = default, DevicePropertiesTemperatureThreshold? temperatureThreshold = default, float? thermostatDailyProgramPeriodPrecisionMinutes = default, List? thermostatDailyPrograms = default, DevicePropertiesThermostatWeeklyProgram? thermostatWeeklyProgram = default) +{ +AccessoryKeypad = accessoryKeypad; +Appearance = appearance; +Battery = battery; +BatteryLevel = batteryLevel; +CurrentlyTriggeringNoiseThresholdIds = currentlyTriggeringNoiseThresholdIds; +HasDirectPower = hasDirectPower; +ImageAltText = imageAltText; +ImageUrl = imageUrl; +Manufacturer = manufacturer; +Model = model; +Name = name; +NoiseLevelDecibels = noiseLevelDecibels; +OfflineAccessCodesEnabled = offlineAccessCodesEnabled; +Online = online; +OnlineAccessCodesEnabled = onlineAccessCodesEnabled; +SerialNumber = serialNumber; +SupportsAccessoryKeypad = supportsAccessoryKeypad; +SupportsOfflineAccessCodes = supportsOfflineAccessCodes; +AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; +SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; +AkilesMetadata = akilesMetadata; +AqaraMetadata = aqaraMetadata; +ArloMetadata = arloMetadata; +AssaAbloyVostioMetadata = assaAbloyVostioMetadata; +AugustMetadata = augustMetadata; +AvigilonAltaMetadata = avigilonAltaMetadata; +BrivoMetadata = brivoMetadata; +ControlbywebMetadata = controlbywebMetadata; +DormakabaOracodeIhoMetadata = dormakabaOracodeIhoMetadata; +DormakabaOracodeMetadata = dormakabaOracodeMetadata; +EcobeeMetadata = ecobeeMetadata; +FourSuitesMetadata = fourSuitesMetadata; +GenieMetadata = genieMetadata; +HoneywellResideoMetadata = honeywellResideoMetadata; +IglooMetadata = iglooMetadata; +IgloohomeMetadata = igloohomeMetadata; +KeynestMetadata = keynestMetadata; +KisiMetadata = kisiMetadata; +KorelockMetadata = korelockMetadata; +KwiksetMetadata = kwiksetMetadata; +LocklyMetadata = locklyMetadata; +MinutMetadata = minutMetadata; +NestMetadata = nestMetadata; +NoiseawareMetadata = noiseawareMetadata; +NukiMetadata = nukiMetadata; +OmnitecMetadata = omnitecMetadata; +ReolinkMetadata = reolinkMetadata; +RingMetadata = ringMetadata; +SaltoKsMetadata = saltoKsMetadata; +SaltoMetadata = saltoMetadata; +SchlageMetadata = schlageMetadata; +SeamBridgeMetadata = seamBridgeMetadata; +SensiMetadata = sensiMetadata; +SmartthingsMetadata = smartthingsMetadata; +TadoMetadata = tadoMetadata; +TapoMetadata = tapoMetadata; +TedeeMetadata = tedeeMetadata; +TtlockMetadata = ttlockMetadata; +TwoNMetadata = twoNMetadata; +UltraloqMetadata = ultraloqMetadata; +VisionlineMetadata = visionlineMetadata; +WyzeMetadata = wyzeMetadata; +YacanMetadata = yacanMetadata; +AutoLockDelaySeconds = autoLockDelaySeconds; +AutoLockEnabled = autoLockEnabled; +BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; +CodeConstraints = codeConstraints; +DoorOpen = doorOpen; +HasNativeEntryEvents = hasNativeEntryEvents; +KeypadBattery = keypadBattery; +Locked = locked; +MaxActiveCodesSupported = maxActiveCodesSupported; +OfflineTimeFrameOptions = offlineTimeFrameOptions; +OnlineTimeFrameOptions = onlineTimeFrameOptions; +SupportedCodeLengths = supportedCodeLengths; +SupportsBackupAccessCodePool = supportsBackupAccessCodePool; +ActiveThermostatSchedule = activeThermostatSchedule; +ActiveThermostatScheduleId = activeThermostatScheduleId; +AvailableClimatePresetModes = availableClimatePresetModes; +AvailableClimatePresets = availableClimatePresets; +AvailableFanModeSettings = availableFanModeSettings; +AvailableHvacModeSettings = availableHvacModeSettings; +CurrentClimateSetting = currentClimateSetting; +DefaultClimateSetting = defaultClimateSetting; +FallbackClimatePresetKey = fallbackClimatePresetKey; +FanModeSetting = fanModeSetting; +IsCooling = isCooling; +IsFanRunning = isFanRunning; +IsHeating = isHeating; +IsTemporaryManualOverrideActive = isTemporaryManualOverrideActive; +MaxCoolingSetPointCelsius = maxCoolingSetPointCelsius; +MaxCoolingSetPointFahrenheit = maxCoolingSetPointFahrenheit; +MaxHeatingSetPointCelsius = maxHeatingSetPointCelsius; +MaxHeatingSetPointFahrenheit = maxHeatingSetPointFahrenheit; +MaxThermostatDailyProgramPeriodsPerDay = maxThermostatDailyProgramPeriodsPerDay; +MaxUniqueClimatePresetsPerThermostatWeeklyProgram = maxUniqueClimatePresetsPerThermostatWeeklyProgram; +MinCoolingSetPointCelsius = minCoolingSetPointCelsius; +MinCoolingSetPointFahrenheit = minCoolingSetPointFahrenheit; +MinHeatingCoolingDeltaCelsius = minHeatingCoolingDeltaCelsius; +MinHeatingCoolingDeltaFahrenheit = minHeatingCoolingDeltaFahrenheit; +MinHeatingSetPointCelsius = minHeatingSetPointCelsius; +MinHeatingSetPointFahrenheit = minHeatingSetPointFahrenheit; +RelativeHumidity = relativeHumidity; +TemperatureCelsius = temperatureCelsius; +TemperatureFahrenheit = temperatureFahrenheit; +TemperatureThreshold = temperatureThreshold; +ThermostatDailyProgramPeriodPrecisionMinutes = thermostatDailyProgramPeriodPrecisionMinutes; +ThermostatDailyPrograms = thermostatDailyPrograms; +ThermostatWeeklyProgram = thermostatWeeklyProgram; +} + +/// +/// Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AvailableClimatePresetModesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "home")] +Home = 1, + +[EnumMember(Value = "away")] +Away = 2, + +[EnumMember(Value = "wake")] +Wake = 3, + +[EnumMember(Value = "sleep")] +Sleep = 4, + +[EnumMember(Value = "occupied")] +Occupied = 5, + +[EnumMember(Value = "unoccupied")] +Unoccupied = 6, +} + +/// +/// Fan mode settings that the thermostat supports. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AvailableFanModeSettingsEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// HVAC mode settings that the thermostat supports. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum AvailableHvacModeSettingsEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, + +[EnumMember(Value = "heat")] +Heat = 2, + +[EnumMember(Value = "cool")] +Cool = 3, + +[EnumMember(Value = "heat_cool")] +HeatCool = 4, + +[EnumMember(Value = "eco")] +Eco = 5, +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// Accessory keypad properties and state. +/// +[DataMember(Name = "accessory_keypad", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAccessoryKeypad? AccessoryKeypad { get; set; } + +/// +/// Appearance-related properties, as reported by the device. +/// +[DataMember(Name = "appearance", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAppearance Appearance { get; set; } + +/// +/// Represents the current status of the battery charge level. +/// +[DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesBattery? Battery { get; set; } + +/// +/// Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. +/// +[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] +public float? BatteryLevel { get; set; } + +/// +/// Array of noise threshold IDs that are currently triggering. +/// +[DataMember(Name = "currently_triggering_noise_threshold_ids", IsRequired = false, EmitDefaultValue = false)] +public List? CurrentlyTriggeringNoiseThresholdIds { get; set; } + +/// +/// Indicates whether the device has direct power. +/// +[DataMember(Name = "has_direct_power", IsRequired = false, EmitDefaultValue = false)] +public bool? HasDirectPower { get; set; } + +/// +/// Alt text for the device image. +/// +[DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] +public string? ImageAltText { get; set; } + +/// +/// Image URL for the device. +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string? ImageUrl { get; set; } + +/// +/// Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. +/// +[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] +public string? Manufacturer { get; set; } + +/// +/// Device model-related properties. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesModel Model { get; set; } + +/// +/// Name of the device. +/// +[Obsolete("use device.display_name instead")] +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// Indicates current noise level in decibels, if the device supports noise detection. +/// +[DataMember(Name = "noise_level_decibels", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseLevelDecibels { get; set; } + +/// +/// Indicates whether it is currently possible to use offline access codes for the device. +/// +[Obsolete("use device.can_program_offline_access_codes")] +[DataMember(Name = "offline_access_codes_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? OfflineAccessCodesEnabled { get; set; } + +/// +/// Indicates whether the device is online. +/// +[DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] +public bool Online { get; set; } + +/// +/// Indicates whether it is currently possible to use online access codes for the device. +/// +[Obsolete("use device.can_program_online_access_codes")] +[DataMember(Name = "online_access_codes_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? OnlineAccessCodesEnabled { get; set; } + +/// +/// Serial number of the device. +/// +[DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] +public string? SerialNumber { get; set; } + +[Obsolete("use device.properties.model.can_connect_accessory_keypad")] +[DataMember(Name = "supports_accessory_keypad", IsRequired = false, EmitDefaultValue = false)] +public bool? SupportsAccessoryKeypad { get; set; } + +[Obsolete("use offline_access_codes_enabled")] +[DataMember(Name = "supports_offline_access_codes", IsRequired = false, EmitDefaultValue = false)] +public bool? SupportsOfflineAccessCodes { get; set; } + +/// +/// ASSA ABLOY Credential Service metadata for the phone. +/// +[DataMember(Name = "assa_abloy_credential_service_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAssaAbloyCredentialServiceMetadata? AssaAbloyCredentialServiceMetadata { get; set; } + +/// +/// Salto Space credential service metadata for the phone. +/// +[DataMember(Name = "salto_space_credential_service_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesSaltoSpaceCredentialServiceMetadata? SaltoSpaceCredentialServiceMetadata { get; set; } + +/// +/// Metadata for an Akiles device. +/// +[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAkilesMetadata? AkilesMetadata { get; set; } + +/// +/// Metadata for an Aqara device. +/// +[DataMember(Name = "aqara_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAqaraMetadata? AqaraMetadata { get; set; } + +/// +/// Metadata for an Arlo camera. +/// +[DataMember(Name = "arlo_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesArloMetadata? ArloMetadata { get; set; } + +/// +/// Metadata for an ASSA ABLOY Vostio system. +/// +[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + +/// +/// Metadata for an August device. +/// +[DataMember(Name = "august_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAugustMetadata? AugustMetadata { get; set; } + +/// +/// Metadata for an Avigilon Alta system. +/// +[DataMember(Name = "avigilon_alta_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAvigilonAltaMetadata? AvigilonAltaMetadata { get; set; } + +/// +/// Metadata for a Brivo device. +/// +[DataMember(Name = "brivo_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesBrivoMetadata? BrivoMetadata { get; set; } + +/// +/// Metadata for a ControlByWeb device. +/// +[DataMember(Name = "controlbyweb_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesControlbywebMetadata? ControlbywebMetadata { get; set; } + +/// +/// Metadata for a dormakaba Oracode Homeowner's Portal device. +/// +[DataMember(Name = "dormakaba_oracode_iho_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesDormakabaOracodeIhoMetadata? DormakabaOracodeIhoMetadata { get; set; } + +/// +/// Metadata for a dormakaba Oracode device. +/// +[DataMember(Name = "dormakaba_oracode_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } + +/// +/// Metadata for an ecobee device. +/// +[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesEcobeeMetadata? EcobeeMetadata { get; set; } + +/// +/// Metadata for a 4SUITES device. +/// +[DataMember(Name = "four_suites_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesFourSuitesMetadata? FourSuitesMetadata { get; set; } + +/// +/// Metadata for a Genie device. +/// +[DataMember(Name = "genie_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesGenieMetadata? GenieMetadata { get; set; } + +/// +/// Metadata for a Honeywell Resideo device. +/// +[DataMember(Name = "honeywell_resideo_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesHoneywellResideoMetadata? HoneywellResideoMetadata { get; set; } + +/// +/// Metadata for an igloo device. +/// +[DataMember(Name = "igloo_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesIglooMetadata? IglooMetadata { get; set; } + +/// +/// Metadata for an igloohome device. +/// +[DataMember(Name = "igloohome_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesIgloohomeMetadata? IgloohomeMetadata { get; set; } + +/// +/// Metadata for a KeyNest device. +/// +[DataMember(Name = "keynest_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesKeynestMetadata? KeynestMetadata { get; set; } + +/// +/// Metadata for a Kisi device. +/// +[DataMember(Name = "kisi_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesKisiMetadata? KisiMetadata { get; set; } + +/// +/// Metadata for a Korelock device. +/// +[DataMember(Name = "korelock_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesKorelockMetadata? KorelockMetadata { get; set; } + +/// +/// Metadata for a Kwikset device. +/// +[DataMember(Name = "kwikset_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesKwiksetMetadata? KwiksetMetadata { get; set; } + +/// +/// Metadata for a Lockly device. +/// +[DataMember(Name = "lockly_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesLocklyMetadata? LocklyMetadata { get; set; } + +/// +/// Metadata for a Minut device. +/// +[DataMember(Name = "minut_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesMinutMetadata? MinutMetadata { get; set; } + +/// +/// Metadata for a Google Nest device. +/// +[DataMember(Name = "nest_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesNestMetadata? NestMetadata { get; set; } + +/// +/// Metadata for a NoiseAware device. +/// +[DataMember(Name = "noiseaware_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesNoiseawareMetadata? NoiseawareMetadata { get; set; } + +/// +/// Metadata for a Nuki device. +/// +[DataMember(Name = "nuki_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesNukiMetadata? NukiMetadata { get; set; } + +/// +/// Metadata for an Omnitec device. +/// +[DataMember(Name = "omnitec_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesOmnitecMetadata? OmnitecMetadata { get; set; } + +/// +/// Metadata for a Reolink camera. +/// +[DataMember(Name = "reolink_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesReolinkMetadata? ReolinkMetadata { get; set; } + +/// +/// Metadata for a Ring device. +/// +[DataMember(Name = "ring_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesRingMetadata? RingMetadata { get; set; } + +/// +/// Metadata for a Salto KS device. +/// +[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesSaltoKsMetadata? SaltoKsMetadata { get; set; } + +/// +/// Metada for a Salto device. +/// +[Obsolete("Use `salto_ks_metadata` instead.")] +[DataMember(Name = "salto_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesSaltoMetadata? SaltoMetadata { get; set; } + +/// +/// Metadata for a Schlage device. +/// +[DataMember(Name = "schlage_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesSchlageMetadata? SchlageMetadata { get; set; } + +/// +/// Metadata for Seam Bridge. +/// +[DataMember(Name = "seam_bridge_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesSeamBridgeMetadata? SeamBridgeMetadata { get; set; } + +/// +/// Metadata for a Sensi device. +/// +[DataMember(Name = "sensi_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesSensiMetadata? SensiMetadata { get; set; } + +/// +/// Metadata for a SmartThings device. +/// +[DataMember(Name = "smartthings_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesSmartthingsMetadata? SmartthingsMetadata { get; set; } + +/// +/// Metadata for a tado° device. +/// +[DataMember(Name = "tado_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesTadoMetadata? TadoMetadata { get; set; } + +/// +/// Metadata for a Tapo camera. +/// +[DataMember(Name = "tapo_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesTapoMetadata? TapoMetadata { get; set; } + +/// +/// Metadata for a Tedee device. +/// +[DataMember(Name = "tedee_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesTedeeMetadata? TedeeMetadata { get; set; } + +/// +/// Metadata for a TTLock device. +/// +[DataMember(Name = "ttlock_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesTtlockMetadata? TtlockMetadata { get; set; } + +/// +/// Metadata for a 2N device. +/// +[DataMember(Name = "two_n_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesTwoNMetadata? TwoNMetadata { get; set; } + +/// +/// Metadata for an Ultraloq device. +/// +[DataMember(Name = "ultraloq_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesUltraloqMetadata? UltraloqMetadata { get; set; } + +/// +/// Metadata for an ASSA ABLOY Visionline system. +/// +[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesVisionlineMetadata? VisionlineMetadata { get; set; } + +/// +/// Metadata for a Wyze device. +/// +[DataMember(Name = "wyze_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesWyzeMetadata? WyzeMetadata { get; set; } + +/// +/// Metadata for a Yacan device. +/// +[DataMember(Name = "yacan_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesYacanMetadata? YacanMetadata { get; set; } + +/// +/// The delay in seconds before the lock automatically locks after being unlocked. +/// +[DataMember(Name = "auto_lock_delay_seconds", IsRequired = false, EmitDefaultValue = false)] +public float? AutoLockDelaySeconds { get; set; } + +/// +/// Indicates whether automatic locking is enabled. +/// +[DataMember(Name = "auto_lock_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoLockEnabled { get; set; } + +/// +/// Indicates whether the [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) is currently enabled for the device. To disable it, set this to `false` using [/devices/update](https://www.seam.co/docs/api/devices/update). +/// +[DataMember(Name = "backup_access_code_pool_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? BackupAccessCodePoolEnabled { get; set; } + +/// +/// Constraints on access codes for the device. Seam represents each constraint as an object with a `constraint_type` property. Depending on the constraint type, there may also be additional properties. Note that some constraints are manufacturer- or device-specific. +/// +[DataMember(Name = "code_constraints", IsRequired = false, EmitDefaultValue = false)] +public List? CodeConstraints { get; set; } + +/// +/// Indicates whether the door is open. +/// +[DataMember(Name = "door_open", IsRequired = false, EmitDefaultValue = false)] +public bool? DoorOpen { get; set; } + +/// +/// Indicates whether the device supports native entry events. +/// +[DataMember(Name = "has_native_entry_events", IsRequired = false, EmitDefaultValue = false)] +public bool? HasNativeEntryEvents { get; set; } + +/// +/// Keypad battery status. +/// +[DataMember(Name = "keypad_battery", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesKeypadBattery? KeypadBattery { get; set; } + +/// +/// Indicates whether the lock is locked. +/// +[DataMember(Name = "locked", IsRequired = false, EmitDefaultValue = false)] +public bool? Locked { get; set; } + +/// +/// Maximum number of active access codes that the device supports. +/// +[DataMember(Name = "max_active_codes_supported", IsRequired = false, EmitDefaultValue = false)] +public float? MaxActiveCodesSupported { get; set; } + +/// +/// Time frames that may be requested when creating an offline access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. +/// +[DataMember(Name = "offline_time_frame_options", IsRequired = false, EmitDefaultValue = false)] +public List? OfflineTimeFrameOptions { get; set; } + +/// +/// Time frames that may be requested when creating an online access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. +/// +[DataMember(Name = "online_time_frame_options", IsRequired = false, EmitDefaultValue = false)] +public List? OnlineTimeFrameOptions { get; set; } + +/// +/// Supported code lengths for access codes. +/// +[DataMember(Name = "supported_code_lengths", IsRequired = false, EmitDefaultValue = false)] +public List? SupportedCodeLengths { get; set; } + +/// +/// Indicates whether the device supports a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). +/// +[DataMember(Name = "supports_backup_access_code_pool", IsRequired = false, EmitDefaultValue = false)] +public bool? SupportsBackupAccessCodePool { get; set; } + +/// +/// Active [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[Obsolete("Use `active_thermostat_schedule_id` with `/thermostats/schedules/get` instead.")] +[DataMember(Name = "active_thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesActiveThermostatSchedule? ActiveThermostatSchedule { get; set; } + +/// +/// ID of the active [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "active_thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] +public string? ActiveThermostatScheduleId { get; set; } + +/// +/// Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". +/// +[DataMember(Name = "available_climate_preset_modes", IsRequired = false, EmitDefaultValue = false)] +public List? AvailableClimatePresetModes { get; set; } + +/// +/// Available [climate presets](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for the thermostat. +/// +[DataMember(Name = "available_climate_presets", IsRequired = false, EmitDefaultValue = false)] +public List? AvailableClimatePresets { get; set; } + +/// +/// Fan mode settings that the thermostat supports. +/// +[DataMember(Name = "available_fan_mode_settings", IsRequired = false, EmitDefaultValue = false)] +public List? AvailableFanModeSettings { get; set; } + +/// +/// HVAC mode settings that the thermostat supports. +/// +[DataMember(Name = "available_hvac_mode_settings", IsRequired = false, EmitDefaultValue = false)] +public List? AvailableHvacModeSettings { get; set; } + +/// +/// Current climate setting. +/// +[DataMember(Name = "current_climate_setting", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesCurrentClimateSetting? CurrentClimateSetting { get; set; } + +[Obsolete("use fallback_climate_preset_key to specify a fallback climate preset instead.")] +[DataMember(Name = "default_climate_setting", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesDefaultClimateSetting? DefaultClimateSetting { get; set; } + +/// +/// Key of the [fallback climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) for the thermostat. +/// +[DataMember(Name = "fallback_climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string? FallbackClimatePresetKey { get; set; } + +[Obsolete("Use `current_climate_setting.fan_mode_setting` instead.")] +[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public DeviceProperties.FanModeSettingEnum? FanModeSetting { get; set; } + +/// +/// Indicates whether the connected HVAC system is currently cooling, as reported by the thermostat. +/// +[DataMember(Name = "is_cooling", IsRequired = false, EmitDefaultValue = false)] +public bool? IsCooling { get; set; } + +/// +/// Indicates whether the fan in the connected HVAC system is currently running, as reported by the thermostat. +/// +[DataMember(Name = "is_fan_running", IsRequired = false, EmitDefaultValue = false)] +public bool? IsFanRunning { get; set; } + +/// +/// Indicates whether the connected HVAC system is currently heating, as reported by the thermostat. +/// +[DataMember(Name = "is_heating", IsRequired = false, EmitDefaultValue = false)] +public bool? IsHeating { get; set; } + +/// +/// Indicates whether the current thermostat settings differ from the most recent active program or schedule that Seam activated. For this condition to occur, `current_climate_setting.manual_override_allowed` must also be `true`. +/// +[DataMember(Name = "is_temporary_manual_override_active", IsRequired = false, EmitDefaultValue = false)] +public bool? IsTemporaryManualOverrideActive { get; set; } + +/// +/// Maximum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. +/// +[DataMember(Name = "max_cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? MaxCoolingSetPointCelsius { get; set; } + +/// +/// Maximum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. +/// +[DataMember(Name = "max_cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? MaxCoolingSetPointFahrenheit { get; set; } + +/// +/// Maximum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. +/// +[DataMember(Name = "max_heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? MaxHeatingSetPointCelsius { get; set; } + +/// +/// Maximum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. +/// +[DataMember(Name = "max_heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? MaxHeatingSetPointFahrenheit { get; set; } + +/// +/// Maximum number of periods that the thermostat can support per day. For example, if the thermostat supports 4 periods per day, this value is 4. +/// +[DataMember(Name = "max_thermostat_daily_program_periods_per_day", IsRequired = false, EmitDefaultValue = false)] +public float? MaxThermostatDailyProgramPeriodsPerDay { get; set; } + +/// +/// Maximum number of climate presets that the thermostat can support for weekly programming. +/// +[DataMember(Name = "max_unique_climate_presets_per_thermostat_weekly_program", IsRequired = false, EmitDefaultValue = false)] +public float? MaxUniqueClimatePresetsPerThermostatWeeklyProgram { get; set; } + +/// +/// Minimum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. +/// +[DataMember(Name = "min_cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? MinCoolingSetPointCelsius { get; set; } + +/// +/// Minimum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. +/// +[DataMember(Name = "min_cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? MinCoolingSetPointFahrenheit { get; set; } + +/// +/// Minimum [temperature difference](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °C between the cooling and heating set points when in heat-cool (auto) mode. +/// +[DataMember(Name = "min_heating_cooling_delta_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? MinHeatingCoolingDeltaCelsius { get; set; } + +/// +/// Minimum [temperature difference](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °F between the cooling and heating set points when in heat-cool (auto) mode. +/// +[DataMember(Name = "min_heating_cooling_delta_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? MinHeatingCoolingDeltaFahrenheit { get; set; } + +/// +/// Minimum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. +/// +[DataMember(Name = "min_heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? MinHeatingSetPointCelsius { get; set; } + +/// +/// Minimum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. +/// +[DataMember(Name = "min_heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? MinHeatingSetPointFahrenheit { get; set; } + +/// +/// Reported relative humidity, as a value between 0 and 1, inclusive. +/// +[DataMember(Name = "relative_humidity", IsRequired = false, EmitDefaultValue = false)] +public float? RelativeHumidity { get; set; } + +/// +/// Reported temperature in °C. +/// +[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? TemperatureCelsius { get; set; } + +/// +/// Reported temperature in °F. +/// +[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? TemperatureFahrenheit { get; set; } + +/// +/// Current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. +/// +[DataMember(Name = "temperature_threshold", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesTemperatureThreshold? TemperatureThreshold { get; set; } + +/// +/// Precision of the thermostat's period in minutes. For example, if the thermostat supports 15-minute periods, this value is 15. All values are relative to the top of the hour, so for 15 minutes, the periods would be 0, 15, 30, and 45 minutes past the hour. +/// +[DataMember(Name = "thermostat_daily_program_period_precision_minutes", IsRequired = false, EmitDefaultValue = false)] +public float? ThermostatDailyProgramPeriodPrecisionMinutes { get; set; } + +/// +/// Configured [daily programs](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. +/// +[DataMember(Name = "thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] +public List? ThermostatDailyPrograms { get; set; } + +/// +/// Current [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. +/// +[DataMember(Name = "thermostat_weekly_program", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesThermostatWeeklyProgram? ThermostatWeeklyProgram { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAccessoryKeypad_model")] +public class DevicePropertiesAccessoryKeypad +{ +[JsonConstructorAttribute] +protected DevicePropertiesAccessoryKeypad() { } + +public DevicePropertiesAccessoryKeypad(DevicePropertiesAccessoryKeypadBattery? battery = default, bool isConnected = default) +{ +Battery = battery; +IsConnected = isConnected; +} + +/// +/// Keypad battery properties. +/// +[DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAccessoryKeypadBattery? Battery { get; set; } + +/// +/// Indicates if an accessory keypad is connected to the device. +/// +[DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnected { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAccessoryKeypadBattery_model")] +public class DevicePropertiesAccessoryKeypadBattery +{ +[JsonConstructorAttribute] +protected DevicePropertiesAccessoryKeypadBattery() { } + +public DevicePropertiesAccessoryKeypadBattery(float level = default) +{ +Level = level; +} + +[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] +public float Level { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAppearance_model")] +public class DevicePropertiesAppearance +{ +[JsonConstructorAttribute] +protected DevicePropertiesAppearance() { } + +public DevicePropertiesAppearance(string name = default) +{ +Name = name; +} + +/// +/// Name of the device as seen from the provider API and application, not settable through Seam. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesBattery_model")] +public class DevicePropertiesBattery +{ +[JsonConstructorAttribute] +protected DevicePropertiesBattery() { } + +public DevicePropertiesBattery(float level = default, DevicePropertiesBattery.StatusEnum status = default) +{ +Level = level; +Status = status; +} + +/// +/// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "critical")] +Critical = 1, + +[EnumMember(Value = "low")] +Low = 2, + +[EnumMember(Value = "good")] +Good = 3, + +[EnumMember(Value = "full")] +Full = 4, +} + +/// +/// Battery charge level as a value between 0 and 1, inclusive. +/// +[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] +public float Level { get; set; } + +/// +/// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesBattery.StatusEnum Status { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesModel_model")] +public class DevicePropertiesModel +{ +[JsonConstructorAttribute] +protected DevicePropertiesModel() { } + +public DevicePropertiesModel(bool? accessoryKeypadSupported = default, bool? canConnectAccessoryKeypad = default, string displayName = default, bool? hasBuiltInKeypad = default, string manufacturerDisplayName = default, bool? offlineAccessCodesSupported = default, bool? onlineAccessCodesSupported = default) +{ +AccessoryKeypadSupported = accessoryKeypadSupported; +CanConnectAccessoryKeypad = canConnectAccessoryKeypad; +DisplayName = displayName; +HasBuiltInKeypad = hasBuiltInKeypad; +ManufacturerDisplayName = manufacturerDisplayName; +OfflineAccessCodesSupported = offlineAccessCodesSupported; +OnlineAccessCodesSupported = onlineAccessCodesSupported; +} + +[Obsolete("use device.properties.model.can_connect_accessory_keypad")] +[DataMember(Name = "accessory_keypad_supported", IsRequired = false, EmitDefaultValue = false)] +public bool? AccessoryKeypadSupported { get; set; } + +/// +/// Indicates whether the device can connect a accessory keypad. +/// +[DataMember(Name = "can_connect_accessory_keypad", IsRequired = false, EmitDefaultValue = false)] +public bool? CanConnectAccessoryKeypad { get; set; } + +/// +/// Display name of the device model. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Indicates whether the device has a built in accessory keypad. +/// +[DataMember(Name = "has_built_in_keypad", IsRequired = false, EmitDefaultValue = false)] +public bool? HasBuiltInKeypad { get; set; } + +/// +/// Display name that corresponds to the manufacturer-specific terminology for the device. +/// +[DataMember(Name = "manufacturer_display_name", IsRequired = false, EmitDefaultValue = false)] +public string ManufacturerDisplayName { get; set; } + +[Obsolete("use device.can_program_offline_access_codes.")] +[DataMember(Name = "offline_access_codes_supported", IsRequired = false, EmitDefaultValue = false)] +public bool? OfflineAccessCodesSupported { get; set; } + +[Obsolete("use device.can_program_online_access_codes.")] +[DataMember(Name = "online_access_codes_supported", IsRequired = false, EmitDefaultValue = false)] +public bool? OnlineAccessCodesSupported { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAssaAbloyCredentialServiceMetadata_model")] +public class DevicePropertiesAssaAbloyCredentialServiceMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesAssaAbloyCredentialServiceMetadata() { } + +public DevicePropertiesAssaAbloyCredentialServiceMetadata(List? endpoints = default, bool? hasActiveEndpoint = default) +{ +Endpoints = endpoints; +HasActiveEndpoint = hasActiveEndpoint; +} + +/// +/// Endpoints associated with the phone. +/// +[DataMember(Name = "endpoints", IsRequired = false, EmitDefaultValue = false)] +public List? Endpoints { get; set; } + +/// +/// Indicates whether the credential service has active endpoints associated with the phone. +/// +[DataMember(Name = "has_active_endpoint", IsRequired = false, EmitDefaultValue = false)] +public bool? HasActiveEndpoint { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAssaAbloyCredentialServiceMetadataEndpoints_model")] +public class DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints +{ +[JsonConstructorAttribute] +protected DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints() { } + +public DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints(string? endpointId = default, bool? isActive = default) +{ +EndpointId = endpointId; +IsActive = isActive; +} + +/// +/// ID of the associated endpoint. +/// +[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] +public string? EndpointId { get; set; } + +/// +/// Indicated whether the endpoint is active. +/// +[DataMember(Name = "is_active", IsRequired = false, EmitDefaultValue = false)] +public bool? IsActive { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesSaltoSpaceCredentialServiceMetadata_model")] +public class DevicePropertiesSaltoSpaceCredentialServiceMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesSaltoSpaceCredentialServiceMetadata() { } + +public DevicePropertiesSaltoSpaceCredentialServiceMetadata(bool? hasActivePhone = default) +{ +HasActivePhone = hasActivePhone; +} + +/// +/// Indicates whether the credential service has an active associated phone. +/// +[DataMember(Name = "has_active_phone", IsRequired = false, EmitDefaultValue = false)] +public bool? HasActivePhone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAkilesMetadata_model")] +public class DevicePropertiesAkilesMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesAkilesMetadata() { } + +public DevicePropertiesAkilesMetadata(string? gadgetId = default, string? gadgetName = default, string? productName = default) +{ +GadgetId = gadgetId; +GadgetName = gadgetName; +ProductName = productName; +} + +/// +/// Gadget ID for an Akiles device. +/// +[DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] +public string? GadgetId { get; set; } + +/// +/// Gadget name for an Akiles device. +/// +[DataMember(Name = "gadget_name", IsRequired = false, EmitDefaultValue = false)] +public string? GadgetName { get; set; } + +/// +/// Product name for an Akiles device. +/// +[DataMember(Name = "product_name", IsRequired = false, EmitDefaultValue = false)] +public string? ProductName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAqaraMetadata_model")] +public class DevicePropertiesAqaraMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesAqaraMetadata() { } + +public DevicePropertiesAqaraMetadata(string? deviceName = default, string? did = default, string? firmwareVersion = default, string? model = default, float? modelType = default, string? parentDid = default, string? positionId = default, string? timeZone = default) +{ +DeviceName = deviceName; +Did = did; +FirmwareVersion = firmwareVersion; +Model = model; +ModelType = modelType; +ParentDid = parentDid; +PositionId = positionId; +TimeZone = timeZone; +} + +/// +/// Device name for an Aqara device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Device ID (did) for an Aqara device. +/// +[DataMember(Name = "did", IsRequired = false, EmitDefaultValue = false)] +public string? Did { get; set; } + +/// +/// Firmware version for an Aqara device. +/// +[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] +public string? FirmwareVersion { get; set; } + +/// +/// Model identifier for an Aqara device. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +/// +/// Model type for an Aqara device. +/// +[DataMember(Name = "model_type", IsRequired = false, EmitDefaultValue = false)] +public float? ModelType { get; set; } + +/// +/// Parent gateway device ID for an Aqara device. +/// +[DataMember(Name = "parent_did", IsRequired = false, EmitDefaultValue = false)] +public string? ParentDid { get; set; } + +/// +/// Position (room) ID for an Aqara device. +/// +[DataMember(Name = "position_id", IsRequired = false, EmitDefaultValue = false)] +public string? PositionId { get; set; } + +/// +/// Time zone reported for an Aqara device (e.g. GMT-07:00). +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesArloMetadata_model")] +public class DevicePropertiesArloMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesArloMetadata() { } + +public DevicePropertiesArloMetadata(string? deviceId = default, string? deviceName = default, string? firmwareVersion = default, string? hardwareVersion = default, string? modelId = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +FirmwareVersion = firmwareVersion; +HardwareVersion = hardwareVersion; +ModelId = modelId; +} + +/// +/// Device ID reported by Arlo. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name reported by Arlo. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Firmware version reported by Arlo. +/// +[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] +public string? FirmwareVersion { get; set; } + +/// +/// Hardware version reported by Arlo. +/// +[DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] +public string? HardwareVersion { get; set; } + +/// +/// Model ID reported by Arlo. +/// +[DataMember(Name = "model_id", IsRequired = false, EmitDefaultValue = false)] +public string? ModelId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAssaAbloyVostioMetadata_model")] +public class DevicePropertiesAssaAbloyVostioMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesAssaAbloyVostioMetadata() { } + +public DevicePropertiesAssaAbloyVostioMetadata(string? encoderName = default) +{ +EncoderName = encoderName; +} + +/// +/// Encoder name for an ASSA ABLOY Vostio system. +/// +[DataMember(Name = "encoder_name", IsRequired = false, EmitDefaultValue = false)] +public string? EncoderName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAugustMetadata_model")] +public class DevicePropertiesAugustMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesAugustMetadata() { } + +public DevicePropertiesAugustMetadata(bool? hasKeypad = default, string? houseId = default, string? houseName = default, string? keypadBatteryLevel = default, string? lockId = default, string? lockName = default, string? model = default) +{ +HasKeypad = hasKeypad; +HouseId = houseId; +HouseName = houseName; +KeypadBatteryLevel = keypadBatteryLevel; +LockId = lockId; +LockName = lockName; +Model = model; +} + +/// +/// Indicates whether an August device has a keypad. +/// +[DataMember(Name = "has_keypad", IsRequired = false, EmitDefaultValue = false)] +public bool? HasKeypad { get; set; } + +/// +/// House ID for an August device. +/// +[DataMember(Name = "house_id", IsRequired = false, EmitDefaultValue = false)] +public string? HouseId { get; set; } + +/// +/// House name for an August device. +/// +[DataMember(Name = "house_name", IsRequired = false, EmitDefaultValue = false)] +public string? HouseName { get; set; } + +/// +/// Keypad battery level for an August device. +/// +[DataMember(Name = "keypad_battery_level", IsRequired = false, EmitDefaultValue = false)] +public string? KeypadBatteryLevel { get; set; } + +/// +/// Lock ID for an August device. +/// +[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] +public string? LockId { get; set; } + +/// +/// Lock name for an August device. +/// +[DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] +public string? LockName { get; set; } + +/// +/// Model for an August device. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAvigilonAltaMetadata_model")] +public class DevicePropertiesAvigilonAltaMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesAvigilonAltaMetadata() { } + +public DevicePropertiesAvigilonAltaMetadata(string? entryName = default, float? entryRelaysTotalCount = default, string? orgName = default, float? siteId = default, string? siteName = default, float? zoneId = default, string? zoneName = default) +{ +EntryName = entryName; +EntryRelaysTotalCount = entryRelaysTotalCount; +OrgName = orgName; +SiteId = siteId; +SiteName = siteName; +ZoneId = zoneId; +ZoneName = zoneName; +} + +/// +/// Entry name for an Avigilon Alta system. +/// +[DataMember(Name = "entry_name", IsRequired = false, EmitDefaultValue = false)] +public string? EntryName { get; set; } + +/// +/// Total count of entry relays for an Avigilon Alta system. +/// +[DataMember(Name = "entry_relays_total_count", IsRequired = false, EmitDefaultValue = false)] +public float? EntryRelaysTotalCount { get; set; } + +/// +/// Organization name for an Avigilon Alta system. +/// +[DataMember(Name = "org_name", IsRequired = false, EmitDefaultValue = false)] +public string? OrgName { get; set; } + +/// +/// Site ID for an Avigilon Alta system. +/// +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public float? SiteId { get; set; } + +/// +/// Site name for an Avigilon Alta system. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +/// +/// Zone ID for an Avigilon Alta system. +/// +[DataMember(Name = "zone_id", IsRequired = false, EmitDefaultValue = false)] +public float? ZoneId { get; set; } + +/// +/// Zone name for an Avigilon Alta system. +/// +[DataMember(Name = "zone_name", IsRequired = false, EmitDefaultValue = false)] +public string? ZoneName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesBrivoMetadata_model")] +public class DevicePropertiesBrivoMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesBrivoMetadata() { } + +public DevicePropertiesBrivoMetadata(bool? activationEnabled = default, string? deviceName = default) +{ +ActivationEnabled = activationEnabled; +DeviceName = deviceName; +} + +/// +/// Indicates whether the Brivo access point has activation (remote unlock) enabled. +/// +[DataMember(Name = "activation_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? ActivationEnabled { get; set; } + +/// +/// Device name for a Brivo device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesControlbywebMetadata_model")] +public class DevicePropertiesControlbywebMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesControlbywebMetadata() { } + +public DevicePropertiesControlbywebMetadata(string? deviceId = default, string? deviceName = default, string? relayName = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +RelayName = relayName; +} + +/// +/// Device ID for a ControlByWeb device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a ControlByWeb device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Relay name for a ControlByWeb device. +/// +[DataMember(Name = "relay_name", IsRequired = false, EmitDefaultValue = false)] +public string? RelayName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeIhoMetadata_model")] +public class DevicePropertiesDormakabaOracodeIhoMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesDormakabaOracodeIhoMetadata() { } + +public DevicePropertiesDormakabaOracodeIhoMetadata(float? doorId = default, string? doorName = default, string? ianaTimezone = default, List? userLevels = default) +{ +DoorId = doorId; +DoorName = doorName; +IanaTimezone = ianaTimezone; +UserLevels = userLevels; +} + +/// +/// Door ID for a dormakaba Oracode Homeowner's Portal device. +/// +[DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] +public float? DoorId { get; set; } + +/// +/// Name of the door for a dormakaba Oracode Homeowner's Portal device. +/// +[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] +public string? DoorName { get; set; } + +/// +/// IANA time zone for a dormakaba Oracode Homeowner's Portal device. +/// +[DataMember(Name = "iana_timezone", IsRequired = false, EmitDefaultValue = false)] +public string? IanaTimezone { get; set; } + +/// +/// User levels for a dormakaba Oracode Homeowner's Portal device. +/// +[DataMember(Name = "user_levels", IsRequired = false, EmitDefaultValue = false)] +public List? UserLevels { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeIhoMetadataUserLevels_model")] +public class DevicePropertiesDormakabaOracodeIhoMetadataUserLevels +{ +[JsonConstructorAttribute] +protected DevicePropertiesDormakabaOracodeIhoMetadataUserLevels() { } + +public DevicePropertiesDormakabaOracodeIhoMetadataUserLevels(float? userLevel = default, string? userLevelCheckInTime = default, string? userLevelCheckOutTime = default, string? userLevelName = default, string? userLevelType = default) +{ +UserLevel = userLevel; +UserLevelCheckInTime = userLevelCheckInTime; +UserLevelCheckOutTime = userLevelCheckOutTime; +UserLevelName = userLevelName; +UserLevelType = userLevelType; +} + +[DataMember(Name = "user_level", IsRequired = false, EmitDefaultValue = false)] +public float? UserLevel { get; set; } + +[DataMember(Name = "user_level_check_in_time", IsRequired = false, EmitDefaultValue = false)] +public string? UserLevelCheckInTime { get; set; } + +[DataMember(Name = "user_level_check_out_time", IsRequired = false, EmitDefaultValue = false)] +public string? UserLevelCheckOutTime { get; set; } + +[DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] +public string? UserLevelName { get; set; } + +[DataMember(Name = "user_level_type", IsRequired = false, EmitDefaultValue = false)] +public string? UserLevelType { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeMetadata_model")] +public class DevicePropertiesDormakabaOracodeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesDormakabaOracodeMetadata() { } + +public DevicePropertiesDormakabaOracodeMetadata(string? deviceId = default, float? doorId = default, bool? doorIsWireless = default, string? doorName = default, string? ianaTimezone = default, List? predefinedTimeSlots = default, float? siteId = default, string? siteName = default) +{ +DeviceId = deviceId; +DoorId = doorId; +DoorIsWireless = doorIsWireless; +DoorName = doorName; +IanaTimezone = ianaTimezone; +PredefinedTimeSlots = predefinedTimeSlots; +SiteId = siteId; +SiteName = siteName; +} + +/// +/// Device ID for a dormakaba Oracode device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Door ID for a dormakaba Oracode device. +/// +[DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] +public float? DoorId { get; set; } + +/// +/// Indicates whether a door is wireless for a dormakaba Oracode device. +/// +[DataMember(Name = "door_is_wireless", IsRequired = false, EmitDefaultValue = false)] +public bool? DoorIsWireless { get; set; } + +/// +/// Door name for a dormakaba Oracode device. +/// +[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] +public string? DoorName { get; set; } + +/// +/// IANA time zone for a dormakaba Oracode device. +/// +[DataMember(Name = "iana_timezone", IsRequired = false, EmitDefaultValue = false)] +public string? IanaTimezone { get; set; } + +/// +/// Predefined time slots for a dormakaba Oracode device. +/// +[DataMember(Name = "predefined_time_slots", IsRequired = false, EmitDefaultValue = false)] +public List? PredefinedTimeSlots { get; set; } + +/// +/// Site ID for a dormakaba Oracode device. +/// +[Obsolete("Previously marked as \"@DEPRECATED.\"")] +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public float? SiteId { get; set; } + +/// +/// Site name for a dormakaba Oracode device. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots_model")] +public class DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots +{ +[JsonConstructorAttribute] +protected DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots() { } + +public DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots(string? checkInTime = default, string? checkOutTime = default, string? dormakabaOracodeUserLevelId = default, float? dormakabaOracodeUserLevelPrefix = default, bool? is_24Hour = default, bool? isBiweeklyMode = default, bool? isMaster = default, bool? isOneShot = default, string? name = default, float? prefix = default) +{ +CheckInTime = checkInTime; +CheckOutTime = checkOutTime; +DormakabaOracodeUserLevelId = dormakabaOracodeUserLevelId; +DormakabaOracodeUserLevelPrefix = dormakabaOracodeUserLevelPrefix; +Is_24Hour = is_24Hour; +IsBiweeklyMode = isBiweeklyMode; +IsMaster = isMaster; +IsOneShot = isOneShot; +Name = name; +Prefix = prefix; +} + +/// +/// Check in time for a time slot for a dormakaba Oracode device. +/// +[DataMember(Name = "check_in_time", IsRequired = false, EmitDefaultValue = false)] +public string? CheckInTime { get; set; } + +/// +/// Checkout time for a time slot for a dormakaba Oracode device. +/// +[DataMember(Name = "check_out_time", IsRequired = false, EmitDefaultValue = false)] +public string? CheckOutTime { get; set; } + +/// +/// ID of a user level for a dormakaba Oracode device. +/// +[DataMember(Name = "dormakaba_oracode_user_level_id", IsRequired = false, EmitDefaultValue = false)] +public string? DormakabaOracodeUserLevelId { get; set; } + +/// +/// Prefix for a user level for a dormakaba Oracode device. +/// +[DataMember(Name = "dormakaba_oracode_user_level_prefix", IsRequired = false, EmitDefaultValue = false)] +public float? DormakabaOracodeUserLevelPrefix { get; set; } + +/// +/// Indicates whether a time slot for a dormakaba Oracode device is a 24-hour time slot. +/// +[DataMember(Name = "is_24_hour", IsRequired = false, EmitDefaultValue = false)] +public bool? Is_24Hour { get; set; } + +/// +/// Indicates whether a time slot for a dormakaba Oracode device is in biweekly mode. +/// +[DataMember(Name = "is_biweekly_mode", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBiweeklyMode { get; set; } + +/// +/// Indicates whether a time slot for a dormakaba Oracode device is a master time slot. +/// +[DataMember(Name = "is_master", IsRequired = false, EmitDefaultValue = false)] +public bool? IsMaster { get; set; } + +/// +/// Indicates whether a time slot for a dormakaba Oracode device is a one-shot time slot. +/// +[DataMember(Name = "is_one_shot", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOneShot { get; set; } + +/// +/// Name of a time slot for a dormakaba Oracode device. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Prefix for a time slot for a dormakaba Oracode device. +/// +[DataMember(Name = "prefix", IsRequired = false, EmitDefaultValue = false)] +public float? Prefix { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesEcobeeMetadata_model")] +public class DevicePropertiesEcobeeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesEcobeeMetadata() { } + +public DevicePropertiesEcobeeMetadata(string? deviceName = default, string? ecobeeDeviceId = default) +{ +DeviceName = deviceName; +EcobeeDeviceId = ecobeeDeviceId; +} + +/// +/// Device name for an ecobee device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Device ID for an ecobee device. +/// +[DataMember(Name = "ecobee_device_id", IsRequired = false, EmitDefaultValue = false)] +public string? EcobeeDeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesFourSuitesMetadata_model")] +public class DevicePropertiesFourSuitesMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesFourSuitesMetadata() { } + +public DevicePropertiesFourSuitesMetadata(float? deviceId = default, string? deviceName = default, float? recloseDelayInSeconds = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +RecloseDelayInSeconds = recloseDelayInSeconds; +} + +/// +/// Device ID for a 4SUITES device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public float? DeviceId { get; set; } + +/// +/// Device name for a 4SUITES device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Reclose delay, in seconds, for a 4SUITES device. +/// +[DataMember(Name = "reclose_delay_in_seconds", IsRequired = false, EmitDefaultValue = false)] +public float? RecloseDelayInSeconds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesGenieMetadata_model")] +public class DevicePropertiesGenieMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesGenieMetadata() { } + +public DevicePropertiesGenieMetadata(string? deviceName = default, string? doorName = default) +{ +DeviceName = deviceName; +DoorName = doorName; +} + +/// +/// Lock name for a Genie device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Door name for a Genie device. +/// +[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] +public string? DoorName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesHoneywellResideoMetadata_model")] +public class DevicePropertiesHoneywellResideoMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesHoneywellResideoMetadata() { } + +public DevicePropertiesHoneywellResideoMetadata(string? deviceName = default, string? honeywellResideoDeviceId = default) +{ +DeviceName = deviceName; +HoneywellResideoDeviceId = honeywellResideoDeviceId; +} + +/// +/// Device name for a Honeywell Resideo device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Device ID for a Honeywell Resideo device. +/// +[DataMember(Name = "honeywell_resideo_device_id", IsRequired = false, EmitDefaultValue = false)] +public string? HoneywellResideoDeviceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesIglooMetadata_model")] +public class DevicePropertiesIglooMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesIglooMetadata() { } + +public DevicePropertiesIglooMetadata(string? bridgeId = default, string? deviceId = default, string? model = default) +{ +BridgeId = bridgeId; +DeviceId = deviceId; +Model = model; +} + +/// +/// Bridge ID for an igloo device. +/// +[DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] +public string? BridgeId { get; set; } + +/// +/// Device ID for an igloo device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Model for an igloo device. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesIgloohomeMetadata_model")] +public class DevicePropertiesIgloohomeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesIgloohomeMetadata() { } + +public DevicePropertiesIgloohomeMetadata(string? bridgeId = default, string? bridgeName = default, string? deviceId = default, string? deviceName = default, bool? isAccessoryKeypadLinkedToBridge = default, string? keypadId = default) +{ +BridgeId = bridgeId; +BridgeName = bridgeName; +DeviceId = deviceId; +DeviceName = deviceName; +IsAccessoryKeypadLinkedToBridge = isAccessoryKeypadLinkedToBridge; +KeypadId = keypadId; +} + +/// +/// Bridge ID for an igloohome device. +/// +[DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] +public string? BridgeId { get; set; } + +/// +/// Bridge name for an igloohome device. +/// +[DataMember(Name = "bridge_name", IsRequired = false, EmitDefaultValue = false)] +public string? BridgeName { get; set; } + +/// +/// Device ID for an igloohome device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for an igloohome device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Indicates whether a keypad is linked to a bridge for an igloohome device. +/// +[DataMember(Name = "is_accessory_keypad_linked_to_bridge", IsRequired = false, EmitDefaultValue = false)] +public bool? IsAccessoryKeypadLinkedToBridge { get; set; } + +/// +/// Keypad ID for an igloohome device. +/// +[DataMember(Name = "keypad_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeypadId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesKeynestMetadata_model")] +public class DevicePropertiesKeynestMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesKeynestMetadata() { } + +public DevicePropertiesKeynestMetadata(string? address = default, float? currentOrLastStoreId = default, string? currentStatus = default, string? currentUserCompany = default, string? currentUserEmail = default, string? currentUserName = default, string? currentUserPhoneNumber = default, float? defaultOfficeId = default, string? deviceName = default, float? fobId = default, string? handoverMethod = default, bool? hasPhoto = default, bool? isQuadientLocker = default, string? keyId = default, string? keyNotes = default, string? keynestAppUser = default, string? lastMovement = default, string? propertyId = default, string? propertyPostcode = default, string? statusType = default, string? subscriptionPlan = default) +{ +Address = address; +CurrentOrLastStoreId = currentOrLastStoreId; +CurrentStatus = currentStatus; +CurrentUserCompany = currentUserCompany; +CurrentUserEmail = currentUserEmail; +CurrentUserName = currentUserName; +CurrentUserPhoneNumber = currentUserPhoneNumber; +DefaultOfficeId = defaultOfficeId; +DeviceName = deviceName; +FobId = fobId; +HandoverMethod = handoverMethod; +HasPhoto = hasPhoto; +IsQuadientLocker = isQuadientLocker; +KeyId = keyId; +KeyNotes = keyNotes; +KeynestAppUser = keynestAppUser; +LastMovement = lastMovement; +PropertyId = propertyId; +PropertyPostcode = propertyPostcode; +StatusType = statusType; +SubscriptionPlan = subscriptionPlan; +} + +/// +/// Address for a KeyNest device. +/// +[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] +public string? Address { get; set; } + +/// +/// Current or last store ID for a KeyNest device. +/// +[DataMember(Name = "current_or_last_store_id", IsRequired = false, EmitDefaultValue = false)] +public float? CurrentOrLastStoreId { get; set; } + +/// +/// Current status for a KeyNest device. +/// +[DataMember(Name = "current_status", IsRequired = false, EmitDefaultValue = false)] +public string? CurrentStatus { get; set; } + +/// +/// Current user company for a KeyNest device. +/// +[DataMember(Name = "current_user_company", IsRequired = false, EmitDefaultValue = false)] +public string? CurrentUserCompany { get; set; } + +/// +/// Current user email for a KeyNest device. +/// +[DataMember(Name = "current_user_email", IsRequired = false, EmitDefaultValue = false)] +public string? CurrentUserEmail { get; set; } + +/// +/// Current user name for a KeyNest device. +/// +[DataMember(Name = "current_user_name", IsRequired = false, EmitDefaultValue = false)] +public string? CurrentUserName { get; set; } + +/// +/// Current user phone number for a KeyNest device. +/// +[DataMember(Name = "current_user_phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? CurrentUserPhoneNumber { get; set; } + +/// +/// Default office ID for a KeyNest device. +/// +[DataMember(Name = "default_office_id", IsRequired = false, EmitDefaultValue = false)] +public float? DefaultOfficeId { get; set; } + +/// +/// Device name for a KeyNest device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Fob ID for a KeyNest device. +/// +[DataMember(Name = "fob_id", IsRequired = false, EmitDefaultValue = false)] +public float? FobId { get; set; } + +/// +/// Handover method for a KeyNest device. +/// +[DataMember(Name = "handover_method", IsRequired = false, EmitDefaultValue = false)] +public string? HandoverMethod { get; set; } + +/// +/// Whether the KeyNest device has a photo. +/// +[DataMember(Name = "has_photo", IsRequired = false, EmitDefaultValue = false)] +public bool? HasPhoto { get; set; } + +/// +/// Whether the key is in a locker that does not support the access codes API. +/// +[DataMember(Name = "is_quadient_locker", IsRequired = false, EmitDefaultValue = false)] +public bool? IsQuadientLocker { get; set; } + +/// +/// Key ID for a KeyNest device. +/// +[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] +public string? KeyId { get; set; } + +/// +/// Key notes for a KeyNest device. +/// +[DataMember(Name = "key_notes", IsRequired = false, EmitDefaultValue = false)] +public string? KeyNotes { get; set; } + +/// +/// KeyNest app user for a KeyNest device. +/// +[DataMember(Name = "keynest_app_user", IsRequired = false, EmitDefaultValue = false)] +public string? KeynestAppUser { get; set; } + +/// +/// Last movement timestamp for a KeyNest device. +/// +[DataMember(Name = "last_movement", IsRequired = false, EmitDefaultValue = false)] +public string? LastMovement { get; set; } + +/// +/// Property ID for a KeyNest device. +/// +[DataMember(Name = "property_id", IsRequired = false, EmitDefaultValue = false)] +public string? PropertyId { get; set; } + +/// +/// Property postcode for a KeyNest device. +/// +[DataMember(Name = "property_postcode", IsRequired = false, EmitDefaultValue = false)] +public string? PropertyPostcode { get; set; } + +/// +/// Status type for a KeyNest device. +/// +[DataMember(Name = "status_type", IsRequired = false, EmitDefaultValue = false)] +public string? StatusType { get; set; } + +/// +/// Subscription plan for a KeyNest device. +/// +[DataMember(Name = "subscription_plan", IsRequired = false, EmitDefaultValue = false)] +public string? SubscriptionPlan { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesKisiMetadata_model")] +public class DevicePropertiesKisiMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesKisiMetadata() { } + +public DevicePropertiesKisiMetadata(string? description = default, float? lockId = default, string? lockName = default, string? placeName = default) +{ +Description = description; +LockId = lockId; +LockName = lockName; +PlaceName = placeName; +} + +/// +/// Description for a Kisi device. +/// +[DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] +public string? Description { get; set; } + +/// +/// Lock ID for a Kisi device. +/// +[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] +public float? LockId { get; set; } + +/// +/// Lock name for a Kisi device. +/// +[DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] +public string? LockName { get; set; } + +/// +/// Place name for a Kisi device. +/// +[DataMember(Name = "place_name", IsRequired = false, EmitDefaultValue = false)] +public string? PlaceName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesKorelockMetadata_model")] +public class DevicePropertiesKorelockMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesKorelockMetadata() { } + +public DevicePropertiesKorelockMetadata(string? deviceId = default, string? deviceName = default, string? firmwareVersion = default, string? locationId = default, string? modelCode = default, string? serialNumber = default, float? wifiSignalStrength = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +FirmwareVersion = firmwareVersion; +LocationId = locationId; +ModelCode = modelCode; +SerialNumber = serialNumber; +WifiSignalStrength = wifiSignalStrength; +} + +/// +/// Device ID for a Korelock device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Korelock device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Firmware version for a Korelock device. +/// +[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] +public string? FirmwareVersion { get; set; } + +/// +/// Location ID for a Korelock device. Required for timebound access codes. +/// +[DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] +public string? LocationId { get; set; } + +/// +/// Model code for a Korelock device. +/// +[DataMember(Name = "model_code", IsRequired = false, EmitDefaultValue = false)] +public string? ModelCode { get; set; } + +/// +/// Serial number for a Korelock device. +/// +[DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] +public string? SerialNumber { get; set; } + +/// +/// WiFi signal strength (0-1) for a Korelock device. +/// +[DataMember(Name = "wifi_signal_strength", IsRequired = false, EmitDefaultValue = false)] +public float? WifiSignalStrength { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesKwiksetMetadata_model")] +public class DevicePropertiesKwiksetMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesKwiksetMetadata() { } + +public DevicePropertiesKwiksetMetadata(string? deviceId = default, string? deviceName = default, string? modelNumber = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +ModelNumber = modelNumber; +} + +/// +/// Device ID for a Kwikset device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Kwikset device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Model number for a Kwikset device. +/// +[DataMember(Name = "model_number", IsRequired = false, EmitDefaultValue = false)] +public string? ModelNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesLocklyMetadata_model")] +public class DevicePropertiesLocklyMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesLocklyMetadata() { } + +public DevicePropertiesLocklyMetadata(string? deviceId = default, string? deviceName = default, string? model = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +Model = model; +} + +/// +/// Device ID for a Lockly device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Lockly device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Model for a Lockly device. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesMinutMetadata_model")] +public class DevicePropertiesMinutMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesMinutMetadata() { } + +public DevicePropertiesMinutMetadata(string? deviceId = default, string? deviceName = default, DevicePropertiesMinutMetadataLatestSensorValues? latestSensorValues = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +LatestSensorValues = latestSensorValues; +} + +/// +/// Device ID for a Minut device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Minut device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Latest sensor values for a Minut device. +/// +[DataMember(Name = "latest_sensor_values", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesMinutMetadataLatestSensorValues? LatestSensorValues { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValues_model")] +public class DevicePropertiesMinutMetadataLatestSensorValues +{ +[JsonConstructorAttribute] +protected DevicePropertiesMinutMetadataLatestSensorValues() { } + +public DevicePropertiesMinutMetadataLatestSensorValues(DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ? accelerometerZ = default, DevicePropertiesMinutMetadataLatestSensorValuesHumidity? humidity = default, DevicePropertiesMinutMetadataLatestSensorValuesPressure? pressure = default, DevicePropertiesMinutMetadataLatestSensorValuesSound? sound = default, DevicePropertiesMinutMetadataLatestSensorValuesTemperature? temperature = default) +{ +AccelerometerZ = accelerometerZ; +Humidity = humidity; +Pressure = pressure; +Sound = sound; +Temperature = temperature; +} + +/// +/// Latest accelerometer Z-axis reading for a Minut device. +/// +[DataMember(Name = "accelerometer_z", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ? AccelerometerZ { get; set; } + +/// +/// Latest humidity reading for a Minut device. +/// +[DataMember(Name = "humidity", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesMinutMetadataLatestSensorValuesHumidity? Humidity { get; set; } + +/// +/// Latest pressure reading for a Minut device. +/// +[DataMember(Name = "pressure", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesMinutMetadataLatestSensorValuesPressure? Pressure { get; set; } + +/// +/// Latest sound reading for a Minut device. +/// +[DataMember(Name = "sound", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesMinutMetadataLatestSensorValuesSound? Sound { get; set; } + +/// +/// Latest temperature reading for a Minut device. +/// +[DataMember(Name = "temperature", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesMinutMetadataLatestSensorValuesTemperature? Temperature { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ_model")] +public class DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ +{ +[JsonConstructorAttribute] +protected DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ() { } + +public DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ(string? time = default, float? value = default) +{ +Time = time; +Value = value; +} + +/// +/// Time of latest accelerometer Z-axis reading for a Minut device. +/// +[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] +public string? Time { get; set; } + +/// +/// Value of latest accelerometer Z-axis reading for a Minut device. +/// +[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] +public float? Value { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesHumidity_model")] +public class DevicePropertiesMinutMetadataLatestSensorValuesHumidity +{ +[JsonConstructorAttribute] +protected DevicePropertiesMinutMetadataLatestSensorValuesHumidity() { } + +public DevicePropertiesMinutMetadataLatestSensorValuesHumidity(string? time = default, float? value = default) +{ +Time = time; +Value = value; +} + +/// +/// Time of latest humidity reading for a Minut device. +/// +[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] +public string? Time { get; set; } + +/// +/// Value of latest humidity reading for a Minut device. +/// +[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] +public float? Value { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesPressure_model")] +public class DevicePropertiesMinutMetadataLatestSensorValuesPressure +{ +[JsonConstructorAttribute] +protected DevicePropertiesMinutMetadataLatestSensorValuesPressure() { } + +public DevicePropertiesMinutMetadataLatestSensorValuesPressure(string? time = default, float? value = default) +{ +Time = time; +Value = value; +} + +/// +/// Time of latest pressure reading for a Minut device. +/// +[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] +public string? Time { get; set; } + +/// +/// Value of latest pressure reading for a Minut device. +/// +[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] +public float? Value { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesSound_model")] +public class DevicePropertiesMinutMetadataLatestSensorValuesSound +{ +[JsonConstructorAttribute] +protected DevicePropertiesMinutMetadataLatestSensorValuesSound() { } + +public DevicePropertiesMinutMetadataLatestSensorValuesSound(string? time = default, float? value = default) +{ +Time = time; +Value = value; +} + +/// +/// Time of latest sound reading for a Minut device. +/// +[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] +public string? Time { get; set; } + +/// +/// Value of latest sound reading for a Minut device. +/// +[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] +public float? Value { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesTemperature_model")] +public class DevicePropertiesMinutMetadataLatestSensorValuesTemperature +{ +[JsonConstructorAttribute] +protected DevicePropertiesMinutMetadataLatestSensorValuesTemperature() { } + +public DevicePropertiesMinutMetadataLatestSensorValuesTemperature(string? time = default, float? value = default) +{ +Time = time; +Value = value; +} + +/// +/// Time of latest temperature reading for a Minut device. +/// +[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] +public string? Time { get; set; } + +/// +/// Value of latest temperature reading for a Minut device. +/// +[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] +public float? Value { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesNestMetadata_model")] +public class DevicePropertiesNestMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesNestMetadata() { } + +public DevicePropertiesNestMetadata(string? deviceCustomName = default, string? deviceName = default, string? displayName = default, string? nestDeviceId = default, string? nestStructureId = default, string? structureName = default) +{ +DeviceCustomName = deviceCustomName; +DeviceName = deviceName; +DisplayName = displayName; +NestDeviceId = nestDeviceId; +NestStructureId = nestStructureId; +StructureName = structureName; +} + +/// +/// Custom device name for a Google Nest device. The device owner sets this value. +/// +[DataMember(Name = "device_custom_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceCustomName { get; set; } + +/// +/// Device name for a Google Nest device. Google sets this value. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Name of the Google Home room containing the device. The device owner sets this value. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string? DisplayName { get; set; } + +/// +/// Device ID for a Google Nest device. +/// +[DataMember(Name = "nest_device_id", IsRequired = false, EmitDefaultValue = false)] +public string? NestDeviceId { get; set; } + +/// +/// ID of the Google Nest structure containing the device. +/// +[DataMember(Name = "nest_structure_id", IsRequired = false, EmitDefaultValue = false)] +public string? NestStructureId { get; set; } + +/// +/// Name of the Google Nest structure containing the device. The device owner sets this value. +/// +[DataMember(Name = "structure_name", IsRequired = false, EmitDefaultValue = false)] +public string? StructureName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesNoiseawareMetadata_model")] +public class DevicePropertiesNoiseawareMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesNoiseawareMetadata() { } + +public DevicePropertiesNoiseawareMetadata(string? deviceId = default, DevicePropertiesNoiseawareMetadata.DeviceModelEnum? deviceModel = default, string? deviceName = default, float? noiseLevelDecibel = default, float? noiseLevelNrs = default) +{ +DeviceId = deviceId; +DeviceModel = deviceModel; +DeviceName = deviceName; +NoiseLevelDecibel = noiseLevelDecibel; +NoiseLevelNrs = noiseLevelNrs; +} + +/// +/// Device model for a NoiseAware device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceModelEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "indoor")] +Indoor = 1, + +[EnumMember(Value = "outdoor")] +Outdoor = 2, +} + +/// +/// Device ID for a NoiseAware device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device model for a NoiseAware device. +/// +[DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesNoiseawareMetadata.DeviceModelEnum? DeviceModel { get; set; } + +/// +/// Device name for a NoiseAware device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Noise level, in decibels, for a NoiseAware device. +/// +[DataMember(Name = "noise_level_decibel", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseLevelDecibel { get; set; } + +/// +/// Noise level, expressed as a Noise Risk Score (NRS), for a NoiseAware device. +/// +[DataMember(Name = "noise_level_nrs", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseLevelNrs { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesNukiMetadata_model")] +public class DevicePropertiesNukiMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesNukiMetadata() { } + +public DevicePropertiesNukiMetadata(string? deviceId = default, string? deviceName = default, bool? keypad_2Paired = default, bool? keypadBatteryCritical = default, bool? keypadPaired = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +Keypad_2Paired = keypad_2Paired; +KeypadBatteryCritical = keypadBatteryCritical; +KeypadPaired = keypadPaired; +} + +/// +/// Device ID for a Nuki device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Nuki device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Indicates whether keypad 2 is paired for a Nuki device. +/// +[DataMember(Name = "keypad_2_paired", IsRequired = false, EmitDefaultValue = false)] +public bool? Keypad_2Paired { get; set; } + +/// +/// Indicates whether the keypad battery is in a critical state for a Nuki device. +/// +[DataMember(Name = "keypad_battery_critical", IsRequired = false, EmitDefaultValue = false)] +public bool? KeypadBatteryCritical { get; set; } + +/// +/// Indicates whether the keypad is paired for a Nuki device. +/// +[DataMember(Name = "keypad_paired", IsRequired = false, EmitDefaultValue = false)] +public bool? KeypadPaired { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesOmnitecMetadata_model")] +public class DevicePropertiesOmnitecMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesOmnitecMetadata() { } + +public DevicePropertiesOmnitecMetadata(bool? hasGateway = default, string? lockAlias = default, float? lockId = default, string? lockMac = default, string? lockName = default, string? timeZone = default, float? timezoneRawOffsetMs = default) +{ +HasGateway = hasGateway; +LockAlias = lockAlias; +LockId = lockId; +LockMac = lockMac; +LockName = lockName; +TimeZone = timeZone; +TimezoneRawOffsetMs = timezoneRawOffsetMs; +} + +/// +/// Whether the Omnitec lock has a connected gateway for remote operations. +/// +[DataMember(Name = "has_gateway", IsRequired = false, EmitDefaultValue = false)] +public bool? HasGateway { get; set; } + +/// +/// Operator-assigned alias for an Omnitec device. +/// +[DataMember(Name = "lock_alias", IsRequired = false, EmitDefaultValue = false)] +public string? LockAlias { get; set; } + +/// +/// Lock ID for an Omnitec device. +/// +[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] +public float? LockId { get; set; } + +/// +/// Bluetooth MAC address for an Omnitec device. +/// +[DataMember(Name = "lock_mac", IsRequired = false, EmitDefaultValue = false)] +public string? LockMac { get; set; } + +/// +/// Lock name for an Omnitec device. +/// +[DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] +public string? LockName { get; set; } + +/// +/// IANA time zone for the Omnitec device, used to schedule time-bound access codes at the correct local time (accounting for DST). +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +/// +/// Static UTC offset of the Omnitec lock in milliseconds. Does not account for DST. +/// +[DataMember(Name = "timezone_raw_offset_ms", IsRequired = false, EmitDefaultValue = false)] +public float? TimezoneRawOffsetMs { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesReolinkMetadata_model")] +public class DevicePropertiesReolinkMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesReolinkMetadata() { } + +public DevicePropertiesReolinkMetadata(string? firmwareVersion = default, string? hardwareVersion = default, string? model = default) +{ +FirmwareVersion = firmwareVersion; +HardwareVersion = hardwareVersion; +Model = model; +} + +/// +/// Firmware version reported by the camera. +/// +[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] +public string? FirmwareVersion { get; set; } + +/// +/// Hardware version reported by the camera. +/// +[DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] +public string? HardwareVersion { get; set; } + +/// +/// Model reported by the Reolink camera. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesRingMetadata_model")] +public class DevicePropertiesRingMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesRingMetadata() { } + +public DevicePropertiesRingMetadata(string? deviceId = default, string? deviceName = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +} + +/// +/// Device ID for a Ring device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Ring device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesSaltoKsMetadata_model")] +public class DevicePropertiesSaltoKsMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesSaltoKsMetadata() { } + +public DevicePropertiesSaltoKsMetadata(string? batteryLevel = default, string? customerReference = default, bool? hasCustomPinSubscription = default, string? lockId = default, string? lockType = default, string? lockedState = default, string? model = default, string? siteId = default, string? siteName = default) +{ +BatteryLevel = batteryLevel; +CustomerReference = customerReference; +HasCustomPinSubscription = hasCustomPinSubscription; +LockId = lockId; +LockType = lockType; +LockedState = lockedState; +Model = model; +SiteId = siteId; +SiteName = siteName; +} + +/// +/// Battery level for a Salto KS device. +/// +[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] +public string? BatteryLevel { get; set; } + +/// +/// Customer reference for a Salto KS device. +/// +[DataMember(Name = "customer_reference", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerReference { get; set; } + +/// +/// Indicates whether the site has a Salto KS subscription that supports custom PINs. +/// +[DataMember(Name = "has_custom_pin_subscription", IsRequired = false, EmitDefaultValue = false)] +public bool? HasCustomPinSubscription { get; set; } + +/// +/// Lock ID for a Salto KS device. +/// +[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] +public string? LockId { get; set; } + +/// +/// Lock type for a Salto KS device. +/// +[DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] +public string? LockType { get; set; } + +/// +/// Locked state for a Salto KS device. +/// +[DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] +public string? LockedState { get; set; } + +/// +/// Model for a Salto KS device. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +/// +/// Site ID for the Salto KS site to which the device belongs. +/// +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public string? SiteId { get; set; } + +/// +/// Site name for the Salto KS site to which the device belongs. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesSaltoMetadata_model")] +public class DevicePropertiesSaltoMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesSaltoMetadata() { } + +public DevicePropertiesSaltoMetadata(string? batteryLevel = default, string? customerReference = default, string? lockId = default, string? lockType = default, string? lockedState = default, string? model = default, string? siteId = default, string? siteName = default) +{ +BatteryLevel = batteryLevel; +CustomerReference = customerReference; +LockId = lockId; +LockType = lockType; +LockedState = lockedState; +Model = model; +SiteId = siteId; +SiteName = siteName; +} + +/// +/// Battery level for a Salto device. +/// +[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] +public string? BatteryLevel { get; set; } + +/// +/// Customer reference for a Salto device. +/// +[DataMember(Name = "customer_reference", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerReference { get; set; } + +/// +/// Lock ID for a Salto device. +/// +[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] +public string? LockId { get; set; } + +/// +/// Lock type for a Salto device. +/// +[DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] +public string? LockType { get; set; } + +/// +/// Locked state for a Salto device. +/// +[DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] +public string? LockedState { get; set; } + +/// +/// Model for a Salto device. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +/// +/// Site ID for the Salto KS site to which the device belongs. +/// +[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] +public string? SiteId { get; set; } + +/// +/// Site name for the Salto KS site to which the device belongs. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesSchlageMetadata_model")] +public class DevicePropertiesSchlageMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesSchlageMetadata() { } + +public DevicePropertiesSchlageMetadata(string? deviceId = default, string? deviceName = default, string? model = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +Model = model; +} + +/// +/// Device ID for a Schlage device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Schlage device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Model for a Schlage device. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesSeamBridgeMetadata_model")] +public class DevicePropertiesSeamBridgeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesSeamBridgeMetadata() { } + +public DevicePropertiesSeamBridgeMetadata(float? deviceNum = default, string? name = default, DevicePropertiesSeamBridgeMetadata.UnlockMethodEnum? unlockMethod = default) +{ +DeviceNum = deviceNum; +Name = name; +UnlockMethod = unlockMethod; +} + +/// +/// Unlock method for Seam Bridge. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum UnlockMethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "bridge")] +Bridge = 1, + +[EnumMember(Value = "doorking")] +Doorking = 2, +} + +/// +/// Device number for Seam Bridge. +/// +[DataMember(Name = "device_num", IsRequired = false, EmitDefaultValue = false)] +public float? DeviceNum { get; set; } + +/// +/// Name for Seam Bridge. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Unlock method for Seam Bridge. +/// +[DataMember(Name = "unlock_method", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesSeamBridgeMetadata.UnlockMethodEnum? UnlockMethod { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesSensiMetadata_model")] +public class DevicePropertiesSensiMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesSensiMetadata() { } + +public DevicePropertiesSensiMetadata(string? deviceId = default, string? deviceName = default, bool? dualSetpointsNotSupported = default, string? productType = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +DualSetpointsNotSupported = dualSetpointsNotSupported; +ProductType = productType; +} + +/// +/// Device ID for a Sensi device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Sensi device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Set to true when the device does not support the /dual-setpoints API endpoint. +/// +[DataMember(Name = "dual_setpoints_not_supported", IsRequired = false, EmitDefaultValue = false)] +public bool? DualSetpointsNotSupported { get; set; } + +/// +/// Product type for a Sensi device. +/// +[DataMember(Name = "product_type", IsRequired = false, EmitDefaultValue = false)] +public string? ProductType { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesSmartthingsMetadata_model")] +public class DevicePropertiesSmartthingsMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesSmartthingsMetadata() { } + +public DevicePropertiesSmartthingsMetadata(string? deviceId = default, string? deviceName = default, string? locationId = default, string? model = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +LocationId = locationId; +Model = model; +} + +/// +/// Device ID for a SmartThings device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a SmartThings device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Location ID for a SmartThings device. +/// +[DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] +public string? LocationId { get; set; } + +/// +/// Model for a SmartThings device. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesTadoMetadata_model")] +public class DevicePropertiesTadoMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesTadoMetadata() { } + +public DevicePropertiesTadoMetadata(string? deviceType = default, string? serialNo = default) +{ +DeviceType = deviceType; +SerialNo = serialNo; +} + +/// +/// Device type for a tado° device. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceType { get; set; } + +/// +/// Serial number for a tado° device. +/// +[DataMember(Name = "serial_no", IsRequired = false, EmitDefaultValue = false)] +public string? SerialNo { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesTapoMetadata_model")] +public class DevicePropertiesTapoMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesTapoMetadata() { } + +public DevicePropertiesTapoMetadata(string? firmwareVersion = default, string? hardwareVersion = default, string? model = default) +{ +FirmwareVersion = firmwareVersion; +HardwareVersion = hardwareVersion; +Model = model; +} + +/// +/// Firmware version reported by the camera. +/// +[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] +public string? FirmwareVersion { get; set; } + +/// +/// Hardware version reported by the camera. +/// +[DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] +public string? HardwareVersion { get; set; } + +/// +/// Model reported by the Tapo camera. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public string? Model { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesTedeeMetadata_model")] +public class DevicePropertiesTedeeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesTedeeMetadata() { } + +public DevicePropertiesTedeeMetadata(float? bridgeId = default, string? bridgeName = default, float? deviceId = default, string? deviceModel = default, string? deviceName = default, float? keypadId = default, string? serialNumber = default) +{ +BridgeId = bridgeId; +BridgeName = bridgeName; +DeviceId = deviceId; +DeviceModel = deviceModel; +DeviceName = deviceName; +KeypadId = keypadId; +SerialNumber = serialNumber; +} + +/// +/// Bridge ID for a Tedee device. +/// +[DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] +public float? BridgeId { get; set; } + +/// +/// Bridge name for a Tedee device. +/// +[DataMember(Name = "bridge_name", IsRequired = false, EmitDefaultValue = false)] +public string? BridgeName { get; set; } + +/// +/// Device ID for a Tedee device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public float? DeviceId { get; set; } + +/// +/// Device model for a Tedee device. +/// +[DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceModel { get; set; } + +/// +/// Device name for a Tedee device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Keypad ID for a Tedee device. +/// +[DataMember(Name = "keypad_id", IsRequired = false, EmitDefaultValue = false)] +public float? KeypadId { get; set; } + +/// +/// Serial number for a Tedee device. +/// +[DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] +public string? SerialNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesTtlockMetadata_model")] +public class DevicePropertiesTtlockMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesTtlockMetadata() { } + +public DevicePropertiesTtlockMetadata(string? featureValue = default, DevicePropertiesTtlockMetadataFeatures? features = default, bool? hasGateway = default, string? lockAlias = default, float? lockId = default, float? timezoneRawOffsetMs = default, List? wirelessKeypads = default) +{ +FeatureValue = featureValue; +Features = features; +HasGateway = hasGateway; +LockAlias = lockAlias; +LockId = lockId; +TimezoneRawOffsetMs = timezoneRawOffsetMs; +WirelessKeypads = wirelessKeypads; +} + +/// +/// Feature value for a TTLock device. +/// +[DataMember(Name = "feature_value", IsRequired = false, EmitDefaultValue = false)] +public string? FeatureValue { get; set; } + +/// +/// Features for a TTLock device. +/// +[DataMember(Name = "features", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesTtlockMetadataFeatures? Features { get; set; } + +/// +/// Indicates whether a TTLock device has a gateway. +/// +[DataMember(Name = "has_gateway", IsRequired = false, EmitDefaultValue = false)] +public bool? HasGateway { get; set; } + +/// +/// Lock alias for a TTLock device. +/// +[DataMember(Name = "lock_alias", IsRequired = false, EmitDefaultValue = false)] +public string? LockAlias { get; set; } + +/// +/// Lock ID for a TTLock device. +/// +[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] +public float? LockId { get; set; } + +/// +/// Lock-side timezone offset in milliseconds east of UTC, as configured in the TTLock app. Source of truth for the lock's wall-clock interpretation of access code start/end times — a misconfigured value here is the typical cause of customer "codes offset by N hours" reports. Diagnostic only; Seam does not convert times based on this value. +/// +[DataMember(Name = "timezone_raw_offset_ms", IsRequired = false, EmitDefaultValue = false)] +public float? TimezoneRawOffsetMs { get; set; } + +/// +/// Wireless keypads for a TTLock device. +/// +[DataMember(Name = "wireless_keypads", IsRequired = false, EmitDefaultValue = false)] +public List? WirelessKeypads { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesTtlockMetadataFeatures_model")] +public class DevicePropertiesTtlockMetadataFeatures +{ +[JsonConstructorAttribute] +protected DevicePropertiesTtlockMetadataFeatures() { } + +public DevicePropertiesTtlockMetadataFeatures(bool? autoLockTimeConfig = default, bool? incompleteKeyboardPasscode = default, bool? lockCommand = default, bool? passcode = default, bool? passcodeManagement = default, bool? unlockViaGateway = default, bool? wifi = default) +{ +AutoLockTimeConfig = autoLockTimeConfig; +IncompleteKeyboardPasscode = incompleteKeyboardPasscode; +LockCommand = lockCommand; +Passcode = passcode; +PasscodeManagement = passcodeManagement; +UnlockViaGateway = unlockViaGateway; +Wifi = wifi; +} + +/// +/// Indicates whether a TTLock device supports auto-lock time configuration. +/// +[DataMember(Name = "auto_lock_time_config", IsRequired = false, EmitDefaultValue = false)] +public bool? AutoLockTimeConfig { get; set; } + +/// +/// Indicates whether a TTLock device supports an incomplete keyboard passcode. +/// +[DataMember(Name = "incomplete_keyboard_passcode", IsRequired = false, EmitDefaultValue = false)] +public bool? IncompleteKeyboardPasscode { get; set; } + +/// +/// Indicates whether a TTLock device supports the lock command. +/// +[DataMember(Name = "lock_command", IsRequired = false, EmitDefaultValue = false)] +public bool? LockCommand { get; set; } + +/// +/// Indicates whether a TTLock device supports a passcode. +/// +[DataMember(Name = "passcode", IsRequired = false, EmitDefaultValue = false)] +public bool? Passcode { get; set; } + +/// +/// Indicates whether a TTLock device supports passcode management. +/// +[DataMember(Name = "passcode_management", IsRequired = false, EmitDefaultValue = false)] +public bool? PasscodeManagement { get; set; } + +/// +/// Indicates whether a TTLock device supports unlock via gateway. +/// +[DataMember(Name = "unlock_via_gateway", IsRequired = false, EmitDefaultValue = false)] +public bool? UnlockViaGateway { get; set; } + +/// +/// Indicates whether a TTLock device supports Wi-Fi. +/// +[DataMember(Name = "wifi", IsRequired = false, EmitDefaultValue = false)] +public bool? Wifi { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesTtlockMetadataWirelessKeypads_model")] +public class DevicePropertiesTtlockMetadataWirelessKeypads +{ +[JsonConstructorAttribute] +protected DevicePropertiesTtlockMetadataWirelessKeypads() { } + +public DevicePropertiesTtlockMetadataWirelessKeypads(float? wirelessKeypadId = default, string? wirelessKeypadName = default) +{ +WirelessKeypadId = wirelessKeypadId; +WirelessKeypadName = wirelessKeypadName; +} + +/// +/// ID for a wireless keypad for a TTLock device. +/// +[DataMember(Name = "wireless_keypad_id", IsRequired = false, EmitDefaultValue = false)] +public float? WirelessKeypadId { get; set; } + +/// +/// Name for a wireless keypad for a TTLock device. +/// +[DataMember(Name = "wireless_keypad_name", IsRequired = false, EmitDefaultValue = false)] +public string? WirelessKeypadName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesTwoNMetadata_model")] +public class DevicePropertiesTwoNMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesTwoNMetadata() { } + +public DevicePropertiesTwoNMetadata(float? deviceId = default, string? deviceName = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +} + +/// +/// Device ID for a 2N device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public float? DeviceId { get; set; } + +/// +/// Device name for a 2N device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesUltraloqMetadata_model")] +public class DevicePropertiesUltraloqMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesUltraloqMetadata() { } + +public DevicePropertiesUltraloqMetadata(string? deviceId = default, string? deviceName = default, string? deviceType = default, string? timeZone = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +DeviceType = deviceType; +TimeZone = timeZone; +} + +/// +/// Device ID for an Ultraloq device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for an Ultraloq device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Device type for an Ultraloq device. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceType { get; set; } + +/// +/// IANA timezone for the Ultraloq device. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesVisionlineMetadata_model")] +public class DevicePropertiesVisionlineMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesVisionlineMetadata() { } + +public DevicePropertiesVisionlineMetadata(string? encoderId = default) +{ +EncoderId = encoderId; +} + +/// +/// Encoder ID for an ASSA ABLOY Visionline system. +/// +[DataMember(Name = "encoder_id", IsRequired = false, EmitDefaultValue = false)] +public string? EncoderId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesWyzeMetadata_model")] +public class DevicePropertiesWyzeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesWyzeMetadata() { } + +public DevicePropertiesWyzeMetadata(string? deviceId = default, string? deviceInfoModel = default, string? deviceName = default, string? keypadUuid = default, float? lockerStatusHardlock = default, string? productModel = default, string? productName = default, string? productType = default) +{ +DeviceId = deviceId; +DeviceInfoModel = deviceInfoModel; +DeviceName = deviceName; +KeypadUuid = keypadUuid; +LockerStatusHardlock = lockerStatusHardlock; +ProductModel = productModel; +ProductName = productName; +ProductType = productType; +} + +/// +/// Device ID for a Wyze device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device information model for a Wyze device. +/// +[DataMember(Name = "device_info_model", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceInfoModel { get; set; } + +/// +/// Device name for a Wyze device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Keypad UUID for a Wyze device. +/// +[DataMember(Name = "keypad_uuid", IsRequired = false, EmitDefaultValue = false)] +public string? KeypadUuid { get; set; } + +/// +/// Locker status (hardlock) for a Wyze device. +/// +[DataMember(Name = "locker_status_hardlock", IsRequired = false, EmitDefaultValue = false)] +public float? LockerStatusHardlock { get; set; } + +/// +/// Product model for a Wyze device. +/// +[DataMember(Name = "product_model", IsRequired = false, EmitDefaultValue = false)] +public string? ProductModel { get; set; } + +/// +/// Product name for a Wyze device. +/// +[DataMember(Name = "product_name", IsRequired = false, EmitDefaultValue = false)] +public string? ProductName { get; set; } + +/// +/// Product type for a Wyze device. +/// +[DataMember(Name = "product_type", IsRequired = false, EmitDefaultValue = false)] +public string? ProductType { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesYacanMetadata_model")] +public class DevicePropertiesYacanMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesYacanMetadata() { } + +public DevicePropertiesYacanMetadata(string? deviceId = default, string? deviceName = default, string? deviceType = default, string? serialNumber = default) +{ +DeviceId = deviceId; +DeviceName = deviceName; +DeviceType = deviceType; +SerialNumber = serialNumber; +} + +/// +/// Device ID for a Yacan device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Device name for a Yacan device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Device type for a Yacan device. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceType { get; set; } + +/// +/// Serial number for a Yacan device. +/// +[DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] +public string? SerialNumber { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesCodeConstraints_model")] +public class DevicePropertiesCodeConstraints +{ +[JsonConstructorAttribute] +protected DevicePropertiesCodeConstraints() { } + +public DevicePropertiesCodeConstraints(DevicePropertiesCodeConstraints.ConstraintTypeEnum constraintType = default, float? maxLength = default, float? minLength = default) +{ +ConstraintType = constraintType; +MaxLength = maxLength; +MinLength = minLength; +} + +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ConstraintTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "no_zeros")] +NoZeros = 1, + +[EnumMember(Value = "cannot_start_with_12")] +CannotStartWith_12 = 2, + +[EnumMember(Value = "no_triple_consecutive_ints")] +NoTripleConsecutiveInts = 3, + +[EnumMember(Value = "cannot_specify_pin_code")] +CannotSpecifyPinCode = 4, + +[EnumMember(Value = "pin_code_matches_existing_set")] +PinCodeMatchesExistingSet = 5, + +[EnumMember(Value = "start_date_in_future")] +StartDateInFuture = 6, + +[EnumMember(Value = "no_ascending_or_descending_sequence")] +NoAscendingOrDescendingSequence = 7, + +[EnumMember(Value = "at_least_three_unique_digits")] +AtLeastThreeUniqueDigits = 8, + +[EnumMember(Value = "cannot_contain_089")] +CannotContain_089 = 9, + +[EnumMember(Value = "cannot_contain_0789")] +CannotContain_0789 = 10, + +[EnumMember(Value = "unique_first_four_digits")] +UniqueFirstFourDigits = 11, + +[EnumMember(Value = "no_all_same_digits")] +NoAllSameDigits = 12, + +[EnumMember(Value = "name_length")] +NameLength = 13, + +[EnumMember(Value = "name_must_be_unique")] +NameMustBeUnique = 14, +} + +[DataMember(Name = "constraint_type", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesCodeConstraints.ConstraintTypeEnum ConstraintType { get; set; } + +/// +/// Maximum name length constraint for access codes. +/// +[DataMember(Name = "max_length", IsRequired = false, EmitDefaultValue = false)] +public float? MaxLength { get; set; } + +/// +/// Minimum name length constraint for access codes. +/// +[DataMember(Name = "min_length", IsRequired = false, EmitDefaultValue = false)] +public float? MinLength { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesKeypadBattery_model")] +public class DevicePropertiesKeypadBattery +{ +[JsonConstructorAttribute] +protected DevicePropertiesKeypadBattery() { } + +public DevicePropertiesKeypadBattery(float level = default) +{ +Level = level; +} + +/// +/// Keypad battery charge level. +/// +[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] +public float Level { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesOfflineTimeFrameOptions_model")] +public class DevicePropertiesOfflineTimeFrameOptions +{ +[JsonConstructorAttribute] +protected DevicePropertiesOfflineTimeFrameOptions() { } + +public DevicePropertiesOfflineTimeFrameOptions(string displayName = default, string? endDateRecurrenceRule = default, bool? matchingStartEndTime = default, string? maxDuration = default, string? minDuration = default, string? startDateRecurrenceRule = default, List? timePairs = default, string? timeZone = default) +{ +DisplayName = displayName; +EndDateRecurrenceRule = endDateRecurrenceRule; +MatchingStartEndTime = matchingStartEndTime; +MaxDuration = maxDuration; +MinDuration = minDuration; +StartDateRecurrenceRule = startDateRecurrenceRule; +TimePairs = timePairs; +TimeZone = timeZone; +} + +/// +/// Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. +/// +[DataMember(Name = "end_date_recurrence_rule", IsRequired = false, EmitDefaultValue = false)] +public string? EndDateRecurrenceRule { get; set; } + +/// +/// When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. +/// +[DataMember(Name = "matching_start_end_time", IsRequired = false, EmitDefaultValue = false)] +public bool? MatchingStartEndTime { get; set; } + +/// +/// Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. +/// +[DataMember(Name = "max_duration", IsRequired = false, EmitDefaultValue = false)] +public string? MaxDuration { get; set; } + +/// +/// Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. +/// +[DataMember(Name = "min_duration", IsRequired = false, EmitDefaultValue = false)] +public string? MinDuration { get; set; } + +/// +/// iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. +/// +[DataMember(Name = "start_date_recurrence_rule", IsRequired = false, EmitDefaultValue = false)] +public string? StartDateRecurrenceRule { get; set; } + +/// +/// Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. +/// +[DataMember(Name = "time_pairs", IsRequired = false, EmitDefaultValue = false)] +public List? TimePairs { get; set; } + +/// +/// IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesOfflineTimeFrameOptionsTimePairs_model")] +public class DevicePropertiesOfflineTimeFrameOptionsTimePairs +{ +[JsonConstructorAttribute] +protected DevicePropertiesOfflineTimeFrameOptionsTimePairs() { } + +public DevicePropertiesOfflineTimeFrameOptionsTimePairs(string displayName = default, string endTime = default, string startTime = default) +{ +DisplayName = displayName; +EndTime = endTime; +StartTime = startTime; +} + +/// +/// Label for the start/end time pairing. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. +/// +[DataMember(Name = "end_time", IsRequired = false, EmitDefaultValue = false)] +public string EndTime { get; set; } + +/// +/// Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. +/// +[DataMember(Name = "start_time", IsRequired = false, EmitDefaultValue = false)] +public string StartTime { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesOnlineTimeFrameOptions_model")] +public class DevicePropertiesOnlineTimeFrameOptions +{ +[JsonConstructorAttribute] +protected DevicePropertiesOnlineTimeFrameOptions() { } + +public DevicePropertiesOnlineTimeFrameOptions(string displayName = default, string? endDateRecurrenceRule = default, bool? matchingStartEndTime = default, string? maxDuration = default, string? minDuration = default, string? startDateRecurrenceRule = default, List? timePairs = default, string? timeZone = default) +{ +DisplayName = displayName; +EndDateRecurrenceRule = endDateRecurrenceRule; +MatchingStartEndTime = matchingStartEndTime; +MaxDuration = maxDuration; +MinDuration = minDuration; +StartDateRecurrenceRule = startDateRecurrenceRule; +TimePairs = timePairs; +TimeZone = timeZone; +} + +/// +/// Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. +/// +[DataMember(Name = "end_date_recurrence_rule", IsRequired = false, EmitDefaultValue = false)] +public string? EndDateRecurrenceRule { get; set; } + +/// +/// When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. +/// +[DataMember(Name = "matching_start_end_time", IsRequired = false, EmitDefaultValue = false)] +public bool? MatchingStartEndTime { get; set; } + +/// +/// Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. +/// +[DataMember(Name = "max_duration", IsRequired = false, EmitDefaultValue = false)] +public string? MaxDuration { get; set; } + +/// +/// Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. +/// +[DataMember(Name = "min_duration", IsRequired = false, EmitDefaultValue = false)] +public string? MinDuration { get; set; } + +/// +/// iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. +/// +[DataMember(Name = "start_date_recurrence_rule", IsRequired = false, EmitDefaultValue = false)] +public string? StartDateRecurrenceRule { get; set; } + +/// +/// Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. +/// +[DataMember(Name = "time_pairs", IsRequired = false, EmitDefaultValue = false)] +public List? TimePairs { get; set; } + +/// +/// IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesOnlineTimeFrameOptionsTimePairs_model")] +public class DevicePropertiesOnlineTimeFrameOptionsTimePairs +{ +[JsonConstructorAttribute] +protected DevicePropertiesOnlineTimeFrameOptionsTimePairs() { } + +public DevicePropertiesOnlineTimeFrameOptionsTimePairs(string displayName = default, string endTime = default, string startTime = default) +{ +DisplayName = displayName; +EndTime = endTime; +StartTime = startTime; +} + +/// +/// Label for the start/end time pairing. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. +/// +[DataMember(Name = "end_time", IsRequired = false, EmitDefaultValue = false)] +public string EndTime { get; set; } + +/// +/// Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. +/// +[DataMember(Name = "start_time", IsRequired = false, EmitDefaultValue = false)] +public string StartTime { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesActiveThermostatSchedule_model")] +public class DevicePropertiesActiveThermostatSchedule +{ +[JsonConstructorAttribute] +protected DevicePropertiesActiveThermostatSchedule() { } + +public DevicePropertiesActiveThermostatSchedule(string climatePresetKey = default, string createdAt = default, string deviceId = default, string endsAt = default, List errors = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default, string thermostatScheduleId = default, string workspaceId = default) +{ +ClimatePresetKey = climatePresetKey; +CreatedAt = createdAt; +DeviceId = deviceId; +EndsAt = endsAt; +Errors = errors; +IsOverrideAllowed = isOverrideAllowed; +MaxOverridePeriodMinutes = maxOverridePeriodMinutes; +Name = name; +StartsAt = startsAt; +ThermostatScheduleId = thermostatScheduleId; +WorkspaceId = workspaceId; +} + +/// +/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the desired [thermostat](https://www.seam.co/docs/capability-guides/thermostats) device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string EndsAt { get; set; } + +/// +/// Errors associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. +/// +[DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOverrideAllowed { get; set; } + +/// +/// Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[DataMember(Name = "max_override_period_minutes", IsRequired = false, EmitDefaultValue = false)] +public int? MaxOverridePeriodMinutes { get; set; } + +/// +/// User-friendly name to identify the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string StartsAt { get; set; } + +/// +/// ID of the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] +public string ThermostatScheduleId { get; set; } + +/// +/// ID of the workspace that contains the thermostat schedule. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesActiveThermostatScheduleErrors_model")] +public class DevicePropertiesActiveThermostatScheduleErrors +{ +[JsonConstructorAttribute] +protected DevicePropertiesActiveThermostatScheduleErrors() { } + +public DevicePropertiesActiveThermostatScheduleErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAvailableClimatePresets_model")] +public class DevicePropertiesAvailableClimatePresets +{ +[JsonConstructorAttribute] +protected DevicePropertiesAvailableClimatePresets() { } + +public DevicePropertiesAvailableClimatePresets(bool canDelete = default, bool canEdit = default, bool canUseWithThermostatDailyPrograms = default, string climatePresetKey = default, DevicePropertiesAvailableClimatePresets.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string displayName = default, DevicePropertiesAvailableClimatePresetsEcobeeMetadata? ecobeeMetadata = default, DevicePropertiesAvailableClimatePresets.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, DevicePropertiesAvailableClimatePresets.HvacModeSettingEnum? hvacModeSetting = default, bool manualOverrideAllowed = default, string? name = default) +{ +CanDelete = canDelete; +CanEdit = canEdit; +CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; +ClimatePresetKey = climatePresetKey; +ClimatePresetMode = climatePresetMode; +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DisplayName = displayName; +EcobeeMetadata = ecobeeMetadata; +FanModeSetting = fanModeSetting; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +HvacModeSetting = hvacModeSetting; +ManualOverrideAllowed = manualOverrideAllowed; +Name = name; +} + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ClimatePresetModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "home")] +Home = 1, + +[EnumMember(Value = "away")] +Away = 2, + +[EnumMember(Value = "wake")] +Wake = 3, + +[EnumMember(Value = "sleep")] +Sleep = 4, + +[EnumMember(Value = "occupied")] +Occupied = 5, + +[EnumMember(Value = "unoccupied")] +Unoccupied = 6, +} + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum HvacModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, + +[EnumMember(Value = "heat")] +Heat = 2, + +[EnumMember(Value = "cool")] +Cool = 3, + +[EnumMember(Value = "heat_cool")] +HeatCool = 4, + +[EnumMember(Value = "eco")] +Eco = 5, +} + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. +/// +[DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] +public bool CanDelete { get; set; } + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. +/// +[DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] +public bool CanEdit { get; set; } + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. +/// +[DataMember(Name = "can_use_with_thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] +public bool CanUseWithThermostatDailyPrograms { get; set; } + +/// +/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAvailableClimatePresets.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Metadata specific to the Ecobee climate, if applicable. +/// +[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAvailableClimatePresetsEcobeeMetadata? EcobeeMetadata { get; set; } + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAvailableClimatePresets.FanModeSettingEnum? FanModeSetting { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAvailableClimatePresets.HvacModeSettingEnum? HvacModeSetting { get; set; } + +/// +/// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] +[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool ManualOverrideAllowed { get; set; } + +/// +/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesAvailableClimatePresetsEcobeeMetadata_model")] +public class DevicePropertiesAvailableClimatePresetsEcobeeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesAvailableClimatePresetsEcobeeMetadata() { } + +public DevicePropertiesAvailableClimatePresetsEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, DevicePropertiesAvailableClimatePresetsEcobeeMetadata.OwnerEnum? owner = default) +{ +ClimateRef = climateRef; +IsOptimized = isOptimized; +Owner = owner; +} + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum OwnerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "user")] +User = 1, + +[EnumMember(Value = "system")] +System = 2, +} + +/// +/// Reference to the Ecobee climate, if applicable. +/// +[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] +public string? ClimateRef { get; set; } + +/// +/// Indicates if the climate preset is optimized by Ecobee. +/// +[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOptimized { get; set; } + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesAvailableClimatePresetsEcobeeMetadata.OwnerEnum? Owner { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesCurrentClimateSetting_model")] +public class DevicePropertiesCurrentClimateSetting +{ +[JsonConstructorAttribute] +protected DevicePropertiesCurrentClimateSetting() { } + +public DevicePropertiesCurrentClimateSetting(bool? canDelete = default, bool? canEdit = default, bool? canUseWithThermostatDailyPrograms = default, string? climatePresetKey = default, DevicePropertiesCurrentClimateSetting.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string? displayName = default, DevicePropertiesCurrentClimateSettingEcobeeMetadata? ecobeeMetadata = default, DevicePropertiesCurrentClimateSetting.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, DevicePropertiesCurrentClimateSetting.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) +{ +CanDelete = canDelete; +CanEdit = canEdit; +CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; +ClimatePresetKey = climatePresetKey; +ClimatePresetMode = climatePresetMode; +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DisplayName = displayName; +EcobeeMetadata = ecobeeMetadata; +FanModeSetting = fanModeSetting; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +HvacModeSetting = hvacModeSetting; +ManualOverrideAllowed = manualOverrideAllowed; +Name = name; +} + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ClimatePresetModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "home")] +Home = 1, + +[EnumMember(Value = "away")] +Away = 2, + +[EnumMember(Value = "wake")] +Wake = 3, + +[EnumMember(Value = "sleep")] +Sleep = 4, + +[EnumMember(Value = "occupied")] +Occupied = 5, - [EnumMember(Value = "linear_lock")] - LinearLock = 9, +[EnumMember(Value = "unoccupied")] +Unoccupied = 6, +} + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum HvacModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, + +[EnumMember(Value = "heat")] +Heat = 2, + +[EnumMember(Value = "cool")] +Cool = 3, + +[EnumMember(Value = "heat_cool")] +HeatCool = 4, + +[EnumMember(Value = "eco")] +Eco = 5, +} + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. +/// +[DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] +public bool? CanDelete { get; set; } + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. +/// +[DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] +public bool? CanEdit { get; set; } + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. +/// +[DataMember(Name = "can_use_with_thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUseWithThermostatDailyPrograms { get; set; } + +/// +/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string? ClimatePresetKey { get; set; } + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesCurrentClimateSetting.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string? DisplayName { get; set; } + +/// +/// Metadata specific to the Ecobee climate, if applicable. +/// +[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesCurrentClimateSettingEcobeeMetadata? EcobeeMetadata { get; set; } + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesCurrentClimateSetting.FanModeSettingEnum? FanModeSetting { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesCurrentClimateSetting.HvacModeSettingEnum? HvacModeSetting { get; set; } + +/// +/// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] +[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? ManualOverrideAllowed { get; set; } + +/// +/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesCurrentClimateSettingEcobeeMetadata_model")] +public class DevicePropertiesCurrentClimateSettingEcobeeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesCurrentClimateSettingEcobeeMetadata() { } + +public DevicePropertiesCurrentClimateSettingEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, DevicePropertiesCurrentClimateSettingEcobeeMetadata.OwnerEnum? owner = default) +{ +ClimateRef = climateRef; +IsOptimized = isOptimized; +Owner = owner; +} + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum OwnerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "user")] +User = 1, + +[EnumMember(Value = "system")] +System = 2, +} + +/// +/// Reference to the Ecobee climate, if applicable. +/// +[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] +public string? ClimateRef { get; set; } + +/// +/// Indicates if the climate preset is optimized by Ecobee. +/// +[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOptimized { get; set; } + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesCurrentClimateSettingEcobeeMetadata.OwnerEnum? Owner { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesDefaultClimateSetting_model")] +public class DevicePropertiesDefaultClimateSetting +{ +[JsonConstructorAttribute] +protected DevicePropertiesDefaultClimateSetting() { } + +public DevicePropertiesDefaultClimateSetting(bool? canDelete = default, bool? canEdit = default, bool? canUseWithThermostatDailyPrograms = default, string? climatePresetKey = default, DevicePropertiesDefaultClimateSetting.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string? displayName = default, DevicePropertiesDefaultClimateSettingEcobeeMetadata? ecobeeMetadata = default, DevicePropertiesDefaultClimateSetting.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, DevicePropertiesDefaultClimateSetting.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) +{ +CanDelete = canDelete; +CanEdit = canEdit; +CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; +ClimatePresetKey = climatePresetKey; +ClimatePresetMode = climatePresetMode; +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +DisplayName = displayName; +EcobeeMetadata = ecobeeMetadata; +FanModeSetting = fanModeSetting; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +HvacModeSetting = hvacModeSetting; +ManualOverrideAllowed = manualOverrideAllowed; +Name = name; +} + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ClimatePresetModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "home")] +Home = 1, + +[EnumMember(Value = "away")] +Away = 2, + +[EnumMember(Value = "wake")] +Wake = 3, + +[EnumMember(Value = "sleep")] +Sleep = 4, + +[EnumMember(Value = "occupied")] +Occupied = 5, + +[EnumMember(Value = "unoccupied")] +Unoccupied = 6, +} + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum HvacModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, - [EnumMember(Value = "lockly_lock")] - LocklyLock = 10, +[EnumMember(Value = "heat")] +Heat = 2, - [EnumMember(Value = "kwikset_lock")] - KwiksetLock = 11, +[EnumMember(Value = "cool")] +Cool = 3, - [EnumMember(Value = "nuki_lock")] - NukiLock = 12, +[EnumMember(Value = "heat_cool")] +HeatCool = 4, - [EnumMember(Value = "salto_lock")] - SaltoLock = 13, +[EnumMember(Value = "eco")] +Eco = 5, +} + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. +/// +[DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] +public bool? CanDelete { get; set; } + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. +/// +[DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] +public bool? CanEdit { get; set; } + +/// +/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. +/// +[DataMember(Name = "can_use_with_thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUseWithThermostatDailyPrograms { get; set; } + +/// +/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string? ClimatePresetKey { get; set; } + +/// +/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. +/// +[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesDefaultClimateSetting.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string? DisplayName { get; set; } + +/// +/// Metadata specific to the Ecobee climate, if applicable. +/// +[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesDefaultClimateSettingEcobeeMetadata? EcobeeMetadata { get; set; } + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesDefaultClimateSetting.FanModeSettingEnum? FanModeSetting { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesDefaultClimateSetting.HvacModeSettingEnum? HvacModeSetting { get; set; } + +/// +/// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] +[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? ManualOverrideAllowed { get; set; } + +/// +/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesDefaultClimateSettingEcobeeMetadata_model")] +public class DevicePropertiesDefaultClimateSettingEcobeeMetadata +{ +[JsonConstructorAttribute] +protected DevicePropertiesDefaultClimateSettingEcobeeMetadata() { } + +public DevicePropertiesDefaultClimateSettingEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, DevicePropertiesDefaultClimateSettingEcobeeMetadata.OwnerEnum? owner = default) +{ +ClimateRef = climateRef; +IsOptimized = isOptimized; +Owner = owner; +} + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum OwnerEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "user")] +User = 1, + +[EnumMember(Value = "system")] +System = 2, +} + +/// +/// Reference to the Ecobee climate, if applicable. +/// +[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] +public string? ClimateRef { get; set; } + +/// +/// Indicates if the climate preset is optimized by Ecobee. +/// +[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOptimized { get; set; } + +/// +/// Indicates whether the climate preset is owned by the user or the system. +/// +[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] +public DevicePropertiesDefaultClimateSettingEcobeeMetadata.OwnerEnum? Owner { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesTemperatureThreshold_model")] +public class DevicePropertiesTemperatureThreshold +{ +[JsonConstructorAttribute] +protected DevicePropertiesTemperatureThreshold() { } + +public DevicePropertiesTemperatureThreshold(float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default) +{ +LowerLimitCelsius = lowerLimitCelsius; +LowerLimitFahrenheit = lowerLimitFahrenheit; +UpperLimitCelsius = upperLimitCelsius; +UpperLimitFahrenheit = upperLimitFahrenheit; +} - [EnumMember(Value = "schlage_lock")] - SchlageLock = 14, +/// +/// Lower limit in °C within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. +/// +[DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? LowerLimitCelsius { get; set; } + +/// +/// Lower limit in °F within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. +/// +[DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? LowerLimitFahrenheit { get; set; } + +/// +/// Upper limit in °C within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. +/// +[DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? UpperLimitCelsius { get; set; } + +/// +/// Upper limit in °F within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. +/// +[DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? UpperLimitFahrenheit { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_devicePropertiesThermostatDailyPrograms_model")] +public class DevicePropertiesThermostatDailyPrograms +{ +[JsonConstructorAttribute] +protected DevicePropertiesThermostatDailyPrograms() { } - [EnumMember(Value = "smartthings_lock")] - SmartthingsLock = 15, +public DevicePropertiesThermostatDailyPrograms(string createdAt = default, string deviceId = default, string? name = default, List periods = default, string thermostatDailyProgramId = default, string workspaceId = default) +{ +CreatedAt = createdAt; +DeviceId = deviceId; +Name = name; +Periods = periods; +ThermostatDailyProgramId = thermostatDailyProgramId; +WorkspaceId = workspaceId; +} - [EnumMember(Value = "wyze_lock")] - WyzeLock = 16, +/// +/// Date and time at which the thermostat daily program was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the thermostat device on which the thermostat daily program is configured. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// User-friendly name to identify the thermostat daily program. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Array of thermostat daily program periods. +/// +[DataMember(Name = "periods", IsRequired = false, EmitDefaultValue = false)] +public List Periods { get; set; } + +/// +/// ID of the thermostat daily program. +/// +[DataMember(Name = "thermostat_daily_program_id", IsRequired = false, EmitDefaultValue = false)] +public string ThermostatDailyProgramId { get; set; } + +/// +/// ID of the workspace that contains the thermostat daily program. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "yale_lock")] - YaleLock = 17, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "two_n_intercom")] - TwoNIntercom = 18, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "controlbyweb_device")] - ControlbywebDevice = 19, +[DataContract(Name = "seamModel_devicePropertiesThermostatDailyProgramsPeriods_model")] +public class DevicePropertiesThermostatDailyProgramsPeriods +{ +[JsonConstructorAttribute] +protected DevicePropertiesThermostatDailyProgramsPeriods() { } - [EnumMember(Value = "ttlock_lock")] - TtlockLock = 20, +public DevicePropertiesThermostatDailyProgramsPeriods(string climatePresetKey = default, string startsAtTime = default) +{ +ClimatePresetKey = climatePresetKey; +StartsAtTime = startsAtTime; +} - [EnumMember(Value = "igloohome_lock")] - IgloohomeLock = 21, +/// +/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } - [EnumMember(Value = "four_suites_door")] - FourSuitesDoor = 22, +/// +/// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] +public string StartsAtTime { get; set; } - [EnumMember(Value = "dormakaba_oracode_door")] - DormakabaOracodeDoor = 23, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "tedee_lock")] - TedeeLock = 24, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "akiles_lock")] - AkilesLock = 25, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "ultraloq_lock")] - UltraloqLock = 26, +[DataContract(Name = "seamModel_devicePropertiesThermostatWeeklyProgram_model")] +public class DevicePropertiesThermostatWeeklyProgram +{ +[JsonConstructorAttribute] +protected DevicePropertiesThermostatWeeklyProgram() { } - [EnumMember(Value = "yacan_lock")] - YacanLock = 27, +public DevicePropertiesThermostatWeeklyProgram(string createdAt = default, string? fridayProgramId = default, string? mondayProgramId = default, string? saturdayProgramId = default, string? sundayProgramId = default, string? thursdayProgramId = default, string? tuesdayProgramId = default, string? wednesdayProgramId = default) +{ +CreatedAt = createdAt; +FridayProgramId = fridayProgramId; +MondayProgramId = mondayProgramId; +SaturdayProgramId = saturdayProgramId; +SundayProgramId = sundayProgramId; +ThursdayProgramId = thursdayProgramId; +TuesdayProgramId = tuesdayProgramId; +WednesdayProgramId = wednesdayProgramId; +} - [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 28, +/// +/// Date and time at which the thermostat weekly program was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the thermostat daily program to run on Fridays. +/// +[DataMember(Name = "friday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? FridayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Mondays. +/// +[DataMember(Name = "monday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? MondayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Saturdays. +/// +[DataMember(Name = "saturday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? SaturdayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Sundays. +/// +[DataMember(Name = "sunday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? SundayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Thursdays. +/// +[DataMember(Name = "thursday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? ThursdayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Tuesdays. +/// +[DataMember(Name = "tuesday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? TuesdayProgramId { get; set; } + +/// +/// ID of the thermostat daily program to run on Wednesdays. +/// +[DataMember(Name = "wednesday_program_id", IsRequired = false, EmitDefaultValue = false)] +public string? WednesdayProgramId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 29, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "kisi_lock")] - KisiLock = 30, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "aqara_lock")] - AqaraLock = 31, - - [EnumMember(Value = "keynest_key")] - KeynestKey = 32, - - [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 33, - - [EnumMember(Value = "minut_sensor")] - MinutSensor = 34, - - [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 35, - - [EnumMember(Value = "nest_thermostat")] - NestThermostat = 36, - - [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 37, - - [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 38, - - [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 39, - - [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 40, - - [EnumMember(Value = "ios_phone")] - IosPhone = 41, - - [EnumMember(Value = "android_phone")] - AndroidPhone = 42, - - [EnumMember(Value = "ring_camera")] - RingCamera = 43, - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(DeviceErrorsUnrecognized))] - [JsonSubtypes.KnownSubType(typeof(DeviceErrorsBridgeDisconnected), "bridge_disconnected")] - [JsonSubtypes.KnownSubType( - typeof(DeviceErrorsSubscriptionRequired), - "subscription_required" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceErrorsAuxiliaryHeatRunning), - "auxiliary_heat_running" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceErrorsMissingDeviceCredentials), - "missing_device_credentials" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceErrorsAugustLockNotAuthorized), - "august_lock_not_authorized" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceErrorsEmptyBackupAccessCodePool), - "empty_backup_access_code_pool" - )] - [JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceDisconnected), "device_disconnected")] - [JsonSubtypes.KnownSubType(typeof(DeviceErrorsHubDisconnected), "hub_disconnected")] - [JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceRemoved), "device_removed")] - [JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceOffline), "device_offline")] - [JsonSubtypes.KnownSubType( - typeof(DeviceErrorsDormakabaSitesDisconnected), - "dormakaba_sites_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceErrorsInsufficientPermissions), - "insufficient_permissions" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceErrorsSaltoKsSubscriptionLimitExceeded), - "salto_ks_subscription_limit_exceeded" - )] - [JsonSubtypes.KnownSubType(typeof(DeviceErrorsAccountDisconnected), "account_disconnected")] - public abstract class DeviceErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_deviceErrorsAccountDisconnected_model")] - public class DeviceErrorsAccountDisconnected : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsAccountDisconnected() { } - - public DeviceErrorsAccountDisconnected( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "account_disconnected"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsSaltoKsSubscriptionLimitExceeded_model")] - public class DeviceErrorsSaltoKsSubscriptionLimitExceeded : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsSaltoKsSubscriptionLimitExceeded() { } - - public DeviceErrorsSaltoKsSubscriptionLimitExceeded( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsInsufficientPermissions_model")] - public class DeviceErrorsInsufficientPermissions : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsInsufficientPermissions() { } - - public DeviceErrorsInsufficientPermissions( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "insufficient_permissions"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsDormakabaSitesDisconnected_model")] - public class DeviceErrorsDormakabaSitesDisconnected : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsDormakabaSitesDisconnected() { } - - public DeviceErrorsDormakabaSitesDisconnected( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsDeviceOffline_model")] - public class DeviceErrorsDeviceOffline : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsDeviceOffline() { } - - public DeviceErrorsDeviceOffline( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_offline"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsDeviceRemoved_model")] - public class DeviceErrorsDeviceRemoved : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsDeviceRemoved() { } - - public DeviceErrorsDeviceRemoved( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_removed"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsHubDisconnected_model")] - public class DeviceErrorsHubDisconnected : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsHubDisconnected() { } - - public DeviceErrorsHubDisconnected( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "hub_disconnected"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsDeviceDisconnected_model")] - public class DeviceErrorsDeviceDisconnected : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsDeviceDisconnected() { } - - public DeviceErrorsDeviceDisconnected( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_disconnected"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsEmptyBackupAccessCodePool_model")] - public class DeviceErrorsEmptyBackupAccessCodePool : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsEmptyBackupAccessCodePool() { } - - public DeviceErrorsEmptyBackupAccessCodePool( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "empty_backup_access_code_pool"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsAugustLockNotAuthorized_model")] - public class DeviceErrorsAugustLockNotAuthorized : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsAugustLockNotAuthorized() { } - - public DeviceErrorsAugustLockNotAuthorized( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "august_lock_not_authorized"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsMissingDeviceCredentials_model")] - public class DeviceErrorsMissingDeviceCredentials : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsMissingDeviceCredentials() { } - - public DeviceErrorsMissingDeviceCredentials( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "missing_device_credentials"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsAuxiliaryHeatRunning_model")] - public class DeviceErrorsAuxiliaryHeatRunning : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsAuxiliaryHeatRunning() { } - - public DeviceErrorsAuxiliaryHeatRunning( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "auxiliary_heat_running"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsSubscriptionRequired_model")] - public class DeviceErrorsSubscriptionRequired : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsSubscriptionRequired() { } - - public DeviceErrorsSubscriptionRequired( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "subscription_required"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsBridgeDisconnected_model")] - public class DeviceErrorsBridgeDisconnected : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsBridgeDisconnected() { } - - public DeviceErrorsBridgeDisconnected( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "bridge_disconnected"; - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceErrorsUnrecognized_model")] - public class DeviceErrorsUnrecognized : DeviceErrors - { - [JsonConstructorAttribute] - protected DeviceErrorsUnrecognized() { } - - public DeviceErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(DeviceWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsMaxAccessCodesReached), - "max_access_codes_reached" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsUnreliableOnlineStatus), - "unreliable_online_status" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsAccessoryKeypadLowBattery), - "accessory_keypad_low_battery" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsAccessoryKeypadSetupRequired), - "accessory_keypad_setup_required" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsKeynestUnsupportedLocker), - "keynest_unsupported_locker" - )] - [JsonSubtypes.KnownSubType(typeof(DeviceWarningsProviderIssue), "provider_issue")] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsHubRequiredForAdditionalCapabilities), - "hub_required_for_additional_capabilities" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsTwoNDeviceMissingTimezone), - "two_n_device_missing_timezone" - )] - [JsonSubtypes.KnownSubType(typeof(DeviceWarningsTimeZoneMismatch), "time_zone_mismatch")] - [JsonSubtypes.KnownSubType(typeof(DeviceWarningsTimeZoneUnknown), "time_zone_unknown")] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsUltraloqTimeZoneUnknown), - "ultraloq_time_zone_unknown" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsLocklyTimeZoneNotConfigured), - "lockly_time_zone_not_configured" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsUnknownIssueWithPhone), - "unknown_issue_with_phone" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsSaltoKsLockAccessCodeSupportRemoved), - "salto_ks_lock_access_code_support_removed" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsSaltoKsSubscriptionLimitAlmostReached), - "salto_ks_subscription_limit_almost_reached" - )] - [JsonSubtypes.KnownSubType(typeof(DeviceWarningsPrivacyMode), "privacy_mode")] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsSaltoKsPrivacyMode), - "salto_ks_privacy_mode" - )] - [JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsOfficeMode), "salto_ks_office_mode")] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsDeviceHasFlakyConnection), - "device_has_flaky_connection" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsScheduledMaintenanceWindow), - "scheduled_maintenance_window" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsDeviceCommunicationDegraded), - "device_communication_degraded" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsTemperatureThresholdExceeded), - "temperature_threshold_exceeded" - )] - [JsonSubtypes.KnownSubType(typeof(DeviceWarningsPowerSavingMode), "power_saving_mode")] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsTtlockWeakGatewaySignal), - "ttlock_weak_gateway_signal" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsTtlockLockGatewayUnlockingNotEnabled), - "ttlock_lock_gateway_unlocking_not_enabled" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsThirdPartyIntegrationDetected), - "third_party_integration_detected" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsManyActiveBackupCodes), - "many_active_backup_codes" - )] - [JsonSubtypes.KnownSubType( - typeof(DeviceWarningsPartialBackupAccessCodePool), - "partial_backup_access_code_pool" - )] - public abstract class DeviceWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_deviceWarningsPartialBackupAccessCodePool_model")] - public class DeviceWarningsPartialBackupAccessCodePool : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsPartialBackupAccessCodePool() { } - - public DeviceWarningsPartialBackupAccessCodePool( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "partial_backup_access_code_pool"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsManyActiveBackupCodes_model")] - public class DeviceWarningsManyActiveBackupCodes : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsManyActiveBackupCodes() { } - - public DeviceWarningsManyActiveBackupCodes( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "many_active_backup_codes"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsThirdPartyIntegrationDetected_model")] - public class DeviceWarningsThirdPartyIntegrationDetected : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsThirdPartyIntegrationDetected() { } - - public DeviceWarningsThirdPartyIntegrationDetected( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "third_party_integration_detected"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsTtlockLockGatewayUnlockingNotEnabled_model")] - public class DeviceWarningsTtlockLockGatewayUnlockingNotEnabled : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsTtlockLockGatewayUnlockingNotEnabled() { } - - public DeviceWarningsTtlockLockGatewayUnlockingNotEnabled( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "ttlock_lock_gateway_unlocking_not_enabled"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsTtlockWeakGatewaySignal_model")] - public class DeviceWarningsTtlockWeakGatewaySignal : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsTtlockWeakGatewaySignal() { } - - public DeviceWarningsTtlockWeakGatewaySignal( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "ttlock_weak_gateway_signal"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsPowerSavingMode_model")] - public class DeviceWarningsPowerSavingMode : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsPowerSavingMode() { } - - public DeviceWarningsPowerSavingMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "power_saving_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsTemperatureThresholdExceeded_model")] - public class DeviceWarningsTemperatureThresholdExceeded : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsTemperatureThresholdExceeded() { } - - public DeviceWarningsTemperatureThresholdExceeded( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "temperature_threshold_exceeded"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsDeviceCommunicationDegraded_model")] - public class DeviceWarningsDeviceCommunicationDegraded : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsDeviceCommunicationDegraded() { } - - public DeviceWarningsDeviceCommunicationDegraded( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "device_communication_degraded"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsScheduledMaintenanceWindow_model")] - public class DeviceWarningsScheduledMaintenanceWindow : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsScheduledMaintenanceWindow() { } - - public DeviceWarningsScheduledMaintenanceWindow( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "scheduled_maintenance_window"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsDeviceHasFlakyConnection_model")] - public class DeviceWarningsDeviceHasFlakyConnection : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsDeviceHasFlakyConnection() { } - - public DeviceWarningsDeviceHasFlakyConnection( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "device_has_flaky_connection"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsSaltoKsOfficeMode_model")] - public class DeviceWarningsSaltoKsOfficeMode : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsSaltoKsOfficeMode() { } - - public DeviceWarningsSaltoKsOfficeMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "salto_ks_office_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsSaltoKsPrivacyMode_model")] - public class DeviceWarningsSaltoKsPrivacyMode : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsSaltoKsPrivacyMode() { } - - public DeviceWarningsSaltoKsPrivacyMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "salto_ks_privacy_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsPrivacyMode_model")] - public class DeviceWarningsPrivacyMode : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsPrivacyMode() { } - - public DeviceWarningsPrivacyMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "privacy_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsSaltoKsSubscriptionLimitAlmostReached_model")] - public class DeviceWarningsSaltoKsSubscriptionLimitAlmostReached : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsSaltoKsSubscriptionLimitAlmostReached() { } - - public DeviceWarningsSaltoKsSubscriptionLimitAlmostReached( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "salto_ks_subscription_limit_almost_reached"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsSaltoKsLockAccessCodeSupportRemoved_model")] - public class DeviceWarningsSaltoKsLockAccessCodeSupportRemoved : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsSaltoKsLockAccessCodeSupportRemoved() { } - - public DeviceWarningsSaltoKsLockAccessCodeSupportRemoved( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "salto_ks_lock_access_code_support_removed"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsUnknownIssueWithPhone_model")] - public class DeviceWarningsUnknownIssueWithPhone : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsUnknownIssueWithPhone() { } - - public DeviceWarningsUnknownIssueWithPhone( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unknown_issue_with_phone"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsLocklyTimeZoneNotConfigured_model")] - public class DeviceWarningsLocklyTimeZoneNotConfigured : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsLocklyTimeZoneNotConfigured() { } - - public DeviceWarningsLocklyTimeZoneNotConfigured( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "lockly_time_zone_not_configured"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsUltraloqTimeZoneUnknown_model")] - public class DeviceWarningsUltraloqTimeZoneUnknown : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsUltraloqTimeZoneUnknown() { } - - public DeviceWarningsUltraloqTimeZoneUnknown( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "ultraloq_time_zone_unknown"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsTimeZoneUnknown_model")] - public class DeviceWarningsTimeZoneUnknown : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsTimeZoneUnknown() { } - - public DeviceWarningsTimeZoneUnknown( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "time_zone_unknown"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsTimeZoneMismatch_model")] - public class DeviceWarningsTimeZoneMismatch : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsTimeZoneMismatch() { } - - public DeviceWarningsTimeZoneMismatch( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "time_zone_mismatch"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsTwoNDeviceMissingTimezone_model")] - public class DeviceWarningsTwoNDeviceMissingTimezone : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsTwoNDeviceMissingTimezone() { } - - public DeviceWarningsTwoNDeviceMissingTimezone( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "two_n_device_missing_timezone"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsHubRequiredForAdditionalCapabilities_model")] - public class DeviceWarningsHubRequiredForAdditionalCapabilities : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsHubRequiredForAdditionalCapabilities() { } - - public DeviceWarningsHubRequiredForAdditionalCapabilities( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "hub_required_for_additional_capabilities"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsProviderIssue_model")] - public class DeviceWarningsProviderIssue : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsProviderIssue() { } - - public DeviceWarningsProviderIssue( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "provider_issue"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsKeynestUnsupportedLocker_model")] - public class DeviceWarningsKeynestUnsupportedLocker : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsKeynestUnsupportedLocker() { } - - public DeviceWarningsKeynestUnsupportedLocker( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "keynest_unsupported_locker"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsAccessoryKeypadSetupRequired_model")] - public class DeviceWarningsAccessoryKeypadSetupRequired : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsAccessoryKeypadSetupRequired() { } - - public DeviceWarningsAccessoryKeypadSetupRequired( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "accessory_keypad_setup_required"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsAccessoryKeypadLowBattery_model")] - public class DeviceWarningsAccessoryKeypadLowBattery : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsAccessoryKeypadLowBattery() { } - - public DeviceWarningsAccessoryKeypadLowBattery( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "accessory_keypad_low_battery"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsUnreliableOnlineStatus_model")] - public class DeviceWarningsUnreliableOnlineStatus : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsUnreliableOnlineStatus() { } - - public DeviceWarningsUnreliableOnlineStatus( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unreliable_online_status"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsMaxAccessCodesReached_model")] - public class DeviceWarningsMaxAccessCodesReached : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsMaxAccessCodesReached() { } - - public DeviceWarningsMaxAccessCodesReached( - int activeAccessCodeCount = default, - string createdAt = default, - int maxActiveAccessCodeCount = default, - string message = default, - string warningCode = default - ) - { - ActiveAccessCodeCount = activeAccessCodeCount; - CreatedAt = createdAt; - MaxActiveAccessCodeCount = maxActiveAccessCodeCount; - Message = message; - WarningCode = warningCode; - } - - /// - /// Number of active access codes on the device when the warning was set. - /// - [DataMember( - Name = "active_access_code_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int ActiveAccessCodeCount { get; set; } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Maximum number of active access codes supported by the device. - /// - [DataMember( - Name = "max_active_access_code_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int MaxActiveAccessCodeCount { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "max_access_codes_reached"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceWarningsUnrecognized_model")] - public class DeviceWarningsUnrecognized : DeviceWarnings - { - [JsonConstructorAttribute] - protected DeviceWarningsUnrecognized() { } - - public DeviceWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Indicates whether the lock supports configuring automatic locking. - /// - [DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanConfigureAutoLock { get; set; } - - /// - /// Indicates whether the thermostat supports cooling. - /// - [DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacCool { get; set; } - - /// - /// Indicates whether the thermostat supports heating. - /// - [DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacHeat { get; set; } - - /// - /// Indicates whether the thermostat supports simultaneous heating and cooling. - /// - [DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacHeatCool { get; set; } - - /// - /// Indicates whether the device supports programming offline access codes. - /// - [DataMember( - Name = "can_program_offline_access_codes", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramOfflineAccessCodes { get; set; } - - /// - /// Indicates whether the device supports programming online access codes. - /// - [DataMember( - Name = "can_program_online_access_codes", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramOnlineAccessCodes { get; set; } - - /// - /// Indicates whether the thermostat supports different climate programs for each day of the week. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_different_each_day", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } - - /// - /// Indicates whether the thermostat supports a single climate program applied to every day. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_same_each_day", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } - - /// - /// Indicates whether the thermostat supports weekday/weekend climate programs. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_weekday_weekend", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } - - /// - /// Indicates whether the device supports remote locking. - /// - [DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanRemotelyLock { get; set; } - - /// - /// Indicates whether the device supports remote unlocking. - /// - [DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanRemotelyUnlock { get; set; } - - /// - /// Indicates whether the thermostat supports running climate programs. - /// - [DataMember( - Name = "can_run_thermostat_programs", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanRunThermostatPrograms { get; set; } - - /// - /// Indicates whether the device supports simulating connection in a sandbox. - /// - [DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] - public bool? CanSimulateConnection { get; set; } - - /// - /// Indicates whether the device supports simulating disconnection in a sandbox. - /// - [DataMember( - Name = "can_simulate_disconnection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateDisconnection { get; set; } - - /// - /// Indicates whether the hub supports simulating connection in a sandbox. - /// - [DataMember( - Name = "can_simulate_hub_connection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateHubConnection { get; set; } - - /// - /// Indicates whether the hub supports simulating disconnection in a sandbox. - /// - [DataMember( - Name = "can_simulate_hub_disconnection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateHubDisconnection { get; set; } - - /// - /// Indicates whether the device supports simulating a paid subscription in a sandbox. - /// - [DataMember( - Name = "can_simulate_paid_subscription", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulatePaidSubscription { get; set; } - - /// - /// Indicates whether the device supports simulating removal in a sandbox. - /// - [DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] - public bool? CanSimulateRemoval { get; set; } - - /// - /// Indicates whether the thermostat can be turned off. - /// - [DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] - public bool? CanTurnOffHvac { get; set; } - - /// - /// Indicates whether the lock supports unlocking with an access code. - /// - [DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] - public bool? CanUnlockWithCode { get; set; } - - /// - /// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). - /// - [DataMember(Name = "capabilities_supported", IsRequired = false, EmitDefaultValue = false)] - public List CapabilitiesSupported { get; set; } - - /// - /// Unique identifier for the account associated with the device. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the device object was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object CustomMetadata { get; set; } - - /// - /// ID of the device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Manufacturer of the device. Represents the hardware brand, which may differ from the provider. - /// - [DataMember(Name = "device_manufacturer", IsRequired = false, EmitDefaultValue = false)] - public DeviceDeviceManufacturer? DeviceManufacturer { get; set; } - - /// - /// Provider of the device. Represents the third-party service through which the device is controlled. - /// - [DataMember(Name = "device_provider", IsRequired = false, EmitDefaultValue = false)] - public DeviceDeviceProvider? DeviceProvider { get; set; } - - /// - /// Type of the device. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public Device.DeviceTypeEnum DeviceType { get; set; } - - /// - /// Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Location information for the device. - /// - [DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] - public DeviceLocation? Location { get; set; } - - /// - /// Optional nickname to describe the device, settable through Seam. - /// - [DataMember(Name = "nickname", IsRequired = false, EmitDefaultValue = false)] - public string? Nickname { get; set; } - - /// - /// Properties of the device. - /// - [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] - public DeviceProperties Properties { get; set; } - - /// - /// IDs of the spaces the device is in. - /// - [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] - public List SpaceIds { get; set; } - - /// - /// Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// Unique identifier for the Seam workspace associated with the device. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceDeviceManufacturer_model")] - public class DeviceDeviceManufacturer - { - [JsonConstructorAttribute] - protected DeviceDeviceManufacturer() { } - - public DeviceDeviceManufacturer( - string displayName = default, - string? imageUrl = default, - string manufacturer = default - ) - { - DisplayName = displayName; - ImageUrl = imageUrl; - Manufacturer = manufacturer; - } - - /// - /// Display name for the manufacturer, such as `August`, `Yale`, `Salto`, and so on. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Image URL for the manufacturer logo. - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string? ImageUrl { get; set; } - - /// - /// Manufacturer identifier, such as `august`, `yale`, `salto`, and so on. - /// - [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] - public string Manufacturer { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceDeviceProvider_model")] - public class DeviceDeviceProvider - { - [JsonConstructorAttribute] - protected DeviceDeviceProvider() { } - - public DeviceDeviceProvider( - string deviceProviderName = default, - string displayName = default, - string? imageUrl = default, - string providerCategory = default - ) - { - DeviceProviderName = deviceProviderName; - DisplayName = displayName; - ImageUrl = imageUrl; - ProviderCategory = providerCategory; - } - - /// - /// Device provider name. Corresponds to the integration type, such as `august`, `schlage`, `yale_access`, and so on. - /// - [DataMember(Name = "device_provider_name", IsRequired = false, EmitDefaultValue = false)] - public string DeviceProviderName { get; set; } - - /// - /// Display name for the device provider type. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Image URL for the device provider. - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string? ImageUrl { get; set; } - - /// - /// Provider category. Indicates the third-party provider type, such as `stable`, for stable integrations, or `internal`, for internal integrations. - /// - [DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] - public string ProviderCategory { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceLocation_model")] - public class DeviceLocation - { - [JsonConstructorAttribute] - protected DeviceLocation() { } - - public DeviceLocation( - string? locationName = default, - string? roomName = default, - string? timeZone = default, - string? timezone = default - ) - { - LocationName = locationName; - RoomName = roomName; - TimeZone = timeZone; - Timezone = timezone; - } - - /// - /// Name of the device location. - /// - [DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] - public string? LocationName { get; set; } - - /// - /// Name of the room within the device location, when the provider reports one. - /// - [DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] - public string? RoomName { get; set; } - - /// - /// Time zone of the device location. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - /// - /// Time zone of the device location. - /// - [Obsolete("Use `time_zone` instead.")] - [DataMember(Name = "timezone", IsRequired = false, EmitDefaultValue = false)] - public string? Timezone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_deviceProperties_model")] - public class DeviceProperties - { - [JsonConstructorAttribute] - protected DeviceProperties() { } - - public DeviceProperties( - DevicePropertiesAccessoryKeypad? accessoryKeypad = default, - DevicePropertiesAppearance appearance = default, - DevicePropertiesBattery? battery = default, - float? batteryLevel = default, - List? currentlyTriggeringNoiseThresholdIds = default, - bool? hasDirectPower = default, - string? imageAltText = default, - string? imageUrl = default, - string? manufacturer = default, - DevicePropertiesModel model = default, - string name = default, - float? noiseLevelDecibels = default, - bool? offlineAccessCodesEnabled = default, - bool online = default, - bool? onlineAccessCodesEnabled = default, - string? serialNumber = default, - bool? supportsAccessoryKeypad = default, - bool? supportsOfflineAccessCodes = default, - DevicePropertiesAssaAbloyCredentialServiceMetadata? assaAbloyCredentialServiceMetadata = - default, - DevicePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = - default, - DevicePropertiesAkilesMetadata? akilesMetadata = default, - DevicePropertiesAqaraMetadata? aqaraMetadata = default, - DevicePropertiesAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, - DevicePropertiesAugustMetadata? augustMetadata = default, - DevicePropertiesAvigilonAltaMetadata? avigilonAltaMetadata = default, - DevicePropertiesBrivoMetadata? brivoMetadata = default, - DevicePropertiesControlbywebMetadata? controlbywebMetadata = default, - DevicePropertiesDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, - DevicePropertiesEcobeeMetadata? ecobeeMetadata = default, - DevicePropertiesFourSuitesMetadata? fourSuitesMetadata = default, - DevicePropertiesGenieMetadata? genieMetadata = default, - DevicePropertiesHoneywellResideoMetadata? honeywellResideoMetadata = default, - DevicePropertiesIglooMetadata? iglooMetadata = default, - DevicePropertiesIgloohomeMetadata? igloohomeMetadata = default, - DevicePropertiesKeynestMetadata? keynestMetadata = default, - DevicePropertiesKisiMetadata? kisiMetadata = default, - DevicePropertiesKorelockMetadata? korelockMetadata = default, - DevicePropertiesKwiksetMetadata? kwiksetMetadata = default, - DevicePropertiesLocklyMetadata? locklyMetadata = default, - DevicePropertiesMinutMetadata? minutMetadata = default, - DevicePropertiesNestMetadata? nestMetadata = default, - DevicePropertiesNoiseawareMetadata? noiseawareMetadata = default, - DevicePropertiesNukiMetadata? nukiMetadata = default, - DevicePropertiesOmnitecMetadata? omnitecMetadata = default, - DevicePropertiesRingMetadata? ringMetadata = default, - DevicePropertiesSaltoKsMetadata? saltoKsMetadata = default, - DevicePropertiesSaltoMetadata? saltoMetadata = default, - DevicePropertiesSchlageMetadata? schlageMetadata = default, - DevicePropertiesSeamBridgeMetadata? seamBridgeMetadata = default, - DevicePropertiesSensiMetadata? sensiMetadata = default, - DevicePropertiesSmartthingsMetadata? smartthingsMetadata = default, - DevicePropertiesTadoMetadata? tadoMetadata = default, - DevicePropertiesTedeeMetadata? tedeeMetadata = default, - DevicePropertiesTtlockMetadata? ttlockMetadata = default, - DevicePropertiesTwoNMetadata? twoNMetadata = default, - DevicePropertiesUltraloqMetadata? ultraloqMetadata = default, - DevicePropertiesVisionlineMetadata? visionlineMetadata = default, - DevicePropertiesWyzeMetadata? wyzeMetadata = default, - DevicePropertiesYacanMetadata? yacanMetadata = default, - float? autoLockDelaySeconds = default, - bool? autoLockEnabled = default, - bool? backupAccessCodePoolEnabled = default, - List? codeConstraints = default, - bool? doorOpen = default, - bool? hasNativeEntryEvents = default, - DevicePropertiesKeypadBattery? keypadBattery = default, - bool? locked = default, - float? maxActiveCodesSupported = default, - List? offlineTimeFrameOptions = default, - List? onlineTimeFrameOptions = default, - List? supportedCodeLengths = default, - bool? supportsBackupAccessCodePool = default, - DevicePropertiesActiveThermostatSchedule? activeThermostatSchedule = default, - string? activeThermostatScheduleId = default, - List? availableClimatePresetModes = - default, - List? availableClimatePresets = default, - List? availableFanModeSettings = default, - List? availableHvacModeSettings = - default, - DevicePropertiesCurrentClimateSetting? currentClimateSetting = default, - DevicePropertiesDefaultClimateSetting? defaultClimateSetting = default, - string? fallbackClimatePresetKey = default, - DeviceProperties.FanModeSettingEnum? fanModeSetting = default, - bool? isCooling = default, - bool? isFanRunning = default, - bool? isHeating = default, - bool? isTemporaryManualOverrideActive = default, - float? maxCoolingSetPointCelsius = default, - float? maxCoolingSetPointFahrenheit = default, - float? maxHeatingSetPointCelsius = default, - float? maxHeatingSetPointFahrenheit = default, - float? maxThermostatDailyProgramPeriodsPerDay = default, - float? maxUniqueClimatePresetsPerThermostatWeeklyProgram = default, - float? minCoolingSetPointCelsius = default, - float? minCoolingSetPointFahrenheit = default, - float? minHeatingCoolingDeltaCelsius = default, - float? minHeatingCoolingDeltaFahrenheit = default, - float? minHeatingSetPointCelsius = default, - float? minHeatingSetPointFahrenheit = default, - float? relativeHumidity = default, - float? temperatureCelsius = default, - float? temperatureFahrenheit = default, - DevicePropertiesTemperatureThreshold? temperatureThreshold = default, - float? thermostatDailyProgramPeriodPrecisionMinutes = default, - List? thermostatDailyPrograms = default, - DevicePropertiesThermostatWeeklyProgram? thermostatWeeklyProgram = default - ) - { - AccessoryKeypad = accessoryKeypad; - Appearance = appearance; - Battery = battery; - BatteryLevel = batteryLevel; - CurrentlyTriggeringNoiseThresholdIds = currentlyTriggeringNoiseThresholdIds; - HasDirectPower = hasDirectPower; - ImageAltText = imageAltText; - ImageUrl = imageUrl; - Manufacturer = manufacturer; - Model = model; - Name = name; - NoiseLevelDecibels = noiseLevelDecibels; - OfflineAccessCodesEnabled = offlineAccessCodesEnabled; - Online = online; - OnlineAccessCodesEnabled = onlineAccessCodesEnabled; - SerialNumber = serialNumber; - SupportsAccessoryKeypad = supportsAccessoryKeypad; - SupportsOfflineAccessCodes = supportsOfflineAccessCodes; - AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; - SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; - AkilesMetadata = akilesMetadata; - AqaraMetadata = aqaraMetadata; - AssaAbloyVostioMetadata = assaAbloyVostioMetadata; - AugustMetadata = augustMetadata; - AvigilonAltaMetadata = avigilonAltaMetadata; - BrivoMetadata = brivoMetadata; - ControlbywebMetadata = controlbywebMetadata; - DormakabaOracodeMetadata = dormakabaOracodeMetadata; - EcobeeMetadata = ecobeeMetadata; - FourSuitesMetadata = fourSuitesMetadata; - GenieMetadata = genieMetadata; - HoneywellResideoMetadata = honeywellResideoMetadata; - IglooMetadata = iglooMetadata; - IgloohomeMetadata = igloohomeMetadata; - KeynestMetadata = keynestMetadata; - KisiMetadata = kisiMetadata; - KorelockMetadata = korelockMetadata; - KwiksetMetadata = kwiksetMetadata; - LocklyMetadata = locklyMetadata; - MinutMetadata = minutMetadata; - NestMetadata = nestMetadata; - NoiseawareMetadata = noiseawareMetadata; - NukiMetadata = nukiMetadata; - OmnitecMetadata = omnitecMetadata; - RingMetadata = ringMetadata; - SaltoKsMetadata = saltoKsMetadata; - SaltoMetadata = saltoMetadata; - SchlageMetadata = schlageMetadata; - SeamBridgeMetadata = seamBridgeMetadata; - SensiMetadata = sensiMetadata; - SmartthingsMetadata = smartthingsMetadata; - TadoMetadata = tadoMetadata; - TedeeMetadata = tedeeMetadata; - TtlockMetadata = ttlockMetadata; - TwoNMetadata = twoNMetadata; - UltraloqMetadata = ultraloqMetadata; - VisionlineMetadata = visionlineMetadata; - WyzeMetadata = wyzeMetadata; - YacanMetadata = yacanMetadata; - AutoLockDelaySeconds = autoLockDelaySeconds; - AutoLockEnabled = autoLockEnabled; - BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; - CodeConstraints = codeConstraints; - DoorOpen = doorOpen; - HasNativeEntryEvents = hasNativeEntryEvents; - KeypadBattery = keypadBattery; - Locked = locked; - MaxActiveCodesSupported = maxActiveCodesSupported; - OfflineTimeFrameOptions = offlineTimeFrameOptions; - OnlineTimeFrameOptions = onlineTimeFrameOptions; - SupportedCodeLengths = supportedCodeLengths; - SupportsBackupAccessCodePool = supportsBackupAccessCodePool; - ActiveThermostatSchedule = activeThermostatSchedule; - ActiveThermostatScheduleId = activeThermostatScheduleId; - AvailableClimatePresetModes = availableClimatePresetModes; - AvailableClimatePresets = availableClimatePresets; - AvailableFanModeSettings = availableFanModeSettings; - AvailableHvacModeSettings = availableHvacModeSettings; - CurrentClimateSetting = currentClimateSetting; - DefaultClimateSetting = defaultClimateSetting; - FallbackClimatePresetKey = fallbackClimatePresetKey; - FanModeSetting = fanModeSetting; - IsCooling = isCooling; - IsFanRunning = isFanRunning; - IsHeating = isHeating; - IsTemporaryManualOverrideActive = isTemporaryManualOverrideActive; - MaxCoolingSetPointCelsius = maxCoolingSetPointCelsius; - MaxCoolingSetPointFahrenheit = maxCoolingSetPointFahrenheit; - MaxHeatingSetPointCelsius = maxHeatingSetPointCelsius; - MaxHeatingSetPointFahrenheit = maxHeatingSetPointFahrenheit; - MaxThermostatDailyProgramPeriodsPerDay = maxThermostatDailyProgramPeriodsPerDay; - MaxUniqueClimatePresetsPerThermostatWeeklyProgram = - maxUniqueClimatePresetsPerThermostatWeeklyProgram; - MinCoolingSetPointCelsius = minCoolingSetPointCelsius; - MinCoolingSetPointFahrenheit = minCoolingSetPointFahrenheit; - MinHeatingCoolingDeltaCelsius = minHeatingCoolingDeltaCelsius; - MinHeatingCoolingDeltaFahrenheit = minHeatingCoolingDeltaFahrenheit; - MinHeatingSetPointCelsius = minHeatingSetPointCelsius; - MinHeatingSetPointFahrenheit = minHeatingSetPointFahrenheit; - RelativeHumidity = relativeHumidity; - TemperatureCelsius = temperatureCelsius; - TemperatureFahrenheit = temperatureFahrenheit; - TemperatureThreshold = temperatureThreshold; - ThermostatDailyProgramPeriodPrecisionMinutes = - thermostatDailyProgramPeriodPrecisionMinutes; - ThermostatDailyPrograms = thermostatDailyPrograms; - ThermostatWeeklyProgram = thermostatWeeklyProgram; - } - - /// - /// Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AvailableClimatePresetModesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "home")] - Home = 1, - - [EnumMember(Value = "away")] - Away = 2, - - [EnumMember(Value = "wake")] - Wake = 3, - - [EnumMember(Value = "sleep")] - Sleep = 4, - - [EnumMember(Value = "occupied")] - Occupied = 5, - - [EnumMember(Value = "unoccupied")] - Unoccupied = 6, - } - - /// - /// Fan mode settings that the thermostat supports. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AvailableFanModeSettingsEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// HVAC mode settings that the thermostat supports. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum AvailableHvacModeSettingsEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "heat")] - Heat = 2, - - [EnumMember(Value = "cool")] - Cool = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - - [EnumMember(Value = "eco")] - Eco = 5, - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// Accessory keypad properties and state. - /// - [DataMember(Name = "accessory_keypad", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAccessoryKeypad? AccessoryKeypad { get; set; } - - /// - /// Appearance-related properties, as reported by the device. - /// - [DataMember(Name = "appearance", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAppearance Appearance { get; set; } - - /// - /// Represents the current status of the battery charge level. - /// - [DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesBattery? Battery { get; set; } - - /// - /// Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. - /// - [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] - public float? BatteryLevel { get; set; } - - /// - /// Array of noise threshold IDs that are currently triggering. - /// - [DataMember( - Name = "currently_triggering_noise_threshold_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List? CurrentlyTriggeringNoiseThresholdIds { get; set; } - - /// - /// Indicates whether the device has direct power. - /// - [DataMember(Name = "has_direct_power", IsRequired = false, EmitDefaultValue = false)] - public bool? HasDirectPower { get; set; } - - /// - /// Alt text for the device image. - /// - [DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] - public string? ImageAltText { get; set; } - - /// - /// Image URL for the device. - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string? ImageUrl { get; set; } - - /// - /// Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. - /// - [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] - public string? Manufacturer { get; set; } - - /// - /// Device model-related properties. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesModel Model { get; set; } - - /// - /// Name of the device. - /// - [Obsolete("use device.display_name instead")] - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Indicates current noise level in decibels, if the device supports noise detection. - /// - [DataMember(Name = "noise_level_decibels", IsRequired = false, EmitDefaultValue = false)] - public float? NoiseLevelDecibels { get; set; } - - /// - /// Indicates whether it is currently possible to use offline access codes for the device. - /// - [Obsolete("use device.can_program_offline_access_codes")] - [DataMember( - Name = "offline_access_codes_enabled", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OfflineAccessCodesEnabled { get; set; } - - /// - /// Indicates whether the device is online. - /// - [DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] - public bool Online { get; set; } - - /// - /// Indicates whether it is currently possible to use online access codes for the device. - /// - [Obsolete("use device.can_program_online_access_codes")] - [DataMember( - Name = "online_access_codes_enabled", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OnlineAccessCodesEnabled { get; set; } - - /// - /// Serial number of the device. - /// - [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] - public string? SerialNumber { get; set; } - - [Obsolete("use device.properties.model.can_connect_accessory_keypad")] - [DataMember( - Name = "supports_accessory_keypad", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? SupportsAccessoryKeypad { get; set; } - - [Obsolete("use offline_access_codes_enabled")] - [DataMember( - Name = "supports_offline_access_codes", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? SupportsOfflineAccessCodes { get; set; } - - /// - /// ASSA ABLOY Credential Service metadata for the phone. - /// - [DataMember( - Name = "assa_abloy_credential_service_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public DevicePropertiesAssaAbloyCredentialServiceMetadata? AssaAbloyCredentialServiceMetadata { get; set; } - - /// - /// Salto Space credential service metadata for the phone. - /// - [DataMember( - Name = "salto_space_credential_service_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public DevicePropertiesSaltoSpaceCredentialServiceMetadata? SaltoSpaceCredentialServiceMetadata { get; set; } - - /// - /// Metadata for an Akiles device. - /// - [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAkilesMetadata? AkilesMetadata { get; set; } - - /// - /// Metadata for an Aqara device. - /// - [DataMember(Name = "aqara_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAqaraMetadata? AqaraMetadata { get; set; } - - /// - /// Metadata for an ASSA ABLOY Vostio system. - /// - [DataMember( - Name = "assa_abloy_vostio_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public DevicePropertiesAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - - /// - /// Metadata for an August device. - /// - [DataMember(Name = "august_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAugustMetadata? AugustMetadata { get; set; } - - /// - /// Metadata for an Avigilon Alta system. - /// - [DataMember(Name = "avigilon_alta_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAvigilonAltaMetadata? AvigilonAltaMetadata { get; set; } - - /// - /// Metadata for a Brivo device. - /// - [DataMember(Name = "brivo_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesBrivoMetadata? BrivoMetadata { get; set; } - - /// - /// Metadata for a ControlByWeb device. - /// - [DataMember(Name = "controlbyweb_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesControlbywebMetadata? ControlbywebMetadata { get; set; } - - /// - /// Metadata for a dormakaba Oracode device. - /// - [DataMember( - Name = "dormakaba_oracode_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public DevicePropertiesDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } - - /// - /// Metadata for an ecobee device. - /// - [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesEcobeeMetadata? EcobeeMetadata { get; set; } - - /// - /// Metadata for a 4SUITES device. - /// - [DataMember(Name = "four_suites_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesFourSuitesMetadata? FourSuitesMetadata { get; set; } - - /// - /// Metadata for a Genie device. - /// - [DataMember(Name = "genie_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesGenieMetadata? GenieMetadata { get; set; } - - /// - /// Metadata for a Honeywell Resideo device. - /// - [DataMember( - Name = "honeywell_resideo_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public DevicePropertiesHoneywellResideoMetadata? HoneywellResideoMetadata { get; set; } - - /// - /// Metadata for an igloo device. - /// - [DataMember(Name = "igloo_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesIglooMetadata? IglooMetadata { get; set; } - - /// - /// Metadata for an igloohome device. - /// - [DataMember(Name = "igloohome_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesIgloohomeMetadata? IgloohomeMetadata { get; set; } - - /// - /// Metadata for a KeyNest device. - /// - [DataMember(Name = "keynest_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesKeynestMetadata? KeynestMetadata { get; set; } - - /// - /// Metadata for a Kisi device. - /// - [DataMember(Name = "kisi_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesKisiMetadata? KisiMetadata { get; set; } - - /// - /// Metadata for a Korelock device. - /// - [DataMember(Name = "korelock_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesKorelockMetadata? KorelockMetadata { get; set; } - - /// - /// Metadata for a Kwikset device. - /// - [DataMember(Name = "kwikset_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesKwiksetMetadata? KwiksetMetadata { get; set; } - - /// - /// Metadata for a Lockly device. - /// - [DataMember(Name = "lockly_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesLocklyMetadata? LocklyMetadata { get; set; } - - /// - /// Metadata for a Minut device. - /// - [DataMember(Name = "minut_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesMinutMetadata? MinutMetadata { get; set; } - - /// - /// Metadata for a Google Nest device. - /// - [DataMember(Name = "nest_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesNestMetadata? NestMetadata { get; set; } - - /// - /// Metadata for a NoiseAware device. - /// - [DataMember(Name = "noiseaware_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesNoiseawareMetadata? NoiseawareMetadata { get; set; } - - /// - /// Metadata for a Nuki device. - /// - [DataMember(Name = "nuki_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesNukiMetadata? NukiMetadata { get; set; } - - /// - /// Metadata for an Omnitec device. - /// - [DataMember(Name = "omnitec_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesOmnitecMetadata? OmnitecMetadata { get; set; } - - /// - /// Metadata for a Ring device. - /// - [DataMember(Name = "ring_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesRingMetadata? RingMetadata { get; set; } - - /// - /// Metadata for a Salto KS device. - /// - [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesSaltoKsMetadata? SaltoKsMetadata { get; set; } - - /// - /// Metada for a Salto device. - /// - [Obsolete("Use `salto_ks_metadata` instead.")] - [DataMember(Name = "salto_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesSaltoMetadata? SaltoMetadata { get; set; } - - /// - /// Metadata for a Schlage device. - /// - [DataMember(Name = "schlage_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesSchlageMetadata? SchlageMetadata { get; set; } - - /// - /// Metadata for Seam Bridge. - /// - [DataMember(Name = "seam_bridge_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesSeamBridgeMetadata? SeamBridgeMetadata { get; set; } - - /// - /// Metadata for a Sensi device. - /// - [DataMember(Name = "sensi_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesSensiMetadata? SensiMetadata { get; set; } - - /// - /// Metadata for a SmartThings device. - /// - [DataMember(Name = "smartthings_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesSmartthingsMetadata? SmartthingsMetadata { get; set; } - - /// - /// Metadata for a tado° device. - /// - [DataMember(Name = "tado_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesTadoMetadata? TadoMetadata { get; set; } - - /// - /// Metadata for a Tedee device. - /// - [DataMember(Name = "tedee_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesTedeeMetadata? TedeeMetadata { get; set; } - - /// - /// Metadata for a TTLock device. - /// - [DataMember(Name = "ttlock_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesTtlockMetadata? TtlockMetadata { get; set; } - - /// - /// Metadata for a 2N device. - /// - [DataMember(Name = "two_n_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesTwoNMetadata? TwoNMetadata { get; set; } - - /// - /// Metadata for an Ultraloq device. - /// - [DataMember(Name = "ultraloq_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesUltraloqMetadata? UltraloqMetadata { get; set; } - - /// - /// Metadata for an ASSA ABLOY Visionline system. - /// - [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesVisionlineMetadata? VisionlineMetadata { get; set; } - - /// - /// Metadata for a Wyze device. - /// - [DataMember(Name = "wyze_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesWyzeMetadata? WyzeMetadata { get; set; } - - /// - /// Metadata for a Yacan device. - /// - [DataMember(Name = "yacan_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesYacanMetadata? YacanMetadata { get; set; } - - /// - /// The delay in seconds before the lock automatically locks after being unlocked. - /// - [DataMember(Name = "auto_lock_delay_seconds", IsRequired = false, EmitDefaultValue = false)] - public float? AutoLockDelaySeconds { get; set; } - - /// - /// Indicates whether automatic locking is enabled. - /// - [DataMember(Name = "auto_lock_enabled", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoLockEnabled { get; set; } - - /// - /// Indicates whether the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is currently enabled for the device. To disable it, set this to `false` using [/devices/update](https://docs.seam.co/api/devices/update). - /// - [DataMember( - Name = "backup_access_code_pool_enabled", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? BackupAccessCodePoolEnabled { get; set; } - - /// - /// Constraints on access codes for the device. Seam represents each constraint as an object with a `constraint_type` property. Depending on the constraint type, there may also be additional properties. Note that some constraints are manufacturer- or device-specific. - /// - [DataMember(Name = "code_constraints", IsRequired = false, EmitDefaultValue = false)] - public List? CodeConstraints { get; set; } - - /// - /// Indicates whether the door is open. - /// - [DataMember(Name = "door_open", IsRequired = false, EmitDefaultValue = false)] - public bool? DoorOpen { get; set; } - - /// - /// Indicates whether the device supports native entry events. - /// - [DataMember(Name = "has_native_entry_events", IsRequired = false, EmitDefaultValue = false)] - public bool? HasNativeEntryEvents { get; set; } - - /// - /// Keypad battery status. - /// - [DataMember(Name = "keypad_battery", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesKeypadBattery? KeypadBattery { get; set; } - - /// - /// Indicates whether the lock is locked. - /// - [DataMember(Name = "locked", IsRequired = false, EmitDefaultValue = false)] - public bool? Locked { get; set; } - - /// - /// Maximum number of active access codes that the device supports. - /// - [DataMember( - Name = "max_active_codes_supported", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MaxActiveCodesSupported { get; set; } - - /// - /// Time frames that may be requested when creating an offline access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. - /// - [DataMember( - Name = "offline_time_frame_options", - IsRequired = false, - EmitDefaultValue = false - )] - public List? OfflineTimeFrameOptions { get; set; } - - /// - /// Time frames that may be requested when creating an online access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. - /// - [DataMember( - Name = "online_time_frame_options", - IsRequired = false, - EmitDefaultValue = false - )] - public List? OnlineTimeFrameOptions { get; set; } - - /// - /// Supported code lengths for access codes. - /// - [DataMember(Name = "supported_code_lengths", IsRequired = false, EmitDefaultValue = false)] - public List? SupportedCodeLengths { get; set; } - - /// - /// Indicates whether the device supports a [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes). - /// - [DataMember( - Name = "supports_backup_access_code_pool", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? SupportsBackupAccessCodePool { get; set; } - - /// - /// Active [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [Obsolete("Use `active_thermostat_schedule_id` with `/thermostats/schedules/get` instead.")] - [DataMember( - Name = "active_thermostat_schedule", - IsRequired = false, - EmitDefaultValue = false - )] - public DevicePropertiesActiveThermostatSchedule? ActiveThermostatSchedule { get; set; } - - /// - /// ID of the active [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember( - Name = "active_thermostat_schedule_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ActiveThermostatScheduleId { get; set; } - - /// - /// Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". - /// - [DataMember( - Name = "available_climate_preset_modes", - IsRequired = false, - EmitDefaultValue = false - )] - public List? AvailableClimatePresetModes { get; set; } - - /// - /// Available [climate presets](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for the thermostat. - /// - [DataMember( - Name = "available_climate_presets", - IsRequired = false, - EmitDefaultValue = false - )] - public List? AvailableClimatePresets { get; set; } - - /// - /// Fan mode settings that the thermostat supports. - /// - [DataMember( - Name = "available_fan_mode_settings", - IsRequired = false, - EmitDefaultValue = false - )] - public List? AvailableFanModeSettings { get; set; } - - /// - /// HVAC mode settings that the thermostat supports. - /// - [DataMember( - Name = "available_hvac_mode_settings", - IsRequired = false, - EmitDefaultValue = false - )] - public List? AvailableHvacModeSettings { get; set; } - - /// - /// Current climate setting. - /// - [DataMember(Name = "current_climate_setting", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesCurrentClimateSetting? CurrentClimateSetting { get; set; } - - [Obsolete("use fallback_climate_preset_key to specify a fallback climate preset instead.")] - [DataMember(Name = "default_climate_setting", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesDefaultClimateSetting? DefaultClimateSetting { get; set; } - - /// - /// Key of the [fallback climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) for the thermostat. - /// - [DataMember( - Name = "fallback_climate_preset_key", - IsRequired = false, - EmitDefaultValue = false - )] - public string? FallbackClimatePresetKey { get; set; } - - [Obsolete("Use `current_climate_setting.fan_mode_setting` instead.")] - [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public DeviceProperties.FanModeSettingEnum? FanModeSetting { get; set; } - - /// - /// Indicates whether the connected HVAC system is currently cooling, as reported by the thermostat. - /// - [DataMember(Name = "is_cooling", IsRequired = false, EmitDefaultValue = false)] - public bool? IsCooling { get; set; } - - /// - /// Indicates whether the fan in the connected HVAC system is currently running, as reported by the thermostat. - /// - [DataMember(Name = "is_fan_running", IsRequired = false, EmitDefaultValue = false)] - public bool? IsFanRunning { get; set; } - - /// - /// Indicates whether the connected HVAC system is currently heating, as reported by the thermostat. - /// - [DataMember(Name = "is_heating", IsRequired = false, EmitDefaultValue = false)] - public bool? IsHeating { get; set; } - - /// - /// Indicates whether the current thermostat settings differ from the most recent active program or schedule that Seam activated. For this condition to occur, `current_climate_setting.manual_override_allowed` must also be `true`. - /// - [DataMember( - Name = "is_temporary_manual_override_active", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsTemporaryManualOverrideActive { get; set; } - - /// - /// Maximum [cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. - /// - [DataMember( - Name = "max_cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MaxCoolingSetPointCelsius { get; set; } - - /// - /// Maximum [cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. - /// - [DataMember( - Name = "max_cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MaxCoolingSetPointFahrenheit { get; set; } - - /// - /// Maximum [heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. - /// - [DataMember( - Name = "max_heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MaxHeatingSetPointCelsius { get; set; } - - /// - /// Maximum [heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. - /// - [DataMember( - Name = "max_heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MaxHeatingSetPointFahrenheit { get; set; } - - /// - /// Maximum number of periods that the thermostat can support per day. For example, if the thermostat supports 4 periods per day, this value is 4. - /// - [DataMember( - Name = "max_thermostat_daily_program_periods_per_day", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MaxThermostatDailyProgramPeriodsPerDay { get; set; } - - /// - /// Maximum number of climate presets that the thermostat can support for weekly programming. - /// - [DataMember( - Name = "max_unique_climate_presets_per_thermostat_weekly_program", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MaxUniqueClimatePresetsPerThermostatWeeklyProgram { get; set; } - - /// - /// Minimum [cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. - /// - [DataMember( - Name = "min_cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MinCoolingSetPointCelsius { get; set; } - - /// - /// Minimum [cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. - /// - [DataMember( - Name = "min_cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MinCoolingSetPointFahrenheit { get; set; } - - /// - /// Minimum [temperature difference](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °C between the cooling and heating set points when in heat-cool (auto) mode. - /// - [DataMember( - Name = "min_heating_cooling_delta_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MinHeatingCoolingDeltaCelsius { get; set; } - - /// - /// Minimum [temperature difference](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °F between the cooling and heating set points when in heat-cool (auto) mode. - /// - [DataMember( - Name = "min_heating_cooling_delta_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MinHeatingCoolingDeltaFahrenheit { get; set; } - - /// - /// Minimum [heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. - /// - [DataMember( - Name = "min_heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MinHeatingSetPointCelsius { get; set; } - - /// - /// Minimum [heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. - /// - [DataMember( - Name = "min_heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? MinHeatingSetPointFahrenheit { get; set; } - - /// - /// Reported relative humidity, as a value between 0 and 1, inclusive. - /// - [DataMember(Name = "relative_humidity", IsRequired = false, EmitDefaultValue = false)] - public float? RelativeHumidity { get; set; } - - /// - /// Reported temperature in °C. - /// - [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? TemperatureCelsius { get; set; } - - /// - /// Reported temperature in °F. - /// - [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float? TemperatureFahrenheit { get; set; } - - /// - /// Current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. - /// - [DataMember(Name = "temperature_threshold", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesTemperatureThreshold? TemperatureThreshold { get; set; } - - /// - /// Precision of the thermostat's period in minutes. For example, if the thermostat supports 15-minute periods, this value is 15. All values are relative to the top of the hour, so for 15 minutes, the periods would be 0, 15, 30, and 45 minutes past the hour. - /// - [DataMember( - Name = "thermostat_daily_program_period_precision_minutes", - IsRequired = false, - EmitDefaultValue = false - )] - public float? ThermostatDailyProgramPeriodPrecisionMinutes { get; set; } - - /// - /// Configured [daily programs](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. - /// - [DataMember( - Name = "thermostat_daily_programs", - IsRequired = false, - EmitDefaultValue = false - )] - public List? ThermostatDailyPrograms { get; set; } - - /// - /// Current [weekly program](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. - /// - [DataMember( - Name = "thermostat_weekly_program", - IsRequired = false, - EmitDefaultValue = false - )] - public DevicePropertiesThermostatWeeklyProgram? ThermostatWeeklyProgram { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAccessoryKeypad_model")] - public class DevicePropertiesAccessoryKeypad - { - [JsonConstructorAttribute] - protected DevicePropertiesAccessoryKeypad() { } - - public DevicePropertiesAccessoryKeypad( - DevicePropertiesAccessoryKeypadBattery? battery = default, - bool isConnected = default - ) - { - Battery = battery; - IsConnected = isConnected; - } - - /// - /// Keypad battery properties. - /// - [DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAccessoryKeypadBattery? Battery { get; set; } - - /// - /// Indicates if an accessory keypad is connected to the device. - /// - [DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] - public bool IsConnected { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAccessoryKeypadBattery_model")] - public class DevicePropertiesAccessoryKeypadBattery - { - [JsonConstructorAttribute] - protected DevicePropertiesAccessoryKeypadBattery() { } - - public DevicePropertiesAccessoryKeypadBattery(float level = default) - { - Level = level; - } - - [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] - public float Level { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAppearance_model")] - public class DevicePropertiesAppearance - { - [JsonConstructorAttribute] - protected DevicePropertiesAppearance() { } - - public DevicePropertiesAppearance(string name = default) - { - Name = name; - } - - /// - /// Name of the device as seen from the provider API and application, not settable through Seam. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesBattery_model")] - public class DevicePropertiesBattery - { - [JsonConstructorAttribute] - protected DevicePropertiesBattery() { } - - public DevicePropertiesBattery( - float level = default, - DevicePropertiesBattery.StatusEnum status = default - ) - { - Level = level; - Status = status; - } - - /// - /// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "critical")] - Critical = 1, - - [EnumMember(Value = "low")] - Low = 2, - - [EnumMember(Value = "good")] - Good = 3, - - [EnumMember(Value = "full")] - Full = 4, - } - - /// - /// Battery charge level as a value between 0 and 1, inclusive. - /// - [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] - public float Level { get; set; } - - /// - /// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesBattery.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesModel_model")] - public class DevicePropertiesModel - { - [JsonConstructorAttribute] - protected DevicePropertiesModel() { } - - public DevicePropertiesModel( - bool? accessoryKeypadSupported = default, - bool? canConnectAccessoryKeypad = default, - string displayName = default, - bool? hasBuiltInKeypad = default, - string manufacturerDisplayName = default, - bool? offlineAccessCodesSupported = default, - bool? onlineAccessCodesSupported = default - ) - { - AccessoryKeypadSupported = accessoryKeypadSupported; - CanConnectAccessoryKeypad = canConnectAccessoryKeypad; - DisplayName = displayName; - HasBuiltInKeypad = hasBuiltInKeypad; - ManufacturerDisplayName = manufacturerDisplayName; - OfflineAccessCodesSupported = offlineAccessCodesSupported; - OnlineAccessCodesSupported = onlineAccessCodesSupported; - } - - [Obsolete("use device.properties.model.can_connect_accessory_keypad")] - [DataMember( - Name = "accessory_keypad_supported", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AccessoryKeypadSupported { get; set; } - - /// - /// Indicates whether the device can connect a accessory keypad. - /// - [DataMember( - Name = "can_connect_accessory_keypad", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanConnectAccessoryKeypad { get; set; } - - /// - /// Display name of the device model. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Indicates whether the device has a built in accessory keypad. - /// - [DataMember(Name = "has_built_in_keypad", IsRequired = false, EmitDefaultValue = false)] - public bool? HasBuiltInKeypad { get; set; } - - /// - /// Display name that corresponds to the manufacturer-specific terminology for the device. - /// - [DataMember( - Name = "manufacturer_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string ManufacturerDisplayName { get; set; } - - [Obsolete("use device.can_program_offline_access_codes.")] - [DataMember( - Name = "offline_access_codes_supported", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OfflineAccessCodesSupported { get; set; } - - [Obsolete("use device.can_program_online_access_codes.")] - [DataMember( - Name = "online_access_codes_supported", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OnlineAccessCodesSupported { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAssaAbloyCredentialServiceMetadata_model")] - public class DevicePropertiesAssaAbloyCredentialServiceMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesAssaAbloyCredentialServiceMetadata() { } - - public DevicePropertiesAssaAbloyCredentialServiceMetadata( - List? endpoints = default, - bool? hasActiveEndpoint = default - ) - { - Endpoints = endpoints; - HasActiveEndpoint = hasActiveEndpoint; - } - - /// - /// Endpoints associated with the phone. - /// - [DataMember(Name = "endpoints", IsRequired = false, EmitDefaultValue = false)] - public List? Endpoints { get; set; } - - /// - /// Indicates whether the credential service has active endpoints associated with the phone. - /// - [DataMember(Name = "has_active_endpoint", IsRequired = false, EmitDefaultValue = false)] - public bool? HasActiveEndpoint { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_devicePropertiesAssaAbloyCredentialServiceMetadataEndpoints_model" - )] - public class DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints - { - [JsonConstructorAttribute] - protected DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints() { } - - public DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints( - string? endpointId = default, - bool? isActive = default - ) - { - EndpointId = endpointId; - IsActive = isActive; - } - - /// - /// ID of the associated endpoint. - /// - [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] - public string? EndpointId { get; set; } - - /// - /// Indicated whether the endpoint is active. - /// - [DataMember(Name = "is_active", IsRequired = false, EmitDefaultValue = false)] - public bool? IsActive { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesSaltoSpaceCredentialServiceMetadata_model")] - public class DevicePropertiesSaltoSpaceCredentialServiceMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesSaltoSpaceCredentialServiceMetadata() { } - - public DevicePropertiesSaltoSpaceCredentialServiceMetadata(bool? hasActivePhone = default) - { - HasActivePhone = hasActivePhone; - } - - /// - /// Indicates whether the credential service has an active associated phone. - /// - [DataMember(Name = "has_active_phone", IsRequired = false, EmitDefaultValue = false)] - public bool? HasActivePhone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAkilesMetadata_model")] - public class DevicePropertiesAkilesMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesAkilesMetadata() { } - - public DevicePropertiesAkilesMetadata( - string? memberGroupId = default, - string? gadgetId = default, - string? gadgetName = default, - string? productName = default - ) - { - MemberGroupId = memberGroupId; - GadgetId = gadgetId; - GadgetName = gadgetName; - ProductName = productName; - } - - /// - /// Group ID to which to add users for an Akiles device. - /// - [DataMember(Name = "member_group_id", IsRequired = false, EmitDefaultValue = false)] - public string? MemberGroupId { get; set; } - - /// - /// Gadget ID for an Akiles device. - /// - [DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] - public string? GadgetId { get; set; } - - /// - /// Gadget name for an Akiles device. - /// - [DataMember(Name = "gadget_name", IsRequired = false, EmitDefaultValue = false)] - public string? GadgetName { get; set; } - - /// - /// Product name for an Akiles device. - /// - [DataMember(Name = "product_name", IsRequired = false, EmitDefaultValue = false)] - public string? ProductName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAqaraMetadata_model")] - public class DevicePropertiesAqaraMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesAqaraMetadata() { } - - public DevicePropertiesAqaraMetadata( - string? deviceName = default, - string? did = default, - string? firmwareVersion = default, - string? model = default, - float? modelType = default, - string? parentDid = default, - string? positionId = default, - string? timeZone = default - ) - { - DeviceName = deviceName; - Did = did; - FirmwareVersion = firmwareVersion; - Model = model; - ModelType = modelType; - ParentDid = parentDid; - PositionId = positionId; - TimeZone = timeZone; - } - - /// - /// Device name for an Aqara device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Device ID (did) for an Aqara device. - /// - [DataMember(Name = "did", IsRequired = false, EmitDefaultValue = false)] - public string? Did { get; set; } - - /// - /// Firmware version for an Aqara device. - /// - [DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] - public string? FirmwareVersion { get; set; } - - /// - /// Model identifier for an Aqara device. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public string? Model { get; set; } - - /// - /// Model type for an Aqara device. - /// - [DataMember(Name = "model_type", IsRequired = false, EmitDefaultValue = false)] - public float? ModelType { get; set; } - - /// - /// Parent gateway device ID for an Aqara device. - /// - [DataMember(Name = "parent_did", IsRequired = false, EmitDefaultValue = false)] - public string? ParentDid { get; set; } - - /// - /// Position (room) ID for an Aqara device. - /// - [DataMember(Name = "position_id", IsRequired = false, EmitDefaultValue = false)] - public string? PositionId { get; set; } - - /// - /// Time zone reported for an Aqara device (e.g. GMT-07:00). - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAssaAbloyVostioMetadata_model")] - public class DevicePropertiesAssaAbloyVostioMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesAssaAbloyVostioMetadata() { } - - public DevicePropertiesAssaAbloyVostioMetadata(string? encoderName = default) - { - EncoderName = encoderName; - } - - /// - /// Encoder name for an ASSA ABLOY Vostio system. - /// - [DataMember(Name = "encoder_name", IsRequired = false, EmitDefaultValue = false)] - public string? EncoderName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAugustMetadata_model")] - public class DevicePropertiesAugustMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesAugustMetadata() { } - - public DevicePropertiesAugustMetadata( - bool? hasKeypad = default, - string? houseId = default, - string? houseName = default, - string? keypadBatteryLevel = default, - string? lockId = default, - string? lockName = default, - string? model = default - ) - { - HasKeypad = hasKeypad; - HouseId = houseId; - HouseName = houseName; - KeypadBatteryLevel = keypadBatteryLevel; - LockId = lockId; - LockName = lockName; - Model = model; - } - - /// - /// Indicates whether an August device has a keypad. - /// - [DataMember(Name = "has_keypad", IsRequired = false, EmitDefaultValue = false)] - public bool? HasKeypad { get; set; } - - /// - /// House ID for an August device. - /// - [DataMember(Name = "house_id", IsRequired = false, EmitDefaultValue = false)] - public string? HouseId { get; set; } - - /// - /// House name for an August device. - /// - [DataMember(Name = "house_name", IsRequired = false, EmitDefaultValue = false)] - public string? HouseName { get; set; } - - /// - /// Keypad battery level for an August device. - /// - [DataMember(Name = "keypad_battery_level", IsRequired = false, EmitDefaultValue = false)] - public string? KeypadBatteryLevel { get; set; } - - /// - /// Lock ID for an August device. - /// - [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] - public string? LockId { get; set; } - - /// - /// Lock name for an August device. - /// - [DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] - public string? LockName { get; set; } - - /// - /// Model for an August device. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public string? Model { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAvigilonAltaMetadata_model")] - public class DevicePropertiesAvigilonAltaMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesAvigilonAltaMetadata() { } - - public DevicePropertiesAvigilonAltaMetadata( - string? entryName = default, - float? entryRelaysTotalCount = default, - string? orgName = default, - float? siteId = default, - string? siteName = default, - float? zoneId = default, - string? zoneName = default - ) - { - EntryName = entryName; - EntryRelaysTotalCount = entryRelaysTotalCount; - OrgName = orgName; - SiteId = siteId; - SiteName = siteName; - ZoneId = zoneId; - ZoneName = zoneName; - } - - /// - /// Entry name for an Avigilon Alta system. - /// - [DataMember(Name = "entry_name", IsRequired = false, EmitDefaultValue = false)] - public string? EntryName { get; set; } - - /// - /// Total count of entry relays for an Avigilon Alta system. - /// - [DataMember( - Name = "entry_relays_total_count", - IsRequired = false, - EmitDefaultValue = false - )] - public float? EntryRelaysTotalCount { get; set; } - - /// - /// Organization name for an Avigilon Alta system. - /// - [DataMember(Name = "org_name", IsRequired = false, EmitDefaultValue = false)] - public string? OrgName { get; set; } - - /// - /// Site ID for an Avigilon Alta system. - /// - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public float? SiteId { get; set; } - - /// - /// Site name for an Avigilon Alta system. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - /// - /// Zone ID for an Avigilon Alta system. - /// - [DataMember(Name = "zone_id", IsRequired = false, EmitDefaultValue = false)] - public float? ZoneId { get; set; } - - /// - /// Zone name for an Avigilon Alta system. - /// - [DataMember(Name = "zone_name", IsRequired = false, EmitDefaultValue = false)] - public string? ZoneName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesBrivoMetadata_model")] - public class DevicePropertiesBrivoMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesBrivoMetadata() { } - - public DevicePropertiesBrivoMetadata( - bool? activationEnabled = default, - string? deviceName = default - ) - { - ActivationEnabled = activationEnabled; - DeviceName = deviceName; - } - - /// - /// Indicates whether the Brivo access point has activation (remote unlock) enabled. - /// - [DataMember(Name = "activation_enabled", IsRequired = false, EmitDefaultValue = false)] - public bool? ActivationEnabled { get; set; } - - /// - /// Device name for a Brivo device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesControlbywebMetadata_model")] - public class DevicePropertiesControlbywebMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesControlbywebMetadata() { } - - public DevicePropertiesControlbywebMetadata( - string? deviceId = default, - string? deviceName = default, - string? relayName = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - RelayName = relayName; - } - - /// - /// Device ID for a ControlByWeb device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a ControlByWeb device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Relay name for a ControlByWeb device. - /// - [DataMember(Name = "relay_name", IsRequired = false, EmitDefaultValue = false)] - public string? RelayName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeMetadata_model")] - public class DevicePropertiesDormakabaOracodeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesDormakabaOracodeMetadata() { } - - public DevicePropertiesDormakabaOracodeMetadata( - string? deviceId = default, - float? doorId = default, - bool? doorIsWireless = default, - string? doorName = default, - string? ianaTimezone = default, - List? predefinedTimeSlots = - default, - float? siteId = default, - string? siteName = default - ) - { - DeviceId = deviceId; - DoorId = doorId; - DoorIsWireless = doorIsWireless; - DoorName = doorName; - IanaTimezone = ianaTimezone; - PredefinedTimeSlots = predefinedTimeSlots; - SiteId = siteId; - SiteName = siteName; - } - - /// - /// Device ID for a dormakaba Oracode device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Door ID for a dormakaba Oracode device. - /// - [DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] - public float? DoorId { get; set; } - - /// - /// Indicates whether a door is wireless for a dormakaba Oracode device. - /// - [DataMember(Name = "door_is_wireless", IsRequired = false, EmitDefaultValue = false)] - public bool? DoorIsWireless { get; set; } - - /// - /// Door name for a dormakaba Oracode device. - /// - [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] - public string? DoorName { get; set; } - - /// - /// IANA time zone for a dormakaba Oracode device. - /// - [DataMember(Name = "iana_timezone", IsRequired = false, EmitDefaultValue = false)] - public string? IanaTimezone { get; set; } - - /// - /// Predefined time slots for a dormakaba Oracode device. - /// - [DataMember(Name = "predefined_time_slots", IsRequired = false, EmitDefaultValue = false)] - public List? PredefinedTimeSlots { get; set; } - - /// - /// Site ID for a dormakaba Oracode device. - /// - [Obsolete("Previously marked as \"@DEPRECATED.\"")] - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public float? SiteId { get; set; } - - /// - /// Site name for a dormakaba Oracode device. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_devicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots_model" - )] - public class DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots - { - [JsonConstructorAttribute] - protected DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots() { } - - public DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots( - string? checkInTime = default, - string? checkOutTime = default, - string? dormakabaOracodeUserLevelId = default, - float? dormakabaOracodeUserLevelPrefix = default, - bool? is_24Hour = default, - bool? isBiweeklyMode = default, - bool? isMaster = default, - bool? isOneShot = default, - string? name = default, - float? prefix = default - ) - { - CheckInTime = checkInTime; - CheckOutTime = checkOutTime; - DormakabaOracodeUserLevelId = dormakabaOracodeUserLevelId; - DormakabaOracodeUserLevelPrefix = dormakabaOracodeUserLevelPrefix; - Is_24Hour = is_24Hour; - IsBiweeklyMode = isBiweeklyMode; - IsMaster = isMaster; - IsOneShot = isOneShot; - Name = name; - Prefix = prefix; - } - - /// - /// Check in time for a time slot for a dormakaba Oracode device. - /// - [DataMember(Name = "check_in_time", IsRequired = false, EmitDefaultValue = false)] - public string? CheckInTime { get; set; } - - /// - /// Checkout time for a time slot for a dormakaba Oracode device. - /// - [DataMember(Name = "check_out_time", IsRequired = false, EmitDefaultValue = false)] - public string? CheckOutTime { get; set; } - - /// - /// ID of a user level for a dormakaba Oracode device. - /// - [DataMember( - Name = "dormakaba_oracode_user_level_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? DormakabaOracodeUserLevelId { get; set; } - - /// - /// Prefix for a user level for a dormakaba Oracode device. - /// - [DataMember( - Name = "dormakaba_oracode_user_level_prefix", - IsRequired = false, - EmitDefaultValue = false - )] - public float? DormakabaOracodeUserLevelPrefix { get; set; } - - /// - /// Indicates whether a time slot for a dormakaba Oracode device is a 24-hour time slot. - /// - [DataMember(Name = "is_24_hour", IsRequired = false, EmitDefaultValue = false)] - public bool? Is_24Hour { get; set; } - - /// - /// Indicates whether a time slot for a dormakaba Oracode device is in biweekly mode. - /// - [DataMember(Name = "is_biweekly_mode", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBiweeklyMode { get; set; } - - /// - /// Indicates whether a time slot for a dormakaba Oracode device is a master time slot. - /// - [DataMember(Name = "is_master", IsRequired = false, EmitDefaultValue = false)] - public bool? IsMaster { get; set; } - - /// - /// Indicates whether a time slot for a dormakaba Oracode device is a one-shot time slot. - /// - [DataMember(Name = "is_one_shot", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOneShot { get; set; } - - /// - /// Name of a time slot for a dormakaba Oracode device. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Prefix for a time slot for a dormakaba Oracode device. - /// - [DataMember(Name = "prefix", IsRequired = false, EmitDefaultValue = false)] - public float? Prefix { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesEcobeeMetadata_model")] - public class DevicePropertiesEcobeeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesEcobeeMetadata() { } - - public DevicePropertiesEcobeeMetadata( - string? deviceName = default, - string? ecobeeDeviceId = default - ) - { - DeviceName = deviceName; - EcobeeDeviceId = ecobeeDeviceId; - } - - /// - /// Device name for an ecobee device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Device ID for an ecobee device. - /// - [DataMember(Name = "ecobee_device_id", IsRequired = false, EmitDefaultValue = false)] - public string? EcobeeDeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesFourSuitesMetadata_model")] - public class DevicePropertiesFourSuitesMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesFourSuitesMetadata() { } - - public DevicePropertiesFourSuitesMetadata( - float? deviceId = default, - string? deviceName = default, - float? recloseDelayInSeconds = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - RecloseDelayInSeconds = recloseDelayInSeconds; - } - - /// - /// Device ID for a 4SUITES device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public float? DeviceId { get; set; } - - /// - /// Device name for a 4SUITES device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Reclose delay, in seconds, for a 4SUITES device. - /// - [DataMember( - Name = "reclose_delay_in_seconds", - IsRequired = false, - EmitDefaultValue = false - )] - public float? RecloseDelayInSeconds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesGenieMetadata_model")] - public class DevicePropertiesGenieMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesGenieMetadata() { } - - public DevicePropertiesGenieMetadata( - string? deviceName = default, - string? doorName = default - ) - { - DeviceName = deviceName; - DoorName = doorName; - } - - /// - /// Lock name for a Genie device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Door name for a Genie device. - /// - [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] - public string? DoorName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesHoneywellResideoMetadata_model")] - public class DevicePropertiesHoneywellResideoMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesHoneywellResideoMetadata() { } - - public DevicePropertiesHoneywellResideoMetadata( - string? deviceName = default, - string? honeywellResideoDeviceId = default - ) - { - DeviceName = deviceName; - HoneywellResideoDeviceId = honeywellResideoDeviceId; - } - - /// - /// Device name for a Honeywell Resideo device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Device ID for a Honeywell Resideo device. - /// - [DataMember( - Name = "honeywell_resideo_device_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? HoneywellResideoDeviceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesIglooMetadata_model")] - public class DevicePropertiesIglooMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesIglooMetadata() { } - - public DevicePropertiesIglooMetadata( - string? bridgeId = default, - string? deviceId = default, - string? model = default - ) - { - BridgeId = bridgeId; - DeviceId = deviceId; - Model = model; - } - - /// - /// Bridge ID for an igloo device. - /// - [DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] - public string? BridgeId { get; set; } - - /// - /// Device ID for an igloo device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Model for an igloo device. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public string? Model { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesIgloohomeMetadata_model")] - public class DevicePropertiesIgloohomeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesIgloohomeMetadata() { } - - public DevicePropertiesIgloohomeMetadata( - string? bridgeId = default, - string? bridgeName = default, - string? deviceId = default, - string? deviceName = default, - bool? isAccessoryKeypadLinkedToBridge = default, - string? keypadId = default - ) - { - BridgeId = bridgeId; - BridgeName = bridgeName; - DeviceId = deviceId; - DeviceName = deviceName; - IsAccessoryKeypadLinkedToBridge = isAccessoryKeypadLinkedToBridge; - KeypadId = keypadId; - } - - /// - /// Bridge ID for an igloohome device. - /// - [DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] - public string? BridgeId { get; set; } - - /// - /// Bridge name for an igloohome device. - /// - [DataMember(Name = "bridge_name", IsRequired = false, EmitDefaultValue = false)] - public string? BridgeName { get; set; } - - /// - /// Device ID for an igloohome device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for an igloohome device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Indicates whether a keypad is linked to a bridge for an igloohome device. - /// - [DataMember( - Name = "is_accessory_keypad_linked_to_bridge", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsAccessoryKeypadLinkedToBridge { get; set; } - - /// - /// Keypad ID for an igloohome device. - /// - [DataMember(Name = "keypad_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeypadId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesKeynestMetadata_model")] - public class DevicePropertiesKeynestMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesKeynestMetadata() { } - - public DevicePropertiesKeynestMetadata( - string? address = default, - float? currentOrLastStoreId = default, - string? currentStatus = default, - string? currentUserCompany = default, - string? currentUserEmail = default, - string? currentUserName = default, - string? currentUserPhoneNumber = default, - float? defaultOfficeId = default, - string? deviceName = default, - float? fobId = default, - string? handoverMethod = default, - bool? hasPhoto = default, - bool? isQuadientLocker = default, - string? keyId = default, - string? keyNotes = default, - string? keynestAppUser = default, - string? lastMovement = default, - string? propertyId = default, - string? propertyPostcode = default, - string? statusType = default, - string? subscriptionPlan = default - ) - { - Address = address; - CurrentOrLastStoreId = currentOrLastStoreId; - CurrentStatus = currentStatus; - CurrentUserCompany = currentUserCompany; - CurrentUserEmail = currentUserEmail; - CurrentUserName = currentUserName; - CurrentUserPhoneNumber = currentUserPhoneNumber; - DefaultOfficeId = defaultOfficeId; - DeviceName = deviceName; - FobId = fobId; - HandoverMethod = handoverMethod; - HasPhoto = hasPhoto; - IsQuadientLocker = isQuadientLocker; - KeyId = keyId; - KeyNotes = keyNotes; - KeynestAppUser = keynestAppUser; - LastMovement = lastMovement; - PropertyId = propertyId; - PropertyPostcode = propertyPostcode; - StatusType = statusType; - SubscriptionPlan = subscriptionPlan; - } - - /// - /// Address for a KeyNest device. - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public string? Address { get; set; } - - /// - /// Current or last store ID for a KeyNest device. - /// - [DataMember( - Name = "current_or_last_store_id", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CurrentOrLastStoreId { get; set; } - - /// - /// Current status for a KeyNest device. - /// - [DataMember(Name = "current_status", IsRequired = false, EmitDefaultValue = false)] - public string? CurrentStatus { get; set; } - - /// - /// Current user company for a KeyNest device. - /// - [DataMember(Name = "current_user_company", IsRequired = false, EmitDefaultValue = false)] - public string? CurrentUserCompany { get; set; } - - /// - /// Current user email for a KeyNest device. - /// - [DataMember(Name = "current_user_email", IsRequired = false, EmitDefaultValue = false)] - public string? CurrentUserEmail { get; set; } - - /// - /// Current user name for a KeyNest device. - /// - [DataMember(Name = "current_user_name", IsRequired = false, EmitDefaultValue = false)] - public string? CurrentUserName { get; set; } - - /// - /// Current user phone number for a KeyNest device. - /// - [DataMember( - Name = "current_user_phone_number", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CurrentUserPhoneNumber { get; set; } - - /// - /// Default office ID for a KeyNest device. - /// - [DataMember(Name = "default_office_id", IsRequired = false, EmitDefaultValue = false)] - public float? DefaultOfficeId { get; set; } - - /// - /// Device name for a KeyNest device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Fob ID for a KeyNest device. - /// - [DataMember(Name = "fob_id", IsRequired = false, EmitDefaultValue = false)] - public float? FobId { get; set; } - - /// - /// Handover method for a KeyNest device. - /// - [DataMember(Name = "handover_method", IsRequired = false, EmitDefaultValue = false)] - public string? HandoverMethod { get; set; } - - /// - /// Whether the KeyNest device has a photo. - /// - [DataMember(Name = "has_photo", IsRequired = false, EmitDefaultValue = false)] - public bool? HasPhoto { get; set; } - - /// - /// Whether the key is in a locker that does not support the access codes API. - /// - [DataMember(Name = "is_quadient_locker", IsRequired = false, EmitDefaultValue = false)] - public bool? IsQuadientLocker { get; set; } - - /// - /// Key ID for a KeyNest device. - /// - [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] - public string? KeyId { get; set; } - - /// - /// Key notes for a KeyNest device. - /// - [DataMember(Name = "key_notes", IsRequired = false, EmitDefaultValue = false)] - public string? KeyNotes { get; set; } - - /// - /// KeyNest app user for a KeyNest device. - /// - [DataMember(Name = "keynest_app_user", IsRequired = false, EmitDefaultValue = false)] - public string? KeynestAppUser { get; set; } - - /// - /// Last movement timestamp for a KeyNest device. - /// - [DataMember(Name = "last_movement", IsRequired = false, EmitDefaultValue = false)] - public string? LastMovement { get; set; } - - /// - /// Property ID for a KeyNest device. - /// - [DataMember(Name = "property_id", IsRequired = false, EmitDefaultValue = false)] - public string? PropertyId { get; set; } - - /// - /// Property postcode for a KeyNest device. - /// - [DataMember(Name = "property_postcode", IsRequired = false, EmitDefaultValue = false)] - public string? PropertyPostcode { get; set; } - - /// - /// Status type for a KeyNest device. - /// - [DataMember(Name = "status_type", IsRequired = false, EmitDefaultValue = false)] - public string? StatusType { get; set; } - - /// - /// Subscription plan for a KeyNest device. - /// - [DataMember(Name = "subscription_plan", IsRequired = false, EmitDefaultValue = false)] - public string? SubscriptionPlan { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesKisiMetadata_model")] - public class DevicePropertiesKisiMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesKisiMetadata() { } - - public DevicePropertiesKisiMetadata( - string? description = default, - float? lockId = default, - string? lockName = default, - string? placeName = default - ) - { - Description = description; - LockId = lockId; - LockName = lockName; - PlaceName = placeName; - } - - /// - /// Description for a Kisi device. - /// - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string? Description { get; set; } - - /// - /// Lock ID for a Kisi device. - /// - [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] - public float? LockId { get; set; } - - /// - /// Lock name for a Kisi device. - /// - [DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] - public string? LockName { get; set; } - - /// - /// Place name for a Kisi device. - /// - [DataMember(Name = "place_name", IsRequired = false, EmitDefaultValue = false)] - public string? PlaceName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesKorelockMetadata_model")] - public class DevicePropertiesKorelockMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesKorelockMetadata() { } - - public DevicePropertiesKorelockMetadata( - string? deviceId = default, - string? deviceName = default, - string? firmwareVersion = default, - string? locationId = default, - string? modelCode = default, - string? serialNumber = default, - float? wifiSignalStrength = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - FirmwareVersion = firmwareVersion; - LocationId = locationId; - ModelCode = modelCode; - SerialNumber = serialNumber; - WifiSignalStrength = wifiSignalStrength; - } - - /// - /// Device ID for a Korelock device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Korelock device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Firmware version for a Korelock device. - /// - [DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] - public string? FirmwareVersion { get; set; } - - /// - /// Location ID for a Korelock device. Required for timebound access codes. - /// - [DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] - public string? LocationId { get; set; } - - /// - /// Model code for a Korelock device. - /// - [DataMember(Name = "model_code", IsRequired = false, EmitDefaultValue = false)] - public string? ModelCode { get; set; } - - /// - /// Serial number for a Korelock device. - /// - [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] - public string? SerialNumber { get; set; } - - /// - /// WiFi signal strength (0-1) for a Korelock device. - /// - [DataMember(Name = "wifi_signal_strength", IsRequired = false, EmitDefaultValue = false)] - public float? WifiSignalStrength { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesKwiksetMetadata_model")] - public class DevicePropertiesKwiksetMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesKwiksetMetadata() { } - - public DevicePropertiesKwiksetMetadata( - string? deviceId = default, - string? deviceName = default, - string? modelNumber = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - ModelNumber = modelNumber; - } - - /// - /// Device ID for a Kwikset device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Kwikset device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Model number for a Kwikset device. - /// - [DataMember(Name = "model_number", IsRequired = false, EmitDefaultValue = false)] - public string? ModelNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesLocklyMetadata_model")] - public class DevicePropertiesLocklyMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesLocklyMetadata() { } - - public DevicePropertiesLocklyMetadata( - string? deviceId = default, - string? deviceName = default, - string? model = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - Model = model; - } - - /// - /// Device ID for a Lockly device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Lockly device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Model for a Lockly device. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public string? Model { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesMinutMetadata_model")] - public class DevicePropertiesMinutMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesMinutMetadata() { } - - public DevicePropertiesMinutMetadata( - string? deviceId = default, - string? deviceName = default, - DevicePropertiesMinutMetadataLatestSensorValues? latestSensorValues = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - LatestSensorValues = latestSensorValues; - } - - /// - /// Device ID for a Minut device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Minut device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Latest sensor values for a Minut device. - /// - [DataMember(Name = "latest_sensor_values", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesMinutMetadataLatestSensorValues? LatestSensorValues { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValues_model")] - public class DevicePropertiesMinutMetadataLatestSensorValues - { - [JsonConstructorAttribute] - protected DevicePropertiesMinutMetadataLatestSensorValues() { } - - public DevicePropertiesMinutMetadataLatestSensorValues( - DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ? accelerometerZ = default, - DevicePropertiesMinutMetadataLatestSensorValuesHumidity? humidity = default, - DevicePropertiesMinutMetadataLatestSensorValuesPressure? pressure = default, - DevicePropertiesMinutMetadataLatestSensorValuesSound? sound = default, - DevicePropertiesMinutMetadataLatestSensorValuesTemperature? temperature = default - ) - { - AccelerometerZ = accelerometerZ; - Humidity = humidity; - Pressure = pressure; - Sound = sound; - Temperature = temperature; - } - - /// - /// Latest accelerometer Z-axis reading for a Minut device. - /// - [DataMember(Name = "accelerometer_z", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ? AccelerometerZ { get; set; } - - /// - /// Latest humidity reading for a Minut device. - /// - [DataMember(Name = "humidity", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesMinutMetadataLatestSensorValuesHumidity? Humidity { get; set; } - - /// - /// Latest pressure reading for a Minut device. - /// - [DataMember(Name = "pressure", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesMinutMetadataLatestSensorValuesPressure? Pressure { get; set; } - - /// - /// Latest sound reading for a Minut device. - /// - [DataMember(Name = "sound", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesMinutMetadataLatestSensorValuesSound? Sound { get; set; } - - /// - /// Latest temperature reading for a Minut device. - /// - [DataMember(Name = "temperature", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesMinutMetadataLatestSensorValuesTemperature? Temperature { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ_model" - )] - public class DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ - { - [JsonConstructorAttribute] - protected DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ() { } - - public DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ( - string? time = default, - float? value = default - ) - { - Time = time; - Value = value; - } - - /// - /// Time of latest accelerometer Z-axis reading for a Minut device. - /// - [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] - public string? Time { get; set; } - - /// - /// Value of latest accelerometer Z-axis reading for a Minut device. - /// - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public float? Value { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesHumidity_model")] - public class DevicePropertiesMinutMetadataLatestSensorValuesHumidity - { - [JsonConstructorAttribute] - protected DevicePropertiesMinutMetadataLatestSensorValuesHumidity() { } - - public DevicePropertiesMinutMetadataLatestSensorValuesHumidity( - string? time = default, - float? value = default - ) - { - Time = time; - Value = value; - } - - /// - /// Time of latest humidity reading for a Minut device. - /// - [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] - public string? Time { get; set; } - - /// - /// Value of latest humidity reading for a Minut device. - /// - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public float? Value { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesPressure_model")] - public class DevicePropertiesMinutMetadataLatestSensorValuesPressure - { - [JsonConstructorAttribute] - protected DevicePropertiesMinutMetadataLatestSensorValuesPressure() { } - - public DevicePropertiesMinutMetadataLatestSensorValuesPressure( - string? time = default, - float? value = default - ) - { - Time = time; - Value = value; - } - - /// - /// Time of latest pressure reading for a Minut device. - /// - [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] - public string? Time { get; set; } - - /// - /// Value of latest pressure reading for a Minut device. - /// - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public float? Value { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesSound_model")] - public class DevicePropertiesMinutMetadataLatestSensorValuesSound - { - [JsonConstructorAttribute] - protected DevicePropertiesMinutMetadataLatestSensorValuesSound() { } - - public DevicePropertiesMinutMetadataLatestSensorValuesSound( - string? time = default, - float? value = default - ) - { - Time = time; - Value = value; - } - - /// - /// Time of latest sound reading for a Minut device. - /// - [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] - public string? Time { get; set; } - - /// - /// Value of latest sound reading for a Minut device. - /// - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public float? Value { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesTemperature_model" - )] - public class DevicePropertiesMinutMetadataLatestSensorValuesTemperature - { - [JsonConstructorAttribute] - protected DevicePropertiesMinutMetadataLatestSensorValuesTemperature() { } - - public DevicePropertiesMinutMetadataLatestSensorValuesTemperature( - string? time = default, - float? value = default - ) - { - Time = time; - Value = value; - } - - /// - /// Time of latest temperature reading for a Minut device. - /// - [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] - public string? Time { get; set; } - - /// - /// Value of latest temperature reading for a Minut device. - /// - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public float? Value { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesNestMetadata_model")] - public class DevicePropertiesNestMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesNestMetadata() { } - - public DevicePropertiesNestMetadata( - string? deviceCustomName = default, - string? deviceName = default, - string? displayName = default, - string? nestDeviceId = default, - string? nestStructureId = default, - string? structureName = default - ) - { - DeviceCustomName = deviceCustomName; - DeviceName = deviceName; - DisplayName = displayName; - NestDeviceId = nestDeviceId; - NestStructureId = nestStructureId; - StructureName = structureName; - } - - /// - /// Custom device name for a Google Nest device. The device owner sets this value. - /// - [DataMember(Name = "device_custom_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceCustomName { get; set; } - - /// - /// Device name for a Google Nest device. Google sets this value. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Display name for a Google Nest device. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string? DisplayName { get; set; } - - /// - /// Device ID for a Google Nest device. - /// - [DataMember(Name = "nest_device_id", IsRequired = false, EmitDefaultValue = false)] - public string? NestDeviceId { get; set; } - - /// - /// ID of the Google Nest structure containing the device. - /// - [DataMember(Name = "nest_structure_id", IsRequired = false, EmitDefaultValue = false)] - public string? NestStructureId { get; set; } - - /// - /// Name of the Google Nest structure containing the device. The device owner sets this value. - /// - [DataMember(Name = "structure_name", IsRequired = false, EmitDefaultValue = false)] - public string? StructureName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesNoiseawareMetadata_model")] - public class DevicePropertiesNoiseawareMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesNoiseawareMetadata() { } - - public DevicePropertiesNoiseawareMetadata( - string? deviceId = default, - DevicePropertiesNoiseawareMetadata.DeviceModelEnum? deviceModel = default, - string? deviceName = default, - float? noiseLevelDecibel = default, - float? noiseLevelNrs = default - ) - { - DeviceId = deviceId; - DeviceModel = deviceModel; - DeviceName = deviceName; - NoiseLevelDecibel = noiseLevelDecibel; - NoiseLevelNrs = noiseLevelNrs; - } - - /// - /// Device model for a NoiseAware device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceModelEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "indoor")] - Indoor = 1, - - [EnumMember(Value = "outdoor")] - Outdoor = 2, - } - - /// - /// Device ID for a NoiseAware device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device model for a NoiseAware device. - /// - [DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesNoiseawareMetadata.DeviceModelEnum? DeviceModel { get; set; } - - /// - /// Device name for a NoiseAware device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Noise level, in decibels, for a NoiseAware device. - /// - [DataMember(Name = "noise_level_decibel", IsRequired = false, EmitDefaultValue = false)] - public float? NoiseLevelDecibel { get; set; } - - /// - /// Noise level, expressed as a Noise Risk Score (NRS), for a NoiseAware device. - /// - [DataMember(Name = "noise_level_nrs", IsRequired = false, EmitDefaultValue = false)] - public float? NoiseLevelNrs { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesNukiMetadata_model")] - public class DevicePropertiesNukiMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesNukiMetadata() { } - - public DevicePropertiesNukiMetadata( - string? deviceId = default, - string? deviceName = default, - bool? keypad_2Paired = default, - bool? keypadBatteryCritical = default, - bool? keypadPaired = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - Keypad_2Paired = keypad_2Paired; - KeypadBatteryCritical = keypadBatteryCritical; - KeypadPaired = keypadPaired; - } - - /// - /// Device ID for a Nuki device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Nuki device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Indicates whether keypad 2 is paired for a Nuki device. - /// - [DataMember(Name = "keypad_2_paired", IsRequired = false, EmitDefaultValue = false)] - public bool? Keypad_2Paired { get; set; } - - /// - /// Indicates whether the keypad battery is in a critical state for a Nuki device. - /// - [DataMember(Name = "keypad_battery_critical", IsRequired = false, EmitDefaultValue = false)] - public bool? KeypadBatteryCritical { get; set; } - - /// - /// Indicates whether the keypad is paired for a Nuki device. - /// - [DataMember(Name = "keypad_paired", IsRequired = false, EmitDefaultValue = false)] - public bool? KeypadPaired { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesOmnitecMetadata_model")] - public class DevicePropertiesOmnitecMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesOmnitecMetadata() { } - - public DevicePropertiesOmnitecMetadata( - bool? hasGateway = default, - string? lockAlias = default, - float? lockId = default, - string? lockMac = default, - string? lockName = default, - string? timeZone = default, - float? timezoneRawOffsetMs = default - ) - { - HasGateway = hasGateway; - LockAlias = lockAlias; - LockId = lockId; - LockMac = lockMac; - LockName = lockName; - TimeZone = timeZone; - TimezoneRawOffsetMs = timezoneRawOffsetMs; - } - - /// - /// Whether the Omnitec lock has a connected gateway for remote operations. - /// - [DataMember(Name = "has_gateway", IsRequired = false, EmitDefaultValue = false)] - public bool? HasGateway { get; set; } - - /// - /// Operator-assigned alias for an Omnitec device. - /// - [DataMember(Name = "lock_alias", IsRequired = false, EmitDefaultValue = false)] - public string? LockAlias { get; set; } - - /// - /// Lock ID for an Omnitec device. - /// - [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] - public float? LockId { get; set; } - - /// - /// Bluetooth MAC address for an Omnitec device. - /// - [DataMember(Name = "lock_mac", IsRequired = false, EmitDefaultValue = false)] - public string? LockMac { get; set; } - - /// - /// Lock name for an Omnitec device. - /// - [DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] - public string? LockName { get; set; } - - /// - /// IANA time zone for the Omnitec device, used to schedule time-bound access codes at the correct local time (accounting for DST). - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - /// - /// Static UTC offset of the Omnitec lock in milliseconds. Does not account for DST. - /// - [DataMember(Name = "timezone_raw_offset_ms", IsRequired = false, EmitDefaultValue = false)] - public float? TimezoneRawOffsetMs { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesRingMetadata_model")] - public class DevicePropertiesRingMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesRingMetadata() { } - - public DevicePropertiesRingMetadata( - string? deviceId = default, - string? deviceName = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - } - - /// - /// Device ID for a Ring device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Ring device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesSaltoKsMetadata_model")] - public class DevicePropertiesSaltoKsMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesSaltoKsMetadata() { } - - public DevicePropertiesSaltoKsMetadata( - string? batteryLevel = default, - string? customerReference = default, - bool? hasCustomPinSubscription = default, - string? lockId = default, - string? lockType = default, - string? lockedState = default, - string? model = default, - string? siteId = default, - string? siteName = default - ) - { - BatteryLevel = batteryLevel; - CustomerReference = customerReference; - HasCustomPinSubscription = hasCustomPinSubscription; - LockId = lockId; - LockType = lockType; - LockedState = lockedState; - Model = model; - SiteId = siteId; - SiteName = siteName; - } - - /// - /// Battery level for a Salto KS device. - /// - [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] - public string? BatteryLevel { get; set; } - - /// - /// Customer reference for a Salto KS device. - /// - [DataMember(Name = "customer_reference", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerReference { get; set; } - - /// - /// Indicates whether the site has a Salto KS subscription that supports custom PINs. - /// - [DataMember( - Name = "has_custom_pin_subscription", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? HasCustomPinSubscription { get; set; } - - /// - /// Lock ID for a Salto KS device. - /// - [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] - public string? LockId { get; set; } - - /// - /// Lock type for a Salto KS device. - /// - [DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] - public string? LockType { get; set; } - - /// - /// Locked state for a Salto KS device. - /// - [DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] - public string? LockedState { get; set; } - - /// - /// Model for a Salto KS device. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public string? Model { get; set; } - - /// - /// Site ID for the Salto KS site to which the device belongs. - /// - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public string? SiteId { get; set; } - - /// - /// Site name for the Salto KS site to which the device belongs. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesSaltoMetadata_model")] - public class DevicePropertiesSaltoMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesSaltoMetadata() { } - - public DevicePropertiesSaltoMetadata( - string? batteryLevel = default, - string? customerReference = default, - string? lockId = default, - string? lockType = default, - string? lockedState = default, - string? model = default, - string? siteId = default, - string? siteName = default - ) - { - BatteryLevel = batteryLevel; - CustomerReference = customerReference; - LockId = lockId; - LockType = lockType; - LockedState = lockedState; - Model = model; - SiteId = siteId; - SiteName = siteName; - } - - /// - /// Battery level for a Salto device. - /// - [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] - public string? BatteryLevel { get; set; } - - /// - /// Customer reference for a Salto device. - /// - [DataMember(Name = "customer_reference", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerReference { get; set; } - - /// - /// Lock ID for a Salto device. - /// - [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] - public string? LockId { get; set; } - - /// - /// Lock type for a Salto device. - /// - [DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] - public string? LockType { get; set; } - - /// - /// Locked state for a Salto device. - /// - [DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] - public string? LockedState { get; set; } - - /// - /// Model for a Salto device. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public string? Model { get; set; } - - /// - /// Site ID for the Salto KS site to which the device belongs. - /// - [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] - public string? SiteId { get; set; } - - /// - /// Site name for the Salto KS site to which the device belongs. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesSchlageMetadata_model")] - public class DevicePropertiesSchlageMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesSchlageMetadata() { } - - public DevicePropertiesSchlageMetadata( - string? deviceId = default, - string? deviceName = default, - string? model = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - Model = model; - } - - /// - /// Device ID for a Schlage device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Schlage device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Model for a Schlage device. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public string? Model { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesSeamBridgeMetadata_model")] - public class DevicePropertiesSeamBridgeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesSeamBridgeMetadata() { } - - public DevicePropertiesSeamBridgeMetadata( - float? deviceNum = default, - string? name = default, - DevicePropertiesSeamBridgeMetadata.UnlockMethodEnum? unlockMethod = default - ) - { - DeviceNum = deviceNum; - Name = name; - UnlockMethod = unlockMethod; - } - - /// - /// Unlock method for Seam Bridge. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum UnlockMethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "bridge")] - Bridge = 1, - - [EnumMember(Value = "doorking")] - Doorking = 2, - } - - /// - /// Device number for Seam Bridge. - /// - [DataMember(Name = "device_num", IsRequired = false, EmitDefaultValue = false)] - public float? DeviceNum { get; set; } - - /// - /// Name for Seam Bridge. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Unlock method for Seam Bridge. - /// - [DataMember(Name = "unlock_method", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesSeamBridgeMetadata.UnlockMethodEnum? UnlockMethod { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesSensiMetadata_model")] - public class DevicePropertiesSensiMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesSensiMetadata() { } - - public DevicePropertiesSensiMetadata( - string? deviceId = default, - string? deviceName = default, - bool? dualSetpointsNotSupported = default, - string? productType = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - DualSetpointsNotSupported = dualSetpointsNotSupported; - ProductType = productType; - } - - /// - /// Device ID for a Sensi device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Sensi device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Set to true when the device does not support the /dual-setpoints API endpoint. - /// - [DataMember( - Name = "dual_setpoints_not_supported", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? DualSetpointsNotSupported { get; set; } - - /// - /// Product type for a Sensi device. - /// - [DataMember(Name = "product_type", IsRequired = false, EmitDefaultValue = false)] - public string? ProductType { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesSmartthingsMetadata_model")] - public class DevicePropertiesSmartthingsMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesSmartthingsMetadata() { } - - public DevicePropertiesSmartthingsMetadata( - string? deviceId = default, - string? deviceName = default, - string? locationId = default, - string? model = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - LocationId = locationId; - Model = model; - } - - /// - /// Device ID for a SmartThings device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a SmartThings device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Location ID for a SmartThings device. - /// - [DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] - public string? LocationId { get; set; } - - /// - /// Model for a SmartThings device. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public string? Model { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesTadoMetadata_model")] - public class DevicePropertiesTadoMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesTadoMetadata() { } - - public DevicePropertiesTadoMetadata( - string? deviceType = default, - string? serialNo = default - ) - { - DeviceType = deviceType; - SerialNo = serialNo; - } - - /// - /// Device type for a tado° device. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceType { get; set; } - - /// - /// Serial number for a tado° device. - /// - [DataMember(Name = "serial_no", IsRequired = false, EmitDefaultValue = false)] - public string? SerialNo { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesTedeeMetadata_model")] - public class DevicePropertiesTedeeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesTedeeMetadata() { } - - public DevicePropertiesTedeeMetadata( - float? bridgeId = default, - string? bridgeName = default, - float? deviceId = default, - string? deviceModel = default, - string? deviceName = default, - float? keypadId = default, - string? serialNumber = default - ) - { - BridgeId = bridgeId; - BridgeName = bridgeName; - DeviceId = deviceId; - DeviceModel = deviceModel; - DeviceName = deviceName; - KeypadId = keypadId; - SerialNumber = serialNumber; - } - - /// - /// Bridge ID for a Tedee device. - /// - [DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] - public float? BridgeId { get; set; } - - /// - /// Bridge name for a Tedee device. - /// - [DataMember(Name = "bridge_name", IsRequired = false, EmitDefaultValue = false)] - public string? BridgeName { get; set; } - - /// - /// Device ID for a Tedee device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public float? DeviceId { get; set; } - - /// - /// Device model for a Tedee device. - /// - [DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceModel { get; set; } - - /// - /// Device name for a Tedee device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Keypad ID for a Tedee device. - /// - [DataMember(Name = "keypad_id", IsRequired = false, EmitDefaultValue = false)] - public float? KeypadId { get; set; } - - /// - /// Serial number for a Tedee device. - /// - [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] - public string? SerialNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesTtlockMetadata_model")] - public class DevicePropertiesTtlockMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesTtlockMetadata() { } - - public DevicePropertiesTtlockMetadata( - string? featureValue = default, - DevicePropertiesTtlockMetadataFeatures? features = default, - bool? hasGateway = default, - string? lockAlias = default, - float? lockId = default, - float? timezoneRawOffsetMs = default, - List? wirelessKeypads = default - ) - { - FeatureValue = featureValue; - Features = features; - HasGateway = hasGateway; - LockAlias = lockAlias; - LockId = lockId; - TimezoneRawOffsetMs = timezoneRawOffsetMs; - WirelessKeypads = wirelessKeypads; - } - - /// - /// Feature value for a TTLock device. - /// - [DataMember(Name = "feature_value", IsRequired = false, EmitDefaultValue = false)] - public string? FeatureValue { get; set; } - - /// - /// Features for a TTLock device. - /// - [DataMember(Name = "features", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesTtlockMetadataFeatures? Features { get; set; } - - /// - /// Indicates whether a TTLock device has a gateway. - /// - [DataMember(Name = "has_gateway", IsRequired = false, EmitDefaultValue = false)] - public bool? HasGateway { get; set; } - - /// - /// Lock alias for a TTLock device. - /// - [DataMember(Name = "lock_alias", IsRequired = false, EmitDefaultValue = false)] - public string? LockAlias { get; set; } - - /// - /// Lock ID for a TTLock device. - /// - [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] - public float? LockId { get; set; } - - /// - /// Lock-side timezone offset in milliseconds east of UTC, as configured in the TTLock app. Source of truth for the lock's wall-clock interpretation of access code start/end times — a misconfigured value here is the typical cause of customer "codes offset by N hours" reports. Diagnostic only; Seam does not convert times based on this value. - /// - [DataMember(Name = "timezone_raw_offset_ms", IsRequired = false, EmitDefaultValue = false)] - public float? TimezoneRawOffsetMs { get; set; } - - /// - /// Wireless keypads for a TTLock device. - /// - [DataMember(Name = "wireless_keypads", IsRequired = false, EmitDefaultValue = false)] - public List? WirelessKeypads { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesTtlockMetadataFeatures_model")] - public class DevicePropertiesTtlockMetadataFeatures - { - [JsonConstructorAttribute] - protected DevicePropertiesTtlockMetadataFeatures() { } - - public DevicePropertiesTtlockMetadataFeatures( - bool? autoLockTimeConfig = default, - bool? incompleteKeyboardPasscode = default, - bool? lockCommand = default, - bool? passcode = default, - bool? passcodeManagement = default, - bool? unlockViaGateway = default, - bool? wifi = default - ) - { - AutoLockTimeConfig = autoLockTimeConfig; - IncompleteKeyboardPasscode = incompleteKeyboardPasscode; - LockCommand = lockCommand; - Passcode = passcode; - PasscodeManagement = passcodeManagement; - UnlockViaGateway = unlockViaGateway; - Wifi = wifi; - } - - /// - /// Indicates whether a TTLock device supports auto-lock time configuration. - /// - [DataMember(Name = "auto_lock_time_config", IsRequired = false, EmitDefaultValue = false)] - public bool? AutoLockTimeConfig { get; set; } - - /// - /// Indicates whether a TTLock device supports an incomplete keyboard passcode. - /// - [DataMember( - Name = "incomplete_keyboard_passcode", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IncompleteKeyboardPasscode { get; set; } - - /// - /// Indicates whether a TTLock device supports the lock command. - /// - [DataMember(Name = "lock_command", IsRequired = false, EmitDefaultValue = false)] - public bool? LockCommand { get; set; } - - /// - /// Indicates whether a TTLock device supports a passcode. - /// - [DataMember(Name = "passcode", IsRequired = false, EmitDefaultValue = false)] - public bool? Passcode { get; set; } - - /// - /// Indicates whether a TTLock device supports passcode management. - /// - [DataMember(Name = "passcode_management", IsRequired = false, EmitDefaultValue = false)] - public bool? PasscodeManagement { get; set; } - - /// - /// Indicates whether a TTLock device supports unlock via gateway. - /// - [DataMember(Name = "unlock_via_gateway", IsRequired = false, EmitDefaultValue = false)] - public bool? UnlockViaGateway { get; set; } - - /// - /// Indicates whether a TTLock device supports Wi-Fi. - /// - [DataMember(Name = "wifi", IsRequired = false, EmitDefaultValue = false)] - public bool? Wifi { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesTtlockMetadataWirelessKeypads_model")] - public class DevicePropertiesTtlockMetadataWirelessKeypads - { - [JsonConstructorAttribute] - protected DevicePropertiesTtlockMetadataWirelessKeypads() { } - - public DevicePropertiesTtlockMetadataWirelessKeypads( - float? wirelessKeypadId = default, - string? wirelessKeypadName = default - ) - { - WirelessKeypadId = wirelessKeypadId; - WirelessKeypadName = wirelessKeypadName; - } - - /// - /// ID for a wireless keypad for a TTLock device. - /// - [DataMember(Name = "wireless_keypad_id", IsRequired = false, EmitDefaultValue = false)] - public float? WirelessKeypadId { get; set; } - - /// - /// Name for a wireless keypad for a TTLock device. - /// - [DataMember(Name = "wireless_keypad_name", IsRequired = false, EmitDefaultValue = false)] - public string? WirelessKeypadName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesTwoNMetadata_model")] - public class DevicePropertiesTwoNMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesTwoNMetadata() { } - - public DevicePropertiesTwoNMetadata(float? deviceId = default, string? deviceName = default) - { - DeviceId = deviceId; - DeviceName = deviceName; - } - - /// - /// Device ID for a 2N device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public float? DeviceId { get; set; } - - /// - /// Device name for a 2N device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesUltraloqMetadata_model")] - public class DevicePropertiesUltraloqMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesUltraloqMetadata() { } - - public DevicePropertiesUltraloqMetadata( - string? deviceId = default, - string? deviceName = default, - string? deviceType = default, - string? timeZone = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - DeviceType = deviceType; - TimeZone = timeZone; - } - - /// - /// Device ID for an Ultraloq device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for an Ultraloq device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Device type for an Ultraloq device. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceType { get; set; } - - /// - /// IANA timezone for the Ultraloq device. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesVisionlineMetadata_model")] - public class DevicePropertiesVisionlineMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesVisionlineMetadata() { } - - public DevicePropertiesVisionlineMetadata(string? encoderId = default) - { - EncoderId = encoderId; - } - - /// - /// Encoder ID for an ASSA ABLOY Visionline system. - /// - [DataMember(Name = "encoder_id", IsRequired = false, EmitDefaultValue = false)] - public string? EncoderId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesWyzeMetadata_model")] - public class DevicePropertiesWyzeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesWyzeMetadata() { } - - public DevicePropertiesWyzeMetadata( - string? deviceId = default, - string? deviceInfoModel = default, - string? deviceName = default, - string? keypadUuid = default, - float? lockerStatusHardlock = default, - string? productModel = default, - string? productName = default, - string? productType = default - ) - { - DeviceId = deviceId; - DeviceInfoModel = deviceInfoModel; - DeviceName = deviceName; - KeypadUuid = keypadUuid; - LockerStatusHardlock = lockerStatusHardlock; - ProductModel = productModel; - ProductName = productName; - ProductType = productType; - } - - /// - /// Device ID for a Wyze device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device information model for a Wyze device. - /// - [DataMember(Name = "device_info_model", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceInfoModel { get; set; } - - /// - /// Device name for a Wyze device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Keypad UUID for a Wyze device. - /// - [DataMember(Name = "keypad_uuid", IsRequired = false, EmitDefaultValue = false)] - public string? KeypadUuid { get; set; } - - /// - /// Locker status (hardlock) for a Wyze device. - /// - [DataMember(Name = "locker_status_hardlock", IsRequired = false, EmitDefaultValue = false)] - public float? LockerStatusHardlock { get; set; } - - /// - /// Product model for a Wyze device. - /// - [DataMember(Name = "product_model", IsRequired = false, EmitDefaultValue = false)] - public string? ProductModel { get; set; } - - /// - /// Product name for a Wyze device. - /// - [DataMember(Name = "product_name", IsRequired = false, EmitDefaultValue = false)] - public string? ProductName { get; set; } - - /// - /// Product type for a Wyze device. - /// - [DataMember(Name = "product_type", IsRequired = false, EmitDefaultValue = false)] - public string? ProductType { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesYacanMetadata_model")] - public class DevicePropertiesYacanMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesYacanMetadata() { } - - public DevicePropertiesYacanMetadata( - string? deviceId = default, - string? deviceName = default, - string? deviceType = default, - string? serialNumber = default - ) - { - DeviceId = deviceId; - DeviceName = deviceName; - DeviceType = deviceType; - SerialNumber = serialNumber; - } - - /// - /// Device ID for a Yacan device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Device name for a Yacan device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Device type for a Yacan device. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceType { get; set; } - - /// - /// Serial number for a Yacan device. - /// - [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] - public string? SerialNumber { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesCodeConstraints_model")] - public class DevicePropertiesCodeConstraints - { - [JsonConstructorAttribute] - protected DevicePropertiesCodeConstraints() { } - - public DevicePropertiesCodeConstraints( - DevicePropertiesCodeConstraints.ConstraintTypeEnum constraintType = default, - float? maxLength = default, - float? minLength = default - ) - { - ConstraintType = constraintType; - MaxLength = maxLength; - MinLength = minLength; - } - - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ConstraintTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "no_zeros")] - NoZeros = 1, - - [EnumMember(Value = "cannot_start_with_12")] - CannotStartWith_12 = 2, - - [EnumMember(Value = "no_triple_consecutive_ints")] - NoTripleConsecutiveInts = 3, - - [EnumMember(Value = "cannot_specify_pin_code")] - CannotSpecifyPinCode = 4, - - [EnumMember(Value = "pin_code_matches_existing_set")] - PinCodeMatchesExistingSet = 5, - - [EnumMember(Value = "start_date_in_future")] - StartDateInFuture = 6, - - [EnumMember(Value = "no_ascending_or_descending_sequence")] - NoAscendingOrDescendingSequence = 7, - - [EnumMember(Value = "at_least_three_unique_digits")] - AtLeastThreeUniqueDigits = 8, - - [EnumMember(Value = "cannot_contain_089")] - CannotContain_089 = 9, - - [EnumMember(Value = "cannot_contain_0789")] - CannotContain_0789 = 10, - - [EnumMember(Value = "unique_first_four_digits")] - UniqueFirstFourDigits = 11, - - [EnumMember(Value = "no_all_same_digits")] - NoAllSameDigits = 12, - - [EnumMember(Value = "name_length")] - NameLength = 13, - - [EnumMember(Value = "name_must_be_unique")] - NameMustBeUnique = 14, - } - - [DataMember(Name = "constraint_type", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesCodeConstraints.ConstraintTypeEnum ConstraintType { get; set; } - - /// - /// Maximum name length constraint for access codes. - /// - [DataMember(Name = "max_length", IsRequired = false, EmitDefaultValue = false)] - public float? MaxLength { get; set; } - - /// - /// Minimum name length constraint for access codes. - /// - [DataMember(Name = "min_length", IsRequired = false, EmitDefaultValue = false)] - public float? MinLength { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesKeypadBattery_model")] - public class DevicePropertiesKeypadBattery - { - [JsonConstructorAttribute] - protected DevicePropertiesKeypadBattery() { } - - public DevicePropertiesKeypadBattery(float level = default) - { - Level = level; - } - - /// - /// Keypad battery charge level. - /// - [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] - public float Level { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesOfflineTimeFrameOptions_model")] - public class DevicePropertiesOfflineTimeFrameOptions - { - [JsonConstructorAttribute] - protected DevicePropertiesOfflineTimeFrameOptions() { } - - public DevicePropertiesOfflineTimeFrameOptions( - string displayName = default, - string? endDateRecurrenceRule = default, - bool? matchingStartEndTime = default, - string? maxDuration = default, - string? minDuration = default, - string? startDateRecurrenceRule = default, - List? timePairs = default, - string? timeZone = default - ) - { - DisplayName = displayName; - EndDateRecurrenceRule = endDateRecurrenceRule; - MatchingStartEndTime = matchingStartEndTime; - MaxDuration = maxDuration; - MinDuration = minDuration; - StartDateRecurrenceRule = startDateRecurrenceRule; - TimePairs = timePairs; - TimeZone = timeZone; - } - - /// - /// Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. - /// - [DataMember( - Name = "end_date_recurrence_rule", - IsRequired = false, - EmitDefaultValue = false - )] - public string? EndDateRecurrenceRule { get; set; } - - /// - /// When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. - /// - [DataMember(Name = "matching_start_end_time", IsRequired = false, EmitDefaultValue = false)] - public bool? MatchingStartEndTime { get; set; } - - /// - /// Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. - /// - [DataMember(Name = "max_duration", IsRequired = false, EmitDefaultValue = false)] - public string? MaxDuration { get; set; } - - /// - /// Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. - /// - [DataMember(Name = "min_duration", IsRequired = false, EmitDefaultValue = false)] - public string? MinDuration { get; set; } - - /// - /// iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. - /// - [DataMember( - Name = "start_date_recurrence_rule", - IsRequired = false, - EmitDefaultValue = false - )] - public string? StartDateRecurrenceRule { get; set; } - - /// - /// Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. - /// - [DataMember(Name = "time_pairs", IsRequired = false, EmitDefaultValue = false)] - public List? TimePairs { get; set; } - - /// - /// IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesOfflineTimeFrameOptionsTimePairs_model")] - public class DevicePropertiesOfflineTimeFrameOptionsTimePairs - { - [JsonConstructorAttribute] - protected DevicePropertiesOfflineTimeFrameOptionsTimePairs() { } - - public DevicePropertiesOfflineTimeFrameOptionsTimePairs( - string displayName = default, - string endTime = default, - string startTime = default - ) - { - DisplayName = displayName; - EndTime = endTime; - StartTime = startTime; - } - - /// - /// Label for the start/end time pairing. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. - /// - [DataMember(Name = "end_time", IsRequired = false, EmitDefaultValue = false)] - public string EndTime { get; set; } - - /// - /// Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. - /// - [DataMember(Name = "start_time", IsRequired = false, EmitDefaultValue = false)] - public string StartTime { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesOnlineTimeFrameOptions_model")] - public class DevicePropertiesOnlineTimeFrameOptions - { - [JsonConstructorAttribute] - protected DevicePropertiesOnlineTimeFrameOptions() { } - - public DevicePropertiesOnlineTimeFrameOptions( - string displayName = default, - string? endDateRecurrenceRule = default, - bool? matchingStartEndTime = default, - string? maxDuration = default, - string? minDuration = default, - string? startDateRecurrenceRule = default, - List? timePairs = default, - string? timeZone = default - ) - { - DisplayName = displayName; - EndDateRecurrenceRule = endDateRecurrenceRule; - MatchingStartEndTime = matchingStartEndTime; - MaxDuration = maxDuration; - MinDuration = minDuration; - StartDateRecurrenceRule = startDateRecurrenceRule; - TimePairs = timePairs; - TimeZone = timeZone; - } - - /// - /// Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. - /// - [DataMember( - Name = "end_date_recurrence_rule", - IsRequired = false, - EmitDefaultValue = false - )] - public string? EndDateRecurrenceRule { get; set; } - - /// - /// When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. - /// - [DataMember(Name = "matching_start_end_time", IsRequired = false, EmitDefaultValue = false)] - public bool? MatchingStartEndTime { get; set; } - - /// - /// Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. - /// - [DataMember(Name = "max_duration", IsRequired = false, EmitDefaultValue = false)] - public string? MaxDuration { get; set; } - - /// - /// Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. - /// - [DataMember(Name = "min_duration", IsRequired = false, EmitDefaultValue = false)] - public string? MinDuration { get; set; } - - /// - /// iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. - /// - [DataMember( - Name = "start_date_recurrence_rule", - IsRequired = false, - EmitDefaultValue = false - )] - public string? StartDateRecurrenceRule { get; set; } - - /// - /// Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. - /// - [DataMember(Name = "time_pairs", IsRequired = false, EmitDefaultValue = false)] - public List? TimePairs { get; set; } - - /// - /// IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesOnlineTimeFrameOptionsTimePairs_model")] - public class DevicePropertiesOnlineTimeFrameOptionsTimePairs - { - [JsonConstructorAttribute] - protected DevicePropertiesOnlineTimeFrameOptionsTimePairs() { } - - public DevicePropertiesOnlineTimeFrameOptionsTimePairs( - string displayName = default, - string endTime = default, - string startTime = default - ) - { - DisplayName = displayName; - EndTime = endTime; - StartTime = startTime; - } - - /// - /// Label for the start/end time pairing. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. - /// - [DataMember(Name = "end_time", IsRequired = false, EmitDefaultValue = false)] - public string EndTime { get; set; } - - /// - /// Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. - /// - [DataMember(Name = "start_time", IsRequired = false, EmitDefaultValue = false)] - public string StartTime { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesActiveThermostatSchedule_model")] - public class DevicePropertiesActiveThermostatSchedule - { - [JsonConstructorAttribute] - protected DevicePropertiesActiveThermostatSchedule() { } - - public DevicePropertiesActiveThermostatSchedule( - string climatePresetKey = default, - string createdAt = default, - string deviceId = default, - string endsAt = default, - List errors = default, - bool? isOverrideAllowed = default, - int? maxOverridePeriodMinutes = default, - string? name = default, - string startsAt = default, - string thermostatScheduleId = default, - string workspaceId = default - ) - { - ClimatePresetKey = climatePresetKey; - CreatedAt = createdAt; - DeviceId = deviceId; - EndsAt = endsAt; - Errors = errors; - IsOverrideAllowed = isOverrideAllowed; - MaxOverridePeriodMinutes = maxOverridePeriodMinutes; - Name = name; - StartsAt = startsAt; - ThermostatScheduleId = thermostatScheduleId; - WorkspaceId = workspaceId; - } - - /// - /// Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the desired [thermostat](https://docs.seam.co/capability-guides/thermostats) device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string EndsAt { get; set; } - - /// - /// Errors associated with the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. - /// - [DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOverrideAllowed { get; set; } - - /// - /// Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [DataMember( - Name = "max_override_period_minutes", - IsRequired = false, - EmitDefaultValue = false - )] - public int? MaxOverridePeriodMinutes { get; set; } - - /// - /// User-friendly name to identify the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string StartsAt { get; set; } - - /// - /// ID of the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] - public string ThermostatScheduleId { get; set; } - - /// - /// ID of the workspace that contains the thermostat schedule. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesActiveThermostatScheduleErrors_model")] - public class DevicePropertiesActiveThermostatScheduleErrors - { - [JsonConstructorAttribute] - protected DevicePropertiesActiveThermostatScheduleErrors() { } - - public DevicePropertiesActiveThermostatScheduleErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAvailableClimatePresets_model")] - public class DevicePropertiesAvailableClimatePresets - { - [JsonConstructorAttribute] - protected DevicePropertiesAvailableClimatePresets() { } - - public DevicePropertiesAvailableClimatePresets( - bool canDelete = default, - bool canEdit = default, - bool canUseWithThermostatDailyPrograms = default, - string climatePresetKey = default, - DevicePropertiesAvailableClimatePresets.ClimatePresetModeEnum? climatePresetMode = - default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string displayName = default, - DevicePropertiesAvailableClimatePresetsEcobeeMetadata? ecobeeMetadata = default, - DevicePropertiesAvailableClimatePresets.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - DevicePropertiesAvailableClimatePresets.HvacModeSettingEnum? hvacModeSetting = default, - bool manualOverrideAllowed = default, - string? name = default - ) - { - CanDelete = canDelete; - CanEdit = canEdit; - CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; - ClimatePresetKey = climatePresetKey; - ClimatePresetMode = climatePresetMode; - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DisplayName = displayName; - EcobeeMetadata = ecobeeMetadata; - FanModeSetting = fanModeSetting; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - HvacModeSetting = hvacModeSetting; - ManualOverrideAllowed = manualOverrideAllowed; - Name = name; - } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ClimatePresetModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "home")] - Home = 1, - - [EnumMember(Value = "away")] - Away = 2, - - [EnumMember(Value = "wake")] - Wake = 3, - - [EnumMember(Value = "sleep")] - Sleep = 4, - - [EnumMember(Value = "occupied")] - Occupied = 5, - - [EnumMember(Value = "unoccupied")] - Unoccupied = 6, - } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum HvacModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "heat")] - Heat = 2, - - [EnumMember(Value = "cool")] - Cool = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - - [EnumMember(Value = "eco")] - Eco = 5, - } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. - /// - [DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] - public bool CanDelete { get; set; } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. - /// - [DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] - public bool CanEdit { get; set; } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. - /// - [DataMember( - Name = "can_use_with_thermostat_daily_programs", - IsRequired = false, - EmitDefaultValue = false - )] - public bool CanUseWithThermostatDailyPrograms { get; set; } - - /// - /// Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAvailableClimatePresets.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// Display name for the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Metadata specific to the Ecobee climate, if applicable. - /// - [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAvailableClimatePresetsEcobeeMetadata? EcobeeMetadata { get; set; } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAvailableClimatePresets.FanModeSettingEnum? FanModeSetting { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAvailableClimatePresets.HvacModeSettingEnum? HvacModeSetting { get; set; } - - /// - /// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] - [DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] - public bool ManualOverrideAllowed { get; set; } - - /// - /// User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesAvailableClimatePresetsEcobeeMetadata_model")] - public class DevicePropertiesAvailableClimatePresetsEcobeeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesAvailableClimatePresetsEcobeeMetadata() { } - - public DevicePropertiesAvailableClimatePresetsEcobeeMetadata( - string? climateRef = default, - bool? isOptimized = default, - DevicePropertiesAvailableClimatePresetsEcobeeMetadata.OwnerEnum? owner = default - ) - { - ClimateRef = climateRef; - IsOptimized = isOptimized; - Owner = owner; - } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum OwnerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "user")] - User = 1, - - [EnumMember(Value = "system")] - System = 2, - } - - /// - /// Reference to the Ecobee climate, if applicable. - /// - [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] - public string? ClimateRef { get; set; } - - /// - /// Indicates if the climate preset is optimized by Ecobee. - /// - [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOptimized { get; set; } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesAvailableClimatePresetsEcobeeMetadata.OwnerEnum? Owner { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesCurrentClimateSetting_model")] - public class DevicePropertiesCurrentClimateSetting - { - [JsonConstructorAttribute] - protected DevicePropertiesCurrentClimateSetting() { } - - public DevicePropertiesCurrentClimateSetting( - bool? canDelete = default, - bool? canEdit = default, - bool? canUseWithThermostatDailyPrograms = default, - string? climatePresetKey = default, - DevicePropertiesCurrentClimateSetting.ClimatePresetModeEnum? climatePresetMode = - default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string? displayName = default, - DevicePropertiesCurrentClimateSettingEcobeeMetadata? ecobeeMetadata = default, - DevicePropertiesCurrentClimateSetting.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - DevicePropertiesCurrentClimateSetting.HvacModeSettingEnum? hvacModeSetting = default, - bool? manualOverrideAllowed = default, - string? name = default - ) - { - CanDelete = canDelete; - CanEdit = canEdit; - CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; - ClimatePresetKey = climatePresetKey; - ClimatePresetMode = climatePresetMode; - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DisplayName = displayName; - EcobeeMetadata = ecobeeMetadata; - FanModeSetting = fanModeSetting; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - HvacModeSetting = hvacModeSetting; - ManualOverrideAllowed = manualOverrideAllowed; - Name = name; - } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ClimatePresetModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "home")] - Home = 1, - - [EnumMember(Value = "away")] - Away = 2, - - [EnumMember(Value = "wake")] - Wake = 3, - - [EnumMember(Value = "sleep")] - Sleep = 4, - - [EnumMember(Value = "occupied")] - Occupied = 5, - - [EnumMember(Value = "unoccupied")] - Unoccupied = 6, - } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum HvacModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "heat")] - Heat = 2, - - [EnumMember(Value = "cool")] - Cool = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - - [EnumMember(Value = "eco")] - Eco = 5, - } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. - /// - [DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] - public bool? CanDelete { get; set; } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. - /// - [DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] - public bool? CanEdit { get; set; } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. - /// - [DataMember( - Name = "can_use_with_thermostat_daily_programs", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanUseWithThermostatDailyPrograms { get; set; } - - /// - /// Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string? ClimatePresetKey { get; set; } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesCurrentClimateSetting.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// Display name for the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string? DisplayName { get; set; } - - /// - /// Metadata specific to the Ecobee climate, if applicable. - /// - [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesCurrentClimateSettingEcobeeMetadata? EcobeeMetadata { get; set; } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesCurrentClimateSetting.FanModeSettingEnum? FanModeSetting { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesCurrentClimateSetting.HvacModeSettingEnum? HvacModeSetting { get; set; } - - /// - /// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] - [DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] - public bool? ManualOverrideAllowed { get; set; } - - /// - /// User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesCurrentClimateSettingEcobeeMetadata_model")] - public class DevicePropertiesCurrentClimateSettingEcobeeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesCurrentClimateSettingEcobeeMetadata() { } - - public DevicePropertiesCurrentClimateSettingEcobeeMetadata( - string? climateRef = default, - bool? isOptimized = default, - DevicePropertiesCurrentClimateSettingEcobeeMetadata.OwnerEnum? owner = default - ) - { - ClimateRef = climateRef; - IsOptimized = isOptimized; - Owner = owner; - } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum OwnerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "user")] - User = 1, - - [EnumMember(Value = "system")] - System = 2, - } - - /// - /// Reference to the Ecobee climate, if applicable. - /// - [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] - public string? ClimateRef { get; set; } - - /// - /// Indicates if the climate preset is optimized by Ecobee. - /// - [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOptimized { get; set; } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesCurrentClimateSettingEcobeeMetadata.OwnerEnum? Owner { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesDefaultClimateSetting_model")] - public class DevicePropertiesDefaultClimateSetting - { - [JsonConstructorAttribute] - protected DevicePropertiesDefaultClimateSetting() { } - - public DevicePropertiesDefaultClimateSetting( - bool? canDelete = default, - bool? canEdit = default, - bool? canUseWithThermostatDailyPrograms = default, - string? climatePresetKey = default, - DevicePropertiesDefaultClimateSetting.ClimatePresetModeEnum? climatePresetMode = - default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string? displayName = default, - DevicePropertiesDefaultClimateSettingEcobeeMetadata? ecobeeMetadata = default, - DevicePropertiesDefaultClimateSetting.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - DevicePropertiesDefaultClimateSetting.HvacModeSettingEnum? hvacModeSetting = default, - bool? manualOverrideAllowed = default, - string? name = default - ) - { - CanDelete = canDelete; - CanEdit = canEdit; - CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; - ClimatePresetKey = climatePresetKey; - ClimatePresetMode = climatePresetMode; - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - DisplayName = displayName; - EcobeeMetadata = ecobeeMetadata; - FanModeSetting = fanModeSetting; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - HvacModeSetting = hvacModeSetting; - ManualOverrideAllowed = manualOverrideAllowed; - Name = name; - } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ClimatePresetModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "home")] - Home = 1, - - [EnumMember(Value = "away")] - Away = 2, - - [EnumMember(Value = "wake")] - Wake = 3, - - [EnumMember(Value = "sleep")] - Sleep = 4, - - [EnumMember(Value = "occupied")] - Occupied = 5, - - [EnumMember(Value = "unoccupied")] - Unoccupied = 6, - } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum HvacModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "heat")] - Heat = 2, - - [EnumMember(Value = "cool")] - Cool = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - - [EnumMember(Value = "eco")] - Eco = 5, - } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. - /// - [DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] - public bool? CanDelete { get; set; } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. - /// - [DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] - public bool? CanEdit { get; set; } - - /// - /// Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. - /// - [DataMember( - Name = "can_use_with_thermostat_daily_programs", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanUseWithThermostatDailyPrograms { get; set; } - - /// - /// Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string? ClimatePresetKey { get; set; } - - /// - /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. - /// - [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesDefaultClimateSetting.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// Display name for the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string? DisplayName { get; set; } - - /// - /// Metadata specific to the Ecobee climate, if applicable. - /// - [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesDefaultClimateSettingEcobeeMetadata? EcobeeMetadata { get; set; } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesDefaultClimateSetting.FanModeSettingEnum? FanModeSetting { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesDefaultClimateSetting.HvacModeSettingEnum? HvacModeSetting { get; set; } - - /// - /// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] - [DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] - public bool? ManualOverrideAllowed { get; set; } - - /// - /// User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesDefaultClimateSettingEcobeeMetadata_model")] - public class DevicePropertiesDefaultClimateSettingEcobeeMetadata - { - [JsonConstructorAttribute] - protected DevicePropertiesDefaultClimateSettingEcobeeMetadata() { } - - public DevicePropertiesDefaultClimateSettingEcobeeMetadata( - string? climateRef = default, - bool? isOptimized = default, - DevicePropertiesDefaultClimateSettingEcobeeMetadata.OwnerEnum? owner = default - ) - { - ClimateRef = climateRef; - IsOptimized = isOptimized; - Owner = owner; - } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum OwnerEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "user")] - User = 1, - - [EnumMember(Value = "system")] - System = 2, - } - - /// - /// Reference to the Ecobee climate, if applicable. - /// - [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] - public string? ClimateRef { get; set; } - - /// - /// Indicates if the climate preset is optimized by Ecobee. - /// - [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOptimized { get; set; } - - /// - /// Indicates whether the climate preset is owned by the user or the system. - /// - [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] - public DevicePropertiesDefaultClimateSettingEcobeeMetadata.OwnerEnum? Owner { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesTemperatureThreshold_model")] - public class DevicePropertiesTemperatureThreshold - { - [JsonConstructorAttribute] - protected DevicePropertiesTemperatureThreshold() { } - - public DevicePropertiesTemperatureThreshold( - float? lowerLimitCelsius = default, - float? lowerLimitFahrenheit = default, - float? upperLimitCelsius = default, - float? upperLimitFahrenheit = default - ) - { - LowerLimitCelsius = lowerLimitCelsius; - LowerLimitFahrenheit = lowerLimitFahrenheit; - UpperLimitCelsius = upperLimitCelsius; - UpperLimitFahrenheit = upperLimitFahrenheit; - } - - /// - /// Lower limit in °C within the current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. - /// - [DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? LowerLimitCelsius { get; set; } - - /// - /// Lower limit in °F within the current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. - /// - [DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float? LowerLimitFahrenheit { get; set; } - - /// - /// Upper limit in °C within the current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. - /// - [DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? UpperLimitCelsius { get; set; } - - /// - /// Upper limit in °F within the current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. - /// - [DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float? UpperLimitFahrenheit { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesThermostatDailyPrograms_model")] - public class DevicePropertiesThermostatDailyPrograms - { - [JsonConstructorAttribute] - protected DevicePropertiesThermostatDailyPrograms() { } - - public DevicePropertiesThermostatDailyPrograms( - string createdAt = default, - string deviceId = default, - string? name = default, - List periods = default, - string thermostatDailyProgramId = default, - string workspaceId = default - ) - { - CreatedAt = createdAt; - DeviceId = deviceId; - Name = name; - Periods = periods; - ThermostatDailyProgramId = thermostatDailyProgramId; - WorkspaceId = workspaceId; - } - - /// - /// Date and time at which the thermostat daily program was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the thermostat device on which the thermostat daily program is configured. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// User-friendly name to identify the thermostat daily program. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Array of thermostat daily program periods. - /// - [DataMember(Name = "periods", IsRequired = false, EmitDefaultValue = false)] - public List Periods { get; set; } - - /// - /// ID of the thermostat daily program. - /// - [DataMember( - Name = "thermostat_daily_program_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string ThermostatDailyProgramId { get; set; } - - /// - /// ID of the workspace that contains the thermostat daily program. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesThermostatDailyProgramsPeriods_model")] - public class DevicePropertiesThermostatDailyProgramsPeriods - { - [JsonConstructorAttribute] - protected DevicePropertiesThermostatDailyProgramsPeriods() { } - - public DevicePropertiesThermostatDailyProgramsPeriods( - string climatePresetKey = default, - string startsAtTime = default - ) - { - ClimatePresetKey = climatePresetKey; - StartsAtTime = startsAtTime; - } - - /// - /// Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] - public string StartsAtTime { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_devicePropertiesThermostatWeeklyProgram_model")] - public class DevicePropertiesThermostatWeeklyProgram - { - [JsonConstructorAttribute] - protected DevicePropertiesThermostatWeeklyProgram() { } - - public DevicePropertiesThermostatWeeklyProgram( - string createdAt = default, - string? fridayProgramId = default, - string? mondayProgramId = default, - string? saturdayProgramId = default, - string? sundayProgramId = default, - string? thursdayProgramId = default, - string? tuesdayProgramId = default, - string? wednesdayProgramId = default - ) - { - CreatedAt = createdAt; - FridayProgramId = fridayProgramId; - MondayProgramId = mondayProgramId; - SaturdayProgramId = saturdayProgramId; - SundayProgramId = sundayProgramId; - ThursdayProgramId = thursdayProgramId; - TuesdayProgramId = tuesdayProgramId; - WednesdayProgramId = wednesdayProgramId; - } - - /// - /// Date and time at which the thermostat weekly program was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the thermostat daily program to run on Fridays. - /// - [DataMember(Name = "friday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? FridayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Mondays. - /// - [DataMember(Name = "monday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? MondayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Saturdays. - /// - [DataMember(Name = "saturday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? SaturdayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Sundays. - /// - [DataMember(Name = "sunday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? SundayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Thursdays. - /// - [DataMember(Name = "thursday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? ThursdayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Tuesdays. - /// - [DataMember(Name = "tuesday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? TuesdayProgramId { get; set; } - - /// - /// ID of the thermostat daily program to run on Wednesdays. - /// - [DataMember(Name = "wednesday_program_id", IsRequired = false, EmitDefaultValue = false)] - public string? WednesdayProgramId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } } diff --git a/src/Seam/Model/DeviceProvider.cs b/src/Seam/Model/DeviceProvider.cs index e4e9e674..d006f193 100644 --- a/src/Seam/Model/DeviceProvider.cs +++ b/src/Seam/Model/DeviceProvider.cs @@ -8,504 +8,464 @@ namespace Seam.Model { - [DataContract(Name = "seamModel_deviceProvider_model")] - public class DeviceProvider - { - [JsonConstructorAttribute] - protected DeviceProvider() { } - - public DeviceProvider( - bool? canConfigureAutoLock = default, - bool? canHvacCool = default, - bool? canHvacHeat = default, - bool? canHvacHeatCool = default, - bool? canProgramOfflineAccessCodes = default, - bool? canProgramOnlineAccessCodes = default, - bool? canProgramThermostatProgramsAsDifferentEachDay = default, - bool? canProgramThermostatProgramsAsSameEachDay = default, - bool? canProgramThermostatProgramsAsWeekdayWeekend = default, - bool? canRemotelyLock = default, - bool? canRemotelyUnlock = default, - bool? canRunThermostatPrograms = default, - bool? canSimulateConnection = default, - bool? canSimulateDisconnection = default, - bool? canSimulateHubConnection = default, - bool? canSimulateHubDisconnection = default, - bool? canSimulatePaidSubscription = default, - bool? canSimulateRemoval = default, - bool? canTurnOffHvac = default, - bool? canUnlockWithCode = default, - DeviceProvider.DeviceProviderNameEnum deviceProviderName = default, - string displayName = default, - string imageUrl = default, - List providerCategories = default - ) - { - CanConfigureAutoLock = canConfigureAutoLock; - CanHvacCool = canHvacCool; - CanHvacHeat = canHvacHeat; - CanHvacHeatCool = canHvacHeatCool; - CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; - CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; - CanProgramThermostatProgramsAsDifferentEachDay = - canProgramThermostatProgramsAsDifferentEachDay; - CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; - CanProgramThermostatProgramsAsWeekdayWeekend = - canProgramThermostatProgramsAsWeekdayWeekend; - CanRemotelyLock = canRemotelyLock; - CanRemotelyUnlock = canRemotelyUnlock; - CanRunThermostatPrograms = canRunThermostatPrograms; - CanSimulateConnection = canSimulateConnection; - CanSimulateDisconnection = canSimulateDisconnection; - CanSimulateHubConnection = canSimulateHubConnection; - CanSimulateHubDisconnection = canSimulateHubDisconnection; - CanSimulatePaidSubscription = canSimulatePaidSubscription; - CanSimulateRemoval = canSimulateRemoval; - CanTurnOffHvac = canTurnOffHvac; - CanUnlockWithCode = canUnlockWithCode; - DeviceProviderName = deviceProviderName; - DisplayName = displayName; - ImageUrl = imageUrl; - ProviderCategories = providerCategories; - } - - /// - /// Name of the device provider. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceProviderNameEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "hotek")] - Hotek = 1, - - [EnumMember(Value = "dormakaba_community")] - DormakabaCommunity = 2, - - [EnumMember(Value = "legic_connect")] - LegicConnect = 3, - - [EnumMember(Value = "akuvox")] - Akuvox = 4, - - [EnumMember(Value = "august")] - August = 5, - - [EnumMember(Value = "avigilon_alta")] - AvigilonAlta = 6, - - [EnumMember(Value = "brivo")] - Brivo = 7, - - [EnumMember(Value = "butterflymx")] - Butterflymx = 8, - - [EnumMember(Value = "schlage")] - Schlage = 9, - - [EnumMember(Value = "smartthings")] - Smartthings = 10, - - [EnumMember(Value = "yale")] - Yale = 11, - - [EnumMember(Value = "genie")] - Genie = 12, - - [EnumMember(Value = "doorking")] - Doorking = 13, - - [EnumMember(Value = "salto")] - Salto = 14, - - [EnumMember(Value = "salto_ks")] - SaltoKs = 15, +[DataContract(Name = "seamModel_deviceProvider_model")] +public class DeviceProvider +{ +[JsonConstructorAttribute] +protected DeviceProvider() { } + +public DeviceProvider(bool? canActivateWeeklyProgram = default, bool? canConfigureAutoLock = default, bool? canHvacCool = default, bool? canHvacHeat = default, bool? canHvacHeatCool = default, bool? canProgramOfflineAccessCodes = default, bool? canProgramOnlineAccessCodes = default, bool? canProgramThermostatProgramsAsDifferentEachDay = default, bool? canProgramThermostatProgramsAsSameEachDay = default, bool? canProgramThermostatProgramsAsWeekdayWeekend = default, bool? canRemotelyLock = default, bool? canRemotelyUnlock = default, bool? canRunThermostatPrograms = default, bool? canSimulateConnection = default, bool? canSimulateDisconnection = default, bool? canSimulateHubConnection = default, bool? canSimulateHubDisconnection = default, bool? canSimulatePaidSubscription = default, bool? canSimulateRemoval = default, bool? canStreamLiveVideo = default, bool? canTurnOffHvac = default, bool? canUnlockWithCode = default, DeviceProvider.DeviceProviderNameEnum deviceProviderName = default, string displayName = default, string imageUrl = default, List providerCategories = default) +{ +CanActivateWeeklyProgram = canActivateWeeklyProgram; +CanConfigureAutoLock = canConfigureAutoLock; +CanHvacCool = canHvacCool; +CanHvacHeat = canHvacHeat; +CanHvacHeatCool = canHvacHeatCool; +CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; +CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; +CanProgramThermostatProgramsAsDifferentEachDay = canProgramThermostatProgramsAsDifferentEachDay; +CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; +CanProgramThermostatProgramsAsWeekdayWeekend = canProgramThermostatProgramsAsWeekdayWeekend; +CanRemotelyLock = canRemotelyLock; +CanRemotelyUnlock = canRemotelyUnlock; +CanRunThermostatPrograms = canRunThermostatPrograms; +CanSimulateConnection = canSimulateConnection; +CanSimulateDisconnection = canSimulateDisconnection; +CanSimulateHubConnection = canSimulateHubConnection; +CanSimulateHubDisconnection = canSimulateHubDisconnection; +CanSimulatePaidSubscription = canSimulatePaidSubscription; +CanSimulateRemoval = canSimulateRemoval; +CanStreamLiveVideo = canStreamLiveVideo; +CanTurnOffHvac = canTurnOffHvac; +CanUnlockWithCode = canUnlockWithCode; +DeviceProviderName = deviceProviderName; +DisplayName = displayName; +ImageUrl = imageUrl; +ProviderCategories = providerCategories; +} + +/// +/// Name of the device provider. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceProviderNameEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "hotek")] +Hotek = 1, + +[EnumMember(Value = "dormakaba_community")] +DormakabaCommunity = 2, + +[EnumMember(Value = "legic_connect")] +LegicConnect = 3, + +[EnumMember(Value = "akuvox")] +Akuvox = 4, + +[EnumMember(Value = "august")] +August = 5, + +[EnumMember(Value = "avigilon_alta")] +AvigilonAlta = 6, + +[EnumMember(Value = "brivo")] +Brivo = 7, + +[EnumMember(Value = "butterflymx")] +Butterflymx = 8, + +[EnumMember(Value = "schlage")] +Schlage = 9, + +[EnumMember(Value = "smartthings")] +Smartthings = 10, + +[EnumMember(Value = "yale")] +Yale = 11, + +[EnumMember(Value = "genie")] +Genie = 12, + +[EnumMember(Value = "doorking")] +Doorking = 13, + +[EnumMember(Value = "salto")] +Salto = 14, + +[EnumMember(Value = "salto_ks")] +SaltoKs = 15, + +[EnumMember(Value = "salto_ks_accept")] +SaltoKsAccept = 16, + +[EnumMember(Value = "lockly")] +Lockly = 17, - [EnumMember(Value = "salto_ks_accept")] - SaltoKsAccept = 16, +[EnumMember(Value = "ttlock")] +Ttlock = 18, - [EnumMember(Value = "lockly")] - Lockly = 17, +[EnumMember(Value = "linear")] +Linear = 19, - [EnumMember(Value = "ttlock")] - Ttlock = 18, +[EnumMember(Value = "noiseaware")] +Noiseaware = 20, - [EnumMember(Value = "linear")] - Linear = 19, +[EnumMember(Value = "nuki")] +Nuki = 21, - [EnumMember(Value = "noiseaware")] - Noiseaware = 20, +[EnumMember(Value = "igloo")] +Igloo = 22, - [EnumMember(Value = "nuki")] - Nuki = 21, +[EnumMember(Value = "kwikset")] +Kwikset = 23, - [EnumMember(Value = "igloo")] - Igloo = 22, +[EnumMember(Value = "minut")] +Minut = 24, - [EnumMember(Value = "kwikset")] - Kwikset = 23, +[EnumMember(Value = "my_2n")] +My_2n = 25, - [EnumMember(Value = "minut")] - Minut = 24, +[EnumMember(Value = "controlbyweb")] +Controlbyweb = 26, - [EnumMember(Value = "my_2n")] - My_2n = 25, +[EnumMember(Value = "nest")] +Nest = 27, - [EnumMember(Value = "controlbyweb")] - Controlbyweb = 26, +[EnumMember(Value = "igloohome")] +Igloohome = 28, - [EnumMember(Value = "nest")] - Nest = 27, +[EnumMember(Value = "ecobee")] +Ecobee = 29, - [EnumMember(Value = "igloohome")] - Igloohome = 28, +[EnumMember(Value = "four_suites")] +FourSuites = 30, - [EnumMember(Value = "ecobee")] - Ecobee = 29, +[EnumMember(Value = "dormakaba_oracode")] +DormakabaOracode = 31, - [EnumMember(Value = "four_suites")] - FourSuites = 30, +[EnumMember(Value = "dormakaba_oracode_iho")] +DormakabaOracodeIho = 32, - [EnumMember(Value = "dormakaba_oracode")] - DormakabaOracode = 31, +[EnumMember(Value = "pti")] +Pti = 33, - [EnumMember(Value = "pti")] - Pti = 32, +[EnumMember(Value = "wyze")] +Wyze = 34, - [EnumMember(Value = "wyze")] - Wyze = 33, +[EnumMember(Value = "seam_passport")] +SeamPassport = 35, - [EnumMember(Value = "seam_passport")] - SeamPassport = 34, +[EnumMember(Value = "visionline")] +Visionline = 36, - [EnumMember(Value = "visionline")] - Visionline = 35, +[EnumMember(Value = "assa_abloy_credential_service")] +AssaAbloyCredentialService = 37, - [EnumMember(Value = "assa_abloy_credential_service")] - AssaAbloyCredentialService = 36, +[EnumMember(Value = "tedee")] +Tedee = 38, - [EnumMember(Value = "tedee")] - Tedee = 37, +[EnumMember(Value = "honeywell_resideo")] +HoneywellResideo = 39, - [EnumMember(Value = "honeywell_resideo")] - HoneywellResideo = 38, +[EnumMember(Value = "first_alert")] +FirstAlert = 40, - [EnumMember(Value = "first_alert")] - FirstAlert = 39, +[EnumMember(Value = "latch")] +Latch = 41, - [EnumMember(Value = "latch")] - Latch = 40, +[EnumMember(Value = "akiles")] +Akiles = 42, - [EnumMember(Value = "akiles")] - Akiles = 41, +[EnumMember(Value = "assa_abloy_vostio")] +AssaAbloyVostio = 43, - [EnumMember(Value = "assa_abloy_vostio")] - AssaAbloyVostio = 42, +[EnumMember(Value = "assa_abloy_vostio_credential_service")] +AssaAbloyVostioCredentialService = 44, - [EnumMember(Value = "assa_abloy_vostio_credential_service")] - AssaAbloyVostioCredentialService = 43, +[EnumMember(Value = "tado")] +Tado = 45, - [EnumMember(Value = "tado")] - Tado = 44, +[EnumMember(Value = "salto_space")] +SaltoSpace = 46, - [EnumMember(Value = "salto_space")] - SaltoSpace = 45, +[EnumMember(Value = "sensi")] +Sensi = 47, - [EnumMember(Value = "sensi")] - Sensi = 46, +[EnumMember(Value = "keynest")] +Keynest = 48, - [EnumMember(Value = "keynest")] - Keynest = 47, +[EnumMember(Value = "korelock")] +Korelock = 49, - [EnumMember(Value = "korelock")] - Korelock = 48, +[EnumMember(Value = "keyincode")] +Keyincode = 50, - [EnumMember(Value = "keyincode")] - Keyincode = 49, +[EnumMember(Value = "dormakaba_ambiance")] +DormakabaAmbiance = 51, - [EnumMember(Value = "dormakaba_ambiance")] - DormakabaAmbiance = 50, +[EnumMember(Value = "ultraloq")] +Ultraloq = 52, - [EnumMember(Value = "ultraloq")] - Ultraloq = 51, +[EnumMember(Value = "yacan")] +Yacan = 53, - [EnumMember(Value = "yacan")] - Yacan = 52, +[EnumMember(Value = "dusaw")] +Dusaw = 54, - [EnumMember(Value = "dusaw")] - Dusaw = 53, +[EnumMember(Value = "sifely")] +Sifely = 55, - [EnumMember(Value = "sifely")] - Sifely = 54, +[EnumMember(Value = "thirty_three_lock")] +ThirtyThreeLock = 56, - [EnumMember(Value = "thirty_three_lock")] - ThirtyThreeLock = 55, +[EnumMember(Value = "ring")] +Ring = 57, - [EnumMember(Value = "ring")] - Ring = 56, +[EnumMember(Value = "tapo")] +Tapo = 58, - [EnumMember(Value = "ical")] - Ical = 57, +[EnumMember(Value = "arlo")] +Arlo = 59, - [EnumMember(Value = "lodgify")] - Lodgify = 58, +[EnumMember(Value = "reolink")] +Reolink = 60, - [EnumMember(Value = "hostaway")] - Hostaway = 59, +[EnumMember(Value = "ical")] +Ical = 61, - [EnumMember(Value = "guesty")] - Guesty = 60, +[EnumMember(Value = "lodgify")] +Lodgify = 62, - [EnumMember(Value = "acuity_scheduling")] - AcuityScheduling = 61, +[EnumMember(Value = "hostaway")] +Hostaway = 63, - [EnumMember(Value = "omnitec")] - Omnitec = 62, +[EnumMember(Value = "guesty")] +Guesty = 64, - [EnumMember(Value = "kisi")] - Kisi = 63, +[EnumMember(Value = "acuity_scheduling")] +AcuityScheduling = 65, - [EnumMember(Value = "aqara")] - Aqara = 64, - } +[EnumMember(Value = "omnitec")] +Omnitec = 66, + +[EnumMember(Value = "kisi")] +Kisi = 67, + +[EnumMember(Value = "aqara")] +Aqara = 68, +} + +/// +/// List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ProviderCategoriesEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "stable")] +Stable = 1, + +[EnumMember(Value = "consumer_smartlocks")] +ConsumerSmartlocks = 2, + +[EnumMember(Value = "beta")] +Beta = 3, + +[EnumMember(Value = "thermostats")] +Thermostats = 4, + +[EnumMember(Value = "noise_sensors")] +NoiseSensors = 5, + +[EnumMember(Value = "access_control_systems")] +AccessControlSystems = 6, + +[EnumMember(Value = "cameras")] +Cameras = 7, + +[EnumMember(Value = "connectors")] +Connectors = 8, +} + +/// +/// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. +/// +[DataMember(Name = "can_activate_weekly_program", IsRequired = false, EmitDefaultValue = false)] +public bool? CanActivateWeeklyProgram { get; set; } + +/// +/// Indicates whether the lock supports configuring automatic locking. +/// +[DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanConfigureAutoLock { get; set; } + +/// +/// Indicates whether the thermostat supports cooling. +/// +[DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacCool { get; set; } + +/// +/// Indicates whether the thermostat supports heating. +/// +[DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacHeat { get; set; } + +/// +/// Indicates whether the thermostat supports simultaneous heating and cooling. +/// +[DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacHeatCool { get; set; } + +/// +/// Indicates whether the device supports programming offline access codes. +/// +[DataMember(Name = "can_program_offline_access_codes", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramOfflineAccessCodes { get; set; } + +/// +/// Indicates whether the device supports programming online access codes. +/// +[DataMember(Name = "can_program_online_access_codes", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramOnlineAccessCodes { get; set; } + +/// +/// Indicates whether the thermostat supports different climate programs for each day of the week. +/// +[DataMember(Name = "can_program_thermostat_programs_as_different_each_day", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } + +/// +/// Indicates whether the thermostat supports a single climate program applied to every day. +/// +[DataMember(Name = "can_program_thermostat_programs_as_same_each_day", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } + +/// +/// Indicates whether the thermostat supports weekday/weekend climate programs. +/// +[DataMember(Name = "can_program_thermostat_programs_as_weekday_weekend", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } + +/// +/// Indicates whether the device supports remote locking. +/// +[DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRemotelyLock { get; set; } + +/// +/// Indicates whether the device supports remote unlocking. +/// +[DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRemotelyUnlock { get; set; } + +/// +/// Indicates whether the thermostat supports running climate programs. +/// +[DataMember(Name = "can_run_thermostat_programs", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRunThermostatPrograms { get; set; } + +/// +/// Indicates whether the device supports simulating connection in a sandbox. +/// +[DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateConnection { get; set; } + +/// +/// Indicates whether the device supports simulating disconnection in a sandbox. +/// +[DataMember(Name = "can_simulate_disconnection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateDisconnection { get; set; } + +/// +/// Indicates whether the hub supports simulating connection in a sandbox. +/// +[DataMember(Name = "can_simulate_hub_connection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateHubConnection { get; set; } + +/// +/// Indicates whether the hub supports simulating disconnection in a sandbox. +/// +[DataMember(Name = "can_simulate_hub_disconnection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateHubDisconnection { get; set; } + +/// +/// Indicates whether the device supports simulating a paid subscription in a sandbox. +/// +[DataMember(Name = "can_simulate_paid_subscription", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulatePaidSubscription { get; set; } + +/// +/// Indicates whether the device supports simulating removal in a sandbox. +/// +[DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateRemoval { get; set; } + +/// +/// Indicates whether the camera supports streaming live video through a camera live view session. +/// +[DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] +public bool? CanStreamLiveVideo { get; set; } + +/// +/// Indicates whether the thermostat can be turned off. +/// +[DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] +public bool? CanTurnOffHvac { get; set; } + +/// +/// Indicates whether the lock supports unlocking with an access code. +/// +[DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUnlockWithCode { get; set; } + +/// +/// Name of the device provider. +/// +[DataMember(Name = "device_provider_name", IsRequired = false, EmitDefaultValue = false)] +public DeviceProvider.DeviceProviderNameEnum DeviceProviderName { get; set; } + +/// +/// Display name for the device provider. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Image URL for the device provider. +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string ImageUrl { get; set; } + +/// +/// List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. +/// +[DataMember(Name = "provider_categories", IsRequired = false, EmitDefaultValue = false)] +public List ProviderCategories { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} - /// - /// List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ProviderCategoriesEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "stable")] - Stable = 1, - - [EnumMember(Value = "consumer_smartlocks")] - ConsumerSmartlocks = 2, - - [EnumMember(Value = "beta")] - Beta = 3, - - [EnumMember(Value = "thermostats")] - Thermostats = 4, - - [EnumMember(Value = "noise_sensors")] - NoiseSensors = 5, - - [EnumMember(Value = "access_control_systems")] - AccessControlSystems = 6, - - [EnumMember(Value = "cameras")] - Cameras = 7, - - [EnumMember(Value = "connectors")] - Connectors = 8, - } - - /// - /// Indicates whether the lock supports configuring automatic locking. - /// - [DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanConfigureAutoLock { get; set; } - - /// - /// Indicates whether the thermostat supports cooling. - /// - [DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacCool { get; set; } - - /// - /// Indicates whether the thermostat supports heating. - /// - [DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacHeat { get; set; } - - /// - /// Indicates whether the thermostat supports simultaneous heating and cooling. - /// - [DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacHeatCool { get; set; } - - /// - /// Indicates whether the device supports programming offline access codes. - /// - [DataMember( - Name = "can_program_offline_access_codes", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramOfflineAccessCodes { get; set; } - - /// - /// Indicates whether the device supports programming online access codes. - /// - [DataMember( - Name = "can_program_online_access_codes", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramOnlineAccessCodes { get; set; } - - /// - /// Indicates whether the thermostat supports different climate programs for each day of the week. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_different_each_day", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } - - /// - /// Indicates whether the thermostat supports a single climate program applied to every day. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_same_each_day", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } - - /// - /// Indicates whether the thermostat supports weekday/weekend climate programs. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_weekday_weekend", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } - - /// - /// Indicates whether the device supports remote locking. - /// - [DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanRemotelyLock { get; set; } - - /// - /// Indicates whether the device supports remote unlocking. - /// - [DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanRemotelyUnlock { get; set; } - - /// - /// Indicates whether the thermostat supports running climate programs. - /// - [DataMember( - Name = "can_run_thermostat_programs", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanRunThermostatPrograms { get; set; } - - /// - /// Indicates whether the device supports simulating connection in a sandbox. - /// - [DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] - public bool? CanSimulateConnection { get; set; } - - /// - /// Indicates whether the device supports simulating disconnection in a sandbox. - /// - [DataMember( - Name = "can_simulate_disconnection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateDisconnection { get; set; } - - /// - /// Indicates whether the hub supports simulating connection in a sandbox. - /// - [DataMember( - Name = "can_simulate_hub_connection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateHubConnection { get; set; } - - /// - /// Indicates whether the hub supports simulating disconnection in a sandbox. - /// - [DataMember( - Name = "can_simulate_hub_disconnection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateHubDisconnection { get; set; } - - /// - /// Indicates whether the device supports simulating a paid subscription in a sandbox. - /// - [DataMember( - Name = "can_simulate_paid_subscription", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulatePaidSubscription { get; set; } - - /// - /// Indicates whether the device supports simulating removal in a sandbox. - /// - [DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] - public bool? CanSimulateRemoval { get; set; } - - /// - /// Indicates whether the thermostat can be turned off. - /// - [DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] - public bool? CanTurnOffHvac { get; set; } - - /// - /// Indicates whether the lock supports unlocking with an access code. - /// - [DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] - public bool? CanUnlockWithCode { get; set; } - - /// - /// Name of the device provider. - /// - [DataMember(Name = "device_provider_name", IsRequired = false, EmitDefaultValue = false)] - public DeviceProvider.DeviceProviderNameEnum DeviceProviderName { get; set; } - - /// - /// Display name for the device provider. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Image URL for the device provider. - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string ImageUrl { get; set; } - - /// - /// List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. - /// - [DataMember(Name = "provider_categories", IsRequired = false, EmitDefaultValue = false)] - public List ProviderCategories { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } } diff --git a/src/Seam/Model/Event.cs b/src/Seam/Model/Event.cs index bbd722bd..b172a91e 100644 --- a/src/Seam/Model/Event.cs +++ b/src/Seam/Model/Event.cs @@ -8,17925 +8,15673 @@ namespace Seam.Model { - [JsonConverter(typeof(JsonSubtypes), "event_type")] - [JsonSubtypes.FallBackSubType(typeof(EventUnrecognized))] - [JsonSubtypes.KnownSubType(typeof(EventSpaceDeleted), "space.deleted")] - [JsonSubtypes.KnownSubType(typeof(EventSpaceCreated), "space.created")] - [JsonSubtypes.KnownSubType( - typeof(EventSpaceDeviceMembershipChanged), - "space.device_membership_changed" - )] - [JsonSubtypes.KnownSubType(typeof(EventPhoneDeactivated), "phone.deactivated")] - [JsonSubtypes.KnownSubType(typeof(EventDeviceDoorbellRang), "device.doorbell_rang")] - [JsonSubtypes.KnownSubType(typeof(EventCameraActivated), "camera.activated")] - [JsonSubtypes.KnownSubType(typeof(EventDeviceNameChanged), "device.name_changed")] - [JsonSubtypes.KnownSubType( - typeof(EventThermostatTemperatureChanged), - "thermostat.temperature_changed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventThermostatTemperatureReachedSetPoint), - "thermostat.temperature_reached_set_point" - )] - [JsonSubtypes.KnownSubType( - typeof(EventThermostatTemperatureThresholdNoLongerExceeded), - "thermostat.temperature_threshold_no_longer_exceeded" - )] - [JsonSubtypes.KnownSubType( - typeof(EventThermostatTemperatureThresholdExceeded), - "thermostat.temperature_threshold_exceeded" - )] - [JsonSubtypes.KnownSubType( - typeof(EventThermostatManuallyAdjusted), - "thermostat.manually_adjusted" - )] - [JsonSubtypes.KnownSubType( - typeof(EventThermostatClimatePresetActivated), - "thermostat.climate_preset_activated" - )] - [JsonSubtypes.KnownSubType(typeof(EventLockAccessDenied), "lock.access_denied")] - [JsonSubtypes.KnownSubType(typeof(EventLockUnlocked), "lock.unlocked")] - [JsonSubtypes.KnownSubType(typeof(EventLockLocked), "lock.locked")] - [JsonSubtypes.KnownSubType( - typeof(EventNoiseSensorNoiseThresholdTriggered), - "noise_sensor.noise_threshold_triggered" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceAccessoryKeypadDisconnected), - "device.accessory_keypad_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceAccessoryKeypadConnected), - "device.accessory_keypad_connected" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceErrorSubscriptionRequiredResolved), - "device.error.subscription_required.resolved" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceErrorSubscriptionRequired), - "device.error.subscription_required" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceConnectionStabilized), - "device.connection_stabilized" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceConnectionBecameFlaky), - "device.connection_became_flaky" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceSaltoPrivacyModeDeactivated), - "device.salto.privacy_mode_deactivated" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceSaltoPrivacyModeActivated), - "device.salto.privacy_mode_activated" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceThirdPartyIntegrationNoLongerDetected), - "device.third_party_integration_no_longer_detected" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceThirdPartyIntegrationDetected), - "device.third_party_integration_detected" - )] - [JsonSubtypes.KnownSubType(typeof(EventDeviceDeleted), "device.deleted")] - [JsonSubtypes.KnownSubType(typeof(EventDeviceRemoved), "device.removed")] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceBatteryStatusChanged), - "device.battery_status_changed" - )] - [JsonSubtypes.KnownSubType(typeof(EventDeviceLowBattery), "device.low_battery")] - [JsonSubtypes.KnownSubType(typeof(EventDeviceTampered), "device.tampered")] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceUnmanagedDisconnected), - "device.unmanaged.disconnected" - )] - [JsonSubtypes.KnownSubType(typeof(EventDeviceDisconnected), "device.disconnected")] - [JsonSubtypes.KnownSubType(typeof(EventDeviceUnmanagedConnected), "device.unmanaged.connected")] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceUnmanagedConvertedToManaged), - "device.unmanaged.converted_to_managed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventDeviceConvertedToUnmanaged), - "device.converted_to_unmanaged" - )] - [JsonSubtypes.KnownSubType(typeof(EventDeviceAdded), "device.added")] - [JsonSubtypes.KnownSubType(typeof(EventDeviceConnected), "device.connected")] - [JsonSubtypes.KnownSubType( - typeof(EventConnectWebviewLoginFailed), - "connect_webview.login_failed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventConnectWebviewLoginSucceeded), - "connect_webview.login_succeeded" - )] - [JsonSubtypes.KnownSubType( - typeof(EventActionAttemptSimulateManualLockViaKeypadFailed), - "action_attempt.simulate_manual_lock_via_keypad.failed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventActionAttemptSimulateManualLockViaKeypadSucceeded), - "action_attempt.simulate_manual_lock_via_keypad.succeeded" - )] - [JsonSubtypes.KnownSubType( - typeof(EventActionAttemptSimulateKeypadCodeEntryFailed), - "action_attempt.simulate_keypad_code_entry.failed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventActionAttemptSimulateKeypadCodeEntrySucceeded), - "action_attempt.simulate_keypad_code_entry.succeeded" - )] - [JsonSubtypes.KnownSubType( - typeof(EventActionAttemptUnlockDoorFailed), - "action_attempt.unlock_door.failed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventActionAttemptUnlockDoorSucceeded), - "action_attempt.unlock_door.succeeded" - )] - [JsonSubtypes.KnownSubType( - typeof(EventActionAttemptLockDoorFailed), - "action_attempt.lock_door.failed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventActionAttemptLockDoorSucceeded), - "action_attempt.lock_door.succeeded" - )] - [JsonSubtypes.KnownSubType( - typeof(EventConnectedAccountReauthorizationRequested), - "connected_account.reauthorization_requested" - )] - [JsonSubtypes.KnownSubType( - typeof(EventConnectedAccountCompletedFirstSyncAfterReconnection), - "connected_account.completed_first_sync_after_reconnection" - )] - [JsonSubtypes.KnownSubType(typeof(EventConnectedAccountDeleted), "connected_account.deleted")] - [JsonSubtypes.KnownSubType( - typeof(EventConnectedAccountCompletedFirstSync), - "connected_account.completed_first_sync" - )] - [JsonSubtypes.KnownSubType( - typeof(EventConnectedAccountDisconnected), - "connected_account.disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(EventConnectedAccountSuccessfulLogin), - "connected_account.successful_login" - )] - [JsonSubtypes.KnownSubType(typeof(EventConnectedAccountCreated), "connected_account.created")] - [JsonSubtypes.KnownSubType( - typeof(EventConnectedAccountConnected), - "connected_account.connected" - )] - [JsonSubtypes.KnownSubType(typeof(EventClientSessionDeleted), "client_session.deleted")] - [JsonSubtypes.KnownSubType(typeof(EventAcsEntranceRemoved), "acs_entrance.removed")] - [JsonSubtypes.KnownSubType(typeof(EventAcsEntranceAdded), "acs_entrance.added")] - [JsonSubtypes.KnownSubType(typeof(EventAcsAccessGroupDeleted), "acs_access_group.deleted")] - [JsonSubtypes.KnownSubType(typeof(EventAcsEncoderRemoved), "acs_encoder.removed")] - [JsonSubtypes.KnownSubType(typeof(EventAcsEncoderAdded), "acs_encoder.added")] - [JsonSubtypes.KnownSubType(typeof(EventAcsUserDeleted), "acs_user.deleted")] - [JsonSubtypes.KnownSubType(typeof(EventAcsUserCreated), "acs_user.created")] - [JsonSubtypes.KnownSubType(typeof(EventAcsCredentialInvalidated), "acs_credential.invalidated")] - [JsonSubtypes.KnownSubType(typeof(EventAcsCredentialReissued), "acs_credential.reissued")] - [JsonSubtypes.KnownSubType(typeof(EventAcsCredentialIssued), "acs_credential.issued")] - [JsonSubtypes.KnownSubType(typeof(EventAcsCredentialDeleted), "acs_credential.deleted")] - [JsonSubtypes.KnownSubType(typeof(EventAcsSystemDisconnected), "acs_system.disconnected")] - [JsonSubtypes.KnownSubType(typeof(EventAcsSystemAdded), "acs_system.added")] - [JsonSubtypes.KnownSubType(typeof(EventAcsSystemConnected), "acs_system.connected")] - [JsonSubtypes.KnownSubType( - typeof(EventAccessMethodFailedToIssue), - "access_method.failed_to_issue" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessMethodDelayInIssuing), - "access_method.delay_in_issuing" - )] - [JsonSubtypes.KnownSubType(typeof(EventAccessMethodCreated), "access_method.created")] - [JsonSubtypes.KnownSubType(typeof(EventAccessMethodReissued), "access_method.reissued")] - [JsonSubtypes.KnownSubType(typeof(EventAccessMethodDeleted), "access_method.deleted")] - [JsonSubtypes.KnownSubType( - typeof(EventAccessMethodCardEncodingRequired), - "access_method.card_encoding_required" - )] - [JsonSubtypes.KnownSubType(typeof(EventAccessMethodRevoked), "access_method.revoked")] - [JsonSubtypes.KnownSubType(typeof(EventAccessMethodIssued), "access_method.issued")] - [JsonSubtypes.KnownSubType( - typeof(EventAccessGrantCouldNotCreateRequestedAccessMethods), - "access_grant.could_not_create_requested_access_methods" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessGrantAccessTimesChanged), - "access_grant.access_times_changed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessGrantAccessToDoorLost), - "access_grant.access_to_door_lost" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessGrantAccessGrantedToDoor), - "access_grant.access_granted_to_door" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessGrantAccessGrantedToAllDoors), - "access_grant.access_granted_to_all_doors" - )] - [JsonSubtypes.KnownSubType(typeof(EventAccessGrantDeleted), "access_grant.deleted")] - [JsonSubtypes.KnownSubType(typeof(EventAccessGrantCreated), "access_grant.created")] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeUnmanagedRemoved), - "access_code.unmanaged.removed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeUnmanagedCreated), - "access_code.unmanaged.created" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeUnmanagedFailedToConvertToManaged), - "access_code.unmanaged.failed_to_convert_to_managed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeUnmanagedConvertedToManaged), - "access_code.unmanaged.converted_to_managed" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeBackupAccessCodePulled), - "access_code.backup_access_code_pulled" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeDeletedExternalToSeam), - "access_code.deleted_external_to_seam" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeModifiedExternalToSeam), - "access_code.modified_external_to_seam" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeFailedToRemoveFromDevice), - "access_code.failed_to_remove_from_device" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeDelayInRemovingFromDevice), - "access_code.delay_in_removing_from_device" - )] - [JsonSubtypes.KnownSubType(typeof(EventAccessCodeDeleted), "access_code.deleted")] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeFailedToSetOnDevice), - "access_code.failed_to_set_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeDelayInSettingOnDevice), - "access_code.delay_in_setting_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeRemovedFromDevice), - "access_code.removed_from_device" - )] - [JsonSubtypes.KnownSubType(typeof(EventAccessCodeSetOnDevice), "access_code.set_on_device")] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeScheduledOnDevice), - "access_code.scheduled_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeMutationsRequested), - "access_code.mutations_requested" - )] - [JsonSubtypes.KnownSubType( - typeof(EventAccessCodeTimeFrameChanged), - "access_code.time_frame_changed" - )] - [JsonSubtypes.KnownSubType(typeof(EventAccessCodeCodeChanged), "access_code.code_changed")] - [JsonSubtypes.KnownSubType(typeof(EventAccessCodeNameChanged), "access_code.name_changed")] - [JsonSubtypes.KnownSubType(typeof(EventAccessCodeChanged), "access_code.changed")] - [JsonSubtypes.KnownSubType(typeof(EventAccessCodeCreated), "access_code.created")] - public abstract class Event - { - public abstract string EventType { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string? EventDescription { get; set; } - - public abstract string EventId { get; set; } - - public abstract string OccurredAt { get; set; } - - public abstract string WorkspaceId { get; set; } - - public abstract override string ToString(); - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was created. - /// - [DataContract(Name = "seamModel_eventAccessCodeCreated_model")] - public class EventAccessCodeCreated : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeCreated() { } - - public EventAccessCodeCreated( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.created"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed. - /// - [DataContract(Name = "seamModel_eventAccessCodeChanged_model")] - public class EventAccessCodeChanged : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeChanged() { } - - public EventAccessCodeChanged( - string accessCodeId = default, - string? changeReason = default, - List? changedProperties = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ChangeReason = changeReason; - ChangedProperties = changedProperties; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Human-readable reason for the change (e.g. `ongoing code auto-renewed`). - /// - [DataMember(Name = "change_reason", IsRequired = false, EmitDefaultValue = false)] - public string? ChangeReason { get; set; } - - /// - /// List of properties that changed on the access code. - /// - [DataMember(Name = "changed_properties", IsRequired = false, EmitDefaultValue = false)] - public List? ChangedProperties { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.changed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeChangedChangedProperties_model")] - public class EventAccessCodeChangedChangedProperties - { - [JsonConstructorAttribute] - protected EventAccessCodeChangedChangedProperties() { } - - public EventAccessCodeChangedChangedProperties( - string? from = default, - string property = default, - string? to = default - ) - { - From = from; - Property = property; - To = to; - } - - /// - /// Previous value of the property, or null if not set. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public string? From { get; set; } - - /// - /// Name of the property that changed (e.g. `code`). - /// - [DataMember(Name = "property", IsRequired = false, EmitDefaultValue = false)] - public string Property { get; set; } - - /// - /// New value of the property, or null if cleared. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public string? To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The name of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device. - /// - [DataContract(Name = "seamModel_eventAccessCodeNameChanged_model")] - public class EventAccessCodeNameChanged : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeNameChanged() { } - - public EventAccessCodeNameChanged( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string description = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - EventAccessCodeNameChangedFrom from = default, - string occurredAt = default, - EventAccessCodeNameChangedTo to = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - Description = description; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - From = from; - OccurredAt = occurredAt; - To = to; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the change and its source. - /// - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.name_changed"; - - /// - /// Previous access code name configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public EventAccessCodeNameChangedFrom From { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// New access code name configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public EventAccessCodeNameChangedTo To { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeNameChangedFrom_model")] - public class EventAccessCodeNameChangedFrom - { - [JsonConstructorAttribute] - protected EventAccessCodeNameChangedFrom() { } - - public EventAccessCodeNameChangedFrom(string? name = default) - { - Name = name; - } - - /// - /// Previous name of the access code. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeNameChangedTo_model")] - public class EventAccessCodeNameChangedTo - { - [JsonConstructorAttribute] - protected EventAccessCodeNameChangedTo() { } - - public EventAccessCodeNameChangedTo(string? name = default) - { - Name = name; - } - - /// - /// New name of the access code. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The pin code of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device. - /// - [DataContract(Name = "seamModel_eventAccessCodeCodeChanged_model")] - public class EventAccessCodeCodeChanged : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeCodeChanged() { } - - public EventAccessCodeCodeChanged( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string description = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - EventAccessCodeCodeChangedFrom from = default, - string occurredAt = default, - EventAccessCodeCodeChangedTo to = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - Description = description; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - From = from; - OccurredAt = occurredAt; - To = to; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the change and its source. - /// - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.code_changed"; - - /// - /// Previous pin code configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public EventAccessCodeCodeChangedFrom From { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// New pin code configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public EventAccessCodeCodeChangedTo To { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeCodeChangedFrom_model")] - public class EventAccessCodeCodeChangedFrom - { - [JsonConstructorAttribute] - protected EventAccessCodeCodeChangedFrom() { } - - public EventAccessCodeCodeChangedFrom(string? code = default) - { - Code = code; - } - - /// - /// Previous pin code. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeCodeChangedTo_model")] - public class EventAccessCodeCodeChangedTo - { - [JsonConstructorAttribute] - protected EventAccessCodeCodeChangedTo() { } - - public EventAccessCodeCodeChangedTo(string? code = default) - { - Code = code; - } - - /// - /// New pin code. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The time frame of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device. - /// - [DataContract(Name = "seamModel_eventAccessCodeTimeFrameChanged_model")] - public class EventAccessCodeTimeFrameChanged : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeTimeFrameChanged() { } - - public EventAccessCodeTimeFrameChanged( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string description = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - EventAccessCodeTimeFrameChangedFrom from = default, - string occurredAt = default, - EventAccessCodeTimeFrameChangedTo to = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - Description = description; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - From = from; - OccurredAt = occurredAt; - To = to; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the change and its source. - /// - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.time_frame_changed"; - - /// - /// Previous time frame configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public EventAccessCodeTimeFrameChangedFrom From { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// New time frame configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public EventAccessCodeTimeFrameChangedTo To { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeTimeFrameChangedFrom_model")] - public class EventAccessCodeTimeFrameChangedFrom - { - [JsonConstructorAttribute] - protected EventAccessCodeTimeFrameChangedFrom() { } - - public EventAccessCodeTimeFrameChangedFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Previous end time. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Previous start time. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeTimeFrameChangedTo_model")] - public class EventAccessCodeTimeFrameChangedTo - { - [JsonConstructorAttribute] - protected EventAccessCodeTimeFrameChangedTo() { } - - public EventAccessCodeTimeFrameChangedTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// New end time. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// New start time. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Mutations were requested on an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). This event fires at request time, before the change is confirmed on the device. - /// - [DataContract(Name = "seamModel_eventAccessCodeMutationsRequested_model")] - public class EventAccessCodeMutationsRequested : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeMutationsRequested() { } - - public EventAccessCodeMutationsRequested( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - List requestedMutations = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - RequestedMutations = requestedMutations; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.mutations_requested"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Array of mutations requested on the access code, each containing the mutation type and from/to values. - /// - [DataMember(Name = "requested_mutations", IsRequired = false, EmitDefaultValue = false)] - public List RequestedMutations { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeMutationsRequestedRequestedMutations_model")] - public class EventAccessCodeMutationsRequestedRequestedMutations - { - [JsonConstructorAttribute] - protected EventAccessCodeMutationsRequestedRequestedMutations() { } - - public EventAccessCodeMutationsRequestedRequestedMutations( - object? from = default, - EventAccessCodeMutationsRequestedRequestedMutations.MutationCodeEnum mutationCode = - default, - object? to = default - ) - { - From = from; - MutationCode = mutationCode; - To = to; - } - - /// - /// Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum MutationCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "updating_name")] - UpdatingName = 1, - - [EnumMember(Value = "updating_code")] - UpdatingCode = 2, - - [EnumMember(Value = "updating_time_frame")] - UpdatingTimeFrame = 3, - - [EnumMember(Value = "deleting")] - Deleting = 4, - - [EnumMember(Value = "creating")] - Creating = 5, - - [EnumMember(Value = "deferring_creation")] - DeferringCreation = 6, - } - - /// - /// Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public object? From { get; set; } - - /// - /// Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. - /// - [DataMember(Name = "mutation_code", IsRequired = false, EmitDefaultValue = false)] - public EventAccessCodeMutationsRequestedRequestedMutations.MutationCodeEnum MutationCode { get; set; } - - /// - /// New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public object? To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) on a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeScheduledOnDevice_model")] - public class EventAccessCodeScheduledOnDevice : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeScheduledOnDevice() { } - - public EventAccessCodeScheduledOnDevice( - string accessCodeId = default, - string code = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - Code = code; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Code for the affected access code. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.scheduled_on_device"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was set on a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeSetOnDevice_model")] - public class EventAccessCodeSetOnDevice : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeSetOnDevice() { } - - public EventAccessCodeSetOnDevice( - string accessCodeId = default, - string code = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - Code = code; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Code for the affected access code. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.set_on_device"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was removed from a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeRemovedFromDevice_model")] - public class EventAccessCodeRemovedFromDevice : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeRemovedFromDevice() { } - - public EventAccessCodeRemovedFromDevice( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.removed_from_device"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// There was an unusually long delay in setting an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) on a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDevice_model")] - public class EventAccessCodeDelayInSettingOnDevice : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInSettingOnDevice() { } - - public EventAccessCodeDelayInSettingOnDevice( - List accessCodeErrors = default, - string accessCodeId = default, - List accessCodeWarnings = - default, - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeErrors = accessCodeErrors; - AccessCodeId = accessCodeId; - AccessCodeWarnings = accessCodeWarnings; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Errors associated with the access code. - /// - [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeErrors { get; set; } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Warnings associated with the access code. - /// - [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeWarnings { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.delay_in_setting_on_device"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceAccessCodeErrors_model")] - public class EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors() { } - - public EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings_model")] - public class EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings() { } - - public EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors_model" - )] - public class EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors() { } - - public EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings_model" - )] - public class EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings() { } - - public EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceDeviceErrors_model")] - public class EventAccessCodeDelayInSettingOnDeviceDeviceErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInSettingOnDeviceDeviceErrors() { } - - public EventAccessCodeDelayInSettingOnDeviceDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceDeviceWarnings_model")] - public class EventAccessCodeDelayInSettingOnDeviceDeviceWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInSettingOnDeviceDeviceWarnings() { } - - public EventAccessCodeDelayInSettingOnDeviceDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) failed to be set on a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDevice_model")] - public class EventAccessCodeFailedToSetOnDevice : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToSetOnDevice() { } - - public EventAccessCodeFailedToSetOnDevice( - List accessCodeErrors = default, - string accessCodeId = default, - List accessCodeWarnings = default, - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeErrors = accessCodeErrors; - AccessCodeId = accessCodeId; - AccessCodeWarnings = accessCodeWarnings; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Errors associated with the access code. - /// - [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeErrors { get; set; } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Warnings associated with the access code. - /// - [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeWarnings { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.failed_to_set_on_device"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceAccessCodeErrors_model")] - public class EventAccessCodeFailedToSetOnDeviceAccessCodeErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToSetOnDeviceAccessCodeErrors() { } - - public EventAccessCodeFailedToSetOnDeviceAccessCodeErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceAccessCodeWarnings_model")] - public class EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings() { } - - public EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeFailedToSetOnDeviceConnectedAccountErrors_model" - )] - public class EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors() { } - - public EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings_model" - )] - public class EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings() { } - - public EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceDeviceErrors_model")] - public class EventAccessCodeFailedToSetOnDeviceDeviceErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToSetOnDeviceDeviceErrors() { } - - public EventAccessCodeFailedToSetOnDeviceDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceDeviceWarnings_model")] - public class EventAccessCodeFailedToSetOnDeviceDeviceWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToSetOnDeviceDeviceWarnings() { } - - public EventAccessCodeFailedToSetOnDeviceDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was deleted. - /// - [DataContract(Name = "seamModel_eventAccessCodeDeleted_model")] - public class EventAccessCodeDeleted : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeDeleted() { } - - public EventAccessCodeDeleted( - string accessCodeId = default, - string? code = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - Code = code; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Code for the affected access code. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// There was an unusually long delay in removing an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) from a device. - /// - [Obsolete( - "Seam no longer emits this event. Use `access_code.failed_to_remove_from_device` instead." - )] - [DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDevice_model")] - public class EventAccessCodeDelayInRemovingFromDevice : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInRemovingFromDevice() { } - - public EventAccessCodeDelayInRemovingFromDevice( - List accessCodeErrors = - default, - string accessCodeId = default, - List accessCodeWarnings = - default, - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeErrors = accessCodeErrors; - AccessCodeId = accessCodeId; - AccessCodeWarnings = accessCodeWarnings; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Errors associated with the access code. - /// - [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeErrors { get; set; } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Warnings associated with the access code. - /// - [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeWarnings { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.delay_in_removing_from_device"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors_model" - )] - public class EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors() { } - - public EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings_model" - )] - public class EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings() { } - - public EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors_model" - )] - public class EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors() { } - - public EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings_model" - )] - public class EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings() { } - - public EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceDeviceErrors_model")] - public class EventAccessCodeDelayInRemovingFromDeviceDeviceErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInRemovingFromDeviceDeviceErrors() { } - - public EventAccessCodeDelayInRemovingFromDeviceDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceDeviceWarnings_model")] - public class EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings() { } - - public EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) failed to be removed from a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDevice_model")] - public class EventAccessCodeFailedToRemoveFromDevice : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToRemoveFromDevice() { } - - public EventAccessCodeFailedToRemoveFromDevice( - List accessCodeErrors = - default, - string accessCodeId = default, - List accessCodeWarnings = - default, - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeErrors = accessCodeErrors; - AccessCodeId = accessCodeId; - AccessCodeWarnings = accessCodeWarnings; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Errors associated with the access code. - /// - [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeErrors { get; set; } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Warnings associated with the access code. - /// - [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeWarnings { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.failed_to_remove_from_device"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors_model")] - public class EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors() { } - - public EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings_model" - )] - public class EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings() { } - - public EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors_model" - )] - public class EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors() { } - - public EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings_model" - )] - public class EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings() { } - - public EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceDeviceErrors_model")] - public class EventAccessCodeFailedToRemoveFromDeviceDeviceErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToRemoveFromDeviceDeviceErrors() { } - - public EventAccessCodeFailedToRemoveFromDeviceDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceDeviceWarnings_model")] - public class EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings() { } - - public EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was modified outside of Seam. - /// - [DataContract(Name = "seamModel_eventAccessCodeModifiedExternalToSeam_model")] - public class EventAccessCodeModifiedExternalToSeam : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeModifiedExternalToSeam() { } - - public EventAccessCodeModifiedExternalToSeam( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.modified_external_to_seam"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was deleted outside of Seam. - /// - [DataContract(Name = "seamModel_eventAccessCodeDeletedExternalToSeam_model")] - public class EventAccessCodeDeletedExternalToSeam : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeDeletedExternalToSeam() { } - - public EventAccessCodeDeletedExternalToSeam( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.deleted_external_to_seam"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [backup access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) was pulled from the backup access code pool and set on a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeBackupAccessCodePulled_model")] - public class EventAccessCodeBackupAccessCodePulled : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeBackupAccessCodePulled() { } - - public EventAccessCodeBackupAccessCodePulled( - string accessCodeId = default, - string backupAccessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - BackupAccessCodeId = backupAccessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// ID of the backup access code that was pulled from the pool. - /// - [DataMember(Name = "backup_access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string BackupAccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.backup_access_code_pulled"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was converted successfully to a managed access code. - /// - [DataContract(Name = "seamModel_eventAccessCodeUnmanagedConvertedToManaged_model")] - public class EventAccessCodeUnmanagedConvertedToManaged : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedConvertedToManaged() { } - - public EventAccessCodeUnmanagedConvertedToManaged( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.unmanaged.converted_to_managed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) failed to be converted to a managed access code. - /// - [DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManaged_model")] - public class EventAccessCodeUnmanagedFailedToConvertToManaged : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedFailedToConvertToManaged() { } - - public EventAccessCodeUnmanagedFailedToConvertToManaged( - List accessCodeErrors = - default, - string accessCodeId = default, - List accessCodeWarnings = - default, - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - object? deviceCustomMetadata = default, - List deviceErrors = - default, - string deviceId = default, - List deviceWarnings = - default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeErrors = accessCodeErrors; - AccessCodeId = accessCodeId; - AccessCodeWarnings = accessCodeWarnings; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Errors associated with the access code. - /// - [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeErrors { get; set; } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Warnings associated with the access code. - /// - [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] - public List AccessCodeWarnings { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "access_code.unmanaged.failed_to_convert_to_managed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors_model" - )] - public class EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors() { } - - public EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings_model" - )] - public class EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings() { } - - public EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors_model" - )] - public class EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors() { } - - public EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings_model" - )] - public class EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings() { } - - public EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors_model" - )] - public class EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors() { } - - public EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings_model" - )] - public class EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings() { } - - public EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was created on a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeUnmanagedCreated_model")] - public class EventAccessCodeUnmanagedCreated : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedCreated() { } - - public EventAccessCodeUnmanagedCreated( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.unmanaged.created"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was removed from a device. - /// - [DataContract(Name = "seamModel_eventAccessCodeUnmanagedRemoved_model")] - public class EventAccessCodeUnmanagedRemoved : Event - { - [JsonConstructorAttribute] - protected EventAccessCodeUnmanagedRemoved() { } - - public EventAccessCodeUnmanagedRemoved( - string accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the affected access code. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the device associated with the affected access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_code.unmanaged.removed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An Access Grant was created. - /// - [DataContract(Name = "seamModel_eventAccessGrantCreated_model")] - public class EventAccessGrantCreated : Event - { - [JsonConstructorAttribute] - protected EventAccessGrantCreated() { } - - public EventAccessGrantCreated( - string accessGrantId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_grant.created"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An Access Grant was deleted. - /// - [DataContract(Name = "seamModel_eventAccessGrantDeleted_model")] - public class EventAccessGrantDeleted : Event - { - [JsonConstructorAttribute] - protected EventAccessGrantDeleted() { } - - public EventAccessGrantDeleted( - string accessGrantId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_grant.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// All access requested for an Access Grant was successfully granted. - /// - [DataContract(Name = "seamModel_eventAccessGrantAccessGrantedToAllDoors_model")] - public class EventAccessGrantAccessGrantedToAllDoors : Event - { - [JsonConstructorAttribute] - protected EventAccessGrantAccessGrantedToAllDoors() { } - - public EventAccessGrantAccessGrantedToAllDoors( - string accessGrantId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_grant.access_granted_to_all_doors"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Access requested as part of an Access Grant to a particular door was successfully granted. - /// - [DataContract(Name = "seamModel_eventAccessGrantAccessGrantedToDoor_model")] - public class EventAccessGrantAccessGrantedToDoor : Event - { - [JsonConstructorAttribute] - protected EventAccessGrantAccessGrantedToDoor() { } - - public EventAccessGrantAccessGrantedToDoor( - string accessGrantId = default, - string acsEntranceId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - AcsEntranceId = acsEntranceId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// ID of the affected [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_grant.access_granted_to_door"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Access to a particular door that was requested as part of an Access Grant was lost. - /// - [DataContract(Name = "seamModel_eventAccessGrantAccessToDoorLost_model")] - public class EventAccessGrantAccessToDoorLost : Event - { - [JsonConstructorAttribute] - protected EventAccessGrantAccessToDoorLost() { } - - public EventAccessGrantAccessToDoorLost( - string accessGrantId = default, - string acsEntranceId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - AcsEntranceId = acsEntranceId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// ID of the affected [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_grant.access_to_door_lost"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An Access Grant's start or end time was changed. - /// - [DataContract(Name = "seamModel_eventAccessGrantAccessTimesChanged_model")] - public class EventAccessGrantAccessTimesChanged : Event - { - [JsonConstructorAttribute] - protected EventAccessGrantAccessTimesChanged() { } - - public EventAccessGrantAccessTimesChanged( - string accessGrantId = default, - string? accessGrantKey = default, - string createdAt = default, - string? endsAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string? startsAt = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - AccessGrantKey = accessGrantKey; - CreatedAt = createdAt; - EndsAt = endsAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - StartsAt = startsAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// Key of the affected Access Grant (if present). - /// - [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] - public string? AccessGrantKey { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The new end time for the access grant. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_grant.access_times_changed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// The new start time for the access grant. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// One or more requested access methods could not be created for an Access Grant. - /// - [DataContract(Name = "seamModel_eventAccessGrantCouldNotCreateRequestedAccessMethods_model")] - public class EventAccessGrantCouldNotCreateRequestedAccessMethods : Event - { - [JsonConstructorAttribute] - protected EventAccessGrantCouldNotCreateRequestedAccessMethods() { } - - public EventAccessGrantCouldNotCreateRequestedAccessMethods( - string accessGrantId = default, - string createdAt = default, - string errorMessage = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - List? missingDeviceIds = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - CreatedAt = createdAt; - ErrorMessage = errorMessage; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - MissingDeviceIds = missingDeviceIds; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Description of why the access methods could not be created. - /// - [DataMember(Name = "error_message", IsRequired = false, EmitDefaultValue = false)] - public string ErrorMessage { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "access_grant.could_not_create_requested_access_methods"; - - /// - /// IDs of the devices that did not receive a requested access method. Use these to identify which specific devices failed without having to fetch the Access Grant. - /// - [DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? MissingDeviceIds { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An access method was issued. - /// - [DataContract(Name = "seamModel_eventAccessMethodIssued_model")] - public class EventAccessMethodIssued : Event - { - [JsonConstructorAttribute] - protected EventAccessMethodIssued() { } - - public EventAccessMethodIssued( - List accessGrantIds = default, - List? accessGrantKeys = default, - string accessMethodId = default, - string? code = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - bool? isBackupCode = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - AccessMethodId = accessMethodId; - Code = code; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - IsBackupCode = isBackupCode; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// IDs of the access grants associated with this access method. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrantIds { get; set; } - - /// - /// Keys of the access grants associated with this access method (if present). - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// ID of the affected access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// The actual PIN code for code access methods (only present when mode is 'code'). - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_method.issued"; - - /// - /// Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). - /// - [DataMember(Name = "is_backup_code", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBackupCode { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An access method was revoked. - /// - [DataContract(Name = "seamModel_eventAccessMethodRevoked_model")] - public class EventAccessMethodRevoked : Event - { - [JsonConstructorAttribute] - protected EventAccessMethodRevoked() { } - - public EventAccessMethodRevoked( - List accessGrantIds = default, - List? accessGrantKeys = default, - string accessMethodId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - AccessMethodId = accessMethodId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// IDs of the access grants associated with this access method. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrantIds { get; set; } - - /// - /// Keys of the access grants associated with this access method (if present). - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// ID of the affected access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_method.revoked"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An access method representing a physical card requires encoding. - /// - [DataContract(Name = "seamModel_eventAccessMethodCardEncodingRequired_model")] - public class EventAccessMethodCardEncodingRequired : Event - { - [JsonConstructorAttribute] - protected EventAccessMethodCardEncodingRequired() { } - - public EventAccessMethodCardEncodingRequired( - List accessGrantIds = default, - List? accessGrantKeys = default, - string accessMethodId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - AccessMethodId = accessMethodId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// IDs of the access grants associated with this access method. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrantIds { get; set; } - - /// - /// Keys of the access grants associated with this access method (if present). - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// ID of the affected access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_method.card_encoding_required"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An access method was deleted. - /// - [DataContract(Name = "seamModel_eventAccessMethodDeleted_model")] - public class EventAccessMethodDeleted : Event - { - [JsonConstructorAttribute] - protected EventAccessMethodDeleted() { } - - public EventAccessMethodDeleted( - List accessGrantIds = default, - List? accessGrantKeys = default, - string accessMethodId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - AccessMethodId = accessMethodId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// IDs of the access grants associated with this access method. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrantIds { get; set; } - - /// - /// Keys of the access grants associated with this access method (if present). - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// ID of the affected access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_method.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An access method was reissued. - /// - [DataContract(Name = "seamModel_eventAccessMethodReissued_model")] - public class EventAccessMethodReissued : Event - { - [JsonConstructorAttribute] - protected EventAccessMethodReissued() { } - - public EventAccessMethodReissued( - List accessGrantIds = default, - List? accessGrantKeys = default, - string accessMethodId = default, - string? code = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - bool? isBackupCode = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - AccessMethodId = accessMethodId; - Code = code; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - IsBackupCode = isBackupCode; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// IDs of the access grants associated with this access method. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrantIds { get; set; } - - /// - /// Keys of the access grants associated with this access method (if present). - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// ID of the affected access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// The actual PIN code for code access methods (only present when mode is 'code'). - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_method.reissued"; - - /// - /// Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). - /// - [DataMember(Name = "is_backup_code", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBackupCode { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An access method was created. - /// - [DataContract(Name = "seamModel_eventAccessMethodCreated_model")] - public class EventAccessMethodCreated : Event - { - [JsonConstructorAttribute] - protected EventAccessMethodCreated() { } - - public EventAccessMethodCreated( - List accessGrantIds = default, - List? accessGrantKeys = default, - string accessMethodId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - AccessMethodId = accessMethodId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// IDs of the access grants associated with this access method. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrantIds { get; set; } - - /// - /// Keys of the access grants associated with this access method (if present). - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// ID of the affected access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_method.created"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Seam has not yet issued this access method, even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and the accompanying `delay_in_issuing` warning clears automatically once issuance succeeds. - /// - [DataContract(Name = "seamModel_eventAccessMethodDelayInIssuing_model")] - public class EventAccessMethodDelayInIssuing : Event - { - [JsonConstructorAttribute] - protected EventAccessMethodDelayInIssuing() { } - - public EventAccessMethodDelayInIssuing( - List accessGrantIds = default, - List? accessGrantKeys = default, - string accessMethodId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - AccessMethodId = accessMethodId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// IDs of the access grants associated with this access method. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrantIds { get; set; } - - /// - /// Keys of the access grants associated with this access method (if present). - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// ID of the affected access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_method.delay_in_issuing"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Seam was unable to issue this access method before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and the accompanying `failed_to_issue` error clears automatically if the access method is eventually issued. - /// - [DataContract(Name = "seamModel_eventAccessMethodFailedToIssue_model")] - public class EventAccessMethodFailedToIssue : Event - { - [JsonConstructorAttribute] - protected EventAccessMethodFailedToIssue() { } - - public EventAccessMethodFailedToIssue( - List accessGrantIds = default, - List? accessGrantKeys = default, - string accessMethodId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessGrantIds = accessGrantIds; - AccessGrantKeys = accessGrantKeys; - AccessMethodId = accessMethodId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// IDs of the access grants associated with this access method. - /// - [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessGrantIds { get; set; } - - /// - /// Keys of the access grants associated with this access method (if present). - /// - [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] - public List? AccessGrantKeys { get; set; } - - /// - /// ID of the affected access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "access_method.failed_to_issue"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system](https://docs.seam.co/low-level-apis/access-systems) was connected. - /// - [DataContract(Name = "seamModel_eventAcsSystemConnected_model")] - public class EventAcsSystemConnected : Event - { - [JsonConstructorAttribute] - protected EventAcsSystemConnected() { } - - public EventAcsSystemConnected( - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_system.connected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system](https://docs.seam.co/low-level-apis/access-systems) was added. - /// - [DataContract(Name = "seamModel_eventAcsSystemAdded_model")] - public class EventAcsSystemAdded : Event - { - [JsonConstructorAttribute] - protected EventAcsSystemAdded() { } - - public EventAcsSystemAdded( - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_system.added"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system](https://docs.seam.co/low-level-apis/access-systems) was disconnected. - /// - [DataContract(Name = "seamModel_eventAcsSystemDisconnected_model")] - public class EventAcsSystemDisconnected : Event - { - [JsonConstructorAttribute] - protected EventAcsSystemDisconnected() { } - - public EventAcsSystemDisconnected( - List acsSystemErrors = default, - string acsSystemId = default, - List acsSystemWarnings = default, - List connectedAccountErrors = default, - string? connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsSystemErrors = acsSystemErrors; - AcsSystemId = acsSystemId; - AcsSystemWarnings = acsSystemWarnings; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Errors associated with the access control system. - /// - [DataMember(Name = "acs_system_errors", IsRequired = false, EmitDefaultValue = false)] - public List AcsSystemErrors { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// Warnings associated with the access control system. - /// - [DataMember(Name = "acs_system_warnings", IsRequired = false, EmitDefaultValue = false)] - public List AcsSystemWarnings { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_system.disconnected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAcsSystemDisconnectedAcsSystemErrors_model")] - public class EventAcsSystemDisconnectedAcsSystemErrors - { - [JsonConstructorAttribute] - protected EventAcsSystemDisconnectedAcsSystemErrors() { } - - public EventAcsSystemDisconnectedAcsSystemErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAcsSystemDisconnectedAcsSystemWarnings_model")] - public class EventAcsSystemDisconnectedAcsSystemWarnings - { - [JsonConstructorAttribute] - protected EventAcsSystemDisconnectedAcsSystemWarnings() { } - - public EventAcsSystemDisconnectedAcsSystemWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAcsSystemDisconnectedConnectedAccountErrors_model")] - public class EventAcsSystemDisconnectedConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventAcsSystemDisconnectedConnectedAccountErrors() { } - - public EventAcsSystemDisconnectedConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventAcsSystemDisconnectedConnectedAccountWarnings_model")] - public class EventAcsSystemDisconnectedConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventAcsSystemDisconnectedConnectedAccountWarnings() { } - - public EventAcsSystemDisconnectedConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was deleted. - /// - [DataContract(Name = "seamModel_eventAcsCredentialDeleted_model")] - public class EventAcsCredentialDeleted : Event - { - [JsonConstructorAttribute] - protected EventAcsCredentialDeleted() { } - - public EventAcsCredentialDeleted( - string acsCredentialId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsCredentialId = acsCredentialId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected credential. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_credential.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was issued. - /// - [DataContract(Name = "seamModel_eventAcsCredentialIssued_model")] - public class EventAcsCredentialIssued : Event - { - [JsonConstructorAttribute] - protected EventAcsCredentialIssued() { } - - public EventAcsCredentialIssued( - string acsCredentialId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsCredentialId = acsCredentialId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected credential. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_credential.issued"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was reissued. - /// - [DataContract(Name = "seamModel_eventAcsCredentialReissued_model")] - public class EventAcsCredentialReissued : Event - { - [JsonConstructorAttribute] - protected EventAcsCredentialReissued() { } - - public EventAcsCredentialReissued( - string acsCredentialId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsCredentialId = acsCredentialId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected credential. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_credential.reissued"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was invalidated. That is, the credential cannot be used anymore. - /// - [DataContract(Name = "seamModel_eventAcsCredentialInvalidated_model")] - public class EventAcsCredentialInvalidated : Event - { - [JsonConstructorAttribute] - protected EventAcsCredentialInvalidated() { } - - public EventAcsCredentialInvalidated( - string acsCredentialId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsCredentialId = acsCredentialId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected credential. - /// - [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsCredentialId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_credential.invalidated"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created. - /// - [DataContract(Name = "seamModel_eventAcsUserCreated_model")] - public class EventAcsUserCreated : Event - { - [JsonConstructorAttribute] - protected EventAcsUserCreated() { } - - public EventAcsUserCreated( - string acsSystemId = default, - string acsUserId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the affected access system user. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsUserId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_user.created"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was deleted. - /// - [DataContract(Name = "seamModel_eventAcsUserDeleted_model")] - public class EventAcsUserDeleted : Event - { - [JsonConstructorAttribute] - protected EventAcsUserDeleted() { } - - public EventAcsUserDeleted( - string acsSystemId = default, - string acsUserId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the affected access system user. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsUserId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_user.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was added. - /// - [DataContract(Name = "seamModel_eventAcsEncoderAdded_model")] - public class EventAcsEncoderAdded : Event - { - [JsonConstructorAttribute] - protected EventAcsEncoderAdded() { } - - public EventAcsEncoderAdded( - string acsEncoderId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsEncoderId = acsEncoderId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected encoder. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_encoder.added"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was removed. - /// - [DataContract(Name = "seamModel_eventAcsEncoderRemoved_model")] - public class EventAcsEncoderRemoved : Event - { - [JsonConstructorAttribute] - protected EventAcsEncoderRemoved() { } - - public EventAcsEncoderRemoved( - string acsEncoderId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsEncoderId = acsEncoderId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected encoder. - /// - [DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsEncoderId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_encoder.removed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An ACS access group was deleted. - /// - [DataContract(Name = "seamModel_eventAcsAccessGroupDeleted_model")] - public class EventAcsAccessGroupDeleted : Event - { - [JsonConstructorAttribute] - protected EventAcsAccessGroupDeleted() { } - - public EventAcsAccessGroupDeleted( - string acsAccessGroupId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsAccessGroupId = acsAccessGroupId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected access group. - /// - [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsAccessGroupId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_access_group.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was added. - /// - [DataContract(Name = "seamModel_eventAcsEntranceAdded_model")] - public class EventAcsEntranceAdded : Event - { - [JsonConstructorAttribute] - protected EventAcsEntranceAdded() { } - - public EventAcsEntranceAdded( - string acsEntranceId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected entrance. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_entrance.added"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was removed. - /// - [DataContract(Name = "seamModel_eventAcsEntranceRemoved_model")] - public class EventAcsEntranceRemoved : Event - { - [JsonConstructorAttribute] - protected EventAcsEntranceRemoved() { } - - public EventAcsEntranceRemoved( - string acsEntranceId = default, - string acsSystemId = default, - string? connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AcsEntranceId = acsEntranceId; - AcsSystemId = acsSystemId; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected entrance. - /// - [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsEntranceId { get; set; } - - /// - /// ID of the access system. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public string AcsSystemId { get; set; } - - /// - /// ID of the connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "acs_entrance.removed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A client session was deleted. - /// - [DataContract(Name = "seamModel_eventClientSessionDeleted_model")] - public class EventClientSessionDeleted : Event - { - [JsonConstructorAttribute] - protected EventClientSessionDeleted() { } - - public EventClientSessionDeleted( - string clientSessionId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ClientSessionId = clientSessionId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected client session. - /// - [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] - public string ClientSessionId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "client_session.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A connected account was connected for the first time or was reconnected after being disconnected. - /// - [DataContract(Name = "seamModel_eventConnectedAccountConnected_model")] - public class EventConnectedAccountConnected : Event - { - [JsonConstructorAttribute] - protected EventConnectedAccountConnected() { } - - public EventConnectedAccountConnected( - string? connectWebviewId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the Connect Webview associated with the event. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectWebviewId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the affected connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with this connected account, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connected_account.connected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A connected account was created. - /// - [DataContract(Name = "seamModel_eventConnectedAccountCreated_model")] - public class EventConnectedAccountCreated : Event - { - [JsonConstructorAttribute] - protected EventConnectedAccountCreated() { } - - public EventConnectedAccountCreated( - string connectWebviewId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the Connect Webview associated with the event. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectWebviewId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the affected connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connected_account.created"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A connected account had a successful login using a Connect Webview. - /// - [Obsolete("Use `connect_webview.login_succeeded`.")] - [DataContract(Name = "seamModel_eventConnectedAccountSuccessfulLogin_model")] - public class EventConnectedAccountSuccessfulLogin : Event - { - [JsonConstructorAttribute] - protected EventConnectedAccountSuccessfulLogin() { } - - public EventConnectedAccountSuccessfulLogin( - string connectWebviewId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the Connect Webview associated with the event. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectWebviewId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the affected connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connected_account.successful_login"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A connected account was disconnected. - /// - [DataContract(Name = "seamModel_eventConnectedAccountDisconnected_model")] - public class EventConnectedAccountDisconnected : Event - { - [JsonConstructorAttribute] - protected EventConnectedAccountDisconnected() { } - - public EventConnectedAccountDisconnected( - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the affected connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connected_account.disconnected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventConnectedAccountDisconnectedConnectedAccountErrors_model")] - public class EventConnectedAccountDisconnectedConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventConnectedAccountDisconnectedConnectedAccountErrors() { } - - public EventConnectedAccountDisconnectedConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventConnectedAccountDisconnectedConnectedAccountWarnings_model" - )] - public class EventConnectedAccountDisconnectedConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventConnectedAccountDisconnectedConnectedAccountWarnings() { } - - public EventConnectedAccountDisconnectedConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A connected account completed the first sync with Seam, and the corresponding devices or systems are now available. - /// - [DataContract(Name = "seamModel_eventConnectedAccountCompletedFirstSync_model")] - public class EventConnectedAccountCompletedFirstSync : Event - { - [JsonConstructorAttribute] - protected EventConnectedAccountCompletedFirstSync() { } - - public EventConnectedAccountCompletedFirstSync( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the affected connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connected_account.completed_first_sync"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A connected account was deleted. - /// - [DataContract(Name = "seamModel_eventConnectedAccountDeleted_model")] - public class EventConnectedAccountDeleted : Event - { - [JsonConstructorAttribute] - protected EventConnectedAccountDeleted() { } - - public EventConnectedAccountDeleted( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the affected connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with this connected account, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connected_account.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A connected account completed the first sync after reconnection with Seam, and the corresponding devices or systems are now available. - /// - [DataContract( - Name = "seamModel_eventConnectedAccountCompletedFirstSyncAfterReconnection_model" - )] - public class EventConnectedAccountCompletedFirstSyncAfterReconnection : Event - { - [JsonConstructorAttribute] - protected EventConnectedAccountCompletedFirstSyncAfterReconnection() { } - - public EventConnectedAccountCompletedFirstSyncAfterReconnection( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the affected connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "connected_account.completed_first_sync_after_reconnection"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A connected account requires reauthorization using a new Connect Webview. The account is still connected, but cannot access new features. Delaying reauthorization too long will eventually cause the Connected Account to become disconnected. - /// - [DataContract(Name = "seamModel_eventConnectedAccountReauthorizationRequested_model")] - public class EventConnectedAccountReauthorizationRequested : Event - { - [JsonConstructorAttribute] - protected EventConnectedAccountReauthorizationRequested() { } - - public EventConnectedAccountReauthorizationRequested( - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the affected connected account. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connected_account.reauthorization_requested"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventConnectedAccountReauthorizationRequestedConnectedAccountErrors_model" - )] - public class EventConnectedAccountReauthorizationRequestedConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventConnectedAccountReauthorizationRequestedConnectedAccountErrors() { } - - public EventConnectedAccountReauthorizationRequestedConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventConnectedAccountReauthorizationRequestedConnectedAccountWarnings_model" - )] - public class EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings() { } - - public EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A lock door action attempt succeeded. - /// - [DataContract(Name = "seamModel_eventActionAttemptLockDoorSucceeded_model")] - public class EventActionAttemptLockDoorSucceeded : Event - { - [JsonConstructorAttribute] - protected EventActionAttemptLockDoorSucceeded() { } - - public EventActionAttemptLockDoorSucceeded( - string actionAttemptId = default, - string actionType = default, - string? connectedAccountId = default, - string createdAt = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string status = default, - string workspaceId = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Status = status; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - /// - /// Type of the action. - /// - [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// ID of the connected account associated with the action attempt, if applicable. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device associated with the action attempt, if applicable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "action_attempt.lock_door.succeeded"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Status of the action. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A lock door action attempt failed. - /// - [DataContract(Name = "seamModel_eventActionAttemptLockDoorFailed_model")] - public class EventActionAttemptLockDoorFailed : Event - { - [JsonConstructorAttribute] - protected EventActionAttemptLockDoorFailed() { } - - public EventActionAttemptLockDoorFailed( - string actionAttemptId = default, - string actionType = default, - string? connectedAccountId = default, - string createdAt = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string status = default, - string workspaceId = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Status = status; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - /// - /// Type of the action. - /// - [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// ID of the connected account associated with the action attempt, if applicable. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device associated with the action attempt, if applicable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "action_attempt.lock_door.failed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Status of the action. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An unlock door action attempt succeeded. - /// - [DataContract(Name = "seamModel_eventActionAttemptUnlockDoorSucceeded_model")] - public class EventActionAttemptUnlockDoorSucceeded : Event - { - [JsonConstructorAttribute] - protected EventActionAttemptUnlockDoorSucceeded() { } - - public EventActionAttemptUnlockDoorSucceeded( - string actionAttemptId = default, - string actionType = default, - string? connectedAccountId = default, - string createdAt = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string status = default, - string workspaceId = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Status = status; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - /// - /// Type of the action. - /// - [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// ID of the connected account associated with the action attempt, if applicable. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device associated with the action attempt, if applicable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "action_attempt.unlock_door.succeeded"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Status of the action. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An unlock door action attempt failed. - /// - [DataContract(Name = "seamModel_eventActionAttemptUnlockDoorFailed_model")] - public class EventActionAttemptUnlockDoorFailed : Event - { - [JsonConstructorAttribute] - protected EventActionAttemptUnlockDoorFailed() { } - - public EventActionAttemptUnlockDoorFailed( - string actionAttemptId = default, - string actionType = default, - string? connectedAccountId = default, - string createdAt = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string status = default, - string workspaceId = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Status = status; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - /// - /// Type of the action. - /// - [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// ID of the connected account associated with the action attempt, if applicable. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device associated with the action attempt, if applicable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "action_attempt.unlock_door.failed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Status of the action. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A simulate keypad code entry action attempt succeeded. - /// - [DataContract(Name = "seamModel_eventActionAttemptSimulateKeypadCodeEntrySucceeded_model")] - public class EventActionAttemptSimulateKeypadCodeEntrySucceeded : Event - { - [JsonConstructorAttribute] - protected EventActionAttemptSimulateKeypadCodeEntrySucceeded() { } - - public EventActionAttemptSimulateKeypadCodeEntrySucceeded( - string actionAttemptId = default, - string actionType = default, - string? connectedAccountId = default, - string createdAt = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string status = default, - string workspaceId = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Status = status; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - /// - /// Type of the action. - /// - [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// ID of the connected account associated with the action attempt, if applicable. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device associated with the action attempt, if applicable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "action_attempt.simulate_keypad_code_entry.succeeded"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Status of the action. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A simulate keypad code entry action attempt failed. - /// - [DataContract(Name = "seamModel_eventActionAttemptSimulateKeypadCodeEntryFailed_model")] - public class EventActionAttemptSimulateKeypadCodeEntryFailed : Event - { - [JsonConstructorAttribute] - protected EventActionAttemptSimulateKeypadCodeEntryFailed() { } - - public EventActionAttemptSimulateKeypadCodeEntryFailed( - string actionAttemptId = default, - string actionType = default, - string? connectedAccountId = default, - string createdAt = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string status = default, - string workspaceId = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Status = status; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - /// - /// Type of the action. - /// - [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// ID of the connected account associated with the action attempt, if applicable. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device associated with the action attempt, if applicable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "action_attempt.simulate_keypad_code_entry.failed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Status of the action. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A simulate manual lock via keypad action attempt succeeded. - /// - [DataContract(Name = "seamModel_eventActionAttemptSimulateManualLockViaKeypadSucceeded_model")] - public class EventActionAttemptSimulateManualLockViaKeypadSucceeded : Event - { - [JsonConstructorAttribute] - protected EventActionAttemptSimulateManualLockViaKeypadSucceeded() { } - - public EventActionAttemptSimulateManualLockViaKeypadSucceeded( - string actionAttemptId = default, - string actionType = default, - string? connectedAccountId = default, - string createdAt = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string status = default, - string workspaceId = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Status = status; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - /// - /// Type of the action. - /// - [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// ID of the connected account associated with the action attempt, if applicable. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device associated with the action attempt, if applicable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "action_attempt.simulate_manual_lock_via_keypad.succeeded"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Status of the action. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A simulate manual lock via keypad action attempt failed. - /// - [DataContract(Name = "seamModel_eventActionAttemptSimulateManualLockViaKeypadFailed_model")] - public class EventActionAttemptSimulateManualLockViaKeypadFailed : Event - { - [JsonConstructorAttribute] - protected EventActionAttemptSimulateManualLockViaKeypadFailed() { } - - public EventActionAttemptSimulateManualLockViaKeypadFailed( - string actionAttemptId = default, - string actionType = default, - string? connectedAccountId = default, - string createdAt = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string status = default, - string workspaceId = default - ) - { - ActionAttemptId = actionAttemptId; - ActionType = actionType; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Status = status; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected action attempt. - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string ActionAttemptId { get; set; } - - /// - /// Type of the action. - /// - [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// ID of the connected account associated with the action attempt, if applicable. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device associated with the action attempt, if applicable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "action_attempt.simulate_manual_lock_via_keypad.failed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Status of the action. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A Connect Webview login succeeded. - /// - [DataContract(Name = "seamModel_eventConnectWebviewLoginSucceeded_model")] - public class EventConnectWebviewLoginSucceeded : Event - { - [JsonConstructorAttribute] - protected EventConnectWebviewLoginSucceeded() { } - - public EventConnectWebviewLoginSucceeded( - string connectWebviewId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectWebviewId = connectWebviewId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Connect Webview. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectWebviewId { get; set; } - - /// - /// Custom metadata of the connected account; present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with this connect webview, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connect_webview.login_succeeded"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A Connect Webview login failed. - /// - [DataContract(Name = "seamModel_eventConnectWebviewLoginFailed_model")] - public class EventConnectWebviewLoginFailed : Event - { - [JsonConstructorAttribute] - protected EventConnectWebviewLoginFailed() { } - - public EventConnectWebviewLoginFailed( - string connectWebviewId = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectWebviewId = connectWebviewId; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// ID of the affected Connect Webview. - /// - [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectWebviewId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "connect_webview.login_failed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The status of a device changed from offline to online. That is, the `device.properties.online` property changed from `false` to `true`. Note that some devices operate entirely in offline mode, so Seam never emits a `device.connected` event for these devices. - /// - [DataContract(Name = "seamModel_eventDeviceConnected_model")] - public class EventDeviceConnected : Event - { - [JsonConstructorAttribute] - protected EventDeviceConnected() { } - - public EventDeviceConnected( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.connected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A device was added to Seam or was re-added to Seam after having been removed. - /// - [DataContract(Name = "seamModel_eventDeviceAdded_model")] - public class EventDeviceAdded : Event - { - [JsonConstructorAttribute] - protected EventDeviceAdded() { } - - public EventDeviceAdded( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.added"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A managed device was successfully converted to an [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). - /// - [DataContract(Name = "seamModel_eventDeviceConvertedToUnmanaged_model")] - public class EventDeviceConvertedToUnmanaged : Event - { - [JsonConstructorAttribute] - protected EventDeviceConvertedToUnmanaged() { } - - public EventDeviceConvertedToUnmanaged( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.converted_to_unmanaged"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices) was successfully converted to a managed device. - /// - [DataContract(Name = "seamModel_eventDeviceUnmanagedConvertedToManaged_model")] - public class EventDeviceUnmanagedConvertedToManaged : Event - { - [JsonConstructorAttribute] - protected EventDeviceUnmanagedConvertedToManaged() { } - - public EventDeviceUnmanagedConvertedToManaged( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.unmanaged.converted_to_managed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The status of an [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices) changed from offline to online. That is, the `device.properties.online` property changed from `false` to `true`. - /// - [DataContract(Name = "seamModel_eventDeviceUnmanagedConnected_model")] - public class EventDeviceUnmanagedConnected : Event - { - [JsonConstructorAttribute] - protected EventDeviceUnmanagedConnected() { } - - public EventDeviceUnmanagedConnected( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.unmanaged.connected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The status of a device changed from online to offline. That is, the `device.properties.online` property changed from `true` to `false`. - /// - [DataContract(Name = "seamModel_eventDeviceDisconnected_model")] - public class EventDeviceDisconnected : Event - { - [JsonConstructorAttribute] - protected EventDeviceDisconnected() { } - - public EventDeviceDisconnected( - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - EventDeviceDisconnected.ErrorCodeEnum errorCode = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - ErrorCode = errorCode; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Error code associated with the disconnection event, if any. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ErrorCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "account_disconnected")] - AccountDisconnected = 1, - - [EnumMember(Value = "hub_disconnected")] - HubDisconnected = 2, - - [EnumMember(Value = "device_disconnected")] - DeviceDisconnected = 3, - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Error code associated with the disconnection event, if any. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public EventDeviceDisconnected.ErrorCodeEnum ErrorCode { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.disconnected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceDisconnectedConnectedAccountErrors_model")] - public class EventDeviceDisconnectedConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventDeviceDisconnectedConnectedAccountErrors() { } - - public EventDeviceDisconnectedConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceDisconnectedConnectedAccountWarnings_model")] - public class EventDeviceDisconnectedConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventDeviceDisconnectedConnectedAccountWarnings() { } - - public EventDeviceDisconnectedConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceDisconnectedDeviceErrors_model")] - public class EventDeviceDisconnectedDeviceErrors - { - [JsonConstructorAttribute] - protected EventDeviceDisconnectedDeviceErrors() { } - - public EventDeviceDisconnectedDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceDisconnectedDeviceWarnings_model")] - public class EventDeviceDisconnectedDeviceWarnings - { - [JsonConstructorAttribute] - protected EventDeviceDisconnectedDeviceWarnings() { } - - public EventDeviceDisconnectedDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The status of an [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices) changed from online to offline. That is, the `device.properties.online` property changed from `true` to `false`. - /// - [DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnected_model")] - public class EventDeviceUnmanagedDisconnected : Event - { - [JsonConstructorAttribute] - protected EventDeviceUnmanagedDisconnected() { } - - public EventDeviceUnmanagedDisconnected( - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - EventDeviceUnmanagedDisconnected.ErrorCodeEnum errorCode = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - ErrorCode = errorCode; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Error code associated with the disconnection event, if any. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ErrorCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "account_disconnected")] - AccountDisconnected = 1, - - [EnumMember(Value = "hub_disconnected")] - HubDisconnected = 2, - - [EnumMember(Value = "device_disconnected")] - DeviceDisconnected = 3, - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Error code associated with the disconnection event, if any. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public EventDeviceUnmanagedDisconnected.ErrorCodeEnum ErrorCode { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.unmanaged.disconnected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedConnectedAccountErrors_model")] - public class EventDeviceUnmanagedDisconnectedConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventDeviceUnmanagedDisconnectedConnectedAccountErrors() { } - - public EventDeviceUnmanagedDisconnectedConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventDeviceUnmanagedDisconnectedConnectedAccountWarnings_model" - )] - public class EventDeviceUnmanagedDisconnectedConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventDeviceUnmanagedDisconnectedConnectedAccountWarnings() { } - - public EventDeviceUnmanagedDisconnectedConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedDeviceErrors_model")] - public class EventDeviceUnmanagedDisconnectedDeviceErrors - { - [JsonConstructorAttribute] - protected EventDeviceUnmanagedDisconnectedDeviceErrors() { } - - public EventDeviceUnmanagedDisconnectedDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedDeviceWarnings_model")] - public class EventDeviceUnmanagedDisconnectedDeviceWarnings - { - [JsonConstructorAttribute] - protected EventDeviceUnmanagedDisconnectedDeviceWarnings() { } - - public EventDeviceUnmanagedDisconnectedDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A device detected that it was tampered with, for example, opened or moved. - /// - [DataContract(Name = "seamModel_eventDeviceTampered_model")] - public class EventDeviceTampered : Event - { - [JsonConstructorAttribute] - protected EventDeviceTampered() { } - - public EventDeviceTampered( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.tampered"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A device battery level dropped below the low threshold. - /// - [DataContract(Name = "seamModel_eventDeviceLowBattery_model")] - public class EventDeviceLowBattery : Event - { - [JsonConstructorAttribute] - protected EventDeviceLowBattery() { } - - public EventDeviceLowBattery( - float? accessoryKeypadBatteryLevel = default, - float batteryLevel = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - float? deviceBatteryLevel = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessoryKeypadBatteryLevel = accessoryKeypadBatteryLevel; - BatteryLevel = batteryLevel; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceBatteryLevel = deviceBatteryLevel; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known. - /// - [DataMember( - Name = "accessory_keypad_battery_level", - IsRequired = false, - EmitDefaultValue = false - )] - public float? AccessoryKeypadBatteryLevel { get; set; } - - /// - /// Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event. - /// - [Obsolete( - "Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery." - )] - [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] - public float BatteryLevel { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Number in the range 0 to 1.0 indicating the affected device's own battery level, when known. - /// - [DataMember(Name = "device_battery_level", IsRequired = false, EmitDefaultValue = false)] - public float? DeviceBatteryLevel { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.low_battery"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A device battery status changed since the last `battery_status_changed` event. - /// - [DataContract(Name = "seamModel_eventDeviceBatteryStatusChanged_model")] - public class EventDeviceBatteryStatusChanged : Event - { - [JsonConstructorAttribute] - protected EventDeviceBatteryStatusChanged() { } - - public EventDeviceBatteryStatusChanged( - float batteryLevel = default, - EventDeviceBatteryStatusChanged.BatteryStatusEnum batteryStatus = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - BatteryLevel = batteryLevel; - BatteryStatus = batteryStatus; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Battery status of the affected device, calculated from the numeric `battery_level` value. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum BatteryStatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "critical")] - Critical = 1, - - [EnumMember(Value = "low")] - Low = 2, - - [EnumMember(Value = "good")] - Good = 3, - - [EnumMember(Value = "full")] - Full = 4, - } - - /// - /// Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. - /// - [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] - public float BatteryLevel { get; set; } - - /// - /// Battery status of the affected device, calculated from the numeric `battery_level` value. - /// - [DataMember(Name = "battery_status", IsRequired = false, EmitDefaultValue = false)] - public EventDeviceBatteryStatusChanged.BatteryStatusEnum BatteryStatus { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.battery_status_changed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A device was removed externally from the connected account. - /// - [DataContract(Name = "seamModel_eventDeviceRemoved_model")] - public class EventDeviceRemoved : Event - { - [JsonConstructorAttribute] - protected EventDeviceRemoved() { } - - public EventDeviceRemoved( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.removed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A device was deleted. - /// - [DataContract(Name = "seamModel_eventDeviceDeleted_model")] - public class EventDeviceDeleted : Event - { - [JsonConstructorAttribute] - protected EventDeviceDeleted() { } - - public EventDeviceDeleted( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? deviceName = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - DeviceName = deviceName; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Name of the deleted device, captured at deletion time. The device record no longer exists when this event fires, so the name is preserved here. Null when the device had no resolvable name. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceName { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Seam detected that a device is using a third-party integration that will interfere with Seam device management. - /// - [DataContract(Name = "seamModel_eventDeviceThirdPartyIntegrationDetected_model")] - public class EventDeviceThirdPartyIntegrationDetected : Event - { - [JsonConstructorAttribute] - protected EventDeviceThirdPartyIntegrationDetected() { } - - public EventDeviceThirdPartyIntegrationDetected( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.third_party_integration_detected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Seam detected that a device is no longer using a third-party integration that was interfering with Seam device management. - /// - [DataContract(Name = "seamModel_eventDeviceThirdPartyIntegrationNoLongerDetected_model")] - public class EventDeviceThirdPartyIntegrationNoLongerDetected : Event - { - [JsonConstructorAttribute] - protected EventDeviceThirdPartyIntegrationNoLongerDetected() { } - - public EventDeviceThirdPartyIntegrationNoLongerDetected( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "device.third_party_integration_no_longer_detected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [Salto device](https://docs.seam.co/device-and-system-integration-guides/salto-locks) activated privacy mode. - /// - [DataContract(Name = "seamModel_eventDeviceSaltoPrivacyModeActivated_model")] - public class EventDeviceSaltoPrivacyModeActivated : Event - { - [JsonConstructorAttribute] - protected EventDeviceSaltoPrivacyModeActivated() { } - - public EventDeviceSaltoPrivacyModeActivated( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.salto.privacy_mode_activated"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [Salto device](https://docs.seam.co/device-and-system-integration-guides/salto-locks) deactivated privacy mode. - /// - [DataContract(Name = "seamModel_eventDeviceSaltoPrivacyModeDeactivated_model")] - public class EventDeviceSaltoPrivacyModeDeactivated : Event - { - [JsonConstructorAttribute] - protected EventDeviceSaltoPrivacyModeDeactivated() { } - - public EventDeviceSaltoPrivacyModeDeactivated( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.salto.privacy_mode_deactivated"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Seam detected a flaky device connection. - /// - [DataContract(Name = "seamModel_eventDeviceConnectionBecameFlaky_model")] - public class EventDeviceConnectionBecameFlaky : Event - { - [JsonConstructorAttribute] - protected EventDeviceConnectionBecameFlaky() { } - - public EventDeviceConnectionBecameFlaky( - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.connection_became_flaky"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyConnectedAccountErrors_model")] - public class EventDeviceConnectionBecameFlakyConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventDeviceConnectionBecameFlakyConnectedAccountErrors() { } - - public EventDeviceConnectionBecameFlakyConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventDeviceConnectionBecameFlakyConnectedAccountWarnings_model" - )] - public class EventDeviceConnectionBecameFlakyConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventDeviceConnectionBecameFlakyConnectedAccountWarnings() { } - - public EventDeviceConnectionBecameFlakyConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyDeviceErrors_model")] - public class EventDeviceConnectionBecameFlakyDeviceErrors - { - [JsonConstructorAttribute] - protected EventDeviceConnectionBecameFlakyDeviceErrors() { } - - public EventDeviceConnectionBecameFlakyDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyDeviceWarnings_model")] - public class EventDeviceConnectionBecameFlakyDeviceWarnings - { - [JsonConstructorAttribute] - protected EventDeviceConnectionBecameFlakyDeviceWarnings() { } - - public EventDeviceConnectionBecameFlakyDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Seam detected that a previously-flaky device connection stabilized. - /// - [DataContract(Name = "seamModel_eventDeviceConnectionStabilized_model")] - public class EventDeviceConnectionStabilized : Event - { - [JsonConstructorAttribute] - protected EventDeviceConnectionStabilized() { } - - public EventDeviceConnectionStabilized( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.connection_stabilized"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A third-party subscription is required to use all device features. - /// - [DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequired_model")] - public class EventDeviceErrorSubscriptionRequired : Event - { - [JsonConstructorAttribute] - protected EventDeviceErrorSubscriptionRequired() { } - - public EventDeviceErrorSubscriptionRequired( - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.error.subscription_required"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventDeviceErrorSubscriptionRequiredConnectedAccountErrors_model" - )] - public class EventDeviceErrorSubscriptionRequiredConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventDeviceErrorSubscriptionRequiredConnectedAccountErrors() { } - - public EventDeviceErrorSubscriptionRequiredConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventDeviceErrorSubscriptionRequiredConnectedAccountWarnings_model" - )] - public class EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings() { } - - public EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredDeviceErrors_model")] - public class EventDeviceErrorSubscriptionRequiredDeviceErrors - { - [JsonConstructorAttribute] - protected EventDeviceErrorSubscriptionRequiredDeviceErrors() { } - - public EventDeviceErrorSubscriptionRequiredDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredDeviceWarnings_model")] - public class EventDeviceErrorSubscriptionRequiredDeviceWarnings - { - [JsonConstructorAttribute] - protected EventDeviceErrorSubscriptionRequiredDeviceWarnings() { } - - public EventDeviceErrorSubscriptionRequiredDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A third-party subscription is active or no longer required to use all device features. - /// - [DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredResolved_model")] - public class EventDeviceErrorSubscriptionRequiredResolved : Event - { - [JsonConstructorAttribute] - protected EventDeviceErrorSubscriptionRequiredResolved() { } - - public EventDeviceErrorSubscriptionRequiredResolved( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.error.subscription_required.resolved"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An accessory keypad was connected to a device. - /// - [DataContract(Name = "seamModel_eventDeviceAccessoryKeypadConnected_model")] - public class EventDeviceAccessoryKeypadConnected : Event - { - [JsonConstructorAttribute] - protected EventDeviceAccessoryKeypadConnected() { } - - public EventDeviceAccessoryKeypadConnected( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.accessory_keypad_connected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// An accessory keypad was disconnected from a device. - /// - [DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnected_model")] - public class EventDeviceAccessoryKeypadDisconnected : Event - { - [JsonConstructorAttribute] - protected EventDeviceAccessoryKeypadDisconnected() { } - - public EventDeviceAccessoryKeypadDisconnected( - object? connectedAccountCustomMetadata = default, - List connectedAccountErrors = - default, - string connectedAccountId = default, - List connectedAccountWarnings = - default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - List deviceErrors = default, - string deviceId = default, - List deviceWarnings = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountErrors = connectedAccountErrors; - ConnectedAccountId = connectedAccountId; - ConnectedAccountWarnings = connectedAccountWarnings; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceErrors = deviceErrors; - DeviceId = deviceId; - DeviceWarnings = deviceWarnings; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// Errors associated with the connected account. - /// - [DataMember( - Name = "connected_account_errors", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountErrors { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Warnings associated with the connected account. - /// - [DataMember( - Name = "connected_account_warnings", - IsRequired = false, - EmitDefaultValue = false - )] - public List ConnectedAccountWarnings { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// Errors associated with the device. - /// - [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] - public List DeviceErrors { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Warnings associated with the device. - /// - [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] - public List DeviceWarnings { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.accessory_keypad_disconnected"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors_model" - )] - public class EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors - { - [JsonConstructorAttribute] - protected EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors() { } - - public EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings_model" - )] - public class EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings - { - [JsonConstructorAttribute] - protected EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings() { } - - public EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedDeviceErrors_model")] - public class EventDeviceAccessoryKeypadDisconnectedDeviceErrors - { - [JsonConstructorAttribute] - protected EventDeviceAccessoryKeypadDisconnectedDeviceErrors() { } - - public EventDeviceAccessoryKeypadDisconnectedDeviceErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedDeviceWarnings_model")] - public class EventDeviceAccessoryKeypadDisconnectedDeviceWarnings - { - [JsonConstructorAttribute] - protected EventDeviceAccessoryKeypadDisconnectedDeviceWarnings() { } - - public EventDeviceAccessoryKeypadDisconnectedDeviceWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Extended periods of noise or noise exceeding a [threshold](https://docs.seam.co/capability-guides/noise-sensors#what-is-a-threshold) were detected. - /// - [DataContract(Name = "seamModel_eventNoiseSensorNoiseThresholdTriggered_model")] - public class EventNoiseSensorNoiseThresholdTriggered : Event - { - [JsonConstructorAttribute] - protected EventNoiseSensorNoiseThresholdTriggered() { } - - public EventNoiseSensorNoiseThresholdTriggered( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - object? minutMetadata = default, - float? noiseLevelDecibels = default, - float? noiseLevelNrs = default, - string? noiseThresholdId = default, - string? noiseThresholdName = default, - object? noiseawareMetadata = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - MinutMetadata = minutMetadata; - NoiseLevelDecibels = noiseLevelDecibels; - NoiseLevelNrs = noiseLevelNrs; - NoiseThresholdId = noiseThresholdId; - NoiseThresholdName = noiseThresholdName; - NoiseawareMetadata = noiseawareMetadata; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "noise_sensor.noise_threshold_triggered"; - - /// - /// Metadata from Minut. - /// - [DataMember(Name = "minut_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? MinutMetadata { get; set; } - - /// - /// Detected noise level in decibels. - /// - [DataMember(Name = "noise_level_decibels", IsRequired = false, EmitDefaultValue = false)] - public float? NoiseLevelDecibels { get; set; } - - /// - /// Detected noise level in Noiseaware Noise Risk Score (NRS). - /// - [DataMember(Name = "noise_level_nrs", IsRequired = false, EmitDefaultValue = false)] - public float? NoiseLevelNrs { get; set; } - - /// - /// ID of the noise threshold that was triggered. - /// - [DataMember(Name = "noise_threshold_id", IsRequired = false, EmitDefaultValue = false)] - public string? NoiseThresholdId { get; set; } - - /// - /// Name of the noise threshold that was triggered. - /// - [DataMember(Name = "noise_threshold_name", IsRequired = false, EmitDefaultValue = false)] - public string? NoiseThresholdName { get; set; } - - /// - /// Metadata from Noiseaware. - /// - [DataMember(Name = "noiseaware_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? NoiseawareMetadata { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [lock](https://docs.seam.co/low-level-apis/smart-locks) was locked. - /// - [DataContract(Name = "seamModel_eventLockLocked_model")] - public class EventLockLocked : Event - { - [JsonConstructorAttribute] - protected EventLockLocked() { } - - public EventLockLocked( - string? accessCodeId = default, - bool? accessCodeIsManaged = default, - string? actionAttemptId = default, - string? code = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - bool? isViaBluetooth = default, - bool? isViaNfc = default, - EventLockLocked.MethodEnum method = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - AccessCodeIsManaged = accessCodeIsManaged; - ActionAttemptId = actionAttemptId; - Code = code; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - IsViaBluetooth = isViaBluetooth; - IsViaNfc = isViaNfc; - Method = method; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum MethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "keycode")] - Keycode = 1, - - [EnumMember(Value = "manual")] - Manual = 2, - - [EnumMember(Value = "automatic")] - Automatic = 3, - - [EnumMember(Value = "unknown")] - Unknown = 4, - - [EnumMember(Value = "remote")] - Remote = 5, - - [EnumMember(Value = "card")] - Card = 6, - } - - /// - /// ID of the access code that was used to lock the device. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessCodeId { get; set; } - - /// - /// Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. - /// - [DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool? AccessCodeIsManaged { get; set; } - - /// - /// ID of the Seam action attempt that triggered this lock. Present only when the lock was initiated through Seam (via a `LOCK_DOOR` action attempt). - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string? ActionAttemptId { get; set; } - - /// - /// Code (PIN) that was used to lock the device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "lock.locked"; - - /// - /// Whether the lock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. - /// - [DataMember(Name = "is_via_bluetooth", IsRequired = false, EmitDefaultValue = false)] - public bool? IsViaBluetooth { get; set; } - - /// - /// Whether the lock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. - /// - [DataMember(Name = "is_via_nfc", IsRequired = false, EmitDefaultValue = false)] - public bool? IsViaNfc { get; set; } - - /// - /// Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. - /// - [DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] - public EventLockLocked.MethodEnum Method { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [lock](https://docs.seam.co/low-level-apis/smart-locks) was unlocked. - /// - [DataContract(Name = "seamModel_eventLockUnlocked_model")] - public class EventLockUnlocked : Event - { - [JsonConstructorAttribute] - protected EventLockUnlocked() { } - - public EventLockUnlocked( - string? accessCodeId = default, - bool? accessCodeIsManaged = default, - string? actionAttemptId = default, - string? code = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - bool? isViaBluetooth = default, - bool? isViaNfc = default, - EventLockUnlocked.MethodEnum method = default, - string occurredAt = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - AccessCodeIsManaged = accessCodeIsManaged; - ActionAttemptId = actionAttemptId; - Code = code; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - IsViaBluetooth = isViaBluetooth; - IsViaNfc = isViaNfc; - Method = method; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Method by which the lock was unlocked. `keycode`: an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum MethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "keycode")] - Keycode = 1, - - [EnumMember(Value = "manual")] - Manual = 2, - - [EnumMember(Value = "automatic")] - Automatic = 3, - - [EnumMember(Value = "unknown")] - Unknown = 4, - - [EnumMember(Value = "remote")] - Remote = 5, - - [EnumMember(Value = "card")] - Card = 6, - } - - /// - /// ID of the access code that was used to unlock the affected device. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessCodeId { get; set; } - - /// - /// Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. - /// - [DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool? AccessCodeIsManaged { get; set; } - - /// - /// ID of the Seam action attempt that triggered this unlock. Present only when the unlock was initiated through Seam (via an `UNLOCK_DOOR` action attempt). - /// - [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] - public string? ActionAttemptId { get; set; } - - /// - /// Code (PIN) that was used to unlock the affected device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "lock.unlocked"; - - /// - /// Whether the unlock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. - /// - [DataMember(Name = "is_via_bluetooth", IsRequired = false, EmitDefaultValue = false)] - public bool? IsViaBluetooth { get; set; } - - /// - /// Whether the unlock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. - /// - [DataMember(Name = "is_via_nfc", IsRequired = false, EmitDefaultValue = false)] - public bool? IsViaNfc { get; set; } - - /// - /// Method by which the lock was unlocked. `keycode`: an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. - /// - [DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] - public EventLockUnlocked.MethodEnum Method { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The [lock](https://docs.seam.co/low-level-apis/smart-locks) denied access to a user after one or more consecutive invalid attempts to unlock the device. - /// - [DataContract(Name = "seamModel_eventLockAccessDenied_model")] - public class EventLockAccessDenied : Event - { - [JsonConstructorAttribute] - protected EventLockAccessDenied() { } - - public EventLockAccessDenied( - string? accessCodeId = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string? deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - EventLockAccessDeniedReason? reason = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - Reason = reason; - WorkspaceId = workspaceId; - } - - /// - /// ID of the access code that was used in the unlock attempts. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string? AccessCodeId { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string? DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "lock.access_denied"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Why access was denied, when the provider reports a determinable cause. Omitted when unknown. - /// - [DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] - public EventLockAccessDeniedReason? Reason { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventLockAccessDeniedReason_model")] - public class EventLockAccessDeniedReason - { - [JsonConstructorAttribute] - protected EventLockAccessDeniedReason() { } - - public EventLockAccessDeniedReason( - string message = default, - EventLockAccessDeniedReason.ReasonCodeEnum reasonCode = default - ) - { - Message = message; - ReasonCode = reasonCode; - } - - /// - /// Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ReasonCodeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "unknown_code")] - UnknownCode = 1, - - [EnumMember(Value = "expired_code")] - ExpiredCode = 2, - - [EnumMember(Value = "blocklisted_code")] - BlocklistedCode = 3, - - [EnumMember(Value = "too_many_attempts")] - TooManyAttempts = 4, - - [EnumMember(Value = "blocked_by_privacy_mode")] - BlockedByPrivacyMode = 5, - - [EnumMember(Value = "credential_error")] - CredentialError = 6, - } - - /// - /// Human-readable explanation of why access was denied. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. - /// - [DataMember(Name = "reason_code", IsRequired = false, EmitDefaultValue = false)] - public EventLockAccessDeniedReason.ReasonCodeEnum ReasonCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A thermostat [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) was activated. - /// - [DataContract(Name = "seamModel_eventThermostatClimatePresetActivated_model")] - public class EventThermostatClimatePresetActivated : Event - { - [JsonConstructorAttribute] - protected EventThermostatClimatePresetActivated() { } - - public EventThermostatClimatePresetActivated( - string climatePresetKey = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - bool isFallbackClimatePreset = default, - string occurredAt = default, - string? thermostatScheduleId = default, - string workspaceId = default - ) - { - ClimatePresetKey = climatePresetKey; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - IsFallbackClimatePreset = isFallbackClimatePreset; - OccurredAt = occurredAt; - ThermostatScheduleId = thermostatScheduleId; - WorkspaceId = workspaceId; - } - - /// - /// Key of the climate preset that was activated. - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "thermostat.climate_preset_activated"; - - /// - /// Indicates whether the climate preset that was activated is the fallback climate preset for the thermostat. - /// - [DataMember( - Name = "is_fallback_climate_preset", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsFallbackClimatePreset { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the thermostat schedule that prompted the affected climate preset to be activated. - /// - [DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] - public string? ThermostatScheduleId { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [thermostat](https://docs.seam.co/capability-guides/thermostats) was adjusted manually. - /// - [DataContract(Name = "seamModel_eventThermostatManuallyAdjusted_model")] - public class EventThermostatManuallyAdjusted : Event - { - [JsonConstructorAttribute] - protected EventThermostatManuallyAdjusted() { } - - public EventThermostatManuallyAdjusted( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - float? coolingSetPointCelsius = default, - float? coolingSetPointFahrenheit = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - EventThermostatManuallyAdjusted.FanModeSettingEnum? fanModeSetting = default, - float? heatingSetPointCelsius = default, - float? heatingSetPointFahrenheit = default, - EventThermostatManuallyAdjusted.HvacModeSettingEnum? hvacModeSetting = default, - EventThermostatManuallyAdjusted.MethodEnum method = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CoolingSetPointCelsius = coolingSetPointCelsius; - CoolingSetPointFahrenheit = coolingSetPointFahrenheit; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - FanModeSetting = fanModeSetting; - HeatingSetPointCelsius = heatingSetPointCelsius; - HeatingSetPointFahrenheit = heatingSetPointFahrenheit; - HvacModeSetting = hvacModeSetting; - Method = method; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum FanModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "auto")] - Auto = 1, - - [EnumMember(Value = "on")] - On = 2, - - [EnumMember(Value = "circulate")] - Circulate = 3, - } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum HvacModeSettingEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "off")] - Off = 1, - - [EnumMember(Value = "heat")] - Heat = 2, - - [EnumMember(Value = "cool")] - Cool = 3, - - [EnumMember(Value = "heat_cool")] - HeatCool = 4, - - [EnumMember(Value = "eco")] - Eco = 5, - } - - /// - /// Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum MethodEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "seam")] - Seam = 1, - - [EnumMember(Value = "external")] - External = 2, - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "cooling_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? CoolingSetPointFahrenheit { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "thermostat.manually_adjusted"; - - /// - /// Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. - /// - [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public EventThermostatManuallyAdjusted.FanModeSettingEnum? FanModeSetting { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointCelsius { get; set; } - - /// - /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataMember( - Name = "heating_set_point_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? HeatingSetPointFahrenheit { get; set; } - - /// - /// Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. - /// - [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] - public EventThermostatManuallyAdjusted.HvacModeSettingEnum? HvacModeSetting { get; set; } - - /// - /// Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. - /// - [DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] - public EventThermostatManuallyAdjusted.MethodEnum Method { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [thermostat's](https://docs.seam.co/capability-guides/thermostats) temperature reading exceeded the set [threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds). - /// - [DataContract(Name = "seamModel_eventThermostatTemperatureThresholdExceeded_model")] - public class EventThermostatTemperatureThresholdExceeded : Event - { - [JsonConstructorAttribute] - protected EventThermostatTemperatureThresholdExceeded() { } - - public EventThermostatTemperatureThresholdExceeded( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - float? lowerLimitCelsius = default, - float? lowerLimitFahrenheit = default, - string occurredAt = default, - float temperatureCelsius = default, - float temperatureFahrenheit = default, - float? upperLimitCelsius = default, - float? upperLimitFahrenheit = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - LowerLimitCelsius = lowerLimitCelsius; - LowerLimitFahrenheit = lowerLimitFahrenheit; - OccurredAt = occurredAt; - TemperatureCelsius = temperatureCelsius; - TemperatureFahrenheit = temperatureFahrenheit; - UpperLimitCelsius = upperLimitCelsius; - UpperLimitFahrenheit = upperLimitFahrenheit; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "thermostat.temperature_threshold_exceeded"; - - /// - /// Lower temperature limit, in °C, defined by the set threshold. - /// - [DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? LowerLimitCelsius { get; set; } - - /// - /// Lower temperature limit, in °F, defined by the set threshold. - /// - [DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float? LowerLimitFahrenheit { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Temperature, in °C, reported by the affected thermostat. - /// - [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] - public float TemperatureCelsius { get; set; } - - /// - /// Temperature, in °F, reported by the affected thermostat. - /// - [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float TemperatureFahrenheit { get; set; } - - /// - /// Upper temperature limit, in °C, defined by the set threshold. - /// - [DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? UpperLimitCelsius { get; set; } - - /// - /// Upper temperature limit, in °F, defined by the set threshold. - /// - [DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float? UpperLimitFahrenheit { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [thermostat's](https://docs.seam.co/capability-guides/thermostats) temperature reading no longer exceeds the set [threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds). - /// - [DataContract(Name = "seamModel_eventThermostatTemperatureThresholdNoLongerExceeded_model")] - public class EventThermostatTemperatureThresholdNoLongerExceeded : Event - { - [JsonConstructorAttribute] - protected EventThermostatTemperatureThresholdNoLongerExceeded() { } - - public EventThermostatTemperatureThresholdNoLongerExceeded( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - float? lowerLimitCelsius = default, - float? lowerLimitFahrenheit = default, - string occurredAt = default, - float temperatureCelsius = default, - float temperatureFahrenheit = default, - float? upperLimitCelsius = default, - float? upperLimitFahrenheit = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - LowerLimitCelsius = lowerLimitCelsius; - LowerLimitFahrenheit = lowerLimitFahrenheit; - OccurredAt = occurredAt; - TemperatureCelsius = temperatureCelsius; - TemperatureFahrenheit = temperatureFahrenheit; - UpperLimitCelsius = upperLimitCelsius; - UpperLimitFahrenheit = upperLimitFahrenheit; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = - "thermostat.temperature_threshold_no_longer_exceeded"; - - /// - /// Lower temperature limit, in °C, defined by the set threshold. - /// - [DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? LowerLimitCelsius { get; set; } - - /// - /// Lower temperature limit, in °F, defined by the set threshold. - /// - [DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float? LowerLimitFahrenheit { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Temperature, in °C, reported by the affected thermostat. - /// - [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] - public float TemperatureCelsius { get; set; } - - /// - /// Temperature, in °F, reported by the affected thermostat. - /// - [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float TemperatureFahrenheit { get; set; } - - /// - /// Upper temperature limit, in °C, defined by the set threshold. - /// - [DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] - public float? UpperLimitCelsius { get; set; } - - /// - /// Upper temperature limit, in °F, defined by the set threshold. - /// - [DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float? UpperLimitFahrenheit { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [thermostat's](https://docs.seam.co/capability-guides/thermostats) temperature reading is within 1 °C of the configured cooling or heating [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). - /// - [DataContract(Name = "seamModel_eventThermostatTemperatureReachedSetPoint_model")] - public class EventThermostatTemperatureReachedSetPoint : Event - { - [JsonConstructorAttribute] - protected EventThermostatTemperatureReachedSetPoint() { } - - public EventThermostatTemperatureReachedSetPoint( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - float? desiredTemperatureCelsius = default, - float? desiredTemperatureFahrenheit = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - float temperatureCelsius = default, - float temperatureFahrenheit = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DesiredTemperatureCelsius = desiredTemperatureCelsius; - DesiredTemperatureFahrenheit = desiredTemperatureFahrenheit; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - TemperatureCelsius = temperatureCelsius; - TemperatureFahrenheit = temperatureFahrenheit; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Desired temperature, in °C, defined by the affected thermostat's cooling or heating set point. - /// - [DataMember( - Name = "desired_temperature_celsius", - IsRequired = false, - EmitDefaultValue = false - )] - public float? DesiredTemperatureCelsius { get; set; } - - /// - /// Desired temperature, in °F, defined by the affected thermostat's cooling or heating set point. - /// - [DataMember( - Name = "desired_temperature_fahrenheit", - IsRequired = false, - EmitDefaultValue = false - )] - public float? DesiredTemperatureFahrenheit { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "thermostat.temperature_reached_set_point"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Temperature, in °C, reported by the affected thermostat. - /// - [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] - public float TemperatureCelsius { get; set; } - - /// - /// Temperature, in °F, reported by the affected thermostat. - /// - [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float TemperatureFahrenheit { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A [thermostat's](https://docs.seam.co/capability-guides/thermostats) reported temperature changed by at least 1 °C. - /// - [DataContract(Name = "seamModel_eventThermostatTemperatureChanged_model")] - public class EventThermostatTemperatureChanged : Event - { - [JsonConstructorAttribute] - protected EventThermostatTemperatureChanged() { } - - public EventThermostatTemperatureChanged( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - float temperatureCelsius = default, - float temperatureFahrenheit = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - TemperatureCelsius = temperatureCelsius; - TemperatureFahrenheit = temperatureFahrenheit; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "thermostat.temperature_changed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// Temperature, in °C, reported by the affected thermostat. - /// - [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] - public float TemperatureCelsius { get; set; } - - /// - /// Temperature, in °F, reported by the affected thermostat. - /// - [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] - public float TemperatureFahrenheit { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// The name of a device was changed. - /// - [DataContract(Name = "seamModel_eventDeviceNameChanged_model")] - public class EventDeviceNameChanged : Event - { - [JsonConstructorAttribute] - protected EventDeviceNameChanged() { } - - public EventDeviceNameChanged( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string deviceName = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - DeviceName = deviceName; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// The new name of the affected device. - /// - [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] - public string DeviceName { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.name_changed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A camera was activated, for example, by motion detection. - /// - [DataContract(Name = "seamModel_eventCameraActivated_model")] - public class EventCameraActivated : Event - { - [JsonConstructorAttribute] - protected EventCameraActivated() { } - - public EventCameraActivated( - EventCameraActivated.ActivationReasonEnum activationReason = default, - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string? imageUrl = default, - EventCameraActivated.MotionSubTypeEnum? motionSubType = default, - string occurredAt = default, - string? videoUrl = default, - string workspaceId = default - ) - { - ActivationReason = activationReason; - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - ImageUrl = imageUrl; - MotionSubType = motionSubType; - OccurredAt = occurredAt; - VideoUrl = videoUrl; - WorkspaceId = workspaceId; - } - - /// - /// The reason the camera was activated. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ActivationReasonEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "motion_detected")] - MotionDetected = 1, - } - - /// - /// Sub-type of motion detected, if available. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum MotionSubTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "human")] - Human = 1, - - [EnumMember(Value = "vehicle")] - Vehicle = 2, - - [EnumMember(Value = "package")] - Package = 3, - - [EnumMember(Value = "other")] - Other = 4, - } - - /// - /// The reason the camera was activated. - /// - [DataMember(Name = "activation_reason", IsRequired = false, EmitDefaultValue = false)] - public EventCameraActivated.ActivationReasonEnum ActivationReason { get; set; } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "camera.activated"; - - /// - /// URL to a thumbnail image captured at the time of activation. - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string? ImageUrl { get; set; } - - /// - /// Sub-type of motion detected, if available. - /// - [DataMember(Name = "motion_sub_type", IsRequired = false, EmitDefaultValue = false)] - public EventCameraActivated.MotionSubTypeEnum? MotionSubType { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// URL to a short video clip captured at the time of activation. - /// - [DataMember(Name = "video_url", IsRequired = false, EmitDefaultValue = false)] - public string? VideoUrl { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A doorbell button was pressed on a device. - /// - [DataContract(Name = "seamModel_eventDeviceDoorbellRang_model")] - public class EventDeviceDoorbellRang : Event - { - [JsonConstructorAttribute] - protected EventDeviceDoorbellRang() { } - - public EventDeviceDoorbellRang( - object? connectedAccountCustomMetadata = default, - string connectedAccountId = default, - string createdAt = default, - string? customerKey = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string? imageUrl = default, - string occurredAt = default, - string? videoUrl = default, - string workspaceId = default - ) - { - ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomerKey = customerKey; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - ImageUrl = imageUrl; - OccurredAt = occurredAt; - VideoUrl = videoUrl; - WorkspaceId = workspaceId; - } - - /// - /// Custom metadata of the connected account, present when connected_account_id is provided. - /// - [DataMember( - Name = "connected_account_custom_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public object? ConnectedAccountCustomMetadata { get; set; } - - /// - /// ID of the connected account associated with the event. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// The customer key associated with the device, if any. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Custom metadata of the device, present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "device.doorbell_rang"; - - /// - /// URL to a thumbnail image captured at the time the doorbell was pressed. - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string? ImageUrl { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// URL to a short video clip captured at the time the doorbell was pressed. - /// - [DataMember(Name = "video_url", IsRequired = false, EmitDefaultValue = false)] - public string? VideoUrl { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A phone device was deactivated. - /// - [DataContract(Name = "seamModel_eventPhoneDeactivated_model")] - public class EventPhoneDeactivated : Event - { - [JsonConstructorAttribute] - protected EventPhoneDeactivated() { } - - public EventPhoneDeactivated( - string createdAt = default, - object? deviceCustomMetadata = default, - string deviceId = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string workspaceId = default - ) - { - CreatedAt = createdAt; - DeviceCustomMetadata = deviceCustomMetadata; - DeviceId = deviceId; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Custom metadata of the device; present when device_id is provided. - /// - [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object? DeviceCustomMetadata { get; set; } - - /// - /// ID of the affected phone device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "phone.deactivated"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A device was added or removed from a space. - /// - [DataContract(Name = "seamModel_eventSpaceDeviceMembershipChanged_model")] - public class EventSpaceDeviceMembershipChanged : Event - { - [JsonConstructorAttribute] - protected EventSpaceDeviceMembershipChanged() { } - - public EventSpaceDeviceMembershipChanged( - List acsEntranceIds = default, - string createdAt = default, - List deviceIds = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string spaceId = default, - string? spaceKey = default, - string workspaceId = default - ) - { - AcsEntranceIds = acsEntranceIds; - CreatedAt = createdAt; - DeviceIds = deviceIds; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - SpaceId = spaceId; - SpaceKey = spaceKey; - WorkspaceId = workspaceId; - } - - /// - /// IDs of all ACS entrances currently attached to the space. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List AcsEntranceIds { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// IDs of all devices currently attached to the space. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "space.device_membership_changed"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the affected space. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - /// - /// Unique key for the space within the workspace. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A space was created. - /// - [DataContract(Name = "seamModel_eventSpaceCreated_model")] - public class EventSpaceCreated : Event - { - [JsonConstructorAttribute] - protected EventSpaceCreated() { } - - public EventSpaceCreated( - List acsEntranceIds = default, - string createdAt = default, - List deviceIds = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string spaceId = default, - string? spaceKey = default, - string workspaceId = default - ) - { - AcsEntranceIds = acsEntranceIds; - CreatedAt = createdAt; - DeviceIds = deviceIds; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - SpaceId = spaceId; - SpaceKey = spaceKey; - WorkspaceId = workspaceId; - } - - /// - /// IDs of all ACS entrances attached to the space when it was created. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List AcsEntranceIds { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// IDs of all devices attached to the space when it was created. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "space.created"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the affected space. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - /// - /// Unique key for the space within the workspace. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// A space was deleted. - /// - [DataContract(Name = "seamModel_eventSpaceDeleted_model")] - public class EventSpaceDeleted : Event - { - [JsonConstructorAttribute] - protected EventSpaceDeleted() { } - - public EventSpaceDeleted( - List acsEntranceIds = default, - string createdAt = default, - List deviceIds = default, - string? eventDescription = default, - string eventId = default, - string eventType = default, - string occurredAt = default, - string spaceId = default, - string? spaceKey = default, - string workspaceId = default - ) - { - AcsEntranceIds = acsEntranceIds; - CreatedAt = createdAt; - DeviceIds = deviceIds; - EventDescription = eventDescription; - EventId = eventId; - EventType = eventType; - OccurredAt = occurredAt; - SpaceId = spaceId; - SpaceKey = spaceKey; - WorkspaceId = workspaceId; - } - - /// - /// IDs of all ACS entrances currently attached to the space when it was deleted. - /// - [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] - public List AcsEntranceIds { get; set; } - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// IDs of all devices attached to the space when it was deleted. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "space.deleted"; - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the affected space. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - /// - /// Unique key for the space within the workspace. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_eventUnrecognized_model")] - public class EventUnrecognized : Event - { - [JsonConstructorAttribute] - protected EventUnrecognized() { } - - public EventUnrecognized( - string eventType = default, - string createdAt = default, - string? eventDescription = default, - string eventId = default, - string occurredAt = default, - string workspaceId = default - ) - { - EventType = eventType; - CreatedAt = createdAt; - EventDescription = eventDescription; - EventId = eventId; - OccurredAt = occurredAt; - WorkspaceId = workspaceId; - } - - [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] - public override string EventType { get; } = "unrecognized"; - - /// - /// Date and time at which the event was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. - /// - [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] - public override string? EventDescription { get; set; } - - /// - /// ID of the event. - /// - [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] - public override string EventId { get; set; } - - /// - /// Date and time at which the event occurred. - /// - [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] - public override string OccurredAt { get; set; } - - /// - /// ID of the workspace associated with the event. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public override string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +[JsonConverter(typeof(JsonSubtypes), "event_type")] +[JsonSubtypes.FallBackSubType(typeof(EventUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(EventSpaceDeleted), "space.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventSpaceCreated), "space.created")] +[JsonSubtypes.KnownSubType(typeof(EventSpaceDeviceMembershipChanged), "space.device_membership_changed")] +[JsonSubtypes.KnownSubType(typeof(EventPhoneDeactivated), "phone.deactivated")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceDoorbellRang), "device.doorbell_rang")] +[JsonSubtypes.KnownSubType(typeof(EventCameraActivated), "camera.activated")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceNameChanged), "device.name_changed")] +[JsonSubtypes.KnownSubType(typeof(EventThermostatTemperatureChanged), "thermostat.temperature_changed")] +[JsonSubtypes.KnownSubType(typeof(EventThermostatTemperatureReachedSetPoint), "thermostat.temperature_reached_set_point")] +[JsonSubtypes.KnownSubType(typeof(EventThermostatTemperatureThresholdNoLongerExceeded), "thermostat.temperature_threshold_no_longer_exceeded")] +[JsonSubtypes.KnownSubType(typeof(EventThermostatTemperatureThresholdExceeded), "thermostat.temperature_threshold_exceeded")] +[JsonSubtypes.KnownSubType(typeof(EventThermostatManuallyAdjusted), "thermostat.manually_adjusted")] +[JsonSubtypes.KnownSubType(typeof(EventThermostatClimatePresetActivated), "thermostat.climate_preset_activated")] +[JsonSubtypes.KnownSubType(typeof(EventLockAccessDenied), "lock.access_denied")] +[JsonSubtypes.KnownSubType(typeof(EventLockUnlocked), "lock.unlocked")] +[JsonSubtypes.KnownSubType(typeof(EventLockLocked), "lock.locked")] +[JsonSubtypes.KnownSubType(typeof(EventNoiseSensorNoiseThresholdTriggered), "noise_sensor.noise_threshold_triggered")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceAccessoryKeypadDisconnected), "device.accessory_keypad_disconnected")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceAccessoryKeypadConnected), "device.accessory_keypad_connected")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceErrorSubscriptionRequiredResolved), "device.error.subscription_required.resolved")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceErrorSubscriptionRequired), "device.error.subscription_required")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceConnectionStabilized), "device.connection_stabilized")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceConnectionBecameFlaky), "device.connection_became_flaky")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceSaltoPrivacyModeDeactivated), "device.salto.privacy_mode_deactivated")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceSaltoPrivacyModeActivated), "device.salto.privacy_mode_activated")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceThirdPartyIntegrationNoLongerDetected), "device.third_party_integration_no_longer_detected")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceThirdPartyIntegrationDetected), "device.third_party_integration_detected")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceDeleted), "device.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceRemoved), "device.removed")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceBatteryStatusChanged), "device.battery_status_changed")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceLowBattery), "device.low_battery")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceTampered), "device.tampered")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceUnmanagedDisconnected), "device.unmanaged.disconnected")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceDisconnected), "device.disconnected")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceUnmanagedConnected), "device.unmanaged.connected")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceUnmanagedConvertedToManaged), "device.unmanaged.converted_to_managed")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceConvertedToUnmanaged), "device.converted_to_unmanaged")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceAdded), "device.added")] +[JsonSubtypes.KnownSubType(typeof(EventDeviceConnected), "device.connected")] +[JsonSubtypes.KnownSubType(typeof(EventConnectWebviewLoginFailed), "connect_webview.login_failed")] +[JsonSubtypes.KnownSubType(typeof(EventConnectWebviewLoginSucceeded), "connect_webview.login_succeeded")] +[JsonSubtypes.KnownSubType(typeof(EventActionAttemptSimulateManualLockViaKeypadFailed), "action_attempt.simulate_manual_lock_via_keypad.failed")] +[JsonSubtypes.KnownSubType(typeof(EventActionAttemptSimulateManualLockViaKeypadSucceeded), "action_attempt.simulate_manual_lock_via_keypad.succeeded")] +[JsonSubtypes.KnownSubType(typeof(EventActionAttemptSimulateKeypadCodeEntryFailed), "action_attempt.simulate_keypad_code_entry.failed")] +[JsonSubtypes.KnownSubType(typeof(EventActionAttemptSimulateKeypadCodeEntrySucceeded), "action_attempt.simulate_keypad_code_entry.succeeded")] +[JsonSubtypes.KnownSubType(typeof(EventActionAttemptUnlockDoorFailed), "action_attempt.unlock_door.failed")] +[JsonSubtypes.KnownSubType(typeof(EventActionAttemptUnlockDoorSucceeded), "action_attempt.unlock_door.succeeded")] +[JsonSubtypes.KnownSubType(typeof(EventActionAttemptLockDoorFailed), "action_attempt.lock_door.failed")] +[JsonSubtypes.KnownSubType(typeof(EventActionAttemptLockDoorSucceeded), "action_attempt.lock_door.succeeded")] +[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountReauthorizationRequested), "connected_account.reauthorization_requested")] +[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountCompletedFirstSyncAfterReconnection), "connected_account.completed_first_sync_after_reconnection")] +[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountDeleted), "connected_account.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountCompletedFirstSync), "connected_account.completed_first_sync")] +[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountDisconnected), "connected_account.disconnected")] +[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountSuccessfulLogin), "connected_account.successful_login")] +[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountCreated), "connected_account.created")] +[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountConnected), "connected_account.connected")] +[JsonSubtypes.KnownSubType(typeof(EventClientSessionDeleted), "client_session.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventAcsEntranceRemoved), "acs_entrance.removed")] +[JsonSubtypes.KnownSubType(typeof(EventAcsEntranceAdded), "acs_entrance.added")] +[JsonSubtypes.KnownSubType(typeof(EventAcsAccessGroupDeleted), "acs_access_group.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventAcsEncoderRemoved), "acs_encoder.removed")] +[JsonSubtypes.KnownSubType(typeof(EventAcsEncoderAdded), "acs_encoder.added")] +[JsonSubtypes.KnownSubType(typeof(EventAcsUserDeleted), "acs_user.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventAcsUserCreated), "acs_user.created")] +[JsonSubtypes.KnownSubType(typeof(EventAcsCredentialInvalidated), "acs_credential.invalidated")] +[JsonSubtypes.KnownSubType(typeof(EventAcsCredentialReissued), "acs_credential.reissued")] +[JsonSubtypes.KnownSubType(typeof(EventAcsCredentialIssued), "acs_credential.issued")] +[JsonSubtypes.KnownSubType(typeof(EventAcsCredentialDeleted), "acs_credential.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventAcsSystemDisconnected), "acs_system.disconnected")] +[JsonSubtypes.KnownSubType(typeof(EventAcsSystemAdded), "acs_system.added")] +[JsonSubtypes.KnownSubType(typeof(EventAcsSystemConnected), "acs_system.connected")] +[JsonSubtypes.KnownSubType(typeof(EventAccessMethodFailedToIssue), "access_method.failed_to_issue")] +[JsonSubtypes.KnownSubType(typeof(EventAccessMethodDelayInIssuing), "access_method.delay_in_issuing")] +[JsonSubtypes.KnownSubType(typeof(EventAccessMethodCreated), "access_method.created")] +[JsonSubtypes.KnownSubType(typeof(EventAccessMethodReissued), "access_method.reissued")] +[JsonSubtypes.KnownSubType(typeof(EventAccessMethodDeleted), "access_method.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventAccessMethodCardEncodingRequired), "access_method.card_encoding_required")] +[JsonSubtypes.KnownSubType(typeof(EventAccessMethodRevoked), "access_method.revoked")] +[JsonSubtypes.KnownSubType(typeof(EventAccessMethodIssued), "access_method.issued")] +[JsonSubtypes.KnownSubType(typeof(EventAccessGrantCouldNotCreateRequestedAccessMethods), "access_grant.could_not_create_requested_access_methods")] +[JsonSubtypes.KnownSubType(typeof(EventAccessGrantAccessTimesChanged), "access_grant.access_times_changed")] +[JsonSubtypes.KnownSubType(typeof(EventAccessGrantAccessToDoorLost), "access_grant.access_to_door_lost")] +[JsonSubtypes.KnownSubType(typeof(EventAccessGrantAccessGrantedToDoor), "access_grant.access_granted_to_door")] +[JsonSubtypes.KnownSubType(typeof(EventAccessGrantAccessGrantedToAllDoors), "access_grant.access_granted_to_all_doors")] +[JsonSubtypes.KnownSubType(typeof(EventAccessGrantDeleted), "access_grant.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventAccessGrantCreated), "access_grant.created")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeUnmanagedRemoved), "access_code.unmanaged.removed")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeUnmanagedCreated), "access_code.unmanaged.created")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeUnmanagedFailedToConvertToManaged), "access_code.unmanaged.failed_to_convert_to_managed")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeUnmanagedConvertedToManaged), "access_code.unmanaged.converted_to_managed")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeBackupAccessCodePulled), "access_code.backup_access_code_pulled")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeDeletedExternalToSeam), "access_code.deleted_external_to_seam")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeModifiedExternalToSeam), "access_code.modified_external_to_seam")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeFailedToRemoveFromDevice), "access_code.failed_to_remove_from_device")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeDelayInRemovingFromDevice), "access_code.delay_in_removing_from_device")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeDeleted), "access_code.deleted")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeFailedToSetOnDevice), "access_code.failed_to_set_on_device")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeDelayInSettingOnDevice), "access_code.delay_in_setting_on_device")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeRemovedFromDevice), "access_code.removed_from_device")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeSetOnDevice), "access_code.set_on_device")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeScheduledOnDevice), "access_code.scheduled_on_device")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeMutationsRequested), "access_code.mutations_requested")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeTimeFrameChanged), "access_code.time_frame_changed")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeCodeChanged), "access_code.code_changed")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeNameChanged), "access_code.name_changed")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeChanged), "access_code.changed")] +[JsonSubtypes.KnownSubType(typeof(EventAccessCodeCreated), "access_code.created")] +public abstract class Event +{ +public abstract string EventType { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string? EventDescription { get; set; } + +public abstract string EventId { get; set; } + +public abstract string OccurredAt { get; set; } + +public abstract string WorkspaceId { get; set; } + +public abstract override string ToString(); +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was created. +/// +[DataContract(Name = "seamModel_eventAccessCodeCreated_model")] +public class EventAccessCodeCreated : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeCreated() { } + +public EventAccessCodeCreated(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.created"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed. +/// +[DataContract(Name = "seamModel_eventAccessCodeChanged_model")] +public class EventAccessCodeChanged : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeChanged() { } + +public EventAccessCodeChanged(string accessCodeId = default, string? changeReason = default, List? changedProperties = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ChangeReason = changeReason; +ChangedProperties = changedProperties; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Human-readable reason for the change (e.g. `ongoing code auto-renewed`). +/// +[DataMember(Name = "change_reason", IsRequired = false, EmitDefaultValue = false)] +public string? ChangeReason { get; set; } + +/// +/// List of properties that changed on the access code. +/// +[DataMember(Name = "changed_properties", IsRequired = false, EmitDefaultValue = false)] +public List? ChangedProperties { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.changed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeChangedChangedProperties_model")] +public class EventAccessCodeChangedChangedProperties +{ +[JsonConstructorAttribute] +protected EventAccessCodeChangedChangedProperties() { } + +public EventAccessCodeChangedChangedProperties(string? from = default, string property = default, string? to = default) +{ +From = from; +Property = property; +To = to; +} + +/// +/// Previous value of the property, or null if not set. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public string? From { get; set; } + +/// +/// Name of the property that changed (e.g. `code`). +/// +[DataMember(Name = "property", IsRequired = false, EmitDefaultValue = false)] +public string Property { get; set; } + +/// +/// New value of the property, or null if cleared. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public string? To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The name of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. +/// +[DataContract(Name = "seamModel_eventAccessCodeNameChanged_model")] +public class EventAccessCodeNameChanged : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeNameChanged() { } + +public EventAccessCodeNameChanged(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string description = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, EventAccessCodeNameChangedFrom from = default, string occurredAt = default, EventAccessCodeNameChangedTo to = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +Description = description; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +From = from; +OccurredAt = occurredAt; +To = to; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the change and its source. +/// +[DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] +public string Description { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.name_changed"; + +/// +/// Previous access code name configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public EventAccessCodeNameChangedFrom From { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// New access code name configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public EventAccessCodeNameChangedTo To { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeNameChangedFrom_model")] +public class EventAccessCodeNameChangedFrom +{ +[JsonConstructorAttribute] +protected EventAccessCodeNameChangedFrom() { } + +public EventAccessCodeNameChangedFrom(string? name = default) +{ +Name = name; +} + +/// +/// Previous name of the access code. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeNameChangedTo_model")] +public class EventAccessCodeNameChangedTo +{ +[JsonConstructorAttribute] +protected EventAccessCodeNameChangedTo() { } + +public EventAccessCodeNameChangedTo(string? name = default) +{ +Name = name; +} + +/// +/// New name of the access code. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The pin code of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. +/// +[DataContract(Name = "seamModel_eventAccessCodeCodeChanged_model")] +public class EventAccessCodeCodeChanged : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeCodeChanged() { } + +public EventAccessCodeCodeChanged(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string description = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, EventAccessCodeCodeChangedFrom from = default, string occurredAt = default, EventAccessCodeCodeChangedTo to = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +Description = description; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +From = from; +OccurredAt = occurredAt; +To = to; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the change and its source. +/// +[DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] +public string Description { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.code_changed"; + +/// +/// Previous pin code configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public EventAccessCodeCodeChangedFrom From { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// New pin code configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public EventAccessCodeCodeChangedTo To { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeCodeChangedFrom_model")] +public class EventAccessCodeCodeChangedFrom +{ +[JsonConstructorAttribute] +protected EventAccessCodeCodeChangedFrom() { } + +public EventAccessCodeCodeChangedFrom(string? code = default) +{ +Code = code; +} + +/// +/// Previous pin code. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeCodeChangedTo_model")] +public class EventAccessCodeCodeChangedTo +{ +[JsonConstructorAttribute] +protected EventAccessCodeCodeChangedTo() { } + +public EventAccessCodeCodeChangedTo(string? code = default) +{ +Code = code; +} + +/// +/// New pin code. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The time frame of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. +/// +[DataContract(Name = "seamModel_eventAccessCodeTimeFrameChanged_model")] +public class EventAccessCodeTimeFrameChanged : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeTimeFrameChanged() { } + +public EventAccessCodeTimeFrameChanged(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string description = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, EventAccessCodeTimeFrameChangedFrom from = default, string occurredAt = default, EventAccessCodeTimeFrameChangedTo to = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +Description = description; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +From = from; +OccurredAt = occurredAt; +To = to; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the change and its source. +/// +[DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] +public string Description { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.time_frame_changed"; + +/// +/// Previous time frame configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public EventAccessCodeTimeFrameChangedFrom From { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// New time frame configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public EventAccessCodeTimeFrameChangedTo To { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeTimeFrameChangedFrom_model")] +public class EventAccessCodeTimeFrameChangedFrom +{ +[JsonConstructorAttribute] +protected EventAccessCodeTimeFrameChangedFrom() { } + +public EventAccessCodeTimeFrameChangedFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Previous end time. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Previous start time. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeTimeFrameChangedTo_model")] +public class EventAccessCodeTimeFrameChangedTo +{ +[JsonConstructorAttribute] +protected EventAccessCodeTimeFrameChangedTo() { } + +public EventAccessCodeTimeFrameChangedTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// New end time. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// New start time. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Mutations were requested on an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). This event fires at request time, before the change is confirmed on the device. +/// +[DataContract(Name = "seamModel_eventAccessCodeMutationsRequested_model")] +public class EventAccessCodeMutationsRequested : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeMutationsRequested() { } + +public EventAccessCodeMutationsRequested(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, List requestedMutations = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +RequestedMutations = requestedMutations; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.mutations_requested"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Array of mutations requested on the access code, each containing the mutation type and from/to values. +/// +[DataMember(Name = "requested_mutations", IsRequired = false, EmitDefaultValue = false)] +public List RequestedMutations { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeMutationsRequestedRequestedMutations_model")] +public class EventAccessCodeMutationsRequestedRequestedMutations +{ +[JsonConstructorAttribute] +protected EventAccessCodeMutationsRequestedRequestedMutations() { } + +public EventAccessCodeMutationsRequestedRequestedMutations(object? from = default, EventAccessCodeMutationsRequestedRequestedMutations.MutationCodeEnum mutationCode = default, object? to = default) +{ +From = from; +MutationCode = mutationCode; +To = to; +} + +/// +/// Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum MutationCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "updating_name")] +UpdatingName = 1, + +[EnumMember(Value = "updating_code")] +UpdatingCode = 2, + +[EnumMember(Value = "updating_time_frame")] +UpdatingTimeFrame = 3, + +[EnumMember(Value = "deleting")] +Deleting = 4, + +[EnumMember(Value = "creating")] +Creating = 5, + +[EnumMember(Value = "deferring_creation")] +DeferringCreation = 6, +} + +/// +/// Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public object? From { get; set; } + +/// +/// Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. +/// +[DataMember(Name = "mutation_code", IsRequired = false, EmitDefaultValue = false)] +public EventAccessCodeMutationsRequestedRequestedMutations.MutationCodeEnum MutationCode { get; set; } + +/// +/// New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public object? To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) on a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeScheduledOnDevice_model")] +public class EventAccessCodeScheduledOnDevice : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeScheduledOnDevice() { } + +public EventAccessCodeScheduledOnDevice(string accessCodeId = default, string code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +Code = code; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Code for the affected access code. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string Code { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.scheduled_on_device"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was set on a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeSetOnDevice_model")] +public class EventAccessCodeSetOnDevice : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeSetOnDevice() { } + +public EventAccessCodeSetOnDevice(string accessCodeId = default, string code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +Code = code; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Code for the affected access code. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string Code { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.set_on_device"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was removed from a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeRemovedFromDevice_model")] +public class EventAccessCodeRemovedFromDevice : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeRemovedFromDevice() { } + +public EventAccessCodeRemovedFromDevice(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.removed_from_device"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// There was an unusually long delay in setting an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) on a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDevice_model")] +public class EventAccessCodeDelayInSettingOnDevice : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInSettingOnDevice() { } + +public EventAccessCodeDelayInSettingOnDevice(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeErrors = accessCodeErrors; +AccessCodeId = accessCodeId; +AccessCodeWarnings = accessCodeWarnings; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Errors associated with the access code. +/// +[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeErrors { get; set; } + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Warnings associated with the access code. +/// +[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeWarnings { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.delay_in_setting_on_device"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceAccessCodeErrors_model")] +public class EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors() { } + +public EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings_model")] +public class EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings() { } + +public EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors_model")] +public class EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors() { } + +public EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings_model")] +public class EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings() { } + +public EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceDeviceErrors_model")] +public class EventAccessCodeDelayInSettingOnDeviceDeviceErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInSettingOnDeviceDeviceErrors() { } + +public EventAccessCodeDelayInSettingOnDeviceDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceDeviceWarnings_model")] +public class EventAccessCodeDelayInSettingOnDeviceDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInSettingOnDeviceDeviceWarnings() { } + +public EventAccessCodeDelayInSettingOnDeviceDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) failed to be set on a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDevice_model")] +public class EventAccessCodeFailedToSetOnDevice : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToSetOnDevice() { } + +public EventAccessCodeFailedToSetOnDevice(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeErrors = accessCodeErrors; +AccessCodeId = accessCodeId; +AccessCodeWarnings = accessCodeWarnings; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Errors associated with the access code. +/// +[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeErrors { get; set; } + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Warnings associated with the access code. +/// +[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeWarnings { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.failed_to_set_on_device"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceAccessCodeErrors_model")] +public class EventAccessCodeFailedToSetOnDeviceAccessCodeErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToSetOnDeviceAccessCodeErrors() { } + +public EventAccessCodeFailedToSetOnDeviceAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceAccessCodeWarnings_model")] +public class EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings() { } + +public EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceConnectedAccountErrors_model")] +public class EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors() { } + +public EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings_model")] +public class EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings() { } + +public EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceDeviceErrors_model")] +public class EventAccessCodeFailedToSetOnDeviceDeviceErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToSetOnDeviceDeviceErrors() { } + +public EventAccessCodeFailedToSetOnDeviceDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceDeviceWarnings_model")] +public class EventAccessCodeFailedToSetOnDeviceDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToSetOnDeviceDeviceWarnings() { } + +public EventAccessCodeFailedToSetOnDeviceDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was deleted. +/// +[DataContract(Name = "seamModel_eventAccessCodeDeleted_model")] +public class EventAccessCodeDeleted : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeDeleted() { } + +public EventAccessCodeDeleted(string accessCodeId = default, string? code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +Code = code; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Code for the affected access code. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// There was an unusually long delay in removing an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) from a device. +/// +[Obsolete("Seam no longer emits this event. Use `access_code.failed_to_remove_from_device` instead.")] +[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDevice_model")] +public class EventAccessCodeDelayInRemovingFromDevice : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInRemovingFromDevice() { } + +public EventAccessCodeDelayInRemovingFromDevice(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeErrors = accessCodeErrors; +AccessCodeId = accessCodeId; +AccessCodeWarnings = accessCodeWarnings; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Errors associated with the access code. +/// +[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeErrors { get; set; } + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Warnings associated with the access code. +/// +[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeWarnings { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.delay_in_removing_from_device"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors_model")] +public class EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors() { } + +public EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings_model")] +public class EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings() { } + +public EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors_model")] +public class EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors() { } + +public EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings_model")] +public class EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings() { } + +public EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceDeviceErrors_model")] +public class EventAccessCodeDelayInRemovingFromDeviceDeviceErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInRemovingFromDeviceDeviceErrors() { } + +public EventAccessCodeDelayInRemovingFromDeviceDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceDeviceWarnings_model")] +public class EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings() { } + +public EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) failed to be removed from a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDevice_model")] +public class EventAccessCodeFailedToRemoveFromDevice : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToRemoveFromDevice() { } + +public EventAccessCodeFailedToRemoveFromDevice(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeErrors = accessCodeErrors; +AccessCodeId = accessCodeId; +AccessCodeWarnings = accessCodeWarnings; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Errors associated with the access code. +/// +[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeErrors { get; set; } + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Warnings associated with the access code. +/// +[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeWarnings { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.failed_to_remove_from_device"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors_model")] +public class EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors() { } + +public EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings_model")] +public class EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings() { } + +public EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors_model")] +public class EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors() { } + +public EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings_model")] +public class EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings() { } + +public EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceDeviceErrors_model")] +public class EventAccessCodeFailedToRemoveFromDeviceDeviceErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToRemoveFromDeviceDeviceErrors() { } + +public EventAccessCodeFailedToRemoveFromDeviceDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceDeviceWarnings_model")] +public class EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings() { } + +public EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was modified outside of Seam. +/// +[DataContract(Name = "seamModel_eventAccessCodeModifiedExternalToSeam_model")] +public class EventAccessCodeModifiedExternalToSeam : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeModifiedExternalToSeam() { } + +public EventAccessCodeModifiedExternalToSeam(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.modified_external_to_seam"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was deleted outside of Seam. +/// +[DataContract(Name = "seamModel_eventAccessCodeDeletedExternalToSeam_model")] +public class EventAccessCodeDeletedExternalToSeam : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeDeletedExternalToSeam() { } + +public EventAccessCodeDeletedExternalToSeam(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.deleted_external_to_seam"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [backup access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) was pulled from the backup access code pool and set on a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeBackupAccessCodePulled_model")] +public class EventAccessCodeBackupAccessCodePulled : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeBackupAccessCodePulled() { } + +public EventAccessCodeBackupAccessCodePulled(string accessCodeId = default, string backupAccessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +BackupAccessCodeId = backupAccessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// ID of the backup access code that was pulled from the pool. +/// +[DataMember(Name = "backup_access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string BackupAccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.backup_access_code_pulled"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was converted successfully to a managed access code. +/// +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedConvertedToManaged_model")] +public class EventAccessCodeUnmanagedConvertedToManaged : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedConvertedToManaged() { } + +public EventAccessCodeUnmanagedConvertedToManaged(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.unmanaged.converted_to_managed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) failed to be converted to a managed access code. +/// +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManaged_model")] +public class EventAccessCodeUnmanagedFailedToConvertToManaged : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedFailedToConvertToManaged() { } + +public EventAccessCodeUnmanagedFailedToConvertToManaged(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeErrors = accessCodeErrors; +AccessCodeId = accessCodeId; +AccessCodeWarnings = accessCodeWarnings; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Errors associated with the access code. +/// +[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeErrors { get; set; } + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Warnings associated with the access code. +/// +[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] +public List AccessCodeWarnings { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.unmanaged.failed_to_convert_to_managed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors_model")] +public class EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors() { } + +public EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings_model")] +public class EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings() { } + +public EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors_model")] +public class EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors() { } + +public EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings_model")] +public class EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings() { } + +public EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors_model")] +public class EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors() { } + +public EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings_model")] +public class EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings() { } + +public EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was created on a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedCreated_model")] +public class EventAccessCodeUnmanagedCreated : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedCreated() { } + +public EventAccessCodeUnmanagedCreated(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.unmanaged.created"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was removed from a device. +/// +[DataContract(Name = "seamModel_eventAccessCodeUnmanagedRemoved_model")] +public class EventAccessCodeUnmanagedRemoved : Event +{ +[JsonConstructorAttribute] +protected EventAccessCodeUnmanagedRemoved() { } + +public EventAccessCodeUnmanagedRemoved(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the affected access code. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the device associated with the affected access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_code.unmanaged.removed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An Access Grant was created. +/// +[DataContract(Name = "seamModel_eventAccessGrantCreated_model")] +public class EventAccessGrantCreated : Event +{ +[JsonConstructorAttribute] +protected EventAccessGrantCreated() { } + +public EventAccessGrantCreated(string accessGrantId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_grant.created"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An Access Grant was deleted. +/// +[DataContract(Name = "seamModel_eventAccessGrantDeleted_model")] +public class EventAccessGrantDeleted : Event +{ +[JsonConstructorAttribute] +protected EventAccessGrantDeleted() { } + +public EventAccessGrantDeleted(string accessGrantId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_grant.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// All access requested for an Access Grant was successfully granted. +/// +[DataContract(Name = "seamModel_eventAccessGrantAccessGrantedToAllDoors_model")] +public class EventAccessGrantAccessGrantedToAllDoors : Event +{ +[JsonConstructorAttribute] +protected EventAccessGrantAccessGrantedToAllDoors() { } + +public EventAccessGrantAccessGrantedToAllDoors(string accessGrantId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_grant.access_granted_to_all_doors"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Access requested as part of an Access Grant to a particular door was successfully granted. +/// +[DataContract(Name = "seamModel_eventAccessGrantAccessGrantedToDoor_model")] +public class EventAccessGrantAccessGrantedToDoor : Event +{ +[JsonConstructorAttribute] +protected EventAccessGrantAccessGrantedToDoor() { } + +public EventAccessGrantAccessGrantedToDoor(string accessGrantId = default, string acsEntranceId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +AcsEntranceId = acsEntranceId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// ID of the affected [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_grant.access_granted_to_door"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Access to a particular door that was requested as part of an Access Grant was lost. +/// +[DataContract(Name = "seamModel_eventAccessGrantAccessToDoorLost_model")] +public class EventAccessGrantAccessToDoorLost : Event +{ +[JsonConstructorAttribute] +protected EventAccessGrantAccessToDoorLost() { } + +public EventAccessGrantAccessToDoorLost(string accessGrantId = default, string acsEntranceId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +AcsEntranceId = acsEntranceId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// ID of the affected [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_grant.access_to_door_lost"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An Access Grant's start or end time was changed. +/// +[DataContract(Name = "seamModel_eventAccessGrantAccessTimesChanged_model")] +public class EventAccessGrantAccessTimesChanged : Event +{ +[JsonConstructorAttribute] +protected EventAccessGrantAccessTimesChanged() { } + +public EventAccessGrantAccessTimesChanged(string accessGrantId = default, string? accessGrantKey = default, string createdAt = default, string? endsAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string? startsAt = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +AccessGrantKey = accessGrantKey; +CreatedAt = createdAt; +EndsAt = endsAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +StartsAt = startsAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// Key of the affected Access Grant (if present). +/// +[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] +public string? AccessGrantKey { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The new end time for the access grant. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_grant.access_times_changed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// The new start time for the access grant. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// One or more requested access methods could not be created for an Access Grant. +/// +[DataContract(Name = "seamModel_eventAccessGrantCouldNotCreateRequestedAccessMethods_model")] +public class EventAccessGrantCouldNotCreateRequestedAccessMethods : Event +{ +[JsonConstructorAttribute] +protected EventAccessGrantCouldNotCreateRequestedAccessMethods() { } + +public EventAccessGrantCouldNotCreateRequestedAccessMethods(string accessGrantId = default, string createdAt = default, string errorMessage = default, string? eventDescription = default, string eventId = default, string eventType = default, List? missingDeviceIds = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +CreatedAt = createdAt; +ErrorMessage = errorMessage; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +MissingDeviceIds = missingDeviceIds; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Description of why the access methods could not be created. +/// +[DataMember(Name = "error_message", IsRequired = false, EmitDefaultValue = false)] +public string ErrorMessage { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_grant.could_not_create_requested_access_methods"; + +/// +/// IDs of the devices that did not receive a requested access method. Use these to identify which specific devices failed without having to fetch the Access Grant. +/// +[DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? MissingDeviceIds { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An access method was issued. +/// +[DataContract(Name = "seamModel_eventAccessMethodIssued_model")] +public class EventAccessMethodIssued : Event +{ +[JsonConstructorAttribute] +protected EventAccessMethodIssued() { } + +public EventAccessMethodIssued(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string? code = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, bool? isBackupCode = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +AccessMethodId = accessMethodId; +Code = code; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +IsBackupCode = isBackupCode; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// IDs of the access grants associated with this access method. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrantIds { get; set; } + +/// +/// Keys of the access grants associated with this access method (if present). +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// ID of the affected access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// The actual PIN code for code access methods (only present when mode is 'code'). +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_method.issued"; + +/// +/// Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). +/// +[DataMember(Name = "is_backup_code", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBackupCode { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An access method was revoked. +/// +[DataContract(Name = "seamModel_eventAccessMethodRevoked_model")] +public class EventAccessMethodRevoked : Event +{ +[JsonConstructorAttribute] +protected EventAccessMethodRevoked() { } + +public EventAccessMethodRevoked(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +AccessMethodId = accessMethodId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// IDs of the access grants associated with this access method. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrantIds { get; set; } + +/// +/// Keys of the access grants associated with this access method (if present). +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// ID of the affected access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_method.revoked"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An access method representing a physical card requires encoding. +/// +[DataContract(Name = "seamModel_eventAccessMethodCardEncodingRequired_model")] +public class EventAccessMethodCardEncodingRequired : Event +{ +[JsonConstructorAttribute] +protected EventAccessMethodCardEncodingRequired() { } + +public EventAccessMethodCardEncodingRequired(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +AccessMethodId = accessMethodId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// IDs of the access grants associated with this access method. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrantIds { get; set; } + +/// +/// Keys of the access grants associated with this access method (if present). +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// ID of the affected access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_method.card_encoding_required"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An access method was deleted. +/// +[DataContract(Name = "seamModel_eventAccessMethodDeleted_model")] +public class EventAccessMethodDeleted : Event +{ +[JsonConstructorAttribute] +protected EventAccessMethodDeleted() { } + +public EventAccessMethodDeleted(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +AccessMethodId = accessMethodId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// IDs of the access grants associated with this access method. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrantIds { get; set; } + +/// +/// Keys of the access grants associated with this access method (if present). +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// ID of the affected access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_method.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An access method was reissued. +/// +[DataContract(Name = "seamModel_eventAccessMethodReissued_model")] +public class EventAccessMethodReissued : Event +{ +[JsonConstructorAttribute] +protected EventAccessMethodReissued() { } + +public EventAccessMethodReissued(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string? code = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, bool? isBackupCode = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +AccessMethodId = accessMethodId; +Code = code; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +IsBackupCode = isBackupCode; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// IDs of the access grants associated with this access method. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrantIds { get; set; } + +/// +/// Keys of the access grants associated with this access method (if present). +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// ID of the affected access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// The actual PIN code for code access methods (only present when mode is 'code'). +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_method.reissued"; + +/// +/// Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). +/// +[DataMember(Name = "is_backup_code", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBackupCode { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An access method was created. +/// +[DataContract(Name = "seamModel_eventAccessMethodCreated_model")] +public class EventAccessMethodCreated : Event +{ +[JsonConstructorAttribute] +protected EventAccessMethodCreated() { } + +public EventAccessMethodCreated(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +AccessMethodId = accessMethodId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// IDs of the access grants associated with this access method. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrantIds { get; set; } + +/// +/// Keys of the access grants associated with this access method (if present). +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// ID of the affected access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_method.created"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Seam has not yet issued this access method, even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and the accompanying `delay_in_issuing` warning clears automatically once issuance succeeds. +/// +[DataContract(Name = "seamModel_eventAccessMethodDelayInIssuing_model")] +public class EventAccessMethodDelayInIssuing : Event +{ +[JsonConstructorAttribute] +protected EventAccessMethodDelayInIssuing() { } + +public EventAccessMethodDelayInIssuing(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +AccessMethodId = accessMethodId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// IDs of the access grants associated with this access method. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrantIds { get; set; } + +/// +/// Keys of the access grants associated with this access method (if present). +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// ID of the affected access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_method.delay_in_issuing"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Seam was unable to issue this access method before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and the accompanying `failed_to_issue` error clears automatically if the access method is eventually issued. +/// +[DataContract(Name = "seamModel_eventAccessMethodFailedToIssue_model")] +public class EventAccessMethodFailedToIssue : Event +{ +[JsonConstructorAttribute] +protected EventAccessMethodFailedToIssue() { } + +public EventAccessMethodFailedToIssue(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessGrantIds = accessGrantIds; +AccessGrantKeys = accessGrantKeys; +AccessMethodId = accessMethodId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// IDs of the access grants associated with this access method. +/// +[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessGrantIds { get; set; } + +/// +/// Keys of the access grants associated with this access method (if present). +/// +[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] +public List? AccessGrantKeys { get; set; } + +/// +/// ID of the affected access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "access_method.failed_to_issue"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was connected. +/// +[DataContract(Name = "seamModel_eventAcsSystemConnected_model")] +public class EventAcsSystemConnected : Event +{ +[JsonConstructorAttribute] +protected EventAcsSystemConnected() { } + +public EventAcsSystemConnected(string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_system.connected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was added. +/// +[DataContract(Name = "seamModel_eventAcsSystemAdded_model")] +public class EventAcsSystemAdded : Event +{ +[JsonConstructorAttribute] +protected EventAcsSystemAdded() { } + +public EventAcsSystemAdded(string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_system.added"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was disconnected. +/// +[DataContract(Name = "seamModel_eventAcsSystemDisconnected_model")] +public class EventAcsSystemDisconnected : Event +{ +[JsonConstructorAttribute] +protected EventAcsSystemDisconnected() { } + +public EventAcsSystemDisconnected(List acsSystemErrors = default, string acsSystemId = default, List acsSystemWarnings = default, List connectedAccountErrors = default, string? connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsSystemErrors = acsSystemErrors; +AcsSystemId = acsSystemId; +AcsSystemWarnings = acsSystemWarnings; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Errors associated with the access control system. +/// +[DataMember(Name = "acs_system_errors", IsRequired = false, EmitDefaultValue = false)] +public List AcsSystemErrors { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// Warnings associated with the access control system. +/// +[DataMember(Name = "acs_system_warnings", IsRequired = false, EmitDefaultValue = false)] +public List AcsSystemWarnings { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_system.disconnected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAcsSystemDisconnectedAcsSystemErrors_model")] +public class EventAcsSystemDisconnectedAcsSystemErrors +{ +[JsonConstructorAttribute] +protected EventAcsSystemDisconnectedAcsSystemErrors() { } + +public EventAcsSystemDisconnectedAcsSystemErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAcsSystemDisconnectedAcsSystemWarnings_model")] +public class EventAcsSystemDisconnectedAcsSystemWarnings +{ +[JsonConstructorAttribute] +protected EventAcsSystemDisconnectedAcsSystemWarnings() { } + +public EventAcsSystemDisconnectedAcsSystemWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAcsSystemDisconnectedConnectedAccountErrors_model")] +public class EventAcsSystemDisconnectedConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventAcsSystemDisconnectedConnectedAccountErrors() { } + +public EventAcsSystemDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventAcsSystemDisconnectedConnectedAccountWarnings_model")] +public class EventAcsSystemDisconnectedConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventAcsSystemDisconnectedConnectedAccountWarnings() { } + +public EventAcsSystemDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was deleted. +/// +[DataContract(Name = "seamModel_eventAcsCredentialDeleted_model")] +public class EventAcsCredentialDeleted : Event +{ +[JsonConstructorAttribute] +protected EventAcsCredentialDeleted() { } + +public EventAcsCredentialDeleted(string acsCredentialId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsCredentialId = acsCredentialId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected credential. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_credential.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was issued. +/// +[DataContract(Name = "seamModel_eventAcsCredentialIssued_model")] +public class EventAcsCredentialIssued : Event +{ +[JsonConstructorAttribute] +protected EventAcsCredentialIssued() { } + +public EventAcsCredentialIssued(string acsCredentialId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsCredentialId = acsCredentialId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected credential. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_credential.issued"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was reissued. +/// +[DataContract(Name = "seamModel_eventAcsCredentialReissued_model")] +public class EventAcsCredentialReissued : Event +{ +[JsonConstructorAttribute] +protected EventAcsCredentialReissued() { } + +public EventAcsCredentialReissued(string acsCredentialId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsCredentialId = acsCredentialId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected credential. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_credential.reissued"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was invalidated. That is, the credential cannot be used anymore. +/// +[DataContract(Name = "seamModel_eventAcsCredentialInvalidated_model")] +public class EventAcsCredentialInvalidated : Event +{ +[JsonConstructorAttribute] +protected EventAcsCredentialInvalidated() { } + +public EventAcsCredentialInvalidated(string acsCredentialId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsCredentialId = acsCredentialId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected credential. +/// +[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsCredentialId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_credential.invalidated"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was created. +/// +[DataContract(Name = "seamModel_eventAcsUserCreated_model")] +public class EventAcsUserCreated : Event +{ +[JsonConstructorAttribute] +protected EventAcsUserCreated() { } + +public EventAcsUserCreated(string acsSystemId = default, string acsUserId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the affected access system user. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsUserId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_user.created"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was deleted. +/// +[DataContract(Name = "seamModel_eventAcsUserDeleted_model")] +public class EventAcsUserDeleted : Event +{ +[JsonConstructorAttribute] +protected EventAcsUserDeleted() { } + +public EventAcsUserDeleted(string acsSystemId = default, string acsUserId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the affected access system user. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsUserId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_user.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was added. +/// +[DataContract(Name = "seamModel_eventAcsEncoderAdded_model")] +public class EventAcsEncoderAdded : Event +{ +[JsonConstructorAttribute] +protected EventAcsEncoderAdded() { } + +public EventAcsEncoderAdded(string acsEncoderId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsEncoderId = acsEncoderId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected encoder. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_encoder.added"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was removed. +/// +[DataContract(Name = "seamModel_eventAcsEncoderRemoved_model")] +public class EventAcsEncoderRemoved : Event +{ +[JsonConstructorAttribute] +protected EventAcsEncoderRemoved() { } + +public EventAcsEncoderRemoved(string acsEncoderId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsEncoderId = acsEncoderId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected encoder. +/// +[DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsEncoderId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_encoder.removed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An ACS access group was deleted. +/// +[DataContract(Name = "seamModel_eventAcsAccessGroupDeleted_model")] +public class EventAcsAccessGroupDeleted : Event +{ +[JsonConstructorAttribute] +protected EventAcsAccessGroupDeleted() { } + +public EventAcsAccessGroupDeleted(string acsAccessGroupId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsAccessGroupId = acsAccessGroupId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected access group. +/// +[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsAccessGroupId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_access_group.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was added. +/// +[DataContract(Name = "seamModel_eventAcsEntranceAdded_model")] +public class EventAcsEntranceAdded : Event +{ +[JsonConstructorAttribute] +protected EventAcsEntranceAdded() { } + +public EventAcsEntranceAdded(string acsEntranceId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsEntranceId = acsEntranceId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected entrance. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_entrance.added"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was removed. +/// +[DataContract(Name = "seamModel_eventAcsEntranceRemoved_model")] +public class EventAcsEntranceRemoved : Event +{ +[JsonConstructorAttribute] +protected EventAcsEntranceRemoved() { } + +public EventAcsEntranceRemoved(string acsEntranceId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AcsEntranceId = acsEntranceId; +AcsSystemId = acsSystemId; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected entrance. +/// +[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsEntranceId { get; set; } + +/// +/// ID of the access system. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public string AcsSystemId { get; set; } + +/// +/// ID of the connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "acs_entrance.removed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A client session was deleted. +/// +[DataContract(Name = "seamModel_eventClientSessionDeleted_model")] +public class EventClientSessionDeleted : Event +{ +[JsonConstructorAttribute] +protected EventClientSessionDeleted() { } + +public EventClientSessionDeleted(string clientSessionId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ClientSessionId = clientSessionId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected client session. +/// +[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] +public string ClientSessionId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "client_session.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A connected account was connected for the first time or was reconnected after being disconnected. +/// +[DataContract(Name = "seamModel_eventConnectedAccountConnected_model")] +public class EventConnectedAccountConnected : Event +{ +[JsonConstructorAttribute] +protected EventConnectedAccountConnected() { } + +public EventConnectedAccountConnected(string? connectWebviewId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the Connect Webview associated with the event. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectWebviewId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the affected connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with this connected account, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connected_account.connected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A connected account was created. +/// +[DataContract(Name = "seamModel_eventConnectedAccountCreated_model")] +public class EventConnectedAccountCreated : Event +{ +[JsonConstructorAttribute] +protected EventConnectedAccountCreated() { } + +public EventConnectedAccountCreated(string connectWebviewId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the Connect Webview associated with the event. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectWebviewId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the affected connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connected_account.created"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A connected account had a successful login using a Connect Webview. +/// +[Obsolete("Use `connect_webview.login_succeeded`.")] +[DataContract(Name = "seamModel_eventConnectedAccountSuccessfulLogin_model")] +public class EventConnectedAccountSuccessfulLogin : Event +{ +[JsonConstructorAttribute] +protected EventConnectedAccountSuccessfulLogin() { } + +public EventConnectedAccountSuccessfulLogin(string connectWebviewId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the Connect Webview associated with the event. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectWebviewId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the affected connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connected_account.successful_login"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A connected account was disconnected. +/// +[DataContract(Name = "seamModel_eventConnectedAccountDisconnected_model")] +public class EventConnectedAccountDisconnected : Event +{ +[JsonConstructorAttribute] +protected EventConnectedAccountDisconnected() { } + +public EventConnectedAccountDisconnected(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the affected connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connected_account.disconnected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventConnectedAccountDisconnectedConnectedAccountErrors_model")] +public class EventConnectedAccountDisconnectedConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventConnectedAccountDisconnectedConnectedAccountErrors() { } + +public EventConnectedAccountDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventConnectedAccountDisconnectedConnectedAccountWarnings_model")] +public class EventConnectedAccountDisconnectedConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventConnectedAccountDisconnectedConnectedAccountWarnings() { } + +public EventConnectedAccountDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A connected account completed the first sync with Seam, and the corresponding devices or systems are now available. +/// +[DataContract(Name = "seamModel_eventConnectedAccountCompletedFirstSync_model")] +public class EventConnectedAccountCompletedFirstSync : Event +{ +[JsonConstructorAttribute] +protected EventConnectedAccountCompletedFirstSync() { } + +public EventConnectedAccountCompletedFirstSync(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the affected connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connected_account.completed_first_sync"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A connected account was deleted. +/// +[DataContract(Name = "seamModel_eventConnectedAccountDeleted_model")] +public class EventConnectedAccountDeleted : Event +{ +[JsonConstructorAttribute] +protected EventConnectedAccountDeleted() { } + +public EventConnectedAccountDeleted(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the affected connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with this connected account, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connected_account.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A connected account completed the first sync after reconnection with Seam, and the corresponding devices or systems are now available. +/// +[DataContract(Name = "seamModel_eventConnectedAccountCompletedFirstSyncAfterReconnection_model")] +public class EventConnectedAccountCompletedFirstSyncAfterReconnection : Event +{ +[JsonConstructorAttribute] +protected EventConnectedAccountCompletedFirstSyncAfterReconnection() { } + +public EventConnectedAccountCompletedFirstSyncAfterReconnection(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the affected connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connected_account.completed_first_sync_after_reconnection"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A connected account requires reauthorization using a new Connect Webview. The account is still connected, but cannot access new features. Delaying reauthorization too long will eventually cause the Connected Account to become disconnected. +/// +[DataContract(Name = "seamModel_eventConnectedAccountReauthorizationRequested_model")] +public class EventConnectedAccountReauthorizationRequested : Event +{ +[JsonConstructorAttribute] +protected EventConnectedAccountReauthorizationRequested() { } + +public EventConnectedAccountReauthorizationRequested(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the affected connected account. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connected_account.reauthorization_requested"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventConnectedAccountReauthorizationRequestedConnectedAccountErrors_model")] +public class EventConnectedAccountReauthorizationRequestedConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventConnectedAccountReauthorizationRequestedConnectedAccountErrors() { } + +public EventConnectedAccountReauthorizationRequestedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventConnectedAccountReauthorizationRequestedConnectedAccountWarnings_model")] +public class EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings() { } + +public EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A lock door action attempt succeeded. +/// +[DataContract(Name = "seamModel_eventActionAttemptLockDoorSucceeded_model")] +public class EventActionAttemptLockDoorSucceeded : Event +{ +[JsonConstructorAttribute] +protected EventActionAttemptLockDoorSucceeded() { } + +public EventActionAttemptLockDoorSucceeded(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Status = status; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +/// +/// Type of the action. +/// +[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] +public string ActionType { get; set; } + +/// +/// ID of the connected account associated with the action attempt, if applicable. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device associated with the action attempt, if applicable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "action_attempt.lock_door.succeeded"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Status of the action. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public string Status { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A lock door action attempt failed. +/// +[DataContract(Name = "seamModel_eventActionAttemptLockDoorFailed_model")] +public class EventActionAttemptLockDoorFailed : Event +{ +[JsonConstructorAttribute] +protected EventActionAttemptLockDoorFailed() { } + +public EventActionAttemptLockDoorFailed(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Status = status; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +/// +/// Type of the action. +/// +[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] +public string ActionType { get; set; } + +/// +/// ID of the connected account associated with the action attempt, if applicable. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device associated with the action attempt, if applicable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "action_attempt.lock_door.failed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Status of the action. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public string Status { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An unlock door action attempt succeeded. +/// +[DataContract(Name = "seamModel_eventActionAttemptUnlockDoorSucceeded_model")] +public class EventActionAttemptUnlockDoorSucceeded : Event +{ +[JsonConstructorAttribute] +protected EventActionAttemptUnlockDoorSucceeded() { } + +public EventActionAttemptUnlockDoorSucceeded(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Status = status; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +/// +/// Type of the action. +/// +[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] +public string ActionType { get; set; } + +/// +/// ID of the connected account associated with the action attempt, if applicable. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device associated with the action attempt, if applicable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "action_attempt.unlock_door.succeeded"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Status of the action. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public string Status { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An unlock door action attempt failed. +/// +[DataContract(Name = "seamModel_eventActionAttemptUnlockDoorFailed_model")] +public class EventActionAttemptUnlockDoorFailed : Event +{ +[JsonConstructorAttribute] +protected EventActionAttemptUnlockDoorFailed() { } + +public EventActionAttemptUnlockDoorFailed(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Status = status; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +/// +/// Type of the action. +/// +[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] +public string ActionType { get; set; } + +/// +/// ID of the connected account associated with the action attempt, if applicable. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device associated with the action attempt, if applicable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "action_attempt.unlock_door.failed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Status of the action. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public string Status { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A simulate keypad code entry action attempt succeeded. +/// +[DataContract(Name = "seamModel_eventActionAttemptSimulateKeypadCodeEntrySucceeded_model")] +public class EventActionAttemptSimulateKeypadCodeEntrySucceeded : Event +{ +[JsonConstructorAttribute] +protected EventActionAttemptSimulateKeypadCodeEntrySucceeded() { } + +public EventActionAttemptSimulateKeypadCodeEntrySucceeded(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Status = status; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +/// +/// Type of the action. +/// +[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] +public string ActionType { get; set; } + +/// +/// ID of the connected account associated with the action attempt, if applicable. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device associated with the action attempt, if applicable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "action_attempt.simulate_keypad_code_entry.succeeded"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Status of the action. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public string Status { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A simulate keypad code entry action attempt failed. +/// +[DataContract(Name = "seamModel_eventActionAttemptSimulateKeypadCodeEntryFailed_model")] +public class EventActionAttemptSimulateKeypadCodeEntryFailed : Event +{ +[JsonConstructorAttribute] +protected EventActionAttemptSimulateKeypadCodeEntryFailed() { } + +public EventActionAttemptSimulateKeypadCodeEntryFailed(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Status = status; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +/// +/// Type of the action. +/// +[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] +public string ActionType { get; set; } + +/// +/// ID of the connected account associated with the action attempt, if applicable. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device associated with the action attempt, if applicable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "action_attempt.simulate_keypad_code_entry.failed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Status of the action. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public string Status { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A simulate manual lock via keypad action attempt succeeded. +/// +[DataContract(Name = "seamModel_eventActionAttemptSimulateManualLockViaKeypadSucceeded_model")] +public class EventActionAttemptSimulateManualLockViaKeypadSucceeded : Event +{ +[JsonConstructorAttribute] +protected EventActionAttemptSimulateManualLockViaKeypadSucceeded() { } + +public EventActionAttemptSimulateManualLockViaKeypadSucceeded(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Status = status; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +/// +/// Type of the action. +/// +[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] +public string ActionType { get; set; } + +/// +/// ID of the connected account associated with the action attempt, if applicable. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device associated with the action attempt, if applicable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "action_attempt.simulate_manual_lock_via_keypad.succeeded"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Status of the action. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public string Status { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A simulate manual lock via keypad action attempt failed. +/// +[DataContract(Name = "seamModel_eventActionAttemptSimulateManualLockViaKeypadFailed_model")] +public class EventActionAttemptSimulateManualLockViaKeypadFailed : Event +{ +[JsonConstructorAttribute] +protected EventActionAttemptSimulateManualLockViaKeypadFailed() { } + +public EventActionAttemptSimulateManualLockViaKeypadFailed(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) +{ +ActionAttemptId = actionAttemptId; +ActionType = actionType; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Status = status; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected action attempt. +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string ActionAttemptId { get; set; } + +/// +/// Type of the action. +/// +[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] +public string ActionType { get; set; } + +/// +/// ID of the connected account associated with the action attempt, if applicable. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device associated with the action attempt, if applicable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "action_attempt.simulate_manual_lock_via_keypad.failed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Status of the action. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public string Status { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A Connect Webview login succeeded. +/// +[DataContract(Name = "seamModel_eventConnectWebviewLoginSucceeded_model")] +public class EventConnectWebviewLoginSucceeded : Event +{ +[JsonConstructorAttribute] +protected EventConnectWebviewLoginSucceeded() { } + +public EventConnectWebviewLoginSucceeded(string connectWebviewId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectWebviewId = connectWebviewId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Connect Webview. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectWebviewId { get; set; } + +/// +/// Custom metadata of the connected account; present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with this connect webview, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connect_webview.login_succeeded"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A Connect Webview login failed. +/// +[DataContract(Name = "seamModel_eventConnectWebviewLoginFailed_model")] +public class EventConnectWebviewLoginFailed : Event +{ +[JsonConstructorAttribute] +protected EventConnectWebviewLoginFailed() { } + +public EventConnectWebviewLoginFailed(string connectWebviewId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectWebviewId = connectWebviewId; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// ID of the affected Connect Webview. +/// +[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectWebviewId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "connect_webview.login_failed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The status of a device changed from offline to online. That is, the `device.properties.online` property changed from `false` to `true`. Note that some devices operate entirely in offline mode, so Seam never emits a `device.connected` event for these devices. +/// +[DataContract(Name = "seamModel_eventDeviceConnected_model")] +public class EventDeviceConnected : Event +{ +[JsonConstructorAttribute] +protected EventDeviceConnected() { } + +public EventDeviceConnected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.connected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A device was added to Seam or was re-added to Seam after having been removed. +/// +[DataContract(Name = "seamModel_eventDeviceAdded_model")] +public class EventDeviceAdded : Event +{ +[JsonConstructorAttribute] +protected EventDeviceAdded() { } + +public EventDeviceAdded(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.added"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A managed device was successfully converted to an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). +/// +[DataContract(Name = "seamModel_eventDeviceConvertedToUnmanaged_model")] +public class EventDeviceConvertedToUnmanaged : Event +{ +[JsonConstructorAttribute] +protected EventDeviceConvertedToUnmanaged() { } + +public EventDeviceConvertedToUnmanaged(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.converted_to_unmanaged"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) was successfully converted to a managed device. +/// +[DataContract(Name = "seamModel_eventDeviceUnmanagedConvertedToManaged_model")] +public class EventDeviceUnmanagedConvertedToManaged : Event +{ +[JsonConstructorAttribute] +protected EventDeviceUnmanagedConvertedToManaged() { } + +public EventDeviceUnmanagedConvertedToManaged(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.unmanaged.converted_to_managed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The status of an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) changed from offline to online. That is, the `device.properties.online` property changed from `false` to `true`. +/// +[DataContract(Name = "seamModel_eventDeviceUnmanagedConnected_model")] +public class EventDeviceUnmanagedConnected : Event +{ +[JsonConstructorAttribute] +protected EventDeviceUnmanagedConnected() { } + +public EventDeviceUnmanagedConnected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.unmanaged.connected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The status of a device changed from online to offline. That is, the `device.properties.online` property changed from `true` to `false`. +/// +[DataContract(Name = "seamModel_eventDeviceDisconnected_model")] +public class EventDeviceDisconnected : Event +{ +[JsonConstructorAttribute] +protected EventDeviceDisconnected() { } + +public EventDeviceDisconnected(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, EventDeviceDisconnected.ErrorCodeEnum errorCode = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +ErrorCode = errorCode; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Error code associated with the disconnection event, if any. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ErrorCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "account_disconnected")] +AccountDisconnected = 1, + +[EnumMember(Value = "hub_disconnected")] +HubDisconnected = 2, + +[EnumMember(Value = "device_disconnected")] +DeviceDisconnected = 3, +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Error code associated with the disconnection event, if any. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public EventDeviceDisconnected.ErrorCodeEnum ErrorCode { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.disconnected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceDisconnectedConnectedAccountErrors_model")] +public class EventDeviceDisconnectedConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventDeviceDisconnectedConnectedAccountErrors() { } + +public EventDeviceDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceDisconnectedConnectedAccountWarnings_model")] +public class EventDeviceDisconnectedConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceDisconnectedConnectedAccountWarnings() { } + +public EventDeviceDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceDisconnectedDeviceErrors_model")] +public class EventDeviceDisconnectedDeviceErrors +{ +[JsonConstructorAttribute] +protected EventDeviceDisconnectedDeviceErrors() { } + +public EventDeviceDisconnectedDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceDisconnectedDeviceWarnings_model")] +public class EventDeviceDisconnectedDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceDisconnectedDeviceWarnings() { } + +public EventDeviceDisconnectedDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The status of an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) changed from online to offline. That is, the `device.properties.online` property changed from `true` to `false`. +/// +[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnected_model")] +public class EventDeviceUnmanagedDisconnected : Event +{ +[JsonConstructorAttribute] +protected EventDeviceUnmanagedDisconnected() { } + +public EventDeviceUnmanagedDisconnected(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, EventDeviceUnmanagedDisconnected.ErrorCodeEnum errorCode = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +ErrorCode = errorCode; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Error code associated with the disconnection event, if any. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ErrorCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "account_disconnected")] +AccountDisconnected = 1, + +[EnumMember(Value = "hub_disconnected")] +HubDisconnected = 2, + +[EnumMember(Value = "device_disconnected")] +DeviceDisconnected = 3, +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Error code associated with the disconnection event, if any. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public EventDeviceUnmanagedDisconnected.ErrorCodeEnum ErrorCode { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.unmanaged.disconnected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedConnectedAccountErrors_model")] +public class EventDeviceUnmanagedDisconnectedConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventDeviceUnmanagedDisconnectedConnectedAccountErrors() { } + +public EventDeviceUnmanagedDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedConnectedAccountWarnings_model")] +public class EventDeviceUnmanagedDisconnectedConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceUnmanagedDisconnectedConnectedAccountWarnings() { } + +public EventDeviceUnmanagedDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedDeviceErrors_model")] +public class EventDeviceUnmanagedDisconnectedDeviceErrors +{ +[JsonConstructorAttribute] +protected EventDeviceUnmanagedDisconnectedDeviceErrors() { } + +public EventDeviceUnmanagedDisconnectedDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedDeviceWarnings_model")] +public class EventDeviceUnmanagedDisconnectedDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceUnmanagedDisconnectedDeviceWarnings() { } + +public EventDeviceUnmanagedDisconnectedDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A device detected that it was tampered with, for example, opened or moved. +/// +[DataContract(Name = "seamModel_eventDeviceTampered_model")] +public class EventDeviceTampered : Event +{ +[JsonConstructorAttribute] +protected EventDeviceTampered() { } + +public EventDeviceTampered(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.tampered"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A device battery level dropped below the low threshold. +/// +[DataContract(Name = "seamModel_eventDeviceLowBattery_model")] +public class EventDeviceLowBattery : Event +{ +[JsonConstructorAttribute] +protected EventDeviceLowBattery() { } + +public EventDeviceLowBattery(float? accessoryKeypadBatteryLevel = default, float batteryLevel = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, float? deviceBatteryLevel = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +AccessoryKeypadBatteryLevel = accessoryKeypadBatteryLevel; +BatteryLevel = batteryLevel; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceBatteryLevel = deviceBatteryLevel; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known. +/// +[DataMember(Name = "accessory_keypad_battery_level", IsRequired = false, EmitDefaultValue = false)] +public float? AccessoryKeypadBatteryLevel { get; set; } + +/// +/// Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event. +/// +[Obsolete("Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.")] +[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] +public float BatteryLevel { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Number in the range 0 to 1.0 indicating the affected device's own battery level, when known. +/// +[DataMember(Name = "device_battery_level", IsRequired = false, EmitDefaultValue = false)] +public float? DeviceBatteryLevel { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.low_battery"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A device battery status changed since the last `battery_status_changed` event. +/// +[DataContract(Name = "seamModel_eventDeviceBatteryStatusChanged_model")] +public class EventDeviceBatteryStatusChanged : Event +{ +[JsonConstructorAttribute] +protected EventDeviceBatteryStatusChanged() { } + +public EventDeviceBatteryStatusChanged(float batteryLevel = default, EventDeviceBatteryStatusChanged.BatteryStatusEnum batteryStatus = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +BatteryLevel = batteryLevel; +BatteryStatus = batteryStatus; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Battery status of the affected device, calculated from the numeric `battery_level` value. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum BatteryStatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "critical")] +Critical = 1, + +[EnumMember(Value = "low")] +Low = 2, + +[EnumMember(Value = "good")] +Good = 3, + +[EnumMember(Value = "full")] +Full = 4, +} + +/// +/// Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. +/// +[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] +public float BatteryLevel { get; set; } + +/// +/// Battery status of the affected device, calculated from the numeric `battery_level` value. +/// +[DataMember(Name = "battery_status", IsRequired = false, EmitDefaultValue = false)] +public EventDeviceBatteryStatusChanged.BatteryStatusEnum BatteryStatus { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.battery_status_changed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A device was removed externally from the connected account. +/// +[DataContract(Name = "seamModel_eventDeviceRemoved_model")] +public class EventDeviceRemoved : Event +{ +[JsonConstructorAttribute] +protected EventDeviceRemoved() { } + +public EventDeviceRemoved(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.removed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A device was deleted. +/// +[DataContract(Name = "seamModel_eventDeviceDeleted_model")] +public class EventDeviceDeleted : Event +{ +[JsonConstructorAttribute] +protected EventDeviceDeleted() { } + +public EventDeviceDeleted(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? deviceName = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +DeviceName = deviceName; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Name of the deleted device, captured at deletion time. The device record no longer exists when this event fires, so the name is preserved here. Null when the device had no resolvable name. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceName { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Seam detected that a device is using a third-party integration that will interfere with Seam device management. +/// +[DataContract(Name = "seamModel_eventDeviceThirdPartyIntegrationDetected_model")] +public class EventDeviceThirdPartyIntegrationDetected : Event +{ +[JsonConstructorAttribute] +protected EventDeviceThirdPartyIntegrationDetected() { } + +public EventDeviceThirdPartyIntegrationDetected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.third_party_integration_detected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Seam detected that a device is no longer using a third-party integration that was interfering with Seam device management. +/// +[DataContract(Name = "seamModel_eventDeviceThirdPartyIntegrationNoLongerDetected_model")] +public class EventDeviceThirdPartyIntegrationNoLongerDetected : Event +{ +[JsonConstructorAttribute] +protected EventDeviceThirdPartyIntegrationNoLongerDetected() { } + +public EventDeviceThirdPartyIntegrationNoLongerDetected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.third_party_integration_no_longer_detected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [Salto device](https://www.seam.co/docs/device-and-system-integration-guides/salto-locks) activated privacy mode. +/// +[DataContract(Name = "seamModel_eventDeviceSaltoPrivacyModeActivated_model")] +public class EventDeviceSaltoPrivacyModeActivated : Event +{ +[JsonConstructorAttribute] +protected EventDeviceSaltoPrivacyModeActivated() { } + +public EventDeviceSaltoPrivacyModeActivated(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.salto.privacy_mode_activated"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [Salto device](https://www.seam.co/docs/device-and-system-integration-guides/salto-locks) deactivated privacy mode. +/// +[DataContract(Name = "seamModel_eventDeviceSaltoPrivacyModeDeactivated_model")] +public class EventDeviceSaltoPrivacyModeDeactivated : Event +{ +[JsonConstructorAttribute] +protected EventDeviceSaltoPrivacyModeDeactivated() { } + +public EventDeviceSaltoPrivacyModeDeactivated(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.salto.privacy_mode_deactivated"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Seam detected a flaky device connection. +/// +[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlaky_model")] +public class EventDeviceConnectionBecameFlaky : Event +{ +[JsonConstructorAttribute] +protected EventDeviceConnectionBecameFlaky() { } + +public EventDeviceConnectionBecameFlaky(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.connection_became_flaky"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyConnectedAccountErrors_model")] +public class EventDeviceConnectionBecameFlakyConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventDeviceConnectionBecameFlakyConnectedAccountErrors() { } + +public EventDeviceConnectionBecameFlakyConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyConnectedAccountWarnings_model")] +public class EventDeviceConnectionBecameFlakyConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceConnectionBecameFlakyConnectedAccountWarnings() { } + +public EventDeviceConnectionBecameFlakyConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyDeviceErrors_model")] +public class EventDeviceConnectionBecameFlakyDeviceErrors +{ +[JsonConstructorAttribute] +protected EventDeviceConnectionBecameFlakyDeviceErrors() { } + +public EventDeviceConnectionBecameFlakyDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyDeviceWarnings_model")] +public class EventDeviceConnectionBecameFlakyDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceConnectionBecameFlakyDeviceWarnings() { } + +public EventDeviceConnectionBecameFlakyDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Seam detected that a previously-flaky device connection stabilized. +/// +[DataContract(Name = "seamModel_eventDeviceConnectionStabilized_model")] +public class EventDeviceConnectionStabilized : Event +{ +[JsonConstructorAttribute] +protected EventDeviceConnectionStabilized() { } + +public EventDeviceConnectionStabilized(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.connection_stabilized"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A third-party subscription is required to use all device features. +/// +[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequired_model")] +public class EventDeviceErrorSubscriptionRequired : Event +{ +[JsonConstructorAttribute] +protected EventDeviceErrorSubscriptionRequired() { } + +public EventDeviceErrorSubscriptionRequired(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.error.subscription_required"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredConnectedAccountErrors_model")] +public class EventDeviceErrorSubscriptionRequiredConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventDeviceErrorSubscriptionRequiredConnectedAccountErrors() { } + +public EventDeviceErrorSubscriptionRequiredConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredConnectedAccountWarnings_model")] +public class EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings() { } + +public EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredDeviceErrors_model")] +public class EventDeviceErrorSubscriptionRequiredDeviceErrors +{ +[JsonConstructorAttribute] +protected EventDeviceErrorSubscriptionRequiredDeviceErrors() { } + +public EventDeviceErrorSubscriptionRequiredDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredDeviceWarnings_model")] +public class EventDeviceErrorSubscriptionRequiredDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceErrorSubscriptionRequiredDeviceWarnings() { } + +public EventDeviceErrorSubscriptionRequiredDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A third-party subscription is active or no longer required to use all device features. +/// +[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredResolved_model")] +public class EventDeviceErrorSubscriptionRequiredResolved : Event +{ +[JsonConstructorAttribute] +protected EventDeviceErrorSubscriptionRequiredResolved() { } + +public EventDeviceErrorSubscriptionRequiredResolved(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.error.subscription_required.resolved"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An accessory keypad was connected to a device. +/// +[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadConnected_model")] +public class EventDeviceAccessoryKeypadConnected : Event +{ +[JsonConstructorAttribute] +protected EventDeviceAccessoryKeypadConnected() { } + +public EventDeviceAccessoryKeypadConnected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.accessory_keypad_connected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// An accessory keypad was disconnected from a device. +/// +[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnected_model")] +public class EventDeviceAccessoryKeypadDisconnected : Event +{ +[JsonConstructorAttribute] +protected EventDeviceAccessoryKeypadDisconnected() { } + +public EventDeviceAccessoryKeypadDisconnected(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountErrors = connectedAccountErrors; +ConnectedAccountId = connectedAccountId; +ConnectedAccountWarnings = connectedAccountWarnings; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceErrors = deviceErrors; +DeviceId = deviceId; +DeviceWarnings = deviceWarnings; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// Errors associated with the connected account. +/// +[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountErrors { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Warnings associated with the connected account. +/// +[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] +public List ConnectedAccountWarnings { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// Errors associated with the device. +/// +[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] +public List DeviceErrors { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Warnings associated with the device. +/// +[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] +public List DeviceWarnings { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.accessory_keypad_disconnected"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors_model")] +public class EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors +{ +[JsonConstructorAttribute] +protected EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors() { } + +public EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings_model")] +public class EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings() { } + +public EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedDeviceErrors_model")] +public class EventDeviceAccessoryKeypadDisconnectedDeviceErrors +{ +[JsonConstructorAttribute] +protected EventDeviceAccessoryKeypadDisconnectedDeviceErrors() { } + +public EventDeviceAccessoryKeypadDisconnectedDeviceErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedDeviceWarnings_model")] +public class EventDeviceAccessoryKeypadDisconnectedDeviceWarnings +{ +[JsonConstructorAttribute] +protected EventDeviceAccessoryKeypadDisconnectedDeviceWarnings() { } + +public EventDeviceAccessoryKeypadDisconnectedDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Extended periods of noise or noise exceeding a [threshold](https://www.seam.co/docs/capability-guides/noise-sensors#what-is-a-threshold) were detected. +/// +[DataContract(Name = "seamModel_eventNoiseSensorNoiseThresholdTriggered_model")] +public class EventNoiseSensorNoiseThresholdTriggered : Event +{ +[JsonConstructorAttribute] +protected EventNoiseSensorNoiseThresholdTriggered() { } + +public EventNoiseSensorNoiseThresholdTriggered(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, object? minutMetadata = default, float? noiseLevelDecibels = default, float? noiseLevelNrs = default, string? noiseThresholdId = default, string? noiseThresholdName = default, object? noiseawareMetadata = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +MinutMetadata = minutMetadata; +NoiseLevelDecibels = noiseLevelDecibels; +NoiseLevelNrs = noiseLevelNrs; +NoiseThresholdId = noiseThresholdId; +NoiseThresholdName = noiseThresholdName; +NoiseawareMetadata = noiseawareMetadata; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "noise_sensor.noise_threshold_triggered"; + +/// +/// Metadata from Minut. +/// +[DataMember(Name = "minut_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? MinutMetadata { get; set; } + +/// +/// Detected noise level in decibels. +/// +[DataMember(Name = "noise_level_decibels", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseLevelDecibels { get; set; } + +/// +/// Detected noise level in Noiseaware Noise Risk Score (NRS). +/// +[DataMember(Name = "noise_level_nrs", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseLevelNrs { get; set; } + +/// +/// ID of the noise threshold that was triggered. +/// +[DataMember(Name = "noise_threshold_id", IsRequired = false, EmitDefaultValue = false)] +public string? NoiseThresholdId { get; set; } + +/// +/// Name of the noise threshold that was triggered. +/// +[DataMember(Name = "noise_threshold_name", IsRequired = false, EmitDefaultValue = false)] +public string? NoiseThresholdName { get; set; } + +/// +/// Metadata from Noiseaware. +/// +[DataMember(Name = "noiseaware_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? NoiseawareMetadata { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [lock](https://www.seam.co/docs/low-level-apis/smart-locks) was locked. +/// +[DataContract(Name = "seamModel_eventLockLocked_model")] +public class EventLockLocked : Event +{ +[JsonConstructorAttribute] +protected EventLockLocked() { } + +public EventLockLocked(string? accessCodeId = default, bool? accessCodeIsManaged = default, string? actionAttemptId = default, string? code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, bool? isViaBluetooth = default, bool? isViaNfc = default, EventLockLocked.MethodEnum method = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +AccessCodeIsManaged = accessCodeIsManaged; +ActionAttemptId = actionAttemptId; +Code = code; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +IsViaBluetooth = isViaBluetooth; +IsViaNfc = isViaNfc; +Method = method; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum MethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "keycode")] +Keycode = 1, + +[EnumMember(Value = "manual")] +Manual = 2, + +[EnumMember(Value = "automatic")] +Automatic = 3, + +[EnumMember(Value = "unknown")] +Unknown = 4, + +[EnumMember(Value = "remote")] +Remote = 5, + +[EnumMember(Value = "card")] +Card = 6, + +[EnumMember(Value = "mobile_key")] +MobileKey = 7, +} + +/// +/// ID of the access code that was used to lock the device. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessCodeId { get; set; } + +/// +/// Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. +/// +[DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool? AccessCodeIsManaged { get; set; } + +/// +/// ID of the Seam action attempt that triggered this lock. Present only when the lock was initiated through Seam (via a `LOCK_DOOR` action attempt). +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string? ActionAttemptId { get; set; } + +/// +/// Code (PIN) that was used to lock the device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "lock.locked"; + +/// +/// Whether the lock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. +/// +[DataMember(Name = "is_via_bluetooth", IsRequired = false, EmitDefaultValue = false)] +public bool? IsViaBluetooth { get; set; } + +/// +/// Whether the lock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. +/// +[DataMember(Name = "is_via_nfc", IsRequired = false, EmitDefaultValue = false)] +public bool? IsViaNfc { get; set; } + +/// +/// Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. +/// +[DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] +public EventLockLocked.MethodEnum Method { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [lock](https://www.seam.co/docs/low-level-apis/smart-locks) was unlocked. +/// +[DataContract(Name = "seamModel_eventLockUnlocked_model")] +public class EventLockUnlocked : Event +{ +[JsonConstructorAttribute] +protected EventLockUnlocked() { } + +public EventLockUnlocked(string? accessCodeId = default, bool? accessCodeIsManaged = default, string? actionAttemptId = default, string? code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, bool? isViaBluetooth = default, bool? isViaNfc = default, EventLockUnlocked.MethodEnum method = default, string occurredAt = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +AccessCodeIsManaged = accessCodeIsManaged; +ActionAttemptId = actionAttemptId; +Code = code; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +IsViaBluetooth = isViaBluetooth; +IsViaNfc = isViaNfc; +Method = method; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Method by which the lock was unlocked. `keycode`: an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum MethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "keycode")] +Keycode = 1, + +[EnumMember(Value = "manual")] +Manual = 2, + +[EnumMember(Value = "automatic")] +Automatic = 3, + +[EnumMember(Value = "unknown")] +Unknown = 4, + +[EnumMember(Value = "remote")] +Remote = 5, + +[EnumMember(Value = "card")] +Card = 6, + +[EnumMember(Value = "mobile_key")] +MobileKey = 7, +} + +/// +/// ID of the access code that was used to unlock the affected device. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessCodeId { get; set; } + +/// +/// Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. +/// +[DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool? AccessCodeIsManaged { get; set; } + +/// +/// ID of the Seam action attempt that triggered this unlock. Present only when the unlock was initiated through Seam (via an `UNLOCK_DOOR` action attempt). +/// +[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] +public string? ActionAttemptId { get; set; } + +/// +/// Code (PIN) that was used to unlock the affected device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "lock.unlocked"; + +/// +/// Whether the unlock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. +/// +[DataMember(Name = "is_via_bluetooth", IsRequired = false, EmitDefaultValue = false)] +public bool? IsViaBluetooth { get; set; } + +/// +/// Whether the unlock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. +/// +[DataMember(Name = "is_via_nfc", IsRequired = false, EmitDefaultValue = false)] +public bool? IsViaNfc { get; set; } + +/// +/// Method by which the lock was unlocked. `keycode`: an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. +/// +[DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] +public EventLockUnlocked.MethodEnum Method { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The [lock](https://www.seam.co/docs/low-level-apis/smart-locks) denied access to a user after one or more consecutive invalid attempts to unlock the device. +/// +[DataContract(Name = "seamModel_eventLockAccessDenied_model")] +public class EventLockAccessDenied : Event +{ +[JsonConstructorAttribute] +protected EventLockAccessDenied() { } + +public EventLockAccessDenied(string? accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, EventLockAccessDeniedReason? reason = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +Reason = reason; +WorkspaceId = workspaceId; +} + +/// +/// ID of the access code that was used in the unlock attempts. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? AccessCodeId { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "lock.access_denied"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Why access was denied, when the provider reports a determinable cause. Omitted when unknown. +/// +[DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] +public EventLockAccessDeniedReason? Reason { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventLockAccessDeniedReason_model")] +public class EventLockAccessDeniedReason +{ +[JsonConstructorAttribute] +protected EventLockAccessDeniedReason() { } + +public EventLockAccessDeniedReason(string message = default, EventLockAccessDeniedReason.ReasonCodeEnum reasonCode = default) +{ +Message = message; +ReasonCode = reasonCode; +} + +/// +/// Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ReasonCodeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "unknown_code")] +UnknownCode = 1, + +[EnumMember(Value = "expired_code")] +ExpiredCode = 2, + +[EnumMember(Value = "blocklisted_code")] +BlocklistedCode = 3, + +[EnumMember(Value = "too_many_attempts")] +TooManyAttempts = 4, + +[EnumMember(Value = "blocked_by_privacy_mode")] +BlockedByPrivacyMode = 5, + +[EnumMember(Value = "credential_error")] +CredentialError = 6, +} + +/// +/// Human-readable explanation of why access was denied. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. +/// +[DataMember(Name = "reason_code", IsRequired = false, EmitDefaultValue = false)] +public EventLockAccessDeniedReason.ReasonCodeEnum ReasonCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A thermostat [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) was activated. +/// +[DataContract(Name = "seamModel_eventThermostatClimatePresetActivated_model")] +public class EventThermostatClimatePresetActivated : Event +{ +[JsonConstructorAttribute] +protected EventThermostatClimatePresetActivated() { } + +public EventThermostatClimatePresetActivated(string climatePresetKey = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, bool isFallbackClimatePreset = default, string occurredAt = default, string? thermostatScheduleId = default, string workspaceId = default) +{ +ClimatePresetKey = climatePresetKey; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +IsFallbackClimatePreset = isFallbackClimatePreset; +OccurredAt = occurredAt; +ThermostatScheduleId = thermostatScheduleId; +WorkspaceId = workspaceId; +} + +/// +/// Key of the climate preset that was activated. +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "thermostat.climate_preset_activated"; + +/// +/// Indicates whether the climate preset that was activated is the fallback climate preset for the thermostat. +/// +[DataMember(Name = "is_fallback_climate_preset", IsRequired = false, EmitDefaultValue = false)] +public bool IsFallbackClimatePreset { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the thermostat schedule that prompted the affected climate preset to be activated. +/// +[DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] +public string? ThermostatScheduleId { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [thermostat](https://www.seam.co/docs/capability-guides/thermostats) was adjusted manually. +/// +[DataContract(Name = "seamModel_eventThermostatManuallyAdjusted_model")] +public class EventThermostatManuallyAdjusted : Event +{ +[JsonConstructorAttribute] +protected EventThermostatManuallyAdjusted() { } + +public EventThermostatManuallyAdjusted(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, EventThermostatManuallyAdjusted.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, EventThermostatManuallyAdjusted.HvacModeSettingEnum? hvacModeSetting = default, EventThermostatManuallyAdjusted.MethodEnum method = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CoolingSetPointCelsius = coolingSetPointCelsius; +CoolingSetPointFahrenheit = coolingSetPointFahrenheit; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +FanModeSetting = fanModeSetting; +HeatingSetPointCelsius = heatingSetPointCelsius; +HeatingSetPointFahrenheit = heatingSetPointFahrenheit; +HvacModeSetting = hvacModeSetting; +Method = method; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum FanModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "auto")] +Auto = 1, + +[EnumMember(Value = "on")] +On = 2, + +[EnumMember(Value = "circulate")] +Circulate = 3, +} + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum HvacModeSettingEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "off")] +Off = 1, + +[EnumMember(Value = "heat")] +Heat = 2, + +[EnumMember(Value = "cool")] +Cool = 3, + +[EnumMember(Value = "heat_cool")] +HeatCool = 4, + +[EnumMember(Value = "eco")] +Eco = 5, +} + +/// +/// Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum MethodEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "seam")] +Seam = 1, + +[EnumMember(Value = "external")] +External = 2, +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? CoolingSetPointFahrenheit { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "thermostat.manually_adjusted"; + +/// +/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. +/// +[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public EventThermostatManuallyAdjusted.FanModeSettingEnum? FanModeSetting { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointCelsius { get; set; } + +/// +/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? HeatingSetPointFahrenheit { get; set; } + +/// +/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. +/// +[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] +public EventThermostatManuallyAdjusted.HvacModeSettingEnum? HvacModeSetting { get; set; } + +/// +/// Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. +/// +[DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] +public EventThermostatManuallyAdjusted.MethodEnum Method { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading exceeded the set [threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds). +/// +[DataContract(Name = "seamModel_eventThermostatTemperatureThresholdExceeded_model")] +public class EventThermostatTemperatureThresholdExceeded : Event +{ +[JsonConstructorAttribute] +protected EventThermostatTemperatureThresholdExceeded() { } + +public EventThermostatTemperatureThresholdExceeded(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, string occurredAt = default, float temperatureCelsius = default, float temperatureFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +LowerLimitCelsius = lowerLimitCelsius; +LowerLimitFahrenheit = lowerLimitFahrenheit; +OccurredAt = occurredAt; +TemperatureCelsius = temperatureCelsius; +TemperatureFahrenheit = temperatureFahrenheit; +UpperLimitCelsius = upperLimitCelsius; +UpperLimitFahrenheit = upperLimitFahrenheit; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "thermostat.temperature_threshold_exceeded"; + +/// +/// Lower temperature limit, in °C, defined by the set threshold. +/// +[DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? LowerLimitCelsius { get; set; } + +/// +/// Lower temperature limit, in °F, defined by the set threshold. +/// +[DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? LowerLimitFahrenheit { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Temperature, in °C, reported by the affected thermostat. +/// +[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] +public float TemperatureCelsius { get; set; } + +/// +/// Temperature, in °F, reported by the affected thermostat. +/// +[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float TemperatureFahrenheit { get; set; } + +/// +/// Upper temperature limit, in °C, defined by the set threshold. +/// +[DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? UpperLimitCelsius { get; set; } + +/// +/// Upper temperature limit, in °F, defined by the set threshold. +/// +[DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? UpperLimitFahrenheit { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading no longer exceeds the set [threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds). +/// +[DataContract(Name = "seamModel_eventThermostatTemperatureThresholdNoLongerExceeded_model")] +public class EventThermostatTemperatureThresholdNoLongerExceeded : Event +{ +[JsonConstructorAttribute] +protected EventThermostatTemperatureThresholdNoLongerExceeded() { } + +public EventThermostatTemperatureThresholdNoLongerExceeded(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, string occurredAt = default, float temperatureCelsius = default, float temperatureFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +LowerLimitCelsius = lowerLimitCelsius; +LowerLimitFahrenheit = lowerLimitFahrenheit; +OccurredAt = occurredAt; +TemperatureCelsius = temperatureCelsius; +TemperatureFahrenheit = temperatureFahrenheit; +UpperLimitCelsius = upperLimitCelsius; +UpperLimitFahrenheit = upperLimitFahrenheit; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "thermostat.temperature_threshold_no_longer_exceeded"; + +/// +/// Lower temperature limit, in °C, defined by the set threshold. +/// +[DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? LowerLimitCelsius { get; set; } + +/// +/// Lower temperature limit, in °F, defined by the set threshold. +/// +[DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? LowerLimitFahrenheit { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Temperature, in °C, reported by the affected thermostat. +/// +[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] +public float TemperatureCelsius { get; set; } + +/// +/// Temperature, in °F, reported by the affected thermostat. +/// +[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float TemperatureFahrenheit { get; set; } + +/// +/// Upper temperature limit, in °C, defined by the set threshold. +/// +[DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? UpperLimitCelsius { get; set; } + +/// +/// Upper temperature limit, in °F, defined by the set threshold. +/// +[DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? UpperLimitFahrenheit { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading is within 1 °C of the configured cooling or heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). +/// +[DataContract(Name = "seamModel_eventThermostatTemperatureReachedSetPoint_model")] +public class EventThermostatTemperatureReachedSetPoint : Event +{ +[JsonConstructorAttribute] +protected EventThermostatTemperatureReachedSetPoint() { } + +public EventThermostatTemperatureReachedSetPoint(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, float? desiredTemperatureCelsius = default, float? desiredTemperatureFahrenheit = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, float temperatureCelsius = default, float temperatureFahrenheit = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DesiredTemperatureCelsius = desiredTemperatureCelsius; +DesiredTemperatureFahrenheit = desiredTemperatureFahrenheit; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +TemperatureCelsius = temperatureCelsius; +TemperatureFahrenheit = temperatureFahrenheit; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Desired temperature, in °C, defined by the affected thermostat's cooling or heating set point. +/// +[DataMember(Name = "desired_temperature_celsius", IsRequired = false, EmitDefaultValue = false)] +public float? DesiredTemperatureCelsius { get; set; } + +/// +/// Desired temperature, in °F, defined by the affected thermostat's cooling or heating set point. +/// +[DataMember(Name = "desired_temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float? DesiredTemperatureFahrenheit { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "thermostat.temperature_reached_set_point"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Temperature, in °C, reported by the affected thermostat. +/// +[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] +public float TemperatureCelsius { get; set; } + +/// +/// Temperature, in °F, reported by the affected thermostat. +/// +[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float TemperatureFahrenheit { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) reported temperature changed by at least 1 °C. +/// +[DataContract(Name = "seamModel_eventThermostatTemperatureChanged_model")] +public class EventThermostatTemperatureChanged : Event +{ +[JsonConstructorAttribute] +protected EventThermostatTemperatureChanged() { } + +public EventThermostatTemperatureChanged(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, float temperatureCelsius = default, float temperatureFahrenheit = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +TemperatureCelsius = temperatureCelsius; +TemperatureFahrenheit = temperatureFahrenheit; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "thermostat.temperature_changed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// Temperature, in °C, reported by the affected thermostat. +/// +[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] +public float TemperatureCelsius { get; set; } + +/// +/// Temperature, in °F, reported by the affected thermostat. +/// +[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] +public float TemperatureFahrenheit { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// The name of a device was changed. +/// +[DataContract(Name = "seamModel_eventDeviceNameChanged_model")] +public class EventDeviceNameChanged : Event +{ +[JsonConstructorAttribute] +protected EventDeviceNameChanged() { } + +public EventDeviceNameChanged(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string deviceName = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +DeviceName = deviceName; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// The new name of the affected device. +/// +[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] +public string DeviceName { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.name_changed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A camera was activated, for example, by motion detection. +/// +[DataContract(Name = "seamModel_eventCameraActivated_model")] +public class EventCameraActivated : Event +{ +[JsonConstructorAttribute] +protected EventCameraActivated() { } + +public EventCameraActivated(EventCameraActivated.ActivationReasonEnum activationReason = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string? imageUrl = default, List? mediaIds = default, EventCameraActivated.MotionSubTypeEnum? motionSubType = default, string occurredAt = default, string? videoUrl = default, string workspaceId = default) +{ +ActivationReason = activationReason; +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +ImageUrl = imageUrl; +MediaIds = mediaIds; +MotionSubType = motionSubType; +OccurredAt = occurredAt; +VideoUrl = videoUrl; +WorkspaceId = workspaceId; +} + +/// +/// The reason the camera was activated. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ActivationReasonEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "motion_detected")] +MotionDetected = 1, +} + +/// +/// Sub-type of motion detected, if available. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum MotionSubTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "human")] +Human = 1, + +[EnumMember(Value = "vehicle")] +Vehicle = 2, + +[EnumMember(Value = "package")] +Package = 3, + +[EnumMember(Value = "other")] +Other = 4, +} + +/// +/// The reason the camera was activated. +/// +[DataMember(Name = "activation_reason", IsRequired = false, EmitDefaultValue = false)] +public EventCameraActivated.ActivationReasonEnum ActivationReason { get; set; } + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "camera.activated"; + +/// +/// URL to a thumbnail image captured at the time of activation. +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string? ImageUrl { get; set; } + +/// +/// IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. +/// +[DataMember(Name = "media_ids", IsRequired = false, EmitDefaultValue = false)] +public List? MediaIds { get; set; } + +/// +/// Sub-type of motion detected, if available. +/// +[DataMember(Name = "motion_sub_type", IsRequired = false, EmitDefaultValue = false)] +public EventCameraActivated.MotionSubTypeEnum? MotionSubType { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// URL to a short video clip captured at the time of activation. +/// +[DataMember(Name = "video_url", IsRequired = false, EmitDefaultValue = false)] +public string? VideoUrl { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A doorbell button was pressed on a device. +/// +[DataContract(Name = "seamModel_eventDeviceDoorbellRang_model")] +public class EventDeviceDoorbellRang : Event +{ +[JsonConstructorAttribute] +protected EventDeviceDoorbellRang() { } + +public EventDeviceDoorbellRang(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string? imageUrl = default, List? mediaIds = default, string occurredAt = default, string? videoUrl = default, string workspaceId = default) +{ +ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomerKey = customerKey; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +ImageUrl = imageUrl; +MediaIds = mediaIds; +OccurredAt = occurredAt; +VideoUrl = videoUrl; +WorkspaceId = workspaceId; +} + +/// +/// Custom metadata of the connected account, present when connected_account_id is provided. +/// +[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? ConnectedAccountCustomMetadata { get; set; } + +/// +/// ID of the connected account associated with the event. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// The customer key associated with the device, if any. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Custom metadata of the device, present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "device.doorbell_rang"; + +/// +/// URL to a thumbnail image captured at the time the doorbell was pressed. +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string? ImageUrl { get; set; } + +/// +/// IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. +/// +[DataMember(Name = "media_ids", IsRequired = false, EmitDefaultValue = false)] +public List? MediaIds { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// URL to a short video clip captured at the time the doorbell was pressed. +/// +[DataMember(Name = "video_url", IsRequired = false, EmitDefaultValue = false)] +public string? VideoUrl { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A phone device was deactivated. +/// +[DataContract(Name = "seamModel_eventPhoneDeactivated_model")] +public class EventPhoneDeactivated : Event +{ +[JsonConstructorAttribute] +protected EventPhoneDeactivated() { } + +public EventPhoneDeactivated(string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) +{ +CreatedAt = createdAt; +DeviceCustomMetadata = deviceCustomMetadata; +DeviceId = deviceId; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Custom metadata of the device; present when device_id is provided. +/// +[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object? DeviceCustomMetadata { get; set; } + +/// +/// ID of the affected phone device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "phone.deactivated"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A device was added or removed from a space. +/// +[DataContract(Name = "seamModel_eventSpaceDeviceMembershipChanged_model")] +public class EventSpaceDeviceMembershipChanged : Event +{ +[JsonConstructorAttribute] +protected EventSpaceDeviceMembershipChanged() { } + +public EventSpaceDeviceMembershipChanged(List acsEntranceIds = default, string createdAt = default, List deviceIds = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string spaceId = default, string? spaceKey = default, string workspaceId = default) +{ +AcsEntranceIds = acsEntranceIds; +CreatedAt = createdAt; +DeviceIds = deviceIds; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +SpaceId = spaceId; +SpaceKey = spaceKey; +WorkspaceId = workspaceId; +} + +/// +/// IDs of all ACS entrances currently attached to the space. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List AcsEntranceIds { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// IDs of all devices currently attached to the space. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "space.device_membership_changed"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the affected space. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +/// +/// Unique key for the space within the workspace. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A space was created. +/// +[DataContract(Name = "seamModel_eventSpaceCreated_model")] +public class EventSpaceCreated : Event +{ +[JsonConstructorAttribute] +protected EventSpaceCreated() { } + +public EventSpaceCreated(List acsEntranceIds = default, string createdAt = default, List deviceIds = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string spaceId = default, string? spaceKey = default, string workspaceId = default) +{ +AcsEntranceIds = acsEntranceIds; +CreatedAt = createdAt; +DeviceIds = deviceIds; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +SpaceId = spaceId; +SpaceKey = spaceKey; +WorkspaceId = workspaceId; +} + +/// +/// IDs of all ACS entrances attached to the space when it was created. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List AcsEntranceIds { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// IDs of all devices attached to the space when it was created. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "space.created"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the affected space. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +/// +/// Unique key for the space within the workspace. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// A space was deleted. +/// +[DataContract(Name = "seamModel_eventSpaceDeleted_model")] +public class EventSpaceDeleted : Event +{ +[JsonConstructorAttribute] +protected EventSpaceDeleted() { } + +public EventSpaceDeleted(List acsEntranceIds = default, string createdAt = default, List deviceIds = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string spaceId = default, string? spaceKey = default, string workspaceId = default) +{ +AcsEntranceIds = acsEntranceIds; +CreatedAt = createdAt; +DeviceIds = deviceIds; +EventDescription = eventDescription; +EventId = eventId; +EventType = eventType; +OccurredAt = occurredAt; +SpaceId = spaceId; +SpaceKey = spaceKey; +WorkspaceId = workspaceId; +} + +/// +/// IDs of all ACS entrances currently attached to the space when it was deleted. +/// +[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] +public List AcsEntranceIds { get; set; } + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// IDs of all devices attached to the space when it was deleted. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "space.deleted"; + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the affected space. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +/// +/// Unique key for the space within the workspace. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_eventUnrecognized_model")] +public class EventUnrecognized : Event +{ +[JsonConstructorAttribute] +protected EventUnrecognized() { } + +public EventUnrecognized(string eventType = default, string createdAt = default, string? eventDescription = default, string eventId = default, string occurredAt = default, string workspaceId = default) +{ +EventType = eventType; +CreatedAt = createdAt; +EventDescription = eventDescription; +EventId = eventId; +OccurredAt = occurredAt; +WorkspaceId = workspaceId; +} + +[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] +public override string EventType { get; } = "unrecognized"; + +/// +/// Date and time at which the event was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. +/// +[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] +public override string? EventDescription { get; set; } + +/// +/// ID of the event. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public override string EventId { get; set; } + +/// +/// Date and time at which the event occurred. +/// +[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] +public override string OccurredAt { get; set; } + +/// +/// ID of the workspace associated with the event. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public override string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/InstantKey.cs b/src/Seam/Model/InstantKey.cs index 030b9b52..64567ee7 100644 --- a/src/Seam/Model/InstantKey.cs +++ b/src/Seam/Model/InstantKey.cs @@ -8,170 +8,153 @@ namespace Seam.Model { - /// - /// Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. - /// - /// There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. - /// - [DataContract(Name = "seamModel_instantKey_model")] - public class InstantKey - { - [JsonConstructorAttribute] - protected InstantKey() { } - - public InstantKey( - string clientSessionId = default, - string createdAt = default, - InstantKeyCustomization? customization = default, - string? customizationProfileId = default, - string expiresAt = default, - string instantKeyId = default, - string instantKeyUrl = default, - string userIdentityId = default, - string workspaceId = default - ) - { - ClientSessionId = clientSessionId; - CreatedAt = createdAt; - Customization = customization; - CustomizationProfileId = customizationProfileId; - ExpiresAt = expiresAt; - InstantKeyId = instantKeyId; - InstantKeyUrl = instantKeyUrl; - UserIdentityId = userIdentityId; - WorkspaceId = workspaceId; - } - - /// - /// ID of the client session associated with the Instant Key. - /// - [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] - public string ClientSessionId { get; set; } - - /// - /// Date and time at which the Instant Key was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Customization applied to the Instant Key UI. - /// - [DataMember(Name = "customization", IsRequired = false, EmitDefaultValue = false)] - public InstantKeyCustomization? Customization { get; set; } - - /// - /// ID of the customization profile associated with the Instant Key. - /// - [DataMember( - Name = "customization_profile_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? CustomizationProfileId { get; set; } - - /// - /// Date and time at which the Instant Key expires. - /// - [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] - public string ExpiresAt { get; set; } - - /// - /// ID of the Instant Key. - /// - [DataMember(Name = "instant_key_id", IsRequired = false, EmitDefaultValue = false)] - public string InstantKeyId { get; set; } - - /// - /// Shareable URL for the Instant Key. Use the URL to deliver the Instant Key to your user through a link in a text message or email or by embedding it in your web app. - /// - [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] - public string InstantKeyUrl { get; set; } - - /// - /// ID of the user identity associated with the Instant Key. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - /// - /// ID of the workspace that contains the Instant Key. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_instantKeyCustomization_model")] - public class InstantKeyCustomization - { - [JsonConstructorAttribute] - protected InstantKeyCustomization() { } - - public InstantKeyCustomization( - string? logoUrl = default, - string? primaryColor = default, - string? secondaryColor = default - ) - { - LogoUrl = logoUrl; - PrimaryColor = primaryColor; - SecondaryColor = secondaryColor; - } - - /// - /// URL of the logo displayed on the Instant Key. - /// - [DataMember(Name = "logo_url", IsRequired = false, EmitDefaultValue = false)] - public string? LogoUrl { get; set; } - - /// - /// Primary color used in the Instant Key UI. - /// - [DataMember(Name = "primary_color", IsRequired = false, EmitDefaultValue = false)] - public string? PrimaryColor { get; set; } - - /// - /// Secondary color used in the Instant Key UI. - /// - [DataMember(Name = "secondary_color", IsRequired = false, EmitDefaultValue = false)] - public string? SecondaryColor { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. +/// +/// There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. +/// +[DataContract(Name = "seamModel_instantKey_model")] +public class InstantKey +{ +[JsonConstructorAttribute] +protected InstantKey() { } + +public InstantKey(string clientSessionId = default, string createdAt = default, InstantKeyCustomization? customization = default, string? customizationProfileId = default, string expiresAt = default, string instantKeyId = default, string instantKeyUrl = default, string userIdentityId = default, string workspaceId = default) +{ +ClientSessionId = clientSessionId; +CreatedAt = createdAt; +Customization = customization; +CustomizationProfileId = customizationProfileId; +ExpiresAt = expiresAt; +InstantKeyId = instantKeyId; +InstantKeyUrl = instantKeyUrl; +UserIdentityId = userIdentityId; +WorkspaceId = workspaceId; +} + +/// +/// ID of the client session associated with the Instant Key. +/// +[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] +public string ClientSessionId { get; set; } + +/// +/// Date and time at which the Instant Key was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Customization applied to the Instant Key UI. +/// +[DataMember(Name = "customization", IsRequired = false, EmitDefaultValue = false)] +public InstantKeyCustomization? Customization { get; set; } + +/// +/// ID of the customization profile associated with the Instant Key. +/// +[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] +public string? CustomizationProfileId { get; set; } + +/// +/// Date and time at which the Instant Key expires. +/// +[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] +public string ExpiresAt { get; set; } + +/// +/// ID of the Instant Key. +/// +[DataMember(Name = "instant_key_id", IsRequired = false, EmitDefaultValue = false)] +public string InstantKeyId { get; set; } + +/// +/// Shareable URL for the Instant Key. Use the URL to deliver the Instant Key to your user through a link in a text message or email or by embedding it in your web app. +/// +[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] +public string InstantKeyUrl { get; set; } + +/// +/// ID of the user identity associated with the Instant Key. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +/// +/// ID of the workspace that contains the Instant Key. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_instantKeyCustomization_model")] +public class InstantKeyCustomization +{ +[JsonConstructorAttribute] +protected InstantKeyCustomization() { } + +public InstantKeyCustomization(string? logoUrl = default, string? primaryColor = default, string? secondaryColor = default) +{ +LogoUrl = logoUrl; +PrimaryColor = primaryColor; +SecondaryColor = secondaryColor; +} + +/// +/// URL of the logo displayed on the Instant Key. +/// +[DataMember(Name = "logo_url", IsRequired = false, EmitDefaultValue = false)] +public string? LogoUrl { get; set; } + +/// +/// Primary color used in the Instant Key UI. +/// +[DataMember(Name = "primary_color", IsRequired = false, EmitDefaultValue = false)] +public string? PrimaryColor { get; set; } + +/// +/// Secondary color used in the Instant Key UI. +/// +[DataMember(Name = "secondary_color", IsRequired = false, EmitDefaultValue = false)] +public string? SecondaryColor { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/Media.cs b/src/Seam/Model/Media.cs new file mode 100644 index 00000000..a88bf683 --- /dev/null +++ b/src/Seam/Model/Media.cs @@ -0,0 +1,175 @@ +using System.Runtime.Serialization; +using System.Text; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Seam.Model; + +namespace Seam.Model +{ +/// +/// Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta. +/// +[DataContract(Name = "seamModel_media_model")] +public class Media +{ +[JsonConstructorAttribute] +protected Media() { } + +public Media(string? contentType = default, string createdAt = default, string? deviceId = default, string? eventId = default, string? expiresAt = default, string mediaId = default, Media.MediaTypeEnum mediaType = default, Media.StatusEnum status = default, string? url = default, Media.VideoCodecEnum? videoCodec = default, string workspaceId = default) +{ +ContentType = contentType; +CreatedAt = createdAt; +DeviceId = deviceId; +EventId = eventId; +ExpiresAt = expiresAt; +MediaId = mediaId; +MediaType = mediaType; +Status = status; +Url = url; +VideoCodec = videoCodec; +WorkspaceId = workspaceId; +} + +/// +/// Type of the media: a video clip or a still image. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum MediaTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "video")] +Video = 1, + +[EnumMember(Value = "image")] +Image = 2, +} + +/// +/// Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "pending")] +Pending = 1, + +[EnumMember(Value = "available")] +Available = 2, + +[EnumMember(Value = "unavailable")] +Unavailable = 3, + +[EnumMember(Value = "failed")] +Failed = 4, +} + +/// +/// Video codec used to encode the media. Only present for video media. `hevc` (H.265) playback support varies by browser and device, so check compatibility before assuming a clip plays inline. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum VideoCodecEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "h264")] +H264 = 1, + +[EnumMember(Value = "hevc")] +Hevc = 2, +} + +/// +/// MIME type of the media, such as `video/mp4` or `image/jpeg`. +/// +[DataMember(Name = "content_type", IsRequired = false, EmitDefaultValue = false)] +public string? ContentType { get; set; } + +/// +/// Date and time at which the media was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the device that captured the media. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string? DeviceId { get; set; } + +/// +/// ID of the event that the media belongs to. +/// +[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] +public string? EventId { get; set; } + +/// +/// Date and time at which the media stops being available. Null when Seam does not know when the media expires. +/// +[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] +public string? ExpiresAt { get; set; } + +/// +/// ID of the media. +/// +[DataMember(Name = "media_id", IsRequired = false, EmitDefaultValue = false)] +public string MediaId { get; set; } + +/// +/// Type of the media: a video clip or a still image. +/// +[DataMember(Name = "media_type", IsRequired = false, EmitDefaultValue = false)] +public Media.MediaTypeEnum MediaType { get; set; } + +/// +/// Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public Media.StatusEnum Status { get; set; } + +/// +/// Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL. +/// +[DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] +public string? Url { get; set; } + +/// +/// Video codec used to encode the media. Only present for video media. `hevc` (H.265) playback support varies by browser and device, so check compatibility before assuming a clip plays inline. +/// +[DataMember(Name = "video_codec", IsRequired = false, EmitDefaultValue = false)] +public Media.VideoCodecEnum? VideoCodec { get; set; } + +/// +/// ID of the workspace that contains the media. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +} diff --git a/src/Seam/Model/NoiseThreshold.cs b/src/Seam/Model/NoiseThreshold.cs index 4f00ab63..de3e3db9 100644 --- a/src/Seam/Model/NoiseThreshold.cs +++ b/src/Seam/Model/NoiseThreshold.cs @@ -8,97 +8,86 @@ namespace Seam.Model { - /// - /// Represents a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. - /// - [DataContract(Name = "seamModel_noiseThreshold_model")] - public class NoiseThreshold - { - [JsonConstructorAttribute] - protected NoiseThreshold() { } +/// +/// Represents a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. +/// +[DataContract(Name = "seamModel_noiseThreshold_model")] +public class NoiseThreshold +{ +[JsonConstructorAttribute] +protected NoiseThreshold() { } - public NoiseThreshold( - string deviceId = default, - string endsDailyAt = default, - string name = default, - float noiseThresholdDecibels = default, - string noiseThresholdId = default, - float? noiseThresholdNrs = default, - string startsDailyAt = default - ) - { - DeviceId = deviceId; - EndsDailyAt = endsDailyAt; - Name = name; - NoiseThresholdDecibels = noiseThresholdDecibels; - NoiseThresholdId = noiseThresholdId; - NoiseThresholdNrs = noiseThresholdNrs; - StartsDailyAt = startsDailyAt; - } +public NoiseThreshold(string deviceId = default, string endsDailyAt = default, string name = default, float noiseThresholdDecibels = default, string noiseThresholdId = default, float? noiseThresholdNrs = default, string startsDailyAt = default) +{ +DeviceId = deviceId; +EndsDailyAt = endsDailyAt; +Name = name; +NoiseThresholdDecibels = noiseThresholdDecibels; +NoiseThresholdId = noiseThresholdId; +NoiseThresholdNrs = noiseThresholdNrs; +StartsDailyAt = startsDailyAt; +} - /// - /// Unique identifier for the device that contains the noise threshold. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } +/// +/// Unique identifier for the device that contains the noise threshold. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } - /// - /// Time at which the noise threshold should become inactive daily. - /// - [DataMember(Name = "ends_daily_at", IsRequired = false, EmitDefaultValue = false)] - public string EndsDailyAt { get; set; } +/// +/// Time at which the noise threshold should become inactive daily. +/// +[DataMember(Name = "ends_daily_at", IsRequired = false, EmitDefaultValue = false)] +public string EndsDailyAt { get; set; } - /// - /// Name of the noise threshold. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } +/// +/// Name of the noise threshold. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string Name { get; set; } - /// - /// Noise level in decibels for the noise threshold. - /// - [DataMember( - Name = "noise_threshold_decibels", - IsRequired = false, - EmitDefaultValue = false - )] - public float NoiseThresholdDecibels { get; set; } +/// +/// Noise level in decibels for the noise threshold. +/// +[DataMember(Name = "noise_threshold_decibels", IsRequired = false, EmitDefaultValue = false)] +public float NoiseThresholdDecibels { get; set; } - /// - /// Unique identifier for the noise threshold. - /// - [DataMember(Name = "noise_threshold_id", IsRequired = false, EmitDefaultValue = false)] - public string NoiseThresholdId { get; set; } +/// +/// Unique identifier for the noise threshold. +/// +[DataMember(Name = "noise_threshold_id", IsRequired = false, EmitDefaultValue = false)] +public string NoiseThresholdId { get; set; } - /// - /// Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors). - /// - [DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] - public float? NoiseThresholdNrs { get; set; } +/// +/// Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). +/// +[DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] +public float? NoiseThresholdNrs { get; set; } - /// - /// Time at which the noise threshold should become active daily. - /// - [DataMember(Name = "starts_daily_at", IsRequired = false, EmitDefaultValue = false)] - public string StartsDailyAt { get; set; } +/// +/// Time at which the noise threshold should become active daily. +/// +[DataMember(Name = "starts_daily_at", IsRequired = false, EmitDefaultValue = false)] +public string StartsDailyAt { get; set; } - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} - return stringWriter.ToString(); - } - } } diff --git a/src/Seam/Model/Phone.cs b/src/Seam/Model/Phone.cs index 751ec03e..5e30437f 100644 --- a/src/Seam/Model/Phone.cs +++ b/src/Seam/Model/Phone.cs @@ -8,433 +8,394 @@ namespace Seam.Model { - /// - /// Represents an app user's mobile phone. - /// - [DataContract(Name = "seamModel_phone_model")] - public class Phone - { - [JsonConstructorAttribute] - protected Phone() { } - - public Phone( - string createdAt = default, - object customMetadata = default, - string deviceId = default, - Phone.DeviceTypeEnum deviceType = default, - string displayName = default, - List errors = default, - string? nickname = default, - PhoneProperties properties = default, - List warnings = default, - string workspaceId = default - ) - { - CreatedAt = createdAt; - CustomMetadata = customMetadata; - DeviceId = deviceId; - DeviceType = deviceType; - DisplayName = displayName; - Errors = errors; - Nickname = nickname; - Properties = properties; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - /// - /// Type of the phone device, such as `ios_phone` or `android_phone`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "ios_phone")] - IosPhone = 1, - - [EnumMember(Value = "android_phone")] - AndroidPhone = 2, - } - - /// - /// Date and time at which the phone was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Optional [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object CustomMetadata { get; set; } - - /// - /// ID of the phone. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Type of the phone device, such as `ios_phone` or `android_phone`. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public Phone.DeviceTypeEnum DeviceType { get; set; } - - /// - /// Display name of the phone. Defaults to `nickname` (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Errors associated with the phone. - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Optional nickname to describe the phone, settable through Seam. - /// - [DataMember(Name = "nickname", IsRequired = false, EmitDefaultValue = false)] - public string? Nickname { get; set; } - - /// - /// Properties of the phone. - /// - [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] - public PhoneProperties Properties { get; set; } - - /// - /// Warnings associated with the phone. - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the phone. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_phoneErrors_model")] - public class PhoneErrors - { - [JsonConstructorAttribute] - protected PhoneErrors() { } - - public PhoneErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_phoneProperties_model")] - public class PhoneProperties - { - [JsonConstructorAttribute] - protected PhoneProperties() { } - - public PhoneProperties( - PhonePropertiesAssaAbloyCredentialServiceMetadata? assaAbloyCredentialServiceMetadata = - default, - PhonePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = - default - ) - { - AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; - SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; - } - - /// - /// ASSA ABLOY Credential Service metadata for the phone. - /// - [DataMember( - Name = "assa_abloy_credential_service_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public PhonePropertiesAssaAbloyCredentialServiceMetadata? AssaAbloyCredentialServiceMetadata { get; set; } - - /// - /// Salto Space credential service metadata for the phone. - /// - [DataMember( - Name = "salto_space_credential_service_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public PhonePropertiesSaltoSpaceCredentialServiceMetadata? SaltoSpaceCredentialServiceMetadata { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_phonePropertiesAssaAbloyCredentialServiceMetadata_model")] - public class PhonePropertiesAssaAbloyCredentialServiceMetadata - { - [JsonConstructorAttribute] - protected PhonePropertiesAssaAbloyCredentialServiceMetadata() { } - - public PhonePropertiesAssaAbloyCredentialServiceMetadata( - List? endpoints = default, - bool? hasActiveEndpoint = default - ) - { - Endpoints = endpoints; - HasActiveEndpoint = hasActiveEndpoint; - } - - /// - /// Endpoints associated with the phone. - /// - [DataMember(Name = "endpoints", IsRequired = false, EmitDefaultValue = false)] - public List? Endpoints { get; set; } - - /// - /// Indicates whether the credential service has active endpoints associated with the phone. - /// - [DataMember(Name = "has_active_endpoint", IsRequired = false, EmitDefaultValue = false)] - public bool? HasActiveEndpoint { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_phonePropertiesAssaAbloyCredentialServiceMetadataEndpoints_model" - )] - public class PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints - { - [JsonConstructorAttribute] - protected PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints() { } - - public PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints( - string? endpointId = default, - bool? isActive = default - ) - { - EndpointId = endpointId; - IsActive = isActive; - } - - /// - /// ID of the associated endpoint. - /// - [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] - public string? EndpointId { get; set; } - - /// - /// Indicated whether the endpoint is active. - /// - [DataMember(Name = "is_active", IsRequired = false, EmitDefaultValue = false)] - public bool? IsActive { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_phonePropertiesSaltoSpaceCredentialServiceMetadata_model")] - public class PhonePropertiesSaltoSpaceCredentialServiceMetadata - { - [JsonConstructorAttribute] - protected PhonePropertiesSaltoSpaceCredentialServiceMetadata() { } - - public PhonePropertiesSaltoSpaceCredentialServiceMetadata(bool? hasActivePhone = default) - { - HasActivePhone = hasActivePhone; - } - - /// - /// Indicates whether the credential service has an active associated phone. - /// - [DataMember(Name = "has_active_phone", IsRequired = false, EmitDefaultValue = false)] - public bool? HasActivePhone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_phoneWarnings_model")] - public class PhoneWarnings - { - [JsonConstructorAttribute] - protected PhoneWarnings() { } - - public PhoneWarnings( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Unique identifier of the type of warning. - /// - [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] - public string WarningCode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an app user's mobile phone. +/// +[DataContract(Name = "seamModel_phone_model")] +public class Phone +{ +[JsonConstructorAttribute] +protected Phone() { } + +public Phone(string createdAt = default, object customMetadata = default, string deviceId = default, Phone.DeviceTypeEnum deviceType = default, string displayName = default, List errors = default, string? nickname = default, PhoneProperties properties = default, List warnings = default, string workspaceId = default) +{ +CreatedAt = createdAt; +CustomMetadata = customMetadata; +DeviceId = deviceId; +DeviceType = deviceType; +DisplayName = displayName; +Errors = errors; +Nickname = nickname; +Properties = properties; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +/// +/// Type of the phone device, such as `ios_phone` or `android_phone`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "ios_phone")] +IosPhone = 1, + +[EnumMember(Value = "android_phone")] +AndroidPhone = 2, +} + +/// +/// Date and time at which the phone was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Optional [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object CustomMetadata { get; set; } + +/// +/// ID of the phone. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Type of the phone device, such as `ios_phone` or `android_phone`. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public Phone.DeviceTypeEnum DeviceType { get; set; } + +/// +/// Display name of the phone. Defaults to `nickname` (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Errors associated with the phone. +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Optional nickname to describe the phone, settable through Seam. +/// +[DataMember(Name = "nickname", IsRequired = false, EmitDefaultValue = false)] +public string? Nickname { get; set; } + +/// +/// Properties of the phone. +/// +[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] +public PhoneProperties Properties { get; set; } + +/// +/// Warnings associated with the phone. +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the phone. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_phoneErrors_model")] +public class PhoneErrors +{ +[JsonConstructorAttribute] +protected PhoneErrors() { } + +public PhoneErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_phoneProperties_model")] +public class PhoneProperties +{ +[JsonConstructorAttribute] +protected PhoneProperties() { } + +public PhoneProperties(PhonePropertiesAssaAbloyCredentialServiceMetadata? assaAbloyCredentialServiceMetadata = default, PhonePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = default) +{ +AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; +SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; +} + +/// +/// ASSA ABLOY Credential Service metadata for the phone. +/// +[DataMember(Name = "assa_abloy_credential_service_metadata", IsRequired = false, EmitDefaultValue = false)] +public PhonePropertiesAssaAbloyCredentialServiceMetadata? AssaAbloyCredentialServiceMetadata { get; set; } + +/// +/// Salto Space credential service metadata for the phone. +/// +[DataMember(Name = "salto_space_credential_service_metadata", IsRequired = false, EmitDefaultValue = false)] +public PhonePropertiesSaltoSpaceCredentialServiceMetadata? SaltoSpaceCredentialServiceMetadata { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_phonePropertiesAssaAbloyCredentialServiceMetadata_model")] +public class PhonePropertiesAssaAbloyCredentialServiceMetadata +{ +[JsonConstructorAttribute] +protected PhonePropertiesAssaAbloyCredentialServiceMetadata() { } + +public PhonePropertiesAssaAbloyCredentialServiceMetadata(List? endpoints = default, bool? hasActiveEndpoint = default) +{ +Endpoints = endpoints; +HasActiveEndpoint = hasActiveEndpoint; +} + +/// +/// Endpoints associated with the phone. +/// +[DataMember(Name = "endpoints", IsRequired = false, EmitDefaultValue = false)] +public List? Endpoints { get; set; } + +/// +/// Indicates whether the credential service has active endpoints associated with the phone. +/// +[DataMember(Name = "has_active_endpoint", IsRequired = false, EmitDefaultValue = false)] +public bool? HasActiveEndpoint { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_phonePropertiesAssaAbloyCredentialServiceMetadataEndpoints_model")] +public class PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints +{ +[JsonConstructorAttribute] +protected PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints() { } + +public PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints(string? endpointId = default, bool? isActive = default) +{ +EndpointId = endpointId; +IsActive = isActive; +} + +/// +/// ID of the associated endpoint. +/// +[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] +public string? EndpointId { get; set; } + +/// +/// Indicated whether the endpoint is active. +/// +[DataMember(Name = "is_active", IsRequired = false, EmitDefaultValue = false)] +public bool? IsActive { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_phonePropertiesSaltoSpaceCredentialServiceMetadata_model")] +public class PhonePropertiesSaltoSpaceCredentialServiceMetadata +{ +[JsonConstructorAttribute] +protected PhonePropertiesSaltoSpaceCredentialServiceMetadata() { } + +public PhonePropertiesSaltoSpaceCredentialServiceMetadata(bool? hasActivePhone = default) +{ +HasActivePhone = hasActivePhone; +} + +/// +/// Indicates whether the credential service has an active associated phone. +/// +[DataMember(Name = "has_active_phone", IsRequired = false, EmitDefaultValue = false)] +public bool? HasActivePhone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_phoneWarnings_model")] +public class PhoneWarnings +{ +[JsonConstructorAttribute] +protected PhoneWarnings() { } + +public PhoneWarnings(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +/// +/// Unique identifier of the type of warning. +/// +[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] +public string WarningCode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/Space.cs b/src/Seam/Model/Space.cs index ef105583..4a6fd265 100644 --- a/src/Seam/Model/Space.cs +++ b/src/Seam/Model/Space.cs @@ -8,232 +8,216 @@ namespace Seam.Model { - /// - /// Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. - /// - [DataContract(Name = "seamModel_space_model")] - public class Space - { - [JsonConstructorAttribute] - protected Space() { } - - public Space( - float acsEntranceCount = default, - string createdAt = default, - SpaceCustomerData? customerData = default, - string? customerKey = default, - float deviceCount = default, - string displayName = default, - SpaceGeolocation? geolocation = default, - string name = default, - string spaceId = default, - string? spaceKey = default, - string workspaceId = default - ) - { - AcsEntranceCount = acsEntranceCount; - CreatedAt = createdAt; - CustomerData = customerData; - CustomerKey = customerKey; - DeviceCount = deviceCount; - DisplayName = displayName; - Geolocation = geolocation; - Name = name; - SpaceId = spaceId; - SpaceKey = spaceKey; - WorkspaceId = workspaceId; - } - - /// - /// Number of entrances in the space. - /// - [DataMember(Name = "acs_entrance_count", IsRequired = false, EmitDefaultValue = false)] - public float AcsEntranceCount { get; set; } - - /// - /// Date and time at which the space was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Reservation/stay-related defaults for the space. Also carries the provider/PMS-supplied name under a `<connector_type>_name` key (e.g. `guesty_name`), which Seam preserves when you rename the space (read-only — managed by Seam). - /// - [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] - public SpaceCustomerData? CustomerData { get; set; } - - /// - /// Customer key associated with the space. - /// - [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] - public string? CustomerKey { get; set; } - - /// - /// Number of devices in the space. - /// - [DataMember(Name = "device_count", IsRequired = false, EmitDefaultValue = false)] - public float DeviceCount { get; set; } - - /// - /// Display name for the space. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Geographic coordinates (latitude and longitude) of the space. - /// - [DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] - public SpaceGeolocation? Geolocation { get; set; } - - /// - /// Name of the space. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// ID of the space. - /// - [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] - public string SpaceId { get; set; } - - /// - /// Unique key for the space within the workspace. - /// - [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] - public string? SpaceKey { get; set; } - - /// - /// ID of the workspace associated with the space. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_spaceCustomerData_model")] - public class SpaceCustomerData - { - [JsonConstructorAttribute] - protected SpaceCustomerData() { } - - public SpaceCustomerData( - string? address = default, - string? defaultCheckinTime = default, - string? defaultCheckoutTime = default, - string? timeZone = default - ) - { - Address = address; - DefaultCheckinTime = defaultCheckinTime; - DefaultCheckoutTime = defaultCheckoutTime; - TimeZone = timeZone; - } - - /// - /// Postal address for the space. - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public string? Address { get; set; } - - /// - /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] - public string? DefaultCheckinTime { get; set; } - - /// - /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. - /// - [DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] - public string? DefaultCheckoutTime { get; set; } - - /// - /// IANA time zone for the space, e.g. America/Los_Angeles. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_spaceGeolocation_model")] - public class SpaceGeolocation - { - [JsonConstructorAttribute] - protected SpaceGeolocation() { } - - public SpaceGeolocation(float latitude = default, float longitude = default) - { - Latitude = latitude; - Longitude = longitude; - } - - /// - /// Latitude of the space, in decimal degrees. - /// - [DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] - public float Latitude { get; set; } - - /// - /// Longitude of the space, in decimal degrees. - /// - [DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] - public float Longitude { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. +/// +[DataContract(Name = "seamModel_space_model")] +public class Space +{ +[JsonConstructorAttribute] +protected Space() { } + +public Space(float acsEntranceCount = default, string createdAt = default, SpaceCustomerData? customerData = default, string? customerKey = default, float deviceCount = default, string displayName = default, SpaceGeolocation? geolocation = default, string name = default, string spaceId = default, string? spaceKey = default, string workspaceId = default) +{ +AcsEntranceCount = acsEntranceCount; +CreatedAt = createdAt; +CustomerData = customerData; +CustomerKey = customerKey; +DeviceCount = deviceCount; +DisplayName = displayName; +Geolocation = geolocation; +Name = name; +SpaceId = spaceId; +SpaceKey = spaceKey; +WorkspaceId = workspaceId; +} + +/// +/// Number of entrances in the space. +/// +[DataMember(Name = "acs_entrance_count", IsRequired = false, EmitDefaultValue = false)] +public float AcsEntranceCount { get; set; } + +/// +/// Date and time at which the space was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Reservation/stay-related defaults for the space. Also carries the provider/PMS-supplied name under a `<connector_type>_name` key (e.g. `guesty_name`), which Seam preserves when you rename the space (read-only — managed by Seam). +/// +[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] +public SpaceCustomerData? CustomerData { get; set; } + +/// +/// Customer key associated with the space. +/// +[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] +public string? CustomerKey { get; set; } + +/// +/// Number of devices in the space. +/// +[DataMember(Name = "device_count", IsRequired = false, EmitDefaultValue = false)] +public float DeviceCount { get; set; } + +/// +/// Display name for the space. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Geographic coordinates (latitude and longitude) of the space. +/// +[DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] +public SpaceGeolocation? Geolocation { get; set; } + +/// +/// Name of the space. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// ID of the space. +/// +[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] +public string SpaceId { get; set; } + +/// +/// Unique key for the space within the workspace. +/// +[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] +public string? SpaceKey { get; set; } + +/// +/// ID of the workspace associated with the space. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_spaceCustomerData_model")] +public class SpaceCustomerData +{ +[JsonConstructorAttribute] +protected SpaceCustomerData() { } + +public SpaceCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) +{ +Address = address; +DefaultCheckinTime = defaultCheckinTime; +DefaultCheckoutTime = defaultCheckoutTime; +TimeZone = timeZone; +} + +/// +/// Postal address for the space. +/// +[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] +public string? Address { get; set; } + +/// +/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckinTime { get; set; } + +/// +/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. +/// +[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] +public string? DefaultCheckoutTime { get; set; } + +/// +/// IANA time zone for the space, e.g. America/Los_Angeles. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_spaceGeolocation_model")] +public class SpaceGeolocation +{ +[JsonConstructorAttribute] +protected SpaceGeolocation() { } + +public SpaceGeolocation(float latitude = default, float longitude = default) +{ +Latitude = latitude; +Longitude = longitude; +} + +/// +/// Latitude of the space, in decimal degrees. +/// +[DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] +public float Latitude { get; set; } + +/// +/// Longitude of the space, in decimal degrees. +/// +[DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] +public float Longitude { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/ThermostatDailyProgram.cs b/src/Seam/Model/ThermostatDailyProgram.cs index 3430f044..98ad3d6c 100644 --- a/src/Seam/Model/ThermostatDailyProgram.cs +++ b/src/Seam/Model/ThermostatDailyProgram.cs @@ -8,136 +8,123 @@ namespace Seam.Model { - /// - /// Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. - /// - [DataContract(Name = "seamModel_thermostatDailyProgram_model")] - public class ThermostatDailyProgram - { - [JsonConstructorAttribute] - protected ThermostatDailyProgram() { } - - public ThermostatDailyProgram( - string createdAt = default, - string deviceId = default, - string? name = default, - List periods = default, - string thermostatDailyProgramId = default, - string workspaceId = default - ) - { - CreatedAt = createdAt; - DeviceId = deviceId; - Name = name; - Periods = periods; - ThermostatDailyProgramId = thermostatDailyProgramId; - WorkspaceId = workspaceId; - } - - /// - /// Date and time at which the thermostat daily program was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the thermostat device on which the thermostat daily program is configured. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// User-friendly name to identify the thermostat daily program. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Array of thermostat daily program periods. - /// - [DataMember(Name = "periods", IsRequired = false, EmitDefaultValue = false)] - public List Periods { get; set; } - - /// - /// ID of the thermostat daily program. - /// - [DataMember( - Name = "thermostat_daily_program_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string ThermostatDailyProgramId { get; set; } - - /// - /// ID of the workspace that contains the thermostat daily program. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_thermostatDailyProgramPeriods_model")] - public class ThermostatDailyProgramPeriods - { - [JsonConstructorAttribute] - protected ThermostatDailyProgramPeriods() { } - - public ThermostatDailyProgramPeriods( - string climatePresetKey = default, - string startsAtTime = default - ) - { - ClimatePresetKey = climatePresetKey; - StartsAtTime = startsAtTime; - } - - /// - /// Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] - public string StartsAtTime { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. +/// +[DataContract(Name = "seamModel_thermostatDailyProgram_model")] +public class ThermostatDailyProgram +{ +[JsonConstructorAttribute] +protected ThermostatDailyProgram() { } + +public ThermostatDailyProgram(string createdAt = default, string deviceId = default, string? name = default, List periods = default, string thermostatDailyProgramId = default, string workspaceId = default) +{ +CreatedAt = createdAt; +DeviceId = deviceId; +Name = name; +Periods = periods; +ThermostatDailyProgramId = thermostatDailyProgramId; +WorkspaceId = workspaceId; +} + +/// +/// Date and time at which the thermostat daily program was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the thermostat device on which the thermostat daily program is configured. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// User-friendly name to identify the thermostat daily program. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Array of thermostat daily program periods. +/// +[DataMember(Name = "periods", IsRequired = false, EmitDefaultValue = false)] +public List Periods { get; set; } + +/// +/// ID of the thermostat daily program. +/// +[DataMember(Name = "thermostat_daily_program_id", IsRequired = false, EmitDefaultValue = false)] +public string ThermostatDailyProgramId { get; set; } + +/// +/// ID of the workspace that contains the thermostat daily program. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_thermostatDailyProgramPeriods_model")] +public class ThermostatDailyProgramPeriods +{ +[JsonConstructorAttribute] +protected ThermostatDailyProgramPeriods() { } + +public ThermostatDailyProgramPeriods(string climatePresetKey = default, string startsAtTime = default) +{ +ClimatePresetKey = climatePresetKey; +StartsAtTime = startsAtTime; +} + +/// +/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] +public string StartsAtTime { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/ThermostatSchedule.cs b/src/Seam/Model/ThermostatSchedule.cs index 71eba887..f9340bf5 100644 --- a/src/Seam/Model/ThermostatSchedule.cs +++ b/src/Seam/Model/ThermostatSchedule.cs @@ -8,184 +8,165 @@ namespace Seam.Model { - /// - /// Represents a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://docs.seam.co/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. - /// - [DataContract(Name = "seamModel_thermostatSchedule_model")] - public class ThermostatSchedule - { - [JsonConstructorAttribute] - protected ThermostatSchedule() { } - - public ThermostatSchedule( - string climatePresetKey = default, - string createdAt = default, - string deviceId = default, - string endsAt = default, - List errors = default, - bool? isOverrideAllowed = default, - int? maxOverridePeriodMinutes = default, - string? name = default, - string startsAt = default, - string thermostatScheduleId = default, - string workspaceId = default - ) - { - ClimatePresetKey = climatePresetKey; - CreatedAt = createdAt; - DeviceId = deviceId; - EndsAt = endsAt; - Errors = errors; - IsOverrideAllowed = isOverrideAllowed; - MaxOverridePeriodMinutes = maxOverridePeriodMinutes; - Name = name; - StartsAt = startsAt; - ThermostatScheduleId = thermostatScheduleId; - WorkspaceId = workspaceId; - } - - /// - /// Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] - public string ClimatePresetKey { get; set; } - - /// - /// Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// ID of the desired [thermostat](https://docs.seam.co/capability-guides/thermostats) device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string EndsAt { get; set; } - - /// - /// Errors associated with the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. - /// - [DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOverrideAllowed { get; set; } - - /// - /// Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). - /// - [DataMember( - Name = "max_override_period_minutes", - IsRequired = false, - EmitDefaultValue = false - )] - public int? MaxOverridePeriodMinutes { get; set; } - - /// - /// User-friendly name to identify the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string StartsAt { get; set; } - - /// - /// ID of the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). - /// - [DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] - public string ThermostatScheduleId { get; set; } - - /// - /// ID of the workspace that contains the thermostat schedule. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_thermostatScheduleErrors_model")] - public class ThermostatScheduleErrors - { - [JsonConstructorAttribute] - protected ThermostatScheduleErrors() { } - - public ThermostatScheduleErrors( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. +/// +[DataContract(Name = "seamModel_thermostatSchedule_model")] +public class ThermostatSchedule +{ +[JsonConstructorAttribute] +protected ThermostatSchedule() { } + +public ThermostatSchedule(string climatePresetKey = default, string createdAt = default, string deviceId = default, string endsAt = default, List errors = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default, string thermostatScheduleId = default, string workspaceId = default) +{ +ClimatePresetKey = climatePresetKey; +CreatedAt = createdAt; +DeviceId = deviceId; +EndsAt = endsAt; +Errors = errors; +IsOverrideAllowed = isOverrideAllowed; +MaxOverridePeriodMinutes = maxOverridePeriodMinutes; +Name = name; +StartsAt = startsAt; +ThermostatScheduleId = thermostatScheduleId; +WorkspaceId = workspaceId; +} + +/// +/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] +public string ClimatePresetKey { get; set; } + +/// +/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// ID of the desired [thermostat](https://www.seam.co/docs/capability-guides/thermostats) device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string EndsAt { get; set; } + +/// +/// Errors associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. +/// +[DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOverrideAllowed { get; set; } + +/// +/// Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). +/// +[DataMember(Name = "max_override_period_minutes", IsRequired = false, EmitDefaultValue = false)] +public int? MaxOverridePeriodMinutes { get; set; } + +/// +/// User-friendly name to identify the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string StartsAt { get; set; } + +/// +/// ID of the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). +/// +[DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] +public string ThermostatScheduleId { get; set; } + +/// +/// ID of the workspace that contains the thermostat schedule. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_thermostatScheduleErrors_model")] +public class ThermostatScheduleErrors +{ +[JsonConstructorAttribute] +protected ThermostatScheduleErrors() { } + +public ThermostatScheduleErrors(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/UnmanagedAccessCode.cs b/src/Seam/Model/UnmanagedAccessCode.cs index df27c4d2..181dfd0f 100644 --- a/src/Seam/Model/UnmanagedAccessCode.cs +++ b/src/Seam/Model/UnmanagedAccessCode.cs @@ -8,3042 +8,2597 @@ namespace Seam.Model { - /// - /// Represents an [unmanaged smart lock access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). - /// - /// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. - /// - /// When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. - /// - /// Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. - /// - /// Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: - /// - /// - [Kwikset](https://docs.seam.co/device-and-system-integration-guides/kwikset-locks) - /// - [DataContract(Name = "seamModel_unmanagedAccessCode_model")] - public class UnmanagedAccessCode - { - [JsonConstructorAttribute] - protected UnmanagedAccessCode() { } - - public UnmanagedAccessCode( - string accessCodeId = default, - bool? cannotBeManaged = default, - bool? cannotDeleteUnmanagedAccessCode = default, - string? code = default, - string createdAt = default, - string deviceId = default, - UnmanagedAccessCodeDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, - string? endsAt = default, - List errors = default, - bool isManaged = default, - string? name = default, - string? startsAt = default, - UnmanagedAccessCode.StatusEnum status = default, - UnmanagedAccessCode.TypeEnum type = default, - List warnings = default, - string workspaceId = default - ) - { - AccessCodeId = accessCodeId; - CannotBeManaged = cannotBeManaged; - CannotDeleteUnmanagedAccessCode = cannotDeleteUnmanagedAccessCode; - Code = code; - CreatedAt = createdAt; - DeviceId = deviceId; - DormakabaOracodeMetadata = dormakabaOracodeMetadata; - EndsAt = endsAt; - Errors = errors; - IsManaged = isManaged; - Name = name; - StartsAt = startsAt; - Status = status; - Type = type; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessCodeErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsBridgeDisconnected), - "bridge_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsSubscriptionRequired), - "subscription_required" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsAuxiliaryHeatRunning), - "auxiliary_heat_running" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsMissingDeviceCredentials), - "missing_device_credentials" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsAugustLockNotAuthorized), - "august_lock_not_authorized" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool), - "empty_backup_access_code_pool" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsDeviceDisconnected), - "device_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsHubDisconnected), - "hub_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsDeviceRemoved), - "device_removed" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsDeviceOffline), - "device_offline" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsDormakabaSitesDisconnected), - "dormakaba_sites_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsInsufficientPermissions), - "insufficient_permissions" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded), - "salto_ks_subscription_limit_exceeded" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsAccountDisconnected), - "account_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsFailedToExpire), - "failed_to_expire" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsFailedToUpdate), - "failed_to_update" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsFailedToIssue), - "failed_to_issue" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsCodeConstraintsViolated), - "code_constraints_violated" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsAccessCodeInactive), - "access_code_inactive" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsConflictingExternalModification), - "conflicting_external_modification" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice), - "no_space_for_access_code_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsDuplicateCodeOnDevice), - "duplicate_code_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsFailedToRemoveFromDevice), - "failed_to_remove_from_device" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsFailedToSetOnDevice), - "failed_to_set_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeErrorsProviderIssue), - "provider_issue" - )] - public abstract class UnmanagedAccessCodeErrors - { - public abstract string ErrorCode { get; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsProviderIssue_model")] - public class UnmanagedAccessCodeErrorsProviderIssue : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsProviderIssue() { } - - public UnmanagedAccessCodeErrorsProviderIssue( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "provider_issue"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToSetOnDevice_model")] - public class UnmanagedAccessCodeErrorsFailedToSetOnDevice : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsFailedToSetOnDevice() { } - - public UnmanagedAccessCodeErrorsFailedToSetOnDevice( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_set_on_device"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToRemoveFromDevice_model")] - public class UnmanagedAccessCodeErrorsFailedToRemoveFromDevice : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsFailedToRemoveFromDevice() { } - - public UnmanagedAccessCodeErrorsFailedToRemoveFromDevice( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_remove_from_device"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDuplicateCodeOnDevice_model")] - public class UnmanagedAccessCodeErrorsDuplicateCodeOnDevice : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsDuplicateCodeOnDevice() { } - - public UnmanagedAccessCodeErrorsDuplicateCodeOnDevice( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string? managedAccessCodeId = default, - string message = default, - string? unmanagedAccessCodeId = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - ManagedAccessCodeId = managedAccessCodeId; - Message = message; - UnmanagedAccessCodeId = unmanagedAccessCodeId; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "duplicate_code_on_device"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// ID of the managed access code that conflicts with this managed access code, when Seam can identify it. - /// - [DataMember( - Name = "managed_access_code_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? ManagedAccessCodeId { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. - /// - [DataMember( - Name = "unmanaged_access_code_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? UnmanagedAccessCodeId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice_model" - )] - public class UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice - : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice() { } - - public UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "no_space_for_access_code_on_device"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeErrorsConflictingExternalModification_model" - )] - public class UnmanagedAccessCodeErrorsConflictingExternalModification - : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsConflictingExternalModification() { } - - public UnmanagedAccessCodeErrorsConflictingExternalModification( - UnmanagedAccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? changeType = - default, - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default, - List? modifiedFields = - default - ) - { - ChangeType = changeType; - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - ModifiedFields = modifiedFields; - } - - /// - /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ChangeTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "modified")] - Modified = 1, - - [EnumMember(Value = "removed")] - Removed = 2, - } - - /// - /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - /// - [DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? ChangeType { get; set; } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "conflicting_external_modification"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// List of fields that were changed externally, with their previous and new values. - /// - [DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] - public List? ModifiedFields { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields_model" - )] - public class UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields() { } - - public UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields( - string field = default, - string? from = default, - string? to = default - ) - { - Field = field; - From = from; - To = to; - } - - /// - /// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). - /// - [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The previous value of the field. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public string? From { get; set; } - - /// - /// The new value of the field. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public string? To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAccessCodeInactive_model")] - public class UnmanagedAccessCodeErrorsAccessCodeInactive : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsAccessCodeInactive() { } - - public UnmanagedAccessCodeErrorsAccessCodeInactive( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "access_code_inactive"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsCodeConstraintsViolated_model")] - public class UnmanagedAccessCodeErrorsCodeConstraintsViolated : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsCodeConstraintsViolated() { } - - public UnmanagedAccessCodeErrorsCodeConstraintsViolated( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "code_constraints_violated"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToIssue_model")] - public class UnmanagedAccessCodeErrorsFailedToIssue : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsFailedToIssue() { } - - public UnmanagedAccessCodeErrorsFailedToIssue( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_issue"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToUpdate_model")] - public class UnmanagedAccessCodeErrorsFailedToUpdate : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsFailedToUpdate() { } - - public UnmanagedAccessCodeErrorsFailedToUpdate( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_update"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToExpire_model")] - public class UnmanagedAccessCodeErrorsFailedToExpire : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsFailedToExpire() { } - - public UnmanagedAccessCodeErrorsFailedToExpire( - string? createdAt = default, - string errorCode = default, - bool isAccessCodeError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsAccessCodeError = isAccessCodeError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string? CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_expire"; - - /// - /// Indicates that this is an access code error. - /// - [DataMember( - Name = "is_access_code_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsAccessCodeError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAccountDisconnected_model")] - public class UnmanagedAccessCodeErrorsAccountDisconnected : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsAccountDisconnected() { } - - public UnmanagedAccessCodeErrorsAccountDisconnected( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "account_disconnected"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded_model" - )] - public class UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded - : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded() { } - - public UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsInsufficientPermissions_model")] - public class UnmanagedAccessCodeErrorsInsufficientPermissions : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsInsufficientPermissions() { } - - public UnmanagedAccessCodeErrorsInsufficientPermissions( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "insufficient_permissions"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDormakabaSitesDisconnected_model")] - public class UnmanagedAccessCodeErrorsDormakabaSitesDisconnected : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsDormakabaSitesDisconnected() { } - - public UnmanagedAccessCodeErrorsDormakabaSitesDisconnected( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceOffline_model")] - public class UnmanagedAccessCodeErrorsDeviceOffline : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsDeviceOffline() { } - - public UnmanagedAccessCodeErrorsDeviceOffline( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_offline"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceRemoved_model")] - public class UnmanagedAccessCodeErrorsDeviceRemoved : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsDeviceRemoved() { } - - public UnmanagedAccessCodeErrorsDeviceRemoved( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_removed"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsHubDisconnected_model")] - public class UnmanagedAccessCodeErrorsHubDisconnected : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsHubDisconnected() { } - - public UnmanagedAccessCodeErrorsHubDisconnected( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "hub_disconnected"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceDisconnected_model")] - public class UnmanagedAccessCodeErrorsDeviceDisconnected : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsDeviceDisconnected() { } - - public UnmanagedAccessCodeErrorsDeviceDisconnected( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_disconnected"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsEmptyBackupAccessCodePool_model")] - public class UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool() { } - - public UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "empty_backup_access_code_pool"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAugustLockNotAuthorized_model")] - public class UnmanagedAccessCodeErrorsAugustLockNotAuthorized : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsAugustLockNotAuthorized() { } - - public UnmanagedAccessCodeErrorsAugustLockNotAuthorized( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "august_lock_not_authorized"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsMissingDeviceCredentials_model")] - public class UnmanagedAccessCodeErrorsMissingDeviceCredentials : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsMissingDeviceCredentials() { } - - public UnmanagedAccessCodeErrorsMissingDeviceCredentials( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "missing_device_credentials"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAuxiliaryHeatRunning_model")] - public class UnmanagedAccessCodeErrorsAuxiliaryHeatRunning : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsAuxiliaryHeatRunning() { } - - public UnmanagedAccessCodeErrorsAuxiliaryHeatRunning( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "auxiliary_heat_running"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsSubscriptionRequired_model")] - public class UnmanagedAccessCodeErrorsSubscriptionRequired : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsSubscriptionRequired() { } - - public UnmanagedAccessCodeErrorsSubscriptionRequired( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "subscription_required"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsBridgeDisconnected_model")] - public class UnmanagedAccessCodeErrorsBridgeDisconnected : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsBridgeDisconnected() { } - - public UnmanagedAccessCodeErrorsBridgeDisconnected( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "bridge_disconnected"; - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsUnrecognized_model")] - public class UnmanagedAccessCodeErrorsUnrecognized : UnmanagedAccessCodeErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeErrorsUnrecognized() { } - - public UnmanagedAccessCodeErrorsUnrecognized( - string errorCode = default, - string message = default - ) - { - ErrorCode = errorCode; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "set")] - Set = 1, - - [EnumMember(Value = "unset")] - Unset = 2, - } - - /// - /// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum TypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "time_bound")] - TimeBound = 1, - - [EnumMember(Value = "ongoing")] - Ongoing = 2, - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessCodeWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode), - "unknown_issue_with_access_code" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsBeingDeleted), - "being_deleted" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsUsingBackupAccessCode), - "using_backup_access_code" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsManagementTransferred), - "management_transferred" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours), - "igloo_algopin_must_be_used_within_24_hours" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected), - "third_party_integration_detected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsDelayInIssuing), - "delay_in_issuing" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsDelayInRemovingFromDevice), - "delay_in_removing_from_device" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsDelayInSettingOnDevice), - "delay_in_setting_on_device" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsExternalModificationInEffect), - "external_modification_in_effect" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone), - "time_frame_adjusted_for_unknown_time_zone" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessCodeWarningsCodeRotatesPeriodically), - "code_rotates_periodically" - )] - public abstract class UnmanagedAccessCodeWarnings - { - public abstract string WarningCode { get; } - - public abstract string? CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsCodeRotatesPeriodically_model")] - public class UnmanagedAccessCodeWarningsCodeRotatesPeriodically - : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsCodeRotatesPeriodically() { } - - public UnmanagedAccessCodeWarningsCodeRotatesPeriodically( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "code_rotates_periodically"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone_model" - )] - public class UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone - : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone() { } - - public UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "time_frame_adjusted_for_unknown_time_zone"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeWarningsExternalModificationInEffect_model" - )] - public class UnmanagedAccessCodeWarningsExternalModificationInEffect - : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsExternalModificationInEffect() { } - - public UnmanagedAccessCodeWarningsExternalModificationInEffect( - UnmanagedAccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? changeType = - default, - string? createdAt = default, - string message = default, - List? modifiedFields = - default, - string warningCode = default - ) - { - ChangeType = changeType; - CreatedAt = createdAt; - Message = message; - ModifiedFields = modifiedFields; - WarningCode = warningCode; - } - - /// - /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ChangeTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "modified")] - Modified = 1, - - [EnumMember(Value = "removed")] - Removed = 2, - } - - /// - /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. - /// - [DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? ChangeType { get; set; } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// List of fields that were changed externally, with their previous and new values. - /// - [DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] - public List? ModifiedFields { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "external_modification_in_effect"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields_model" - )] - public class UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields() { } - - public UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields( - string field = default, - string? from = default, - string? to = default - ) - { - Field = field; - From = from; - To = to; - } - - /// - /// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). - /// - [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The previous value of the field. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public string? From { get; set; } - - /// - /// The new value of the field. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public string? To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInSettingOnDevice_model")] - public class UnmanagedAccessCodeWarningsDelayInSettingOnDevice : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsDelayInSettingOnDevice() { } - - public UnmanagedAccessCodeWarningsDelayInSettingOnDevice( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "delay_in_setting_on_device"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeWarningsDelayInRemovingFromDevice_model" - )] - public class UnmanagedAccessCodeWarningsDelayInRemovingFromDevice - : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsDelayInRemovingFromDevice() { } - - public UnmanagedAccessCodeWarningsDelayInRemovingFromDevice( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "delay_in_removing_from_device"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInIssuing_model")] - public class UnmanagedAccessCodeWarningsDelayInIssuing : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsDelayInIssuing() { } - - public UnmanagedAccessCodeWarningsDelayInIssuing( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "delay_in_issuing"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeWarningsThirdPartyIntegrationDetected_model" - )] - public class UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected - : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected() { } - - public UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "third_party_integration_detected"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours_model" - )] - public class UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours - : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours() { } - - public UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "igloo_algopin_must_be_used_within_24_hours"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsManagementTransferred_model")] - public class UnmanagedAccessCodeWarningsManagementTransferred : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsManagementTransferred() { } - - public UnmanagedAccessCodeWarningsManagementTransferred( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "management_transferred"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUsingBackupAccessCode_model")] - public class UnmanagedAccessCodeWarningsUsingBackupAccessCode : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsUsingBackupAccessCode() { } - - public UnmanagedAccessCodeWarningsUsingBackupAccessCode( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "using_backup_access_code"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsBeingDeleted_model")] - public class UnmanagedAccessCodeWarningsBeingDeleted : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsBeingDeleted() { } - - public UnmanagedAccessCodeWarningsBeingDeleted( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessCodeWarningsUnknownIssueWithAccessCode_model" - )] - public class UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode - : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode() { } - - public UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode( - string? createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unknown_issue_with_access_code"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUnrecognized_model")] - public class UnmanagedAccessCodeWarningsUnrecognized : UnmanagedAccessCodeWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeWarningsUnrecognized() { } - - public UnmanagedAccessCodeWarningsUnrecognized( - string warningCode = default, - string? createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string? CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Unique identifier for the access code. - /// - [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessCodeId { get; set; } - - /// - /// Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations. - /// - [DataMember(Name = "cannot_be_managed", IsRequired = false, EmitDefaultValue = false)] - public bool? CannotBeManaged { get; set; } - - /// - /// Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app. - /// - [DataMember( - Name = "cannot_delete_unmanaged_access_code", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CannotDeleteUnmanagedAccessCode { get; set; } - - /// - /// Code used for access. Typically, a numeric or alphanumeric string. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Date and time at which the access code was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Unique identifier for the device associated with the access code. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices. - /// - [DataMember( - Name = "dormakaba_oracode_metadata", - IsRequired = false, - EmitDefaultValue = false - )] - public UnmanagedAccessCodeDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } - - /// - /// Date and time after which the time-bound access code becomes inactive. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Indicates that Seam does not manage the access code. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// Date and time at which the time-bound access code becomes active. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - /// - /// Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessCode.StatusEnum Status { get; set; } - - /// - /// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. - /// - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessCode.TypeEnum Type { get; set; } - - /// - /// Warnings associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// Unique identifier for the Seam workspace associated with the access code. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessCodeDormakabaOracodeMetadata_model")] - public class UnmanagedAccessCodeDormakabaOracodeMetadata - { - [JsonConstructorAttribute] - protected UnmanagedAccessCodeDormakabaOracodeMetadata() { } - - public UnmanagedAccessCodeDormakabaOracodeMetadata( - bool? isCancellable = default, - bool? isEarlyCheckinAble = default, - bool? isExtendable = default, - bool? isOverridable = default, - string? siteName = default, - float? stayId = default, - string? userLevelId = default, - string? userLevelName = default - ) - { - IsCancellable = isCancellable; - IsEarlyCheckinAble = isEarlyCheckinAble; - IsExtendable = isExtendable; - IsOverridable = isOverridable; - SiteName = siteName; - StayId = stayId; - UserLevelId = userLevelId; - UserLevelName = userLevelName; - } - - /// - /// Indicates whether the stay can be cancelled via the Dormakaba Oracode API. - /// - [DataMember(Name = "is_cancellable", IsRequired = false, EmitDefaultValue = false)] - public bool? IsCancellable { get; set; } - - /// - /// Indicates whether early check-in is available for this stay. - /// - [DataMember(Name = "is_early_checkin_able", IsRequired = false, EmitDefaultValue = false)] - public bool? IsEarlyCheckinAble { get; set; } - - /// - /// Indicates whether the stay can be extended via the Dormakaba Oracode API. - /// - [DataMember(Name = "is_extendable", IsRequired = false, EmitDefaultValue = false)] - public bool? IsExtendable { get; set; } - - /// - /// Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. - /// - [DataMember(Name = "is_overridable", IsRequired = false, EmitDefaultValue = false)] - public bool? IsOverridable { get; set; } - - /// - /// Dormakaba Oracode site name associated with this access code. - /// - [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] - public string? SiteName { get; set; } - - /// - /// Dormakaba Oracode stay ID associated with this access code. - /// - [DataMember(Name = "stay_id", IsRequired = false, EmitDefaultValue = false)] - public float? StayId { get; set; } - - /// - /// Dormakaba Oracode user level ID associated with this access code. - /// - [DataMember(Name = "user_level_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserLevelId { get; set; } - - /// - /// Dormakaba Oracode user level name associated with this access code. - /// - [DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] - public string? UserLevelName { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an [unmanaged smart lock access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). +/// +/// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. +/// +/// When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. +/// +/// Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. +/// +/// Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: +/// +/// - [Kwikset](https://www.seam.co/docs/device-and-system-integration-guides/kwikset-locks) +/// +[DataContract(Name = "seamModel_unmanagedAccessCode_model")] +public class UnmanagedAccessCode +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCode() { } + +public UnmanagedAccessCode(string accessCodeId = default, bool? cannotBeManaged = default, bool? cannotDeleteUnmanagedAccessCode = default, string? code = default, string createdAt = default, string deviceId = default, string displayStatus = default, UnmanagedAccessCodeDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, string? endsAt = default, List errors = default, bool isManaged = default, string? name = default, string? startsAt = default, UnmanagedAccessCode.StatusEnum status = default, UnmanagedAccessCode.TypeEnum type = default, List warnings = default, string workspaceId = default) +{ +AccessCodeId = accessCodeId; +CannotBeManaged = cannotBeManaged; +CannotDeleteUnmanagedAccessCode = cannotDeleteUnmanagedAccessCode; +Code = code; +CreatedAt = createdAt; +DeviceId = deviceId; +DisplayStatus = displayStatus; +DormakabaOracodeMetadata = dormakabaOracodeMetadata; +EndsAt = endsAt; +Errors = errors; +IsManaged = isManaged; +Name = name; +StartsAt = startsAt; +Status = status; +Type = type; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessCodeErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsBridgeDisconnected), "bridge_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsSubscriptionRequired), "subscription_required")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsAuxiliaryHeatRunning), "auxiliary_heat_running")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsMissingDeviceCredentials), "missing_device_credentials")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsAugustLockNotAuthorized), "august_lock_not_authorized")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool), "empty_backup_access_code_pool")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDeviceDisconnected), "device_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsHubDisconnected), "hub_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDeviceRemoved), "device_removed")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDeviceOffline), "device_offline")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsInsufficientPermissions), "insufficient_permissions")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsAccountDisconnected), "account_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToDelete), "failed_to_delete")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToUpdate), "failed_to_update")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToIssue), "failed_to_issue")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsCodeConstraintsViolated), "code_constraints_violated")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsAccessCodeInactive), "access_code_inactive")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsConflictingExternalModification), "conflicting_external_modification")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice), "no_space_for_access_code_on_device")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDuplicateCodeOnDevice), "duplicate_code_on_device")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToRemoveFromDevice), "failed_to_remove_from_device")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToSetOnDevice), "failed_to_set_on_device")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsProviderIssue), "provider_issue")] +public abstract class UnmanagedAccessCodeErrors +{ +public abstract string ErrorCode { get; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsProviderIssue_model")] +public class UnmanagedAccessCodeErrorsProviderIssue : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsProviderIssue() { } + +public UnmanagedAccessCodeErrorsProviderIssue(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "provider_issue"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToSetOnDevice_model")] +public class UnmanagedAccessCodeErrorsFailedToSetOnDevice : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsFailedToSetOnDevice() { } + +public UnmanagedAccessCodeErrorsFailedToSetOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_set_on_device"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToRemoveFromDevice_model")] +public class UnmanagedAccessCodeErrorsFailedToRemoveFromDevice : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsFailedToRemoveFromDevice() { } + +public UnmanagedAccessCodeErrorsFailedToRemoveFromDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_remove_from_device"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDuplicateCodeOnDevice_model")] +public class UnmanagedAccessCodeErrorsDuplicateCodeOnDevice : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsDuplicateCodeOnDevice() { } + +public UnmanagedAccessCodeErrorsDuplicateCodeOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string? managedAccessCodeId = default, string message = default, string? unmanagedAccessCodeId = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +ManagedAccessCodeId = managedAccessCodeId; +Message = message; +UnmanagedAccessCodeId = unmanagedAccessCodeId; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "duplicate_code_on_device"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// ID of the managed access code that conflicts with this managed access code, when Seam can identify it. +/// +[DataMember(Name = "managed_access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? ManagedAccessCodeId { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. +/// +[DataMember(Name = "unmanaged_access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string? UnmanagedAccessCodeId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice_model")] +public class UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice() { } + +public UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "no_space_for_access_code_on_device"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsConflictingExternalModification_model")] +public class UnmanagedAccessCodeErrorsConflictingExternalModification : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsConflictingExternalModification() { } + +public UnmanagedAccessCodeErrorsConflictingExternalModification(UnmanagedAccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? changeType = default, string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default, List? modifiedFields = default) +{ +ChangeType = changeType; +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +ModifiedFields = modifiedFields; +} + +/// +/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ChangeTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "modified")] +Modified = 1, + +[EnumMember(Value = "removed")] +Removed = 2, +} + +/// +/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. +/// +[DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? ChangeType { get; set; } + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "conflicting_external_modification"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// List of fields that were changed externally, with their previous and new values. +/// +[DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] +public List? ModifiedFields { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields_model")] +public class UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields() { } + +public UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields(string field = default, string? from = default, string? to = default) +{ +Field = field; +From = from; +To = to; +} + +/// +/// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). +/// +[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] +public string Field { get; set; } + +/// +/// The previous value of the field. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public string? From { get; set; } + +/// +/// The new value of the field. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public string? To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAccessCodeInactive_model")] +public class UnmanagedAccessCodeErrorsAccessCodeInactive : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsAccessCodeInactive() { } + +public UnmanagedAccessCodeErrorsAccessCodeInactive(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "access_code_inactive"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsCodeConstraintsViolated_model")] +public class UnmanagedAccessCodeErrorsCodeConstraintsViolated : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsCodeConstraintsViolated() { } + +public UnmanagedAccessCodeErrorsCodeConstraintsViolated(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "code_constraints_violated"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToIssue_model")] +public class UnmanagedAccessCodeErrorsFailedToIssue : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsFailedToIssue() { } + +public UnmanagedAccessCodeErrorsFailedToIssue(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_issue"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToUpdate_model")] +public class UnmanagedAccessCodeErrorsFailedToUpdate : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsFailedToUpdate() { } + +public UnmanagedAccessCodeErrorsFailedToUpdate(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_update"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToDelete_model")] +public class UnmanagedAccessCodeErrorsFailedToDelete : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsFailedToDelete() { } + +public UnmanagedAccessCodeErrorsFailedToDelete(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsAccessCodeError = isAccessCodeError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string? CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_delete"; + +/// +/// Indicates that this is an access code error. +/// +[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsAccessCodeError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAccountDisconnected_model")] +public class UnmanagedAccessCodeErrorsAccountDisconnected : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsAccountDisconnected() { } + +public UnmanagedAccessCodeErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "account_disconnected"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded_model")] +public class UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded() { } + +public UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsInsufficientPermissions_model")] +public class UnmanagedAccessCodeErrorsInsufficientPermissions : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsInsufficientPermissions() { } + +public UnmanagedAccessCodeErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "insufficient_permissions"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDormakabaSitesDisconnected_model")] +public class UnmanagedAccessCodeErrorsDormakabaSitesDisconnected : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsDormakabaSitesDisconnected() { } + +public UnmanagedAccessCodeErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceOffline_model")] +public class UnmanagedAccessCodeErrorsDeviceOffline : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsDeviceOffline() { } + +public UnmanagedAccessCodeErrorsDeviceOffline(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_offline"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceRemoved_model")] +public class UnmanagedAccessCodeErrorsDeviceRemoved : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsDeviceRemoved() { } + +public UnmanagedAccessCodeErrorsDeviceRemoved(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_removed"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsHubDisconnected_model")] +public class UnmanagedAccessCodeErrorsHubDisconnected : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsHubDisconnected() { } + +public UnmanagedAccessCodeErrorsHubDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "hub_disconnected"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceDisconnected_model")] +public class UnmanagedAccessCodeErrorsDeviceDisconnected : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsDeviceDisconnected() { } + +public UnmanagedAccessCodeErrorsDeviceDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_disconnected"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsEmptyBackupAccessCodePool_model")] +public class UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool() { } + +public UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "empty_backup_access_code_pool"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAugustLockNotAuthorized_model")] +public class UnmanagedAccessCodeErrorsAugustLockNotAuthorized : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsAugustLockNotAuthorized() { } + +public UnmanagedAccessCodeErrorsAugustLockNotAuthorized(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "august_lock_not_authorized"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsMissingDeviceCredentials_model")] +public class UnmanagedAccessCodeErrorsMissingDeviceCredentials : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsMissingDeviceCredentials() { } + +public UnmanagedAccessCodeErrorsMissingDeviceCredentials(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "missing_device_credentials"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAuxiliaryHeatRunning_model")] +public class UnmanagedAccessCodeErrorsAuxiliaryHeatRunning : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsAuxiliaryHeatRunning() { } + +public UnmanagedAccessCodeErrorsAuxiliaryHeatRunning(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "auxiliary_heat_running"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsSubscriptionRequired_model")] +public class UnmanagedAccessCodeErrorsSubscriptionRequired : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsSubscriptionRequired() { } + +public UnmanagedAccessCodeErrorsSubscriptionRequired(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "subscription_required"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsBridgeDisconnected_model")] +public class UnmanagedAccessCodeErrorsBridgeDisconnected : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsBridgeDisconnected() { } + +public UnmanagedAccessCodeErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "bridge_disconnected"; + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsUnrecognized_model")] +public class UnmanagedAccessCodeErrorsUnrecognized : UnmanagedAccessCodeErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeErrorsUnrecognized() { } + +public UnmanagedAccessCodeErrorsUnrecognized(string errorCode = default, string message = default) +{ +ErrorCode = errorCode; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "set")] +Set = 1, + +[EnumMember(Value = "unset")] +Unset = 2, +} + +/// +/// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum TypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "time_bound")] +TimeBound = 1, + +[EnumMember(Value = "ongoing")] +Ongoing = 2, +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessCodeWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode), "unknown_issue_with_access_code")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsBeingDeleted), "being_deleted")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsUsingBackupAccessCode), "using_backup_access_code")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsManagementTransferred), "management_transferred")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours), "igloo_algopin_must_be_used_within_24_hours")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected), "third_party_integration_detected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsDelayInIssuing), "delay_in_issuing")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsDelayInRemovingFromDevice), "delay_in_removing_from_device")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsDelayInSettingOnDevice), "delay_in_setting_on_device")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsExternalModificationInEffect), "external_modification_in_effect")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone), "time_frame_adjusted_for_unknown_time_zone")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsCodeRotatesPeriodically), "code_rotates_periodically")] +public abstract class UnmanagedAccessCodeWarnings +{ +public abstract string WarningCode { get; } + +public abstract string? CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsCodeRotatesPeriodically_model")] +public class UnmanagedAccessCodeWarningsCodeRotatesPeriodically : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsCodeRotatesPeriodically() { } + +public UnmanagedAccessCodeWarningsCodeRotatesPeriodically(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "code_rotates_periodically"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone_model")] +public class UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone() { } + +public UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "time_frame_adjusted_for_unknown_time_zone"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsExternalModificationInEffect_model")] +public class UnmanagedAccessCodeWarningsExternalModificationInEffect : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsExternalModificationInEffect() { } + +public UnmanagedAccessCodeWarningsExternalModificationInEffect(UnmanagedAccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? changeType = default, string? createdAt = default, string message = default, List? modifiedFields = default, string warningCode = default) +{ +ChangeType = changeType; +CreatedAt = createdAt; +Message = message; +ModifiedFields = modifiedFields; +WarningCode = warningCode; +} + +/// +/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ChangeTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "modified")] +Modified = 1, + +[EnumMember(Value = "removed")] +Removed = 2, +} + +/// +/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. +/// +[DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? ChangeType { get; set; } + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// List of fields that were changed externally, with their previous and new values. +/// +[DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] +public List? ModifiedFields { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "external_modification_in_effect"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields_model")] +public class UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields() { } + +public UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields(string field = default, string? from = default, string? to = default) +{ +Field = field; +From = from; +To = to; +} + +/// +/// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). +/// +[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] +public string Field { get; set; } + +/// +/// The previous value of the field. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public string? From { get; set; } + +/// +/// The new value of the field. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public string? To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInSettingOnDevice_model")] +public class UnmanagedAccessCodeWarningsDelayInSettingOnDevice : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsDelayInSettingOnDevice() { } + +public UnmanagedAccessCodeWarningsDelayInSettingOnDevice(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "delay_in_setting_on_device"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInRemovingFromDevice_model")] +public class UnmanagedAccessCodeWarningsDelayInRemovingFromDevice : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsDelayInRemovingFromDevice() { } + +public UnmanagedAccessCodeWarningsDelayInRemovingFromDevice(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "delay_in_removing_from_device"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInIssuing_model")] +public class UnmanagedAccessCodeWarningsDelayInIssuing : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsDelayInIssuing() { } + +public UnmanagedAccessCodeWarningsDelayInIssuing(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "delay_in_issuing"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsThirdPartyIntegrationDetected_model")] +public class UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected() { } + +public UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "third_party_integration_detected"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours_model")] +public class UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours() { } + +public UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "igloo_algopin_must_be_used_within_24_hours"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsManagementTransferred_model")] +public class UnmanagedAccessCodeWarningsManagementTransferred : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsManagementTransferred() { } + +public UnmanagedAccessCodeWarningsManagementTransferred(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "management_transferred"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUsingBackupAccessCode_model")] +public class UnmanagedAccessCodeWarningsUsingBackupAccessCode : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsUsingBackupAccessCode() { } + +public UnmanagedAccessCodeWarningsUsingBackupAccessCode(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "using_backup_access_code"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsBeingDeleted_model")] +public class UnmanagedAccessCodeWarningsBeingDeleted : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsBeingDeleted() { } + +public UnmanagedAccessCodeWarningsBeingDeleted(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUnknownIssueWithAccessCode_model")] +public class UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode() { } + +public UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode(string? createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unknown_issue_with_access_code"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUnrecognized_model")] +public class UnmanagedAccessCodeWarningsUnrecognized : UnmanagedAccessCodeWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeWarningsUnrecognized() { } + +public UnmanagedAccessCodeWarningsUnrecognized(string warningCode = default, string? createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string? CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Unique identifier for the access code. +/// +[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessCodeId { get; set; } + +/// +/// Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations. +/// +[DataMember(Name = "cannot_be_managed", IsRequired = false, EmitDefaultValue = false)] +public bool? CannotBeManaged { get; set; } + +/// +/// Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app. +/// +[DataMember(Name = "cannot_delete_unmanaged_access_code", IsRequired = false, EmitDefaultValue = false)] +public bool? CannotDeleteUnmanagedAccessCode { get; set; } + +/// +/// Code used for access. Typically, a numeric or alphanumeric string. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Date and time at which the access code was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Unique identifier for the device associated with the access code. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Human-readable label for the code's state: `Active` or `Not active`, based on whether the code is set on the device. For display only. The wording is not stable and is not an enumeration — never compare against or branch on it. +/// +[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] +public string DisplayStatus { get; set; } + +/// +/// Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices. +/// +[DataMember(Name = "dormakaba_oracode_metadata", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessCodeDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } + +/// +/// Date and time after which the time-bound access code becomes inactive. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Errors associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Indicates that Seam does not manage the access code. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// Date and time at which the time-bound access code becomes active. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +/// +/// Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. +/// +[Obsolete("Use `display_status` to show a person the code's state.")] +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessCode.StatusEnum Status { get; set; } + +/// +/// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. +/// +[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessCode.TypeEnum Type { get; set; } + +/// +/// Warnings associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// Unique identifier for the Seam workspace associated with the access code. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessCodeDormakabaOracodeMetadata_model")] +public class UnmanagedAccessCodeDormakabaOracodeMetadata +{ +[JsonConstructorAttribute] +protected UnmanagedAccessCodeDormakabaOracodeMetadata() { } + +public UnmanagedAccessCodeDormakabaOracodeMetadata(bool? isCancellable = default, bool? isEarlyCheckinAble = default, bool? isExtendable = default, bool? isOverridable = default, string? siteName = default, float? stayId = default, string? userLevelId = default, string? userLevelName = default) +{ +IsCancellable = isCancellable; +IsEarlyCheckinAble = isEarlyCheckinAble; +IsExtendable = isExtendable; +IsOverridable = isOverridable; +SiteName = siteName; +StayId = stayId; +UserLevelId = userLevelId; +UserLevelName = userLevelName; +} + +/// +/// Indicates whether the stay can be cancelled via the Dormakaba Oracode API. +/// +[DataMember(Name = "is_cancellable", IsRequired = false, EmitDefaultValue = false)] +public bool? IsCancellable { get; set; } + +/// +/// Indicates whether early check-in is available for this stay. +/// +[DataMember(Name = "is_early_checkin_able", IsRequired = false, EmitDefaultValue = false)] +public bool? IsEarlyCheckinAble { get; set; } + +/// +/// Indicates whether the stay can be extended via the Dormakaba Oracode API. +/// +[DataMember(Name = "is_extendable", IsRequired = false, EmitDefaultValue = false)] +public bool? IsExtendable { get; set; } + +/// +/// Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. +/// +[DataMember(Name = "is_overridable", IsRequired = false, EmitDefaultValue = false)] +public bool? IsOverridable { get; set; } + +/// +/// Dormakaba Oracode site name associated with this access code. +/// +[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] +public string? SiteName { get; set; } + +/// +/// Dormakaba Oracode stay ID associated with this access code. +/// +[DataMember(Name = "stay_id", IsRequired = false, EmitDefaultValue = false)] +public float? StayId { get; set; } + +/// +/// Dormakaba Oracode user level ID associated with this access code. +/// +[DataMember(Name = "user_level_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserLevelId { get; set; } + +/// +/// Dormakaba Oracode user level name associated with this access code. +/// +[DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] +public string? UserLevelName { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/UnmanagedAccessGrant.cs b/src/Seam/Model/UnmanagedAccessGrant.cs index beecf8f4..0ea4f417 100644 --- a/src/Seam/Model/UnmanagedAccessGrant.cs +++ b/src/Seam/Model/UnmanagedAccessGrant.cs @@ -8,1428 +8,1251 @@ namespace Seam.Model { - /// - /// Represents an unmanaged Access Grant. Unmanaged Access Grants do not have client sessions, instant keys, customization profiles, or keys. - /// - [DataContract(Name = "seamModel_unmanagedAccessGrant_model")] - public class UnmanagedAccessGrant - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrant() { } - - public UnmanagedAccessGrant( - string accessGrantId = default, - List accessMethodIds = default, - string createdAt = default, - string displayName = default, - string? endsAt = default, - List errors = default, - List locationIds = default, - string? name = default, - List pendingMutations = default, - List requestedAccessMethods = default, - string? reservationKey = default, - List spaceIds = default, - string startsAt = default, - string? userIdentityId = default, - List warnings = default, - string workspaceId = default - ) - { - AccessGrantId = accessGrantId; - AccessMethodIds = accessMethodIds; - CreatedAt = createdAt; - DisplayName = displayName; - EndsAt = endsAt; - Errors = errors; - LocationIds = locationIds; - Name = name; - PendingMutations = pendingMutations; - RequestedAccessMethods = requestedAccessMethods; - ReservationKey = reservationKey; - SpaceIds = spaceIds; - StartsAt = startsAt; - UserIdentityId = userIdentityId; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods), - "cannot_create_requested_access_methods" - )] - public abstract class UnmanagedAccessGrantErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods_model" - )] - public class UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods - : UnmanagedAccessGrantErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods() { } - - public UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods( - string createdAt = default, - string errorCode = default, - string message = default, - List? missingDeviceIds = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - MissingDeviceIds = missingDeviceIds; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. - /// - [DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] - public List? MissingDeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantErrorsUnrecognized_model")] - public class UnmanagedAccessGrantErrorsUnrecognized : UnmanagedAccessGrantErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantErrorsUnrecognized() { } - - public UnmanagedAccessGrantErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "mutation_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantPendingMutationsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes), - "updating_access_times" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantPendingMutationsUpdatingSpaces), - "updating_spaces" - )] - public abstract class UnmanagedAccessGrantPendingMutations - { - public abstract string MutationCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpaces_model")] - public class UnmanagedAccessGrantPendingMutationsUpdatingSpaces - : UnmanagedAccessGrantPendingMutations - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantPendingMutationsUpdatingSpaces() { } - - public UnmanagedAccessGrantPendingMutationsUpdatingSpaces( - string createdAt = default, - UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom from = default, - string message = default, - string mutationCode = default, - UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous location configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_spaces"; - - /// - /// New location configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesFrom_model" - )] - public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom() { } - - public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom( - List deviceIds = default - ) - { - DeviceIds = deviceIds; - } - - /// - /// Previous device IDs where access codes existed. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesTo_model" - )] - public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo() { } - - public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo( - string? commonCodeKey = default, - List deviceIds = default - ) - { - CommonCodeKey = commonCodeKey; - DeviceIds = deviceIds; - } - - /// - /// Common code key to ensure PIN code reuse across devices. - /// - [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] - public string? CommonCodeKey { get; set; } - - /// - /// New device IDs where access codes should be created. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimes_model" - )] - public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes - : UnmanagedAccessGrantPendingMutations - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes() { } - - public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes( - List accessMethodIds = default, - string createdAt = default, - UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, - string message = default, - string mutationCode = default, - UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo to = default - ) - { - AccessMethodIds = accessMethodIds; - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// IDs of the access methods being updated. - /// - [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethodIds { get; set; } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous access time configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_access_times"; - - /// - /// New access time configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom_model" - )] - public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom() { } - - public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Previous end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Previous start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo_model" - )] - public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo() { } - - public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// New end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// New start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUnrecognized_model")] - public class UnmanagedAccessGrantPendingMutationsUnrecognized - : UnmanagedAccessGrantPendingMutations - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantPendingMutationsUnrecognized() { } - - public UnmanagedAccessGrantPendingMutationsUnrecognized( - string mutationCode = default, - string createdAt = default, - string message = default - ) - { - MutationCode = mutationCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "unrecognized"; - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated), - "device_time_constraints_violated" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes), - "device_does_not_support_access_codes" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantWarningsRequestedCodeUnavailable), - "requested_code_unavailable" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantWarningsUpdatingAccessTimes), - "updating_access_times" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantWarningsOverprovisionedAccess), - "overprovisioned_access" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantWarningsUnderprovisionedAccess), - "underprovisioned_access" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessGrantWarningsBeingDeleted), - "being_deleted" - )] - public abstract class UnmanagedAccessGrantWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsBeingDeleted_model")] - public class UnmanagedAccessGrantWarningsBeingDeleted : UnmanagedAccessGrantWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsBeingDeleted() { } - - public UnmanagedAccessGrantWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUnderprovisionedAccess_model")] - public class UnmanagedAccessGrantWarningsUnderprovisionedAccess - : UnmanagedAccessGrantWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsUnderprovisionedAccess() { } - - public UnmanagedAccessGrantWarningsUnderprovisionedAccess( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "underprovisioned_access"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccess_model")] - public class UnmanagedAccessGrantWarningsOverprovisionedAccess - : UnmanagedAccessGrantWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsOverprovisionedAccess() { } - - public UnmanagedAccessGrantWarningsOverprovisionedAccess( - string createdAt = default, - List? failedDevices = - default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - FailedDevices = failedDevices; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). - /// - [DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] - public List? FailedDevices { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "overprovisioned_access"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices_model" - )] - public class UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices() { } - - public UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices( - string deviceId = default, - string errorCode = default, - string message = default - ) - { - DeviceId = deviceId; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Device whose access code could not be revoked. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). - /// - [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// Human-readable description of why revocation failed. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUpdatingAccessTimes_model")] - public class UnmanagedAccessGrantWarningsUpdatingAccessTimes : UnmanagedAccessGrantWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsUpdatingAccessTimes() { } - - public UnmanagedAccessGrantWarningsUpdatingAccessTimes( - List accessMethodIds = default, - string createdAt = default, - string message = default, - string warningCode = default - ) - { - AccessMethodIds = accessMethodIds; - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// IDs of the access methods being updated. - /// - [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethodIds { get; set; } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "updating_access_times"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantWarningsRequestedCodeUnavailable_model" - )] - public class UnmanagedAccessGrantWarningsRequestedCodeUnavailable - : UnmanagedAccessGrantWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsRequestedCodeUnavailable() { } - - public UnmanagedAccessGrantWarningsRequestedCodeUnavailable( - string createdAt = default, - string deviceId = default, - string message = default, - string newCode = default, - string originalCode = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - DeviceId = deviceId; - Message = message; - NewCode = newCode; - OriginalCode = originalCode; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device where the requested code was unavailable. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// The new PIN code that was assigned instead. - /// - [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] - public string NewCode { get; set; } - - /// - /// The originally requested PIN code that was unavailable. - /// - [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] - public string OriginalCode { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "requested_code_unavailable"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes_model" - )] - public class UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes - : UnmanagedAccessGrantWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } - - public UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes( - string createdAt = default, - string deviceId = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - DeviceId = deviceId; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device that does not support access codes. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "device_does_not_support_access_codes"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessGrantWarningsDeviceTimeConstraintsViolated_model" - )] - public class UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated - : UnmanagedAccessGrantWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated() { } - - public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated( - string createdAt = default, - string deviceId = default, - string message = default, - UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = - default, - string warningCode = default - ) - { - CreatedAt = createdAt; - DeviceId = deviceId; - Message = message; - Reason = reason; - WarningCode = warningCode; - } - - /// - /// Specific reason why the grant's times are not programmable on the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ReasonEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "duration_exceeds_max")] - DurationExceedsMax = 1, - - [EnumMember(Value = "times_do_not_match_slots")] - TimesDoNotMatchSlots = 2, - - [EnumMember(Value = "ongoing_not_supported")] - OngoingNotSupported = 3, - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// ID of the device whose time constraints the access grant violates. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// Specific reason why the grant's times are not programmable on the device. - /// - [DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "device_time_constraints_violated"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUnrecognized_model")] - public class UnmanagedAccessGrantWarningsUnrecognized : UnmanagedAccessGrantWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantWarningsUnrecognized() { } - - public UnmanagedAccessGrantWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// ID of the Access Grant. - /// - [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessGrantId { get; set; } - - /// - /// IDs of the access methods created for the Access Grant. - /// - [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] - public List AccessMethodIds { get; set; } - - /// - /// Date and time at which the Access Grant was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name of the Access Grant. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Date and time at which the Access Grant ends. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Errors associated with the [access grant](https://docs.seam.co/use-cases/granting-access). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - [Obsolete("Use `space_ids`.")] - [DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] - public List LocationIds { get; set; } - - /// - /// Name of the Access Grant. If not provided, the display name will be computed. - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string? Name { get; set; } - - /// - /// List of pending mutations for the access grant. This shows updates that are in progress. - /// - [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] - public List PendingMutations { get; set; } - - /// - /// Access methods that the user requested for the Access Grant. - /// - [DataMember( - Name = "requested_access_methods", - IsRequired = false, - EmitDefaultValue = false - )] - public List RequestedAccessMethods { get; set; } - - /// - /// Reservation key for the access grant. - /// - [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] - public string? ReservationKey { get; set; } - - /// - /// IDs of the spaces to which the Access Grant gives access. - /// - [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] - public List SpaceIds { get; set; } - - /// - /// Date and time at which the Access Grant starts. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string StartsAt { get; set; } - - /// - /// ID of user identity to which the Access Grant gives access. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityId { get; set; } - - /// - /// Warnings associated with the [access grant](https://docs.seam.co/use-cases/granting-access). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the Seam workspace associated with the Access Grant. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessGrantRequestedAccessMethods_model")] - public class UnmanagedAccessGrantRequestedAccessMethods - { - [JsonConstructorAttribute] - protected UnmanagedAccessGrantRequestedAccessMethods() { } - - public UnmanagedAccessGrantRequestedAccessMethods( - string? code = default, - List createdAccessMethodIds = default, - string createdAt = default, - string displayName = default, - int? instantKeyMaxUseCount = default, - UnmanagedAccessGrantRequestedAccessMethods.ModeEnum mode = default - ) - { - Code = code; - CreatedAccessMethodIds = createdAccessMethodIds; - CreatedAt = createdAt; - DisplayName = displayName; - InstantKeyMaxUseCount = instantKeyMaxUseCount; - Mode = mode; - } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - /// - /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// IDs of the access methods created for the requested access method. - /// - [DataMember( - Name = "created_access_method_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List CreatedAccessMethodIds { get; set; } - - /// - /// Date and time at which the requested access method was added to the Access Grant. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name of the access method. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. - /// - [DataMember( - Name = "instant_key_max_use_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int? InstantKeyMaxUseCount { get; set; } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessGrantRequestedAccessMethods.ModeEnum Mode { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an unmanaged Access Grant. Unmanaged Access Grants do not have client sessions, instant keys, customization profiles, or keys. +/// +[DataContract(Name = "seamModel_unmanagedAccessGrant_model")] +public class UnmanagedAccessGrant +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrant() { } + +public UnmanagedAccessGrant(string accessGrantId = default, List accessMethodIds = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, List locationIds = default, string? name = default, List pendingMutations = default, List requestedAccessMethods = default, string? reservationKey = default, List spaceIds = default, string startsAt = default, string? userIdentityId = default, List warnings = default, string workspaceId = default) +{ +AccessGrantId = accessGrantId; +AccessMethodIds = accessMethodIds; +CreatedAt = createdAt; +DisplayName = displayName; +EndsAt = endsAt; +Errors = errors; +LocationIds = locationIds; +Name = name; +PendingMutations = pendingMutations; +RequestedAccessMethods = requestedAccessMethods; +ReservationKey = reservationKey; +SpaceIds = spaceIds; +StartsAt = startsAt; +UserIdentityId = userIdentityId; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods), "cannot_create_requested_access_methods")] +public abstract class UnmanagedAccessGrantErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods_model")] +public class UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods : UnmanagedAccessGrantErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods() { } + +public UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods(string createdAt = default, string errorCode = default, string message = default, List? missingDeviceIds = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +MissingDeviceIds = missingDeviceIds; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. +/// +[DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] +public List? MissingDeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantErrorsUnrecognized_model")] +public class UnmanagedAccessGrantErrorsUnrecognized : UnmanagedAccessGrantErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantErrorsUnrecognized() { } + +public UnmanagedAccessGrantErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "mutation_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantPendingMutationsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes), "updating_access_times")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantPendingMutationsUpdatingSpaces), "updating_spaces")] +public abstract class UnmanagedAccessGrantPendingMutations +{ +public abstract string MutationCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpaces_model")] +public class UnmanagedAccessGrantPendingMutationsUpdatingSpaces : UnmanagedAccessGrantPendingMutations +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantPendingMutationsUpdatingSpaces() { } + +public UnmanagedAccessGrantPendingMutationsUpdatingSpaces(string createdAt = default, UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous location configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_spaces"; + +/// +/// New location configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesFrom_model")] +public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom() { } + +public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// Previous device IDs where access codes existed. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesTo_model")] +public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo() { } + +public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo(string? commonCodeKey = default, List deviceIds = default) +{ +CommonCodeKey = commonCodeKey; +DeviceIds = deviceIds; +} + +/// +/// Common code key to ensure PIN code reuse across devices. +/// +[DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] +public string? CommonCodeKey { get; set; } + +/// +/// New device IDs where access codes should be created. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimes_model")] +public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes : UnmanagedAccessGrantPendingMutations +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes() { } + +public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes(List accessMethodIds = default, string createdAt = default, UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo to = default) +{ +AccessMethodIds = accessMethodIds; +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// IDs of the access methods being updated. +/// +[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessMethodIds { get; set; } + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous access time configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_access_times"; + +/// +/// New access time configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom_model")] +public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom() { } + +public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Previous end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Previous start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo_model")] +public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo() { } + +public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// New end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// New start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUnrecognized_model")] +public class UnmanagedAccessGrantPendingMutationsUnrecognized : UnmanagedAccessGrantPendingMutations +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantPendingMutationsUnrecognized() { } + +public UnmanagedAccessGrantPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) +{ +MutationCode = mutationCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "unrecognized"; + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated), "device_time_constraints_violated")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes), "device_does_not_support_access_codes")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsRequestedCodeUnavailable), "requested_code_unavailable")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsUpdatingAccessTimes), "updating_access_times")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsOverprovisionedAccess), "overprovisioned_access")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsUnderprovisionedAccess), "underprovisioned_access")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsBeingDeleted), "being_deleted")] +public abstract class UnmanagedAccessGrantWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsBeingDeleted_model")] +public class UnmanagedAccessGrantWarningsBeingDeleted : UnmanagedAccessGrantWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsBeingDeleted() { } + +public UnmanagedAccessGrantWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUnderprovisionedAccess_model")] +public class UnmanagedAccessGrantWarningsUnderprovisionedAccess : UnmanagedAccessGrantWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsUnderprovisionedAccess() { } + +public UnmanagedAccessGrantWarningsUnderprovisionedAccess(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "underprovisioned_access"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccess_model")] +public class UnmanagedAccessGrantWarningsOverprovisionedAccess : UnmanagedAccessGrantWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsOverprovisionedAccess() { } + +public UnmanagedAccessGrantWarningsOverprovisionedAccess(string createdAt = default, List? failedDevices = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +FailedDevices = failedDevices; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). +/// +[DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] +public List? FailedDevices { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "overprovisioned_access"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices_model")] +public class UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices() { } + +public UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices(string deviceId = default, string errorCode = default, string message = default) +{ +DeviceId = deviceId; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Device whose access code could not be revoked. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). +/// +[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] +public string ErrorCode { get; set; } + +/// +/// Human-readable description of why revocation failed. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUpdatingAccessTimes_model")] +public class UnmanagedAccessGrantWarningsUpdatingAccessTimes : UnmanagedAccessGrantWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsUpdatingAccessTimes() { } + +public UnmanagedAccessGrantWarningsUpdatingAccessTimes(List accessMethodIds = default, string createdAt = default, string message = default, string warningCode = default) +{ +AccessMethodIds = accessMethodIds; +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// IDs of the access methods being updated. +/// +[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessMethodIds { get; set; } + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "updating_access_times"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsRequestedCodeUnavailable_model")] +public class UnmanagedAccessGrantWarningsRequestedCodeUnavailable : UnmanagedAccessGrantWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsRequestedCodeUnavailable() { } + +public UnmanagedAccessGrantWarningsRequestedCodeUnavailable(string createdAt = default, string deviceId = default, string message = default, string newCode = default, string originalCode = default, string warningCode = default) +{ +CreatedAt = createdAt; +DeviceId = deviceId; +Message = message; +NewCode = newCode; +OriginalCode = originalCode; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device where the requested code was unavailable. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// The new PIN code that was assigned instead. +/// +[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] +public string NewCode { get; set; } + +/// +/// The originally requested PIN code that was unavailable. +/// +[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] +public string OriginalCode { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "requested_code_unavailable"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes_model")] +public class UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes : UnmanagedAccessGrantWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } + +public UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes(string createdAt = default, string deviceId = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +DeviceId = deviceId; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device that does not support access codes. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "device_does_not_support_access_codes"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsDeviceTimeConstraintsViolated_model")] +public class UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated : UnmanagedAccessGrantWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated() { } + +public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated(string createdAt = default, string deviceId = default, string message = default, UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = default, string warningCode = default) +{ +CreatedAt = createdAt; +DeviceId = deviceId; +Message = message; +Reason = reason; +WarningCode = warningCode; +} + +/// +/// Specific reason why the grant's times are not programmable on the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ReasonEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "duration_exceeds_max")] +DurationExceedsMax = 1, + +[EnumMember(Value = "times_do_not_match_slots")] +TimesDoNotMatchSlots = 2, + +[EnumMember(Value = "ongoing_not_supported")] +OngoingNotSupported = 3, +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// ID of the device whose time constraints the access grant violates. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// Specific reason why the grant's times are not programmable on the device. +/// +[DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "device_time_constraints_violated"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUnrecognized_model")] +public class UnmanagedAccessGrantWarningsUnrecognized : UnmanagedAccessGrantWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantWarningsUnrecognized() { } + +public UnmanagedAccessGrantWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// ID of the Access Grant. +/// +[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessGrantId { get; set; } + +/// +/// IDs of the access methods created for the Access Grant. +/// +[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List AccessMethodIds { get; set; } + +/// +/// Date and time at which the Access Grant was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name of the Access Grant. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Date and time at which the Access Grant ends. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Errors associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +[Obsolete("Use `space_ids`.")] +[DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] +public List LocationIds { get; set; } + +/// +/// Name of the Access Grant. If not provided, the display name will be computed. +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string? Name { get; set; } + +/// +/// List of pending mutations for the access grant. This shows updates that are in progress. +/// +[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] +public List PendingMutations { get; set; } + +/// +/// Access methods that the user requested for the Access Grant. +/// +[DataMember(Name = "requested_access_methods", IsRequired = false, EmitDefaultValue = false)] +public List RequestedAccessMethods { get; set; } + +/// +/// Reservation key for the access grant. +/// +[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] +public string? ReservationKey { get; set; } + +/// +/// IDs of the spaces to which the Access Grant gives access. +/// +[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] +public List SpaceIds { get; set; } + +/// +/// Date and time at which the Access Grant starts. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string StartsAt { get; set; } + +/// +/// ID of user identity to which the Access Grant gives access. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityId { get; set; } + +/// +/// Warnings associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the Seam workspace associated with the Access Grant. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessGrantRequestedAccessMethods_model")] +public class UnmanagedAccessGrantRequestedAccessMethods +{ +[JsonConstructorAttribute] +protected UnmanagedAccessGrantRequestedAccessMethods() { } + +public UnmanagedAccessGrantRequestedAccessMethods(string? code = default, List createdAccessMethodIds = default, string createdAt = default, string displayName = default, int? instantKeyMaxUseCount = default, UnmanagedAccessGrantRequestedAccessMethods.ModeEnum mode = default) +{ +Code = code; +CreatedAccessMethodIds = createdAccessMethodIds; +CreatedAt = createdAt; +DisplayName = displayName; +InstantKeyMaxUseCount = instantKeyMaxUseCount; +Mode = mode; +} + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +/// +/// Specific PIN code to use for this access method. Only applicable when mode is 'code'. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// IDs of the access methods created for the requested access method. +/// +[DataMember(Name = "created_access_method_ids", IsRequired = false, EmitDefaultValue = false)] +public List CreatedAccessMethodIds { get; set; } + +/// +/// Date and time at which the requested access method was added to the Access Grant. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name of the access method. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. +/// +[DataMember(Name = "instant_key_max_use_count", IsRequired = false, EmitDefaultValue = false)] +public int? InstantKeyMaxUseCount { get; set; } + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessGrantRequestedAccessMethods.ModeEnum Mode { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/UnmanagedAccessMethod.cs b/src/Seam/Model/UnmanagedAccessMethod.cs index e8336f90..05d66511 100644 --- a/src/Seam/Model/UnmanagedAccessMethod.cs +++ b/src/Seam/Model/UnmanagedAccessMethod.cs @@ -8,1162 +8,1129 @@ namespace Seam.Model { - /// - /// Represents an unmanaged access method. Unmanaged access methods do not have client sessions, instant keys, customization profiles, or keys. - /// - [DataContract(Name = "seamModel_unmanagedAccessMethod_model")] - public class UnmanagedAccessMethod - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethod() { } - - public UnmanagedAccessMethod( - string accessMethodId = default, - string? code = default, - string createdAt = default, - string displayName = default, - string displayStatus = default, - List errors = default, - bool? isAssignmentRequired = default, - bool? isEncodingRequired = default, - bool isIssued = default, - bool? isReadyForAssignment = default, - bool? isReadyForEncoding = default, - string? issuedAt = default, - UnmanagedAccessMethod.ModeEnum mode = default, - List pendingMutations = default, - List warnings = default, - string workspaceId = default - ) - { - AccessMethodId = accessMethodId; - Code = code; - CreatedAt = createdAt; - DisplayName = displayName; - DisplayStatus = displayStatus; - Errors = errors; - IsAssignmentRequired = isAssignmentRequired; - IsEncodingRequired = isEncodingRequired; - IsIssued = isIssued; - IsReadyForAssignment = isReadyForAssignment; - IsReadyForEncoding = isReadyForEncoding; - IssuedAt = issuedAt; - Mode = mode; - PendingMutations = pendingMutations; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessMethodErrorsFailedToIssue), - "failed_to_issue" - )] - public abstract class UnmanagedAccessMethodErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodErrorsFailedToIssue_model")] - public class UnmanagedAccessMethodErrorsFailedToIssue : UnmanagedAccessMethodErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodErrorsFailedToIssue() { } - - public UnmanagedAccessMethodErrorsFailedToIssue( - string createdAt = default, - string errorCode = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "failed_to_issue"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodErrorsUnrecognized_model")] - public class UnmanagedAccessMethodErrorsUnrecognized : UnmanagedAccessMethodErrors - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodErrorsUnrecognized() { } - - public UnmanagedAccessMethodErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum ModeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "code")] - Code = 1, - - [EnumMember(Value = "card")] - Card = 2, - - [EnumMember(Value = "mobile_key")] - MobileKey = 3, - - [EnumMember(Value = "cloud_key")] - CloudKey = 4, - } - - [JsonConverter(typeof(JsonSubtypes), "mutation_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodPendingMutationsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes), - "updating_access_times" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessMethodPendingMutationsRevokingAccess), - "revoking_access" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessMethodPendingMutationsProvisioningAccess), - "provisioning_access" - )] - public abstract class UnmanagedAccessMethodPendingMutations - { - public abstract string MutationCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract( - Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccess_model" - )] - public class UnmanagedAccessMethodPendingMutationsProvisioningAccess - : UnmanagedAccessMethodPendingMutations - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsProvisioningAccess() { } - - public UnmanagedAccessMethodPendingMutationsProvisioningAccess( - string createdAt = default, - UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom from = default, - string message = default, - string mutationCode = default, - UnmanagedAccessMethodPendingMutationsProvisioningAccessTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous device configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "provisioning_access"; - - /// - /// New device configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessFrom_model" - )] - public class UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom() { } - - public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom( - List deviceIds = default - ) - { - DeviceIds = deviceIds; - } - - /// - /// Previous device IDs where access was provisioned. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessTo_model" - )] - public class UnmanagedAccessMethodPendingMutationsProvisioningAccessTo - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsProvisioningAccessTo() { } - - public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo( - List deviceIds = default - ) - { - DeviceIds = deviceIds; - } - - /// - /// New device IDs where access is being provisioned. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccess_model")] - public class UnmanagedAccessMethodPendingMutationsRevokingAccess - : UnmanagedAccessMethodPendingMutations - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsRevokingAccess() { } - - public UnmanagedAccessMethodPendingMutationsRevokingAccess( - string createdAt = default, - UnmanagedAccessMethodPendingMutationsRevokingAccessFrom from = default, - string message = default, - string mutationCode = default, - UnmanagedAccessMethodPendingMutationsRevokingAccessTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous device configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "revoking_access"; - - /// - /// New device configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessMethodPendingMutationsRevokingAccessTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessFrom_model" - )] - public class UnmanagedAccessMethodPendingMutationsRevokingAccessFrom - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsRevokingAccessFrom() { } - - public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom( - List deviceIds = default - ) - { - DeviceIds = deviceIds; - } - - /// - /// Previous device IDs where access existed. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessTo_model" - )] - public class UnmanagedAccessMethodPendingMutationsRevokingAccessTo - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsRevokingAccessTo() { } - - public UnmanagedAccessMethodPendingMutationsRevokingAccessTo( - List deviceIds = default - ) - { - DeviceIds = deviceIds; - } - - /// - /// New device IDs where access should remain. - /// - [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] - public List DeviceIds { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimes_model" - )] - public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes - : UnmanagedAccessMethodPendingMutations - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes() { } - - public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes( - string createdAt = default, - UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, - string message = default, - string mutationCode = default, - UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo to = default - ) - { - CreatedAt = createdAt; - From = from; - Message = message; - MutationCode = mutationCode; - To = to; - } - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Previous access time configuration. - /// - [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "updating_access_times"; - - /// - /// New access time configuration. - /// - [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo To { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom_model" - )] - public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom() { } - - public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// Previous end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// Previous start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo_model" - )] - public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo() { } - - public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo( - string? endsAt = default, - string? startsAt = default - ) - { - EndsAt = endsAt; - StartsAt = startsAt; - } - - /// - /// New end time for access. - /// - [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] - public string? EndsAt { get; set; } - - /// - /// New start time for access. - /// - [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] - public string? StartsAt { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUnrecognized_model")] - public class UnmanagedAccessMethodPendingMutationsUnrecognized - : UnmanagedAccessMethodPendingMutations - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodPendingMutationsUnrecognized() { } - - public UnmanagedAccessMethodPendingMutationsUnrecognized( - string mutationCode = default, - string createdAt = default, - string message = default - ) - { - MutationCode = mutationCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] - public override string MutationCode { get; } = "unrecognized"; - - /// - /// Date and time at which the mutation was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the mutation. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessMethodWarningsDelayInIssuing), - "delay_in_issuing" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessMethodWarningsPulledBackupAccessCode), - "pulled_backup_access_code" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessMethodWarningsUpdatingAccessTimes), - "updating_access_times" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedAccessMethodWarningsBeingDeleted), - "being_deleted" - )] - public abstract class UnmanagedAccessMethodWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsBeingDeleted_model")] - public class UnmanagedAccessMethodWarningsBeingDeleted : UnmanagedAccessMethodWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodWarningsBeingDeleted() { } - - public UnmanagedAccessMethodWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUpdatingAccessTimes_model")] - public class UnmanagedAccessMethodWarningsUpdatingAccessTimes - : UnmanagedAccessMethodWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodWarningsUpdatingAccessTimes() { } - - public UnmanagedAccessMethodWarningsUpdatingAccessTimes( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "updating_access_times"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsPulledBackupAccessCode_model")] - public class UnmanagedAccessMethodWarningsPulledBackupAccessCode - : UnmanagedAccessMethodWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodWarningsPulledBackupAccessCode() { } - - public UnmanagedAccessMethodWarningsPulledBackupAccessCode( - string createdAt = default, - string message = default, - string? originalAccessMethodId = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - OriginalAccessMethodId = originalAccessMethodId; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - /// - /// ID of the original access method from which this backup access method was split, if applicable. - /// - [DataMember( - Name = "original_access_method_id", - IsRequired = false, - EmitDefaultValue = false - )] - public string? OriginalAccessMethodId { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "pulled_backup_access_code"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsDelayInIssuing_model")] - public class UnmanagedAccessMethodWarningsDelayInIssuing : UnmanagedAccessMethodWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodWarningsDelayInIssuing() { } - - public UnmanagedAccessMethodWarningsDelayInIssuing( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "delay_in_issuing"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUnrecognized_model")] - public class UnmanagedAccessMethodWarningsUnrecognized : UnmanagedAccessMethodWarnings - { - [JsonConstructorAttribute] - protected UnmanagedAccessMethodWarningsUnrecognized() { } - - public UnmanagedAccessMethodWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// ID of the access method. - /// - [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] - public string AccessMethodId { get; set; } - - /// - /// The actual PIN code for code access methods. - /// - [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] - public string? Code { get; set; } - - /// - /// Date and time at which the access method was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name of the access method. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. - /// - [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] - public string DisplayStatus { get; set; } - - /// - /// Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. - /// - [DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] - public bool? IsAssignmentRequired { get; set; } - - /// - /// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. - /// - [DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] - public bool? IsEncodingRequired { get; set; } - - /// - /// Indicates whether the access method has been issued. - /// - [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] - public bool IsIssued { get; set; } - - /// - /// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. - /// - [DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] - public bool? IsReadyForAssignment { get; set; } - - /// - /// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. - /// - [DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] - public bool? IsReadyForEncoding { get; set; } - - /// - /// Date and time at which the access method was issued. - /// - [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] - public string? IssuedAt { get; set; } - - /// - /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. - /// - [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedAccessMethod.ModeEnum Mode { get; set; } - - /// - /// Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. - /// - [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] - public List PendingMutations { get; set; } - - /// - /// Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the Seam workspace associated with the access method. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an unmanaged access method. Unmanaged access methods do not have client sessions, instant keys, customization profiles, or keys. +/// +[DataContract(Name = "seamModel_unmanagedAccessMethod_model")] +public class UnmanagedAccessMethod +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethod() { } + +public UnmanagedAccessMethod(string accessMethodId = default, string? code = default, string createdAt = default, string displayName = default, string displayStatus = default, List errors = default, bool? isAssignmentRequired = default, bool? isEncodingRequired = default, bool isIssued = default, bool? isReadyForAssignment = default, bool? isReadyForEncoding = default, string? issuedAt = default, UnmanagedAccessMethod.ModeEnum mode = default, List pendingMutations = default, List warnings = default, string workspaceId = default) +{ +AccessMethodId = accessMethodId; +Code = code; +CreatedAt = createdAt; +DisplayName = displayName; +DisplayStatus = displayStatus; +Errors = errors; +IsAssignmentRequired = isAssignmentRequired; +IsEncodingRequired = isEncodingRequired; +IsIssued = isIssued; +IsReadyForAssignment = isReadyForAssignment; +IsReadyForEncoding = isReadyForEncoding; +IssuedAt = issuedAt; +Mode = mode; +PendingMutations = pendingMutations; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodErrorsFailedToIssue), "failed_to_issue")] +public abstract class UnmanagedAccessMethodErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodErrorsFailedToIssue_model")] +public class UnmanagedAccessMethodErrorsFailedToIssue : UnmanagedAccessMethodErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodErrorsFailedToIssue() { } + +public UnmanagedAccessMethodErrorsFailedToIssue(string createdAt = default, string errorCode = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "failed_to_issue"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodErrorsUnrecognized_model")] +public class UnmanagedAccessMethodErrorsUnrecognized : UnmanagedAccessMethodErrors +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodErrorsUnrecognized() { } + +public UnmanagedAccessMethodErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum ModeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "code")] +Code = 1, + +[EnumMember(Value = "card")] +Card = 2, + +[EnumMember(Value = "mobile_key")] +MobileKey = 3, + +[EnumMember(Value = "cloud_key")] +CloudKey = 4, +} + +[JsonConverter(typeof(JsonSubtypes), "mutation_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodPendingMutationsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes), "updating_access_times")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodPendingMutationsRevokingAccess), "revoking_access")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodPendingMutationsProvisioningAccess), "provisioning_access")] +public abstract class UnmanagedAccessMethodPendingMutations +{ +public abstract string MutationCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccess_model")] +public class UnmanagedAccessMethodPendingMutationsProvisioningAccess : UnmanagedAccessMethodPendingMutations +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsProvisioningAccess() { } + +public UnmanagedAccessMethodPendingMutationsProvisioningAccess(string createdAt = default, UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessMethodPendingMutationsProvisioningAccessTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous device configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "provisioning_access"; + +/// +/// New device configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessFrom_model")] +public class UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom() { } + +public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// Previous device IDs where access was provisioned. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessTo_model")] +public class UnmanagedAccessMethodPendingMutationsProvisioningAccessTo +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsProvisioningAccessTo() { } + +public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// New device IDs where access is being provisioned. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccess_model")] +public class UnmanagedAccessMethodPendingMutationsRevokingAccess : UnmanagedAccessMethodPendingMutations +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsRevokingAccess() { } + +public UnmanagedAccessMethodPendingMutationsRevokingAccess(string createdAt = default, UnmanagedAccessMethodPendingMutationsRevokingAccessFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessMethodPendingMutationsRevokingAccessTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous device configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "revoking_access"; + +/// +/// New device configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessMethodPendingMutationsRevokingAccessTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessFrom_model")] +public class UnmanagedAccessMethodPendingMutationsRevokingAccessFrom +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsRevokingAccessFrom() { } + +public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// Previous device IDs where access existed. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessTo_model")] +public class UnmanagedAccessMethodPendingMutationsRevokingAccessTo +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsRevokingAccessTo() { } + +public UnmanagedAccessMethodPendingMutationsRevokingAccessTo(List deviceIds = default) +{ +DeviceIds = deviceIds; +} + +/// +/// New device IDs where access should remain. +/// +[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] +public List DeviceIds { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimes_model")] +public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes : UnmanagedAccessMethodPendingMutations +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes() { } + +public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes(string createdAt = default, UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo to = default) +{ +CreatedAt = createdAt; +From = from; +Message = message; +MutationCode = mutationCode; +To = to; +} + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Previous access time configuration. +/// +[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "updating_access_times"; + +/// +/// New access time configuration. +/// +[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo To { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom_model")] +public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom() { } + +public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// Previous end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// Previous start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo_model")] +public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo() { } + +public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo(string? endsAt = default, string? startsAt = default) +{ +EndsAt = endsAt; +StartsAt = startsAt; +} + +/// +/// New end time for access. +/// +[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] +public string? EndsAt { get; set; } + +/// +/// New start time for access. +/// +[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] +public string? StartsAt { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUnrecognized_model")] +public class UnmanagedAccessMethodPendingMutationsUnrecognized : UnmanagedAccessMethodPendingMutations +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodPendingMutationsUnrecognized() { } + +public UnmanagedAccessMethodPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) +{ +MutationCode = mutationCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] +public override string MutationCode { get; } = "unrecognized"; + +/// +/// Date and time at which the mutation was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the mutation. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber), "user_identity_missing_phone_number")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress), "user_identity_missing_email_address")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsDelayInIssuing), "delay_in_issuing")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsPulledBackupAccessCode), "pulled_backup_access_code")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsUpdatingAccessTimes), "updating_access_times")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsBeingDeleted), "being_deleted")] +public abstract class UnmanagedAccessMethodWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsBeingDeleted_model")] +public class UnmanagedAccessMethodWarningsBeingDeleted : UnmanagedAccessMethodWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodWarningsBeingDeleted() { } + +public UnmanagedAccessMethodWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUpdatingAccessTimes_model")] +public class UnmanagedAccessMethodWarningsUpdatingAccessTimes : UnmanagedAccessMethodWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodWarningsUpdatingAccessTimes() { } + +public UnmanagedAccessMethodWarningsUpdatingAccessTimes(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "updating_access_times"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsPulledBackupAccessCode_model")] +public class UnmanagedAccessMethodWarningsPulledBackupAccessCode : UnmanagedAccessMethodWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodWarningsPulledBackupAccessCode() { } + +public UnmanagedAccessMethodWarningsPulledBackupAccessCode(string createdAt = default, string message = default, string? originalAccessMethodId = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +OriginalAccessMethodId = originalAccessMethodId; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +/// +/// ID of the original access method from which this backup access method was split, if applicable. +/// +[DataMember(Name = "original_access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string? OriginalAccessMethodId { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "pulled_backup_access_code"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsDelayInIssuing_model")] +public class UnmanagedAccessMethodWarningsDelayInIssuing : UnmanagedAccessMethodWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodWarningsDelayInIssuing() { } + +public UnmanagedAccessMethodWarningsDelayInIssuing(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "delay_in_issuing"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUserIdentityMissingEmailAddress_model")] +public class UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress : UnmanagedAccessMethodWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress() { } + +public UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "user_identity_missing_email_address"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber_model")] +public class UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber : UnmanagedAccessMethodWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber() { } + +public UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "user_identity_missing_phone_number"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUnrecognized_model")] +public class UnmanagedAccessMethodWarningsUnrecognized : UnmanagedAccessMethodWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedAccessMethodWarningsUnrecognized() { } + +public UnmanagedAccessMethodWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// ID of the access method. +/// +[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] +public string AccessMethodId { get; set; } + +/// +/// The actual PIN code for code access methods. +/// +[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] +public string? Code { get; set; } + +/// +/// Date and time at which the access method was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name of the access method. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. +/// +[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] +public string DisplayStatus { get; set; } + +/// +/// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. +/// +[DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] +public bool? IsAssignmentRequired { get; set; } + +/// +/// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. +/// +[DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] +public bool? IsEncodingRequired { get; set; } + +/// +/// Indicates whether the access method has been issued. +/// +[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] +public bool IsIssued { get; set; } + +/// +/// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. +/// +[DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] +public bool? IsReadyForAssignment { get; set; } + +/// +/// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. +/// +[DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] +public bool? IsReadyForEncoding { get; set; } + +/// +/// Date and time at which the access method was issued. +/// +[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] +public string? IssuedAt { get; set; } + +/// +/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. +/// +[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedAccessMethod.ModeEnum Mode { get; set; } + +/// +/// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. +/// +[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] +public List PendingMutations { get; set; } + +/// +/// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the Seam workspace associated with the access method. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/UnmanagedDevice.cs b/src/Seam/Model/UnmanagedDevice.cs index 1640118f..9ba9d2cc 100644 --- a/src/Seam/Model/UnmanagedDevice.cs +++ b/src/Seam/Model/UnmanagedDevice.cs @@ -8,3641 +8,3171 @@ namespace Seam.Model { - /// - /// Represents an [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). - /// - [DataContract(Name = "seamModel_unmanagedDevice_model")] - public class UnmanagedDevice - { - [JsonConstructorAttribute] - protected UnmanagedDevice() { } - - public UnmanagedDevice( - bool? canConfigureAutoLock = default, - bool? canHvacCool = default, - bool? canHvacHeat = default, - bool? canHvacHeatCool = default, - bool? canProgramOfflineAccessCodes = default, - bool? canProgramOnlineAccessCodes = default, - bool? canProgramThermostatProgramsAsDifferentEachDay = default, - bool? canProgramThermostatProgramsAsSameEachDay = default, - bool? canProgramThermostatProgramsAsWeekdayWeekend = default, - bool? canRemotelyLock = default, - bool? canRemotelyUnlock = default, - bool? canRunThermostatPrograms = default, - bool? canSimulateConnection = default, - bool? canSimulateDisconnection = default, - bool? canSimulateHubConnection = default, - bool? canSimulateHubDisconnection = default, - bool? canSimulatePaidSubscription = default, - bool? canSimulateRemoval = default, - bool? canTurnOffHvac = default, - bool? canUnlockWithCode = default, - List capabilitiesSupported = default, - string connectedAccountId = default, - string createdAt = default, - object customMetadata = default, - string deviceId = default, - UnmanagedDevice.DeviceTypeEnum deviceType = default, - string displayName = default, - List errors = default, - bool isManaged = default, - UnmanagedDeviceLocation? location = default, - UnmanagedDeviceProperties properties = default, - List warnings = default, - string workspaceId = default - ) - { - CanConfigureAutoLock = canConfigureAutoLock; - CanHvacCool = canHvacCool; - CanHvacHeat = canHvacHeat; - CanHvacHeatCool = canHvacHeatCool; - CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; - CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; - CanProgramThermostatProgramsAsDifferentEachDay = - canProgramThermostatProgramsAsDifferentEachDay; - CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; - CanProgramThermostatProgramsAsWeekdayWeekend = - canProgramThermostatProgramsAsWeekdayWeekend; - CanRemotelyLock = canRemotelyLock; - CanRemotelyUnlock = canRemotelyUnlock; - CanRunThermostatPrograms = canRunThermostatPrograms; - CanSimulateConnection = canSimulateConnection; - CanSimulateDisconnection = canSimulateDisconnection; - CanSimulateHubConnection = canSimulateHubConnection; - CanSimulateHubDisconnection = canSimulateHubDisconnection; - CanSimulatePaidSubscription = canSimulatePaidSubscription; - CanSimulateRemoval = canSimulateRemoval; - CanTurnOffHvac = canTurnOffHvac; - CanUnlockWithCode = canUnlockWithCode; - CapabilitiesSupported = capabilitiesSupported; - ConnectedAccountId = connectedAccountId; - CreatedAt = createdAt; - CustomMetadata = customMetadata; - DeviceId = deviceId; - DeviceType = deviceType; - DisplayName = displayName; - Errors = errors; - IsManaged = isManaged; - Location = location; - Properties = properties; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - /// - /// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum CapabilitiesSupportedEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "access_code")] - AccessCode = 1, - - [EnumMember(Value = "lock")] - Lock = 2, - - [EnumMember(Value = "noise_detection")] - NoiseDetection = 3, - - [EnumMember(Value = "thermostat")] - Thermostat = 4, - - [EnumMember(Value = "battery")] - Battery = 5, - - [EnumMember(Value = "phone")] - Phone = 6, - } - - /// - /// Type of the device. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum DeviceTypeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "akuvox_lock")] - AkuvoxLock = 1, - - [EnumMember(Value = "august_lock")] - AugustLock = 2, - - [EnumMember(Value = "brivo_access_point")] - BrivoAccessPoint = 3, - - [EnumMember(Value = "butterflymx_panel")] - ButterflymxPanel = 4, - - [EnumMember(Value = "avigilon_alta_entry")] - AvigilonAltaEntry = 5, - - [EnumMember(Value = "doorking_lock")] - DoorkingLock = 6, - - [EnumMember(Value = "genie_door")] - GenieDoor = 7, - - [EnumMember(Value = "igloo_lock")] - IglooLock = 8, +/// +/// Represents an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). +/// +[DataContract(Name = "seamModel_unmanagedDevice_model")] +public class UnmanagedDevice +{ +[JsonConstructorAttribute] +protected UnmanagedDevice() { } + +public UnmanagedDevice(bool? canActivateWeeklyProgram = default, bool? canConfigureAutoLock = default, bool? canHvacCool = default, bool? canHvacHeat = default, bool? canHvacHeatCool = default, bool? canProgramOfflineAccessCodes = default, bool? canProgramOnlineAccessCodes = default, bool? canProgramThermostatProgramsAsDifferentEachDay = default, bool? canProgramThermostatProgramsAsSameEachDay = default, bool? canProgramThermostatProgramsAsWeekdayWeekend = default, bool? canRemotelyLock = default, bool? canRemotelyUnlock = default, bool? canRunThermostatPrograms = default, bool? canSimulateConnection = default, bool? canSimulateDisconnection = default, bool? canSimulateHubConnection = default, bool? canSimulateHubDisconnection = default, bool? canSimulatePaidSubscription = default, bool? canSimulateRemoval = default, bool? canStreamLiveVideo = default, bool? canTurnOffHvac = default, bool? canUnlockWithCode = default, List capabilitiesSupported = default, string connectedAccountId = default, string createdAt = default, object customMetadata = default, string deviceId = default, UnmanagedDevice.DeviceTypeEnum deviceType = default, string displayName = default, List errors = default, bool isManaged = default, UnmanagedDeviceLocation? location = default, UnmanagedDeviceProperties properties = default, List warnings = default, string workspaceId = default) +{ +CanActivateWeeklyProgram = canActivateWeeklyProgram; +CanConfigureAutoLock = canConfigureAutoLock; +CanHvacCool = canHvacCool; +CanHvacHeat = canHvacHeat; +CanHvacHeatCool = canHvacHeatCool; +CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; +CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; +CanProgramThermostatProgramsAsDifferentEachDay = canProgramThermostatProgramsAsDifferentEachDay; +CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; +CanProgramThermostatProgramsAsWeekdayWeekend = canProgramThermostatProgramsAsWeekdayWeekend; +CanRemotelyLock = canRemotelyLock; +CanRemotelyUnlock = canRemotelyUnlock; +CanRunThermostatPrograms = canRunThermostatPrograms; +CanSimulateConnection = canSimulateConnection; +CanSimulateDisconnection = canSimulateDisconnection; +CanSimulateHubConnection = canSimulateHubConnection; +CanSimulateHubDisconnection = canSimulateHubDisconnection; +CanSimulatePaidSubscription = canSimulatePaidSubscription; +CanSimulateRemoval = canSimulateRemoval; +CanStreamLiveVideo = canStreamLiveVideo; +CanTurnOffHvac = canTurnOffHvac; +CanUnlockWithCode = canUnlockWithCode; +CapabilitiesSupported = capabilitiesSupported; +ConnectedAccountId = connectedAccountId; +CreatedAt = createdAt; +CustomMetadata = customMetadata; +DeviceId = deviceId; +DeviceType = deviceType; +DisplayName = displayName; +Errors = errors; +IsManaged = isManaged; +Location = location; +Properties = properties; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +/// +/// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum CapabilitiesSupportedEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "access_code")] +AccessCode = 1, + +[EnumMember(Value = "lock")] +Lock = 2, + +[EnumMember(Value = "noise_detection")] +NoiseDetection = 3, + +[EnumMember(Value = "thermostat")] +Thermostat = 4, + +[EnumMember(Value = "battery")] +Battery = 5, + +[EnumMember(Value = "phone")] +Phone = 6, +} + +/// +/// Type of the device. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum DeviceTypeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "akuvox_lock")] +AkuvoxLock = 1, + +[EnumMember(Value = "august_lock")] +AugustLock = 2, + +[EnumMember(Value = "brivo_access_point")] +BrivoAccessPoint = 3, + +[EnumMember(Value = "butterflymx_panel")] +ButterflymxPanel = 4, + +[EnumMember(Value = "avigilon_alta_entry")] +AvigilonAltaEntry = 5, + +[EnumMember(Value = "doorking_lock")] +DoorkingLock = 6, + +[EnumMember(Value = "genie_door")] +GenieDoor = 7, + +[EnumMember(Value = "igloo_lock")] +IglooLock = 8, + +[EnumMember(Value = "linear_lock")] +LinearLock = 9, + +[EnumMember(Value = "lockly_lock")] +LocklyLock = 10, + +[EnumMember(Value = "kwikset_lock")] +KwiksetLock = 11, + +[EnumMember(Value = "nuki_lock")] +NukiLock = 12, + +[EnumMember(Value = "salto_lock")] +SaltoLock = 13, + +[EnumMember(Value = "schlage_lock")] +SchlageLock = 14, + +[EnumMember(Value = "smartthings_lock")] +SmartthingsLock = 15, + +[EnumMember(Value = "wyze_lock")] +WyzeLock = 16, + +[EnumMember(Value = "yale_lock")] +YaleLock = 17, + +[EnumMember(Value = "two_n_intercom")] +TwoNIntercom = 18, + +[EnumMember(Value = "controlbyweb_device")] +ControlbywebDevice = 19, + +[EnumMember(Value = "ttlock_lock")] +TtlockLock = 20, + +[EnumMember(Value = "igloohome_lock")] +IgloohomeLock = 21, + +[EnumMember(Value = "four_suites_door")] +FourSuitesDoor = 22, + +[EnumMember(Value = "dormakaba_oracode_door")] +DormakabaOracodeDoor = 23, + +[EnumMember(Value = "tedee_lock")] +TedeeLock = 24, + +[EnumMember(Value = "akiles_lock")] +AkilesLock = 25, + +[EnumMember(Value = "ultraloq_lock")] +UltraloqLock = 26, + +[EnumMember(Value = "yacan_lock")] +YacanLock = 27, + +[EnumMember(Value = "keyincode_lock")] +KeyincodeLock = 28, + +[EnumMember(Value = "omnitec_lock")] +OmnitecLock = 29, + +[EnumMember(Value = "kisi_lock")] +KisiLock = 30, + +[EnumMember(Value = "aqara_lock")] +AqaraLock = 31, + +[EnumMember(Value = "keynest_key")] +KeynestKey = 32, + +[EnumMember(Value = "noiseaware_activity_zone")] +NoiseawareActivityZone = 33, + +[EnumMember(Value = "minut_sensor")] +MinutSensor = 34, + +[EnumMember(Value = "ecobee_thermostat")] +EcobeeThermostat = 35, + +[EnumMember(Value = "nest_thermostat")] +NestThermostat = 36, + +[EnumMember(Value = "honeywell_resideo_thermostat")] +HoneywellResideoThermostat = 37, + +[EnumMember(Value = "tado_thermostat")] +TadoThermostat = 38, + +[EnumMember(Value = "sensi_thermostat")] +SensiThermostat = 39, + +[EnumMember(Value = "smartthings_thermostat")] +SmartthingsThermostat = 40, + +[EnumMember(Value = "ios_phone")] +IosPhone = 41, + +[EnumMember(Value = "android_phone")] +AndroidPhone = 42, + +[EnumMember(Value = "ring_camera")] +RingCamera = 43, + +[EnumMember(Value = "tapo_camera")] +TapoCamera = 44, + +[EnumMember(Value = "arlo_camera")] +ArloCamera = 45, + +[EnumMember(Value = "reolink_camera")] +ReolinkCamera = 46, +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsBridgeDisconnected), "bridge_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsSubscriptionRequired), "subscription_required")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsAuxiliaryHeatRunning), "auxiliary_heat_running")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsMissingDeviceCredentials), "missing_device_credentials")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsAugustLockNotAuthorized), "august_lock_not_authorized")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsEmptyBackupAccessCodePool), "empty_backup_access_code_pool")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceDisconnected), "device_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsHubDisconnected), "hub_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceRemoved), "device_removed")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceOffline), "device_offline")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsInsufficientPermissions), "insufficient_permissions")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsAccountDisconnected), "account_disconnected")] +public abstract class UnmanagedDeviceErrors +{ +public abstract string ErrorCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsAccountDisconnected_model")] +public class UnmanagedDeviceErrorsAccountDisconnected : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsAccountDisconnected() { } + +public UnmanagedDeviceErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "account_disconnected"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded_model")] +public class UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded() { } + +public UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsInsufficientPermissions_model")] +public class UnmanagedDeviceErrorsInsufficientPermissions : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsInsufficientPermissions() { } + +public UnmanagedDeviceErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "insufficient_permissions"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsDormakabaSitesDisconnected_model")] +public class UnmanagedDeviceErrorsDormakabaSitesDisconnected : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsDormakabaSitesDisconnected() { } + +public UnmanagedDeviceErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsConnectedAccountError = isConnectedAccountError; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + +/// +/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnectedAccountError { get; set; } + +/// +/// Indicates that the error is not a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceOffline_model")] +public class UnmanagedDeviceErrorsDeviceOffline : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsDeviceOffline() { } + +public UnmanagedDeviceErrorsDeviceOffline(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_offline"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceRemoved_model")] +public class UnmanagedDeviceErrorsDeviceRemoved : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsDeviceRemoved() { } + +public UnmanagedDeviceErrorsDeviceRemoved(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_removed"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsHubDisconnected_model")] +public class UnmanagedDeviceErrorsHubDisconnected : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsHubDisconnected() { } + +public UnmanagedDeviceErrorsHubDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "hub_disconnected"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceDisconnected_model")] +public class UnmanagedDeviceErrorsDeviceDisconnected : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsDeviceDisconnected() { } + +public UnmanagedDeviceErrorsDeviceDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "device_disconnected"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsEmptyBackupAccessCodePool_model")] +public class UnmanagedDeviceErrorsEmptyBackupAccessCodePool : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsEmptyBackupAccessCodePool() { } + +public UnmanagedDeviceErrorsEmptyBackupAccessCodePool(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "empty_backup_access_code_pool"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsAugustLockNotAuthorized_model")] +public class UnmanagedDeviceErrorsAugustLockNotAuthorized : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsAugustLockNotAuthorized() { } + +public UnmanagedDeviceErrorsAugustLockNotAuthorized(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "august_lock_not_authorized"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsMissingDeviceCredentials_model")] +public class UnmanagedDeviceErrorsMissingDeviceCredentials : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsMissingDeviceCredentials() { } + +public UnmanagedDeviceErrorsMissingDeviceCredentials(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "missing_device_credentials"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsAuxiliaryHeatRunning_model")] +public class UnmanagedDeviceErrorsAuxiliaryHeatRunning : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsAuxiliaryHeatRunning() { } + +public UnmanagedDeviceErrorsAuxiliaryHeatRunning(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "auxiliary_heat_running"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsSubscriptionRequired_model")] +public class UnmanagedDeviceErrorsSubscriptionRequired : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsSubscriptionRequired() { } + +public UnmanagedDeviceErrorsSubscriptionRequired(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsDeviceError = isDeviceError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "subscription_required"; + +/// +/// Indicates that the error is a device error. +/// +[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] +public bool IsDeviceError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsBridgeDisconnected_model")] +public class UnmanagedDeviceErrorsBridgeDisconnected : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsBridgeDisconnected() { } + +public UnmanagedDeviceErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) +{ +CreatedAt = createdAt; +ErrorCode = errorCode; +IsBridgeError = isBridgeError; +IsConnectedAccountError = isConnectedAccountError; +Message = message; +} + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "bridge_disconnected"; + +/// +/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). +/// +[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsBridgeError { get; set; } + +/// +/// Indicates whether the error is related specifically to the connected account. +/// +[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] +public bool? IsConnectedAccountError { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceErrorsUnrecognized_model")] +public class UnmanagedDeviceErrorsUnrecognized : UnmanagedDeviceErrors +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceErrorsUnrecognized() { } + +public UnmanagedDeviceErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsMaxAccessCodesReached), "max_access_codes_reached")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsUnreliableOnlineStatus), "unreliable_online_status")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsAccessoryKeypadLowBattery), "accessory_keypad_low_battery")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsAccessoryKeypadSetupRequired), "accessory_keypad_setup_required")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsKeynestUnsupportedLocker), "keynest_unsupported_locker")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsProviderIssue), "provider_issue")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities), "hub_required_for_additional_capabilities")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTwoNDeviceMissingTimezone), "two_n_device_missing_timezone")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTimeZoneMismatch), "time_zone_mismatch")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTimeZoneUnknown), "time_zone_unknown")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsUltraloqTimeZoneUnknown), "ultraloq_time_zone_unknown")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured), "lockly_time_zone_not_configured")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsUnknownIssueWithPhone), "unknown_issue_with_phone")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved), "salto_ks_lock_access_code_support_removed")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached), "salto_ks_subscription_limit_almost_reached")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsPrivacyMode), "privacy_mode")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsSaltoKsPrivacyMode), "salto_ks_privacy_mode")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsSaltoKsOfficeMode), "salto_ks_office_mode")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsDeviceHasFlakyConnection), "device_has_flaky_connection")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsScheduledMaintenanceWindow), "scheduled_maintenance_window")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsDeviceCommunicationDegraded), "device_communication_degraded")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTemperatureThresholdExceeded), "temperature_threshold_exceeded")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsPowerSavingMode), "power_saving_mode")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTtlockWeakGatewaySignal), "ttlock_weak_gateway_signal")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled), "ttlock_lock_gateway_unlocking_not_enabled")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsThirdPartyIntegrationDetected), "third_party_integration_detected")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsManyActiveBackupCodes), "many_active_backup_codes")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsPartialBackupAccessCodePool), "partial_backup_access_code_pool")] +public abstract class UnmanagedDeviceWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsPartialBackupAccessCodePool_model")] +public class UnmanagedDeviceWarningsPartialBackupAccessCodePool : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsPartialBackupAccessCodePool() { } + +public UnmanagedDeviceWarningsPartialBackupAccessCodePool(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "partial_backup_access_code_pool"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsManyActiveBackupCodes_model")] +public class UnmanagedDeviceWarningsManyActiveBackupCodes : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsManyActiveBackupCodes() { } + +public UnmanagedDeviceWarningsManyActiveBackupCodes(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "many_active_backup_codes"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsThirdPartyIntegrationDetected_model")] +public class UnmanagedDeviceWarningsThirdPartyIntegrationDetected : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsThirdPartyIntegrationDetected() { } + +public UnmanagedDeviceWarningsThirdPartyIntegrationDetected(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "third_party_integration_detected"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled_model")] +public class UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled() { } + +public UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "ttlock_lock_gateway_unlocking_not_enabled"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsTtlockWeakGatewaySignal_model")] +public class UnmanagedDeviceWarningsTtlockWeakGatewaySignal : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsTtlockWeakGatewaySignal() { } + +public UnmanagedDeviceWarningsTtlockWeakGatewaySignal(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "ttlock_weak_gateway_signal"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsPowerSavingMode_model")] +public class UnmanagedDeviceWarningsPowerSavingMode : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsPowerSavingMode() { } + +public UnmanagedDeviceWarningsPowerSavingMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "power_saving_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsTemperatureThresholdExceeded_model")] +public class UnmanagedDeviceWarningsTemperatureThresholdExceeded : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsTemperatureThresholdExceeded() { } + +public UnmanagedDeviceWarningsTemperatureThresholdExceeded(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "temperature_threshold_exceeded"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsDeviceCommunicationDegraded_model")] +public class UnmanagedDeviceWarningsDeviceCommunicationDegraded : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsDeviceCommunicationDegraded() { } + +public UnmanagedDeviceWarningsDeviceCommunicationDegraded(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "device_communication_degraded"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsScheduledMaintenanceWindow_model")] +public class UnmanagedDeviceWarningsScheduledMaintenanceWindow : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsScheduledMaintenanceWindow() { } + +public UnmanagedDeviceWarningsScheduledMaintenanceWindow(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "scheduled_maintenance_window"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsDeviceHasFlakyConnection_model")] +public class UnmanagedDeviceWarningsDeviceHasFlakyConnection : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsDeviceHasFlakyConnection() { } + +public UnmanagedDeviceWarningsDeviceHasFlakyConnection(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "device_has_flaky_connection"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsOfficeMode_model")] +public class UnmanagedDeviceWarningsSaltoKsOfficeMode : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsSaltoKsOfficeMode() { } + +public UnmanagedDeviceWarningsSaltoKsOfficeMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_office_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsPrivacyMode_model")] +public class UnmanagedDeviceWarningsSaltoKsPrivacyMode : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsSaltoKsPrivacyMode() { } + +public UnmanagedDeviceWarningsSaltoKsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_privacy_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsPrivacyMode_model")] +public class UnmanagedDeviceWarningsPrivacyMode : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsPrivacyMode() { } + +public UnmanagedDeviceWarningsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "privacy_mode"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached_model")] +public class UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached() { } + +public UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_subscription_limit_almost_reached"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved_model")] +public class UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved() { } + +public UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "salto_ks_lock_access_code_support_removed"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsUnknownIssueWithPhone_model")] +public class UnmanagedDeviceWarningsUnknownIssueWithPhone : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsUnknownIssueWithPhone() { } + +public UnmanagedDeviceWarningsUnknownIssueWithPhone(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unknown_issue_with_phone"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsLocklyTimeZoneNotConfigured_model")] +public class UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured() { } + +public UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "lockly_time_zone_not_configured"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsUltraloqTimeZoneUnknown_model")] +public class UnmanagedDeviceWarningsUltraloqTimeZoneUnknown : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsUltraloqTimeZoneUnknown() { } + +public UnmanagedDeviceWarningsUltraloqTimeZoneUnknown(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "ultraloq_time_zone_unknown"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsTimeZoneUnknown_model")] +public class UnmanagedDeviceWarningsTimeZoneUnknown : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsTimeZoneUnknown() { } + +public UnmanagedDeviceWarningsTimeZoneUnknown(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "time_zone_unknown"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsTimeZoneMismatch_model")] +public class UnmanagedDeviceWarningsTimeZoneMismatch : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsTimeZoneMismatch() { } + +public UnmanagedDeviceWarningsTimeZoneMismatch(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "time_zone_mismatch"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsTwoNDeviceMissingTimezone_model")] +public class UnmanagedDeviceWarningsTwoNDeviceMissingTimezone : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsTwoNDeviceMissingTimezone() { } + +public UnmanagedDeviceWarningsTwoNDeviceMissingTimezone(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "two_n_device_missing_timezone"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsHubRequiredForAdditionalCapabilities_model")] +public class UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities() { } + +public UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "hub_required_for_additional_capabilities"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsProviderIssue_model")] +public class UnmanagedDeviceWarningsProviderIssue : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsProviderIssue() { } + +public UnmanagedDeviceWarningsProviderIssue(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "provider_issue"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsKeynestUnsupportedLocker_model")] +public class UnmanagedDeviceWarningsKeynestUnsupportedLocker : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsKeynestUnsupportedLocker() { } + +public UnmanagedDeviceWarningsKeynestUnsupportedLocker(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "keynest_unsupported_locker"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsAccessoryKeypadSetupRequired_model")] +public class UnmanagedDeviceWarningsAccessoryKeypadSetupRequired : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsAccessoryKeypadSetupRequired() { } + +public UnmanagedDeviceWarningsAccessoryKeypadSetupRequired(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "accessory_keypad_setup_required"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsAccessoryKeypadLowBattery_model")] +public class UnmanagedDeviceWarningsAccessoryKeypadLowBattery : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsAccessoryKeypadLowBattery() { } + +public UnmanagedDeviceWarningsAccessoryKeypadLowBattery(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "accessory_keypad_low_battery"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsUnreliableOnlineStatus_model")] +public class UnmanagedDeviceWarningsUnreliableOnlineStatus : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsUnreliableOnlineStatus() { } + +public UnmanagedDeviceWarningsUnreliableOnlineStatus(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unreliable_online_status"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsMaxAccessCodesReached_model")] +public class UnmanagedDeviceWarningsMaxAccessCodesReached : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsMaxAccessCodesReached() { } + +public UnmanagedDeviceWarningsMaxAccessCodesReached(int activeAccessCodeCount = default, string createdAt = default, int maxActiveAccessCodeCount = default, string message = default, string warningCode = default) +{ +ActiveAccessCodeCount = activeAccessCodeCount; +CreatedAt = createdAt; +MaxActiveAccessCodeCount = maxActiveAccessCodeCount; +Message = message; +WarningCode = warningCode; +} + +/// +/// Number of active access codes on the device when the warning was set. +/// +[DataMember(Name = "active_access_code_count", IsRequired = false, EmitDefaultValue = false)] +public int ActiveAccessCodeCount { get; set; } + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Maximum number of active access codes supported by the device. +/// +[DataMember(Name = "max_active_access_code_count", IsRequired = false, EmitDefaultValue = false)] +public int MaxActiveAccessCodeCount { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "max_access_codes_reached"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceWarningsUnrecognized_model")] +public class UnmanagedDeviceWarningsUnrecognized : UnmanagedDeviceWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceWarningsUnrecognized() { } + +public UnmanagedDeviceWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. +/// +[DataMember(Name = "can_activate_weekly_program", IsRequired = false, EmitDefaultValue = false)] +public bool? CanActivateWeeklyProgram { get; set; } + +/// +/// Indicates whether the lock supports configuring automatic locking. +/// +[DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanConfigureAutoLock { get; set; } + +/// +/// Indicates whether the thermostat supports cooling. +/// +[DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacCool { get; set; } + +/// +/// Indicates whether the thermostat supports heating. +/// +[DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacHeat { get; set; } + +/// +/// Indicates whether the thermostat supports simultaneous heating and cooling. +/// +[DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] +public bool? CanHvacHeatCool { get; set; } + +/// +/// Indicates whether the device supports programming offline access codes. +/// +[DataMember(Name = "can_program_offline_access_codes", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramOfflineAccessCodes { get; set; } + +/// +/// Indicates whether the device supports programming online access codes. +/// +[DataMember(Name = "can_program_online_access_codes", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramOnlineAccessCodes { get; set; } + +/// +/// Indicates whether the thermostat supports different climate programs for each day of the week. +/// +[DataMember(Name = "can_program_thermostat_programs_as_different_each_day", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } + +/// +/// Indicates whether the thermostat supports a single climate program applied to every day. +/// +[DataMember(Name = "can_program_thermostat_programs_as_same_each_day", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } + +/// +/// Indicates whether the thermostat supports weekday/weekend climate programs. +/// +[DataMember(Name = "can_program_thermostat_programs_as_weekday_weekend", IsRequired = false, EmitDefaultValue = false)] +public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } + +/// +/// Indicates whether the device supports remote locking. +/// +[DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRemotelyLock { get; set; } + +/// +/// Indicates whether the device supports remote unlocking. +/// +[DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRemotelyUnlock { get; set; } + +/// +/// Indicates whether the thermostat supports running climate programs. +/// +[DataMember(Name = "can_run_thermostat_programs", IsRequired = false, EmitDefaultValue = false)] +public bool? CanRunThermostatPrograms { get; set; } + +/// +/// Indicates whether the device supports simulating connection in a sandbox. +/// +[DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateConnection { get; set; } + +/// +/// Indicates whether the device supports simulating disconnection in a sandbox. +/// +[DataMember(Name = "can_simulate_disconnection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateDisconnection { get; set; } + +/// +/// Indicates whether the hub supports simulating connection in a sandbox. +/// +[DataMember(Name = "can_simulate_hub_connection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateHubConnection { get; set; } + +/// +/// Indicates whether the hub supports simulating disconnection in a sandbox. +/// +[DataMember(Name = "can_simulate_hub_disconnection", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateHubDisconnection { get; set; } + +/// +/// Indicates whether the device supports simulating a paid subscription in a sandbox. +/// +[DataMember(Name = "can_simulate_paid_subscription", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulatePaidSubscription { get; set; } + +/// +/// Indicates whether the device supports simulating removal in a sandbox. +/// +[DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] +public bool? CanSimulateRemoval { get; set; } + +/// +/// Indicates whether the camera supports streaming live video through a camera live view session. +/// +[DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] +public bool? CanStreamLiveVideo { get; set; } + +/// +/// Indicates whether the thermostat can be turned off. +/// +[DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] +public bool? CanTurnOffHvac { get; set; } + +/// +/// Indicates whether the lock supports unlocking with an access code. +/// +[DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] +public bool? CanUnlockWithCode { get; set; } + +/// +/// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). +/// +[DataMember(Name = "capabilities_supported", IsRequired = false, EmitDefaultValue = false)] +public List CapabilitiesSupported { get; set; } + +/// +/// Unique identifier for the account associated with the device. +/// +[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] +public string ConnectedAccountId { get; set; } + +/// +/// Date and time at which the device object was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. +/// +[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] +public object CustomMetadata { get; set; } + +/// +/// ID of the device. +/// +[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] +public string DeviceId { get; set; } + +/// +/// Type of the device. +/// +[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDevice.DeviceTypeEnum DeviceType { get; set; } + +/// +/// Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Indicates that Seam does not manage the device. +/// +[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] +public bool IsManaged { get; set; } + +/// +/// Location information for the device. +/// +[DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDeviceLocation? Location { get; set; } + +/// +/// properties of the device. +/// +[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDeviceProperties Properties { get; set; } + +/// +/// Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// Unique identifier for the Seam workspace associated with the device. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceLocation_model")] +public class UnmanagedDeviceLocation +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceLocation() { } + +public UnmanagedDeviceLocation(string? locationName = default, string? roomName = default, string? timeZone = default, string? timezone = default) +{ +LocationName = locationName; +RoomName = roomName; +TimeZone = timeZone; +Timezone = timezone; +} + +/// +/// Name of the device location. +/// +[DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] +public string? LocationName { get; set; } + +/// +/// Name of the room within the device location, when the provider reports one. +/// +[DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] +public string? RoomName { get; set; } + +/// +/// Time zone of the device location. +/// +[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] +public string? TimeZone { get; set; } + +/// +/// Time zone of the device location. +/// +[Obsolete("Use `time_zone` instead.")] +[DataMember(Name = "timezone", IsRequired = false, EmitDefaultValue = false)] +public string? Timezone { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDeviceProperties_model")] +public class UnmanagedDeviceProperties +{ +[JsonConstructorAttribute] +protected UnmanagedDeviceProperties() { } + +public UnmanagedDeviceProperties(UnmanagedDevicePropertiesAccessoryKeypad? accessoryKeypad = default, UnmanagedDevicePropertiesBattery? battery = default, float? batteryLevel = default, string? imageAltText = default, string? imageUrl = default, string? manufacturer = default, UnmanagedDevicePropertiesModel model = default, string name = default, bool? offlineAccessCodesEnabled = default, bool online = default, bool? onlineAccessCodesEnabled = default) +{ +AccessoryKeypad = accessoryKeypad; +Battery = battery; +BatteryLevel = batteryLevel; +ImageAltText = imageAltText; +ImageUrl = imageUrl; +Manufacturer = manufacturer; +Model = model; +Name = name; +OfflineAccessCodesEnabled = offlineAccessCodesEnabled; +Online = online; +OnlineAccessCodesEnabled = onlineAccessCodesEnabled; +} + +/// +/// Accessory keypad properties and state. +/// +[DataMember(Name = "accessory_keypad", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDevicePropertiesAccessoryKeypad? AccessoryKeypad { get; set; } + +/// +/// Represents the current status of the battery charge level. +/// +[DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDevicePropertiesBattery? Battery { get; set; } + +/// +/// Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. +/// +[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] +public float? BatteryLevel { get; set; } + +/// +/// Alt text for the device image. +/// +[DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] +public string? ImageAltText { get; set; } + +/// +/// Image URL for the device. +/// +[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] +public string? ImageUrl { get; set; } + +/// +/// Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. +/// +[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] +public string? Manufacturer { get; set; } + +/// +/// Device model-related properties. +/// +[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDevicePropertiesModel Model { get; set; } + +/// +/// Name of the device. +/// +[Obsolete("use device.display_name instead")] +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// Indicates whether it is currently possible to use offline access codes for the device. +/// +[Obsolete("use device.can_program_offline_access_codes")] +[DataMember(Name = "offline_access_codes_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? OfflineAccessCodesEnabled { get; set; } + +/// +/// Indicates whether the device is online. +/// +[DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] +public bool Online { get; set; } + +/// +/// Indicates whether it is currently possible to use online access codes for the device. +/// +[Obsolete("use device.can_program_online_access_codes")] +[DataMember(Name = "online_access_codes_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool? OnlineAccessCodesEnabled { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDevicePropertiesAccessoryKeypad_model")] +public class UnmanagedDevicePropertiesAccessoryKeypad +{ +[JsonConstructorAttribute] +protected UnmanagedDevicePropertiesAccessoryKeypad() { } + +public UnmanagedDevicePropertiesAccessoryKeypad(UnmanagedDevicePropertiesAccessoryKeypadBattery? battery = default, bool isConnected = default) +{ +Battery = battery; +IsConnected = isConnected; +} + +/// +/// Keypad battery properties. +/// +[DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDevicePropertiesAccessoryKeypadBattery? Battery { get; set; } + +/// +/// Indicates if an accessory keypad is connected to the device. +/// +[DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] +public bool IsConnected { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} - [EnumMember(Value = "linear_lock")] - LinearLock = 9, +[DataContract(Name = "seamModel_unmanagedDevicePropertiesAccessoryKeypadBattery_model")] +public class UnmanagedDevicePropertiesAccessoryKeypadBattery +{ +[JsonConstructorAttribute] +protected UnmanagedDevicePropertiesAccessoryKeypadBattery() { } + +public UnmanagedDevicePropertiesAccessoryKeypadBattery(float level = default) +{ +Level = level; +} + +[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] +public float Level { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedDevicePropertiesBattery_model")] +public class UnmanagedDevicePropertiesBattery +{ +[JsonConstructorAttribute] +protected UnmanagedDevicePropertiesBattery() { } - [EnumMember(Value = "lockly_lock")] - LocklyLock = 10, +public UnmanagedDevicePropertiesBattery(float level = default, UnmanagedDevicePropertiesBattery.StatusEnum status = default) +{ +Level = level; +Status = status; +} - [EnumMember(Value = "kwikset_lock")] - KwiksetLock = 11, +/// +/// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum StatusEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, - [EnumMember(Value = "nuki_lock")] - NukiLock = 12, +[EnumMember(Value = "critical")] +Critical = 1, - [EnumMember(Value = "salto_lock")] - SaltoLock = 13, +[EnumMember(Value = "low")] +Low = 2, - [EnumMember(Value = "schlage_lock")] - SchlageLock = 14, +[EnumMember(Value = "good")] +Good = 3, - [EnumMember(Value = "smartthings_lock")] - SmartthingsLock = 15, +[EnumMember(Value = "full")] +Full = 4, +} - [EnumMember(Value = "wyze_lock")] - WyzeLock = 16, +/// +/// Battery charge level as a value between 0 and 1, inclusive. +/// +[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] +public float Level { get; set; } - [EnumMember(Value = "yale_lock")] - YaleLock = 17, +/// +/// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. +/// +[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] +public UnmanagedDevicePropertiesBattery.StatusEnum Status { get; set; } - [EnumMember(Value = "two_n_intercom")] - TwoNIntercom = 18, +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "controlbyweb_device")] - ControlbywebDevice = 19, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "ttlock_lock")] - TtlockLock = 20, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "igloohome_lock")] - IgloohomeLock = 21, +[DataContract(Name = "seamModel_unmanagedDevicePropertiesModel_model")] +public class UnmanagedDevicePropertiesModel +{ +[JsonConstructorAttribute] +protected UnmanagedDevicePropertiesModel() { } - [EnumMember(Value = "four_suites_door")] - FourSuitesDoor = 22, +public UnmanagedDevicePropertiesModel(bool? accessoryKeypadSupported = default, bool? canConnectAccessoryKeypad = default, string displayName = default, bool? hasBuiltInKeypad = default, string manufacturerDisplayName = default, bool? offlineAccessCodesSupported = default, bool? onlineAccessCodesSupported = default) +{ +AccessoryKeypadSupported = accessoryKeypadSupported; +CanConnectAccessoryKeypad = canConnectAccessoryKeypad; +DisplayName = displayName; +HasBuiltInKeypad = hasBuiltInKeypad; +ManufacturerDisplayName = manufacturerDisplayName; +OfflineAccessCodesSupported = offlineAccessCodesSupported; +OnlineAccessCodesSupported = onlineAccessCodesSupported; +} - [EnumMember(Value = "dormakaba_oracode_door")] - DormakabaOracodeDoor = 23, +[Obsolete("use device.properties.model.can_connect_accessory_keypad")] +[DataMember(Name = "accessory_keypad_supported", IsRequired = false, EmitDefaultValue = false)] +public bool? AccessoryKeypadSupported { get; set; } + +/// +/// Indicates whether the device can connect a accessory keypad. +/// +[DataMember(Name = "can_connect_accessory_keypad", IsRequired = false, EmitDefaultValue = false)] +public bool? CanConnectAccessoryKeypad { get; set; } + +/// +/// Display name of the device model. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Indicates whether the device has a built in accessory keypad. +/// +[DataMember(Name = "has_built_in_keypad", IsRequired = false, EmitDefaultValue = false)] +public bool? HasBuiltInKeypad { get; set; } + +/// +/// Display name that corresponds to the manufacturer-specific terminology for the device. +/// +[DataMember(Name = "manufacturer_display_name", IsRequired = false, EmitDefaultValue = false)] +public string ManufacturerDisplayName { get; set; } + +[Obsolete("use device.can_program_offline_access_codes.")] +[DataMember(Name = "offline_access_codes_supported", IsRequired = false, EmitDefaultValue = false)] +public bool? OfflineAccessCodesSupported { get; set; } + +[Obsolete("use device.can_program_online_access_codes.")] +[DataMember(Name = "online_access_codes_supported", IsRequired = false, EmitDefaultValue = false)] +public bool? OnlineAccessCodesSupported { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - [EnumMember(Value = "tedee_lock")] - TedeeLock = 24, +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} - [EnumMember(Value = "akiles_lock")] - AkilesLock = 25, +return stringWriter.ToString(); +} +} - [EnumMember(Value = "ultraloq_lock")] - UltraloqLock = 26, - - [EnumMember(Value = "yacan_lock")] - YacanLock = 27, - - [EnumMember(Value = "keyincode_lock")] - KeyincodeLock = 28, - - [EnumMember(Value = "omnitec_lock")] - OmnitecLock = 29, - - [EnumMember(Value = "kisi_lock")] - KisiLock = 30, - - [EnumMember(Value = "aqara_lock")] - AqaraLock = 31, - - [EnumMember(Value = "keynest_key")] - KeynestKey = 32, - - [EnumMember(Value = "noiseaware_activity_zone")] - NoiseawareActivityZone = 33, - - [EnumMember(Value = "minut_sensor")] - MinutSensor = 34, - - [EnumMember(Value = "ecobee_thermostat")] - EcobeeThermostat = 35, - - [EnumMember(Value = "nest_thermostat")] - NestThermostat = 36, - - [EnumMember(Value = "honeywell_resideo_thermostat")] - HoneywellResideoThermostat = 37, - - [EnumMember(Value = "tado_thermostat")] - TadoThermostat = 38, - - [EnumMember(Value = "sensi_thermostat")] - SensiThermostat = 39, - - [EnumMember(Value = "smartthings_thermostat")] - SmartthingsThermostat = 40, - - [EnumMember(Value = "ios_phone")] - IosPhone = 41, - - [EnumMember(Value = "android_phone")] - AndroidPhone = 42, - - [EnumMember(Value = "ring_camera")] - RingCamera = 43, - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsBridgeDisconnected), - "bridge_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsSubscriptionRequired), - "subscription_required" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsAuxiliaryHeatRunning), - "auxiliary_heat_running" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsMissingDeviceCredentials), - "missing_device_credentials" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsAugustLockNotAuthorized), - "august_lock_not_authorized" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsEmptyBackupAccessCodePool), - "empty_backup_access_code_pool" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsDeviceDisconnected), - "device_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsHubDisconnected), - "hub_disconnected" - )] - [JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceRemoved), "device_removed")] - [JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceOffline), "device_offline")] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsDormakabaSitesDisconnected), - "dormakaba_sites_disconnected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsInsufficientPermissions), - "insufficient_permissions" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded), - "salto_ks_subscription_limit_exceeded" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceErrorsAccountDisconnected), - "account_disconnected" - )] - public abstract class UnmanagedDeviceErrors - { - public abstract string ErrorCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsAccountDisconnected_model")] - public class UnmanagedDeviceErrorsAccountDisconnected : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsAccountDisconnected() { } - - public UnmanagedDeviceErrorsAccountDisconnected( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "account_disconnected"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded_model" - )] - public class UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded() { } - - public UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsInsufficientPermissions_model")] - public class UnmanagedDeviceErrorsInsufficientPermissions : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsInsufficientPermissions() { } - - public UnmanagedDeviceErrorsInsufficientPermissions( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "insufficient_permissions"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsDormakabaSitesDisconnected_model")] - public class UnmanagedDeviceErrorsDormakabaSitesDisconnected : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsDormakabaSitesDisconnected() { } - - public UnmanagedDeviceErrorsDormakabaSitesDisconnected( - string createdAt = default, - string errorCode = default, - bool isConnectedAccountError = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsConnectedAccountError = isConnectedAccountError; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - - /// - /// Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsConnectedAccountError { get; set; } - - /// - /// Indicates that the error is not a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceOffline_model")] - public class UnmanagedDeviceErrorsDeviceOffline : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsDeviceOffline() { } - - public UnmanagedDeviceErrorsDeviceOffline( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_offline"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceRemoved_model")] - public class UnmanagedDeviceErrorsDeviceRemoved : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsDeviceRemoved() { } - - public UnmanagedDeviceErrorsDeviceRemoved( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_removed"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsHubDisconnected_model")] - public class UnmanagedDeviceErrorsHubDisconnected : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsHubDisconnected() { } - - public UnmanagedDeviceErrorsHubDisconnected( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "hub_disconnected"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceDisconnected_model")] - public class UnmanagedDeviceErrorsDeviceDisconnected : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsDeviceDisconnected() { } - - public UnmanagedDeviceErrorsDeviceDisconnected( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "device_disconnected"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsEmptyBackupAccessCodePool_model")] - public class UnmanagedDeviceErrorsEmptyBackupAccessCodePool : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsEmptyBackupAccessCodePool() { } - - public UnmanagedDeviceErrorsEmptyBackupAccessCodePool( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "empty_backup_access_code_pool"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsAugustLockNotAuthorized_model")] - public class UnmanagedDeviceErrorsAugustLockNotAuthorized : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsAugustLockNotAuthorized() { } - - public UnmanagedDeviceErrorsAugustLockNotAuthorized( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "august_lock_not_authorized"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsMissingDeviceCredentials_model")] - public class UnmanagedDeviceErrorsMissingDeviceCredentials : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsMissingDeviceCredentials() { } - - public UnmanagedDeviceErrorsMissingDeviceCredentials( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "missing_device_credentials"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsAuxiliaryHeatRunning_model")] - public class UnmanagedDeviceErrorsAuxiliaryHeatRunning : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsAuxiliaryHeatRunning() { } - - public UnmanagedDeviceErrorsAuxiliaryHeatRunning( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "auxiliary_heat_running"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsSubscriptionRequired_model")] - public class UnmanagedDeviceErrorsSubscriptionRequired : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsSubscriptionRequired() { } - - public UnmanagedDeviceErrorsSubscriptionRequired( - string createdAt = default, - string errorCode = default, - bool isDeviceError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsDeviceError = isDeviceError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "subscription_required"; - - /// - /// Indicates that the error is a device error. - /// - [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] - public bool IsDeviceError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsBridgeDisconnected_model")] - public class UnmanagedDeviceErrorsBridgeDisconnected : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsBridgeDisconnected() { } - - public UnmanagedDeviceErrorsBridgeDisconnected( - string createdAt = default, - string errorCode = default, - bool? isBridgeError = default, - bool? isConnectedAccountError = default, - string message = default - ) - { - CreatedAt = createdAt; - ErrorCode = errorCode; - IsBridgeError = isBridgeError; - IsConnectedAccountError = isConnectedAccountError; - Message = message; - } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "bridge_disconnected"; - - /// - /// Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). - /// - [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] - public bool? IsBridgeError { get; set; } - - /// - /// Indicates whether the error is related specifically to the connected account. - /// - [DataMember( - Name = "is_connected_account_error", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? IsConnectedAccountError { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceErrorsUnrecognized_model")] - public class UnmanagedDeviceErrorsUnrecognized : UnmanagedDeviceErrors - { - [JsonConstructorAttribute] - protected UnmanagedDeviceErrorsUnrecognized() { } - - public UnmanagedDeviceErrorsUnrecognized( - string errorCode = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsMaxAccessCodesReached), - "max_access_codes_reached" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsUnreliableOnlineStatus), - "unreliable_online_status" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsAccessoryKeypadLowBattery), - "accessory_keypad_low_battery" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsAccessoryKeypadSetupRequired), - "accessory_keypad_setup_required" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsKeynestUnsupportedLocker), - "keynest_unsupported_locker" - )] - [JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsProviderIssue), "provider_issue")] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities), - "hub_required_for_additional_capabilities" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsTwoNDeviceMissingTimezone), - "two_n_device_missing_timezone" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsTimeZoneMismatch), - "time_zone_mismatch" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsTimeZoneUnknown), - "time_zone_unknown" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsUltraloqTimeZoneUnknown), - "ultraloq_time_zone_unknown" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured), - "lockly_time_zone_not_configured" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsUnknownIssueWithPhone), - "unknown_issue_with_phone" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved), - "salto_ks_lock_access_code_support_removed" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached), - "salto_ks_subscription_limit_almost_reached" - )] - [JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsPrivacyMode), "privacy_mode")] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsSaltoKsPrivacyMode), - "salto_ks_privacy_mode" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsSaltoKsOfficeMode), - "salto_ks_office_mode" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsDeviceHasFlakyConnection), - "device_has_flaky_connection" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsScheduledMaintenanceWindow), - "scheduled_maintenance_window" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsDeviceCommunicationDegraded), - "device_communication_degraded" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsTemperatureThresholdExceeded), - "temperature_threshold_exceeded" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsPowerSavingMode), - "power_saving_mode" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsTtlockWeakGatewaySignal), - "ttlock_weak_gateway_signal" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled), - "ttlock_lock_gateway_unlocking_not_enabled" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsThirdPartyIntegrationDetected), - "third_party_integration_detected" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsManyActiveBackupCodes), - "many_active_backup_codes" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedDeviceWarningsPartialBackupAccessCodePool), - "partial_backup_access_code_pool" - )] - public abstract class UnmanagedDeviceWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsPartialBackupAccessCodePool_model")] - public class UnmanagedDeviceWarningsPartialBackupAccessCodePool : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsPartialBackupAccessCodePool() { } - - public UnmanagedDeviceWarningsPartialBackupAccessCodePool( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "partial_backup_access_code_pool"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsManyActiveBackupCodes_model")] - public class UnmanagedDeviceWarningsManyActiveBackupCodes : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsManyActiveBackupCodes() { } - - public UnmanagedDeviceWarningsManyActiveBackupCodes( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "many_active_backup_codes"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedDeviceWarningsThirdPartyIntegrationDetected_model" - )] - public class UnmanagedDeviceWarningsThirdPartyIntegrationDetected : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsThirdPartyIntegrationDetected() { } - - public UnmanagedDeviceWarningsThirdPartyIntegrationDetected( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "third_party_integration_detected"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled_model" - )] - public class UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled - : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled() { } - - public UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "ttlock_lock_gateway_unlocking_not_enabled"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsTtlockWeakGatewaySignal_model")] - public class UnmanagedDeviceWarningsTtlockWeakGatewaySignal : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsTtlockWeakGatewaySignal() { } - - public UnmanagedDeviceWarningsTtlockWeakGatewaySignal( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "ttlock_weak_gateway_signal"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsPowerSavingMode_model")] - public class UnmanagedDeviceWarningsPowerSavingMode : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsPowerSavingMode() { } - - public UnmanagedDeviceWarningsPowerSavingMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "power_saving_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsTemperatureThresholdExceeded_model")] - public class UnmanagedDeviceWarningsTemperatureThresholdExceeded : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsTemperatureThresholdExceeded() { } - - public UnmanagedDeviceWarningsTemperatureThresholdExceeded( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "temperature_threshold_exceeded"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsDeviceCommunicationDegraded_model")] - public class UnmanagedDeviceWarningsDeviceCommunicationDegraded : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsDeviceCommunicationDegraded() { } - - public UnmanagedDeviceWarningsDeviceCommunicationDegraded( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "device_communication_degraded"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsScheduledMaintenanceWindow_model")] - public class UnmanagedDeviceWarningsScheduledMaintenanceWindow : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsScheduledMaintenanceWindow() { } - - public UnmanagedDeviceWarningsScheduledMaintenanceWindow( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "scheduled_maintenance_window"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsDeviceHasFlakyConnection_model")] - public class UnmanagedDeviceWarningsDeviceHasFlakyConnection : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsDeviceHasFlakyConnection() { } - - public UnmanagedDeviceWarningsDeviceHasFlakyConnection( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "device_has_flaky_connection"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsOfficeMode_model")] - public class UnmanagedDeviceWarningsSaltoKsOfficeMode : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsSaltoKsOfficeMode() { } - - public UnmanagedDeviceWarningsSaltoKsOfficeMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "salto_ks_office_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsPrivacyMode_model")] - public class UnmanagedDeviceWarningsSaltoKsPrivacyMode : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsSaltoKsPrivacyMode() { } - - public UnmanagedDeviceWarningsSaltoKsPrivacyMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "salto_ks_privacy_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsPrivacyMode_model")] - public class UnmanagedDeviceWarningsPrivacyMode : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsPrivacyMode() { } - - public UnmanagedDeviceWarningsPrivacyMode( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "privacy_mode"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached_model" - )] - public class UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached - : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached() { } - - public UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "salto_ks_subscription_limit_almost_reached"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved_model" - )] - public class UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved - : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved() { } - - public UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "salto_ks_lock_access_code_support_removed"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsUnknownIssueWithPhone_model")] - public class UnmanagedDeviceWarningsUnknownIssueWithPhone : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsUnknownIssueWithPhone() { } - - public UnmanagedDeviceWarningsUnknownIssueWithPhone( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unknown_issue_with_phone"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsLocklyTimeZoneNotConfigured_model")] - public class UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured() { } - - public UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "lockly_time_zone_not_configured"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsUltraloqTimeZoneUnknown_model")] - public class UnmanagedDeviceWarningsUltraloqTimeZoneUnknown : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsUltraloqTimeZoneUnknown() { } - - public UnmanagedDeviceWarningsUltraloqTimeZoneUnknown( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "ultraloq_time_zone_unknown"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsTimeZoneUnknown_model")] - public class UnmanagedDeviceWarningsTimeZoneUnknown : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsTimeZoneUnknown() { } - - public UnmanagedDeviceWarningsTimeZoneUnknown( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "time_zone_unknown"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsTimeZoneMismatch_model")] - public class UnmanagedDeviceWarningsTimeZoneMismatch : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsTimeZoneMismatch() { } - - public UnmanagedDeviceWarningsTimeZoneMismatch( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "time_zone_mismatch"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsTwoNDeviceMissingTimezone_model")] - public class UnmanagedDeviceWarningsTwoNDeviceMissingTimezone : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsTwoNDeviceMissingTimezone() { } - - public UnmanagedDeviceWarningsTwoNDeviceMissingTimezone( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "two_n_device_missing_timezone"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedDeviceWarningsHubRequiredForAdditionalCapabilities_model" - )] - public class UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities - : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities() { } - - public UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "hub_required_for_additional_capabilities"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsProviderIssue_model")] - public class UnmanagedDeviceWarningsProviderIssue : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsProviderIssue() { } - - public UnmanagedDeviceWarningsProviderIssue( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "provider_issue"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsKeynestUnsupportedLocker_model")] - public class UnmanagedDeviceWarningsKeynestUnsupportedLocker : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsKeynestUnsupportedLocker() { } - - public UnmanagedDeviceWarningsKeynestUnsupportedLocker( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "keynest_unsupported_locker"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsAccessoryKeypadSetupRequired_model")] - public class UnmanagedDeviceWarningsAccessoryKeypadSetupRequired : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsAccessoryKeypadSetupRequired() { } - - public UnmanagedDeviceWarningsAccessoryKeypadSetupRequired( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "accessory_keypad_setup_required"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsAccessoryKeypadLowBattery_model")] - public class UnmanagedDeviceWarningsAccessoryKeypadLowBattery : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsAccessoryKeypadLowBattery() { } - - public UnmanagedDeviceWarningsAccessoryKeypadLowBattery( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "accessory_keypad_low_battery"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsUnreliableOnlineStatus_model")] - public class UnmanagedDeviceWarningsUnreliableOnlineStatus : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsUnreliableOnlineStatus() { } - - public UnmanagedDeviceWarningsUnreliableOnlineStatus( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unreliable_online_status"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsMaxAccessCodesReached_model")] - public class UnmanagedDeviceWarningsMaxAccessCodesReached : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsMaxAccessCodesReached() { } - - public UnmanagedDeviceWarningsMaxAccessCodesReached( - int activeAccessCodeCount = default, - string createdAt = default, - int maxActiveAccessCodeCount = default, - string message = default, - string warningCode = default - ) - { - ActiveAccessCodeCount = activeAccessCodeCount; - CreatedAt = createdAt; - MaxActiveAccessCodeCount = maxActiveAccessCodeCount; - Message = message; - WarningCode = warningCode; - } - - /// - /// Number of active access codes on the device when the warning was set. - /// - [DataMember( - Name = "active_access_code_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int ActiveAccessCodeCount { get; set; } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Maximum number of active access codes supported by the device. - /// - [DataMember( - Name = "max_active_access_code_count", - IsRequired = false, - EmitDefaultValue = false - )] - public int MaxActiveAccessCodeCount { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "max_access_codes_reached"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceWarningsUnrecognized_model")] - public class UnmanagedDeviceWarningsUnrecognized : UnmanagedDeviceWarnings - { - [JsonConstructorAttribute] - protected UnmanagedDeviceWarningsUnrecognized() { } - - public UnmanagedDeviceWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Indicates whether the lock supports configuring automatic locking. - /// - [DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanConfigureAutoLock { get; set; } - - /// - /// Indicates whether the thermostat supports cooling. - /// - [DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacCool { get; set; } - - /// - /// Indicates whether the thermostat supports heating. - /// - [DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacHeat { get; set; } - - /// - /// Indicates whether the thermostat supports simultaneous heating and cooling. - /// - [DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] - public bool? CanHvacHeatCool { get; set; } - - /// - /// Indicates whether the device supports programming offline access codes. - /// - [DataMember( - Name = "can_program_offline_access_codes", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramOfflineAccessCodes { get; set; } - - /// - /// Indicates whether the device supports programming online access codes. - /// - [DataMember( - Name = "can_program_online_access_codes", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramOnlineAccessCodes { get; set; } - - /// - /// Indicates whether the thermostat supports different climate programs for each day of the week. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_different_each_day", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } - - /// - /// Indicates whether the thermostat supports a single climate program applied to every day. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_same_each_day", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } - - /// - /// Indicates whether the thermostat supports weekday/weekend climate programs. - /// - [DataMember( - Name = "can_program_thermostat_programs_as_weekday_weekend", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } - - /// - /// Indicates whether the device supports remote locking. - /// - [DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanRemotelyLock { get; set; } - - /// - /// Indicates whether the device supports remote unlocking. - /// - [DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] - public bool? CanRemotelyUnlock { get; set; } - - /// - /// Indicates whether the thermostat supports running climate programs. - /// - [DataMember( - Name = "can_run_thermostat_programs", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanRunThermostatPrograms { get; set; } - - /// - /// Indicates whether the device supports simulating connection in a sandbox. - /// - [DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] - public bool? CanSimulateConnection { get; set; } - - /// - /// Indicates whether the device supports simulating disconnection in a sandbox. - /// - [DataMember( - Name = "can_simulate_disconnection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateDisconnection { get; set; } - - /// - /// Indicates whether the hub supports simulating connection in a sandbox. - /// - [DataMember( - Name = "can_simulate_hub_connection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateHubConnection { get; set; } - - /// - /// Indicates whether the hub supports simulating disconnection in a sandbox. - /// - [DataMember( - Name = "can_simulate_hub_disconnection", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulateHubDisconnection { get; set; } - - /// - /// Indicates whether the device supports simulating a paid subscription in a sandbox. - /// - [DataMember( - Name = "can_simulate_paid_subscription", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanSimulatePaidSubscription { get; set; } - - /// - /// Indicates whether the device supports simulating removal in a sandbox. - /// - [DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] - public bool? CanSimulateRemoval { get; set; } - - /// - /// Indicates whether the thermostat can be turned off. - /// - [DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] - public bool? CanTurnOffHvac { get; set; } - - /// - /// Indicates whether the lock supports unlocking with an access code. - /// - [DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] - public bool? CanUnlockWithCode { get; set; } - - /// - /// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). - /// - [DataMember(Name = "capabilities_supported", IsRequired = false, EmitDefaultValue = false)] - public List CapabilitiesSupported { get; set; } - - /// - /// Unique identifier for the account associated with the device. - /// - [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] - public string ConnectedAccountId { get; set; } - - /// - /// Date and time at which the device object was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. - /// - [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] - public object CustomMetadata { get; set; } - - /// - /// ID of the device. - /// - [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// Type of the device. - /// - [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDevice.DeviceTypeEnum DeviceType { get; set; } - - /// - /// Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Indicates that Seam does not manage the device. - /// - [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] - public bool IsManaged { get; set; } - - /// - /// Location information for the device. - /// - [DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDeviceLocation? Location { get; set; } - - /// - /// properties of the device. - /// - [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDeviceProperties Properties { get; set; } - - /// - /// Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// Unique identifier for the Seam workspace associated with the device. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceLocation_model")] - public class UnmanagedDeviceLocation - { - [JsonConstructorAttribute] - protected UnmanagedDeviceLocation() { } - - public UnmanagedDeviceLocation( - string? locationName = default, - string? roomName = default, - string? timeZone = default, - string? timezone = default - ) - { - LocationName = locationName; - RoomName = roomName; - TimeZone = timeZone; - Timezone = timezone; - } - - /// - /// Name of the device location. - /// - [DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] - public string? LocationName { get; set; } - - /// - /// Name of the room within the device location, when the provider reports one. - /// - [DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] - public string? RoomName { get; set; } - - /// - /// Time zone of the device location. - /// - [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] - public string? TimeZone { get; set; } - - /// - /// Time zone of the device location. - /// - [Obsolete("Use `time_zone` instead.")] - [DataMember(Name = "timezone", IsRequired = false, EmitDefaultValue = false)] - public string? Timezone { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDeviceProperties_model")] - public class UnmanagedDeviceProperties - { - [JsonConstructorAttribute] - protected UnmanagedDeviceProperties() { } - - public UnmanagedDeviceProperties( - UnmanagedDevicePropertiesAccessoryKeypad? accessoryKeypad = default, - UnmanagedDevicePropertiesBattery? battery = default, - float? batteryLevel = default, - string? imageAltText = default, - string? imageUrl = default, - string? manufacturer = default, - UnmanagedDevicePropertiesModel model = default, - string name = default, - bool? offlineAccessCodesEnabled = default, - bool online = default, - bool? onlineAccessCodesEnabled = default - ) - { - AccessoryKeypad = accessoryKeypad; - Battery = battery; - BatteryLevel = batteryLevel; - ImageAltText = imageAltText; - ImageUrl = imageUrl; - Manufacturer = manufacturer; - Model = model; - Name = name; - OfflineAccessCodesEnabled = offlineAccessCodesEnabled; - Online = online; - OnlineAccessCodesEnabled = onlineAccessCodesEnabled; - } - - /// - /// Accessory keypad properties and state. - /// - [DataMember(Name = "accessory_keypad", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDevicePropertiesAccessoryKeypad? AccessoryKeypad { get; set; } - - /// - /// Represents the current status of the battery charge level. - /// - [DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDevicePropertiesBattery? Battery { get; set; } - - /// - /// Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. - /// - [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] - public float? BatteryLevel { get; set; } - - /// - /// Alt text for the device image. - /// - [DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] - public string? ImageAltText { get; set; } - - /// - /// Image URL for the device. - /// - [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] - public string? ImageUrl { get; set; } - - /// - /// Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. - /// - [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] - public string? Manufacturer { get; set; } - - /// - /// Device model-related properties. - /// - [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDevicePropertiesModel Model { get; set; } - - /// - /// Name of the device. - /// - [Obsolete("use device.display_name instead")] - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Indicates whether it is currently possible to use offline access codes for the device. - /// - [Obsolete("use device.can_program_offline_access_codes")] - [DataMember( - Name = "offline_access_codes_enabled", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OfflineAccessCodesEnabled { get; set; } - - /// - /// Indicates whether the device is online. - /// - [DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] - public bool Online { get; set; } - - /// - /// Indicates whether it is currently possible to use online access codes for the device. - /// - [Obsolete("use device.can_program_online_access_codes")] - [DataMember( - Name = "online_access_codes_enabled", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OnlineAccessCodesEnabled { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDevicePropertiesAccessoryKeypad_model")] - public class UnmanagedDevicePropertiesAccessoryKeypad - { - [JsonConstructorAttribute] - protected UnmanagedDevicePropertiesAccessoryKeypad() { } - - public UnmanagedDevicePropertiesAccessoryKeypad( - UnmanagedDevicePropertiesAccessoryKeypadBattery? battery = default, - bool isConnected = default - ) - { - Battery = battery; - IsConnected = isConnected; - } - - /// - /// Keypad battery properties. - /// - [DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDevicePropertiesAccessoryKeypadBattery? Battery { get; set; } - - /// - /// Indicates if an accessory keypad is connected to the device. - /// - [DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] - public bool IsConnected { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDevicePropertiesAccessoryKeypadBattery_model")] - public class UnmanagedDevicePropertiesAccessoryKeypadBattery - { - [JsonConstructorAttribute] - protected UnmanagedDevicePropertiesAccessoryKeypadBattery() { } - - public UnmanagedDevicePropertiesAccessoryKeypadBattery(float level = default) - { - Level = level; - } - - [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] - public float Level { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDevicePropertiesBattery_model")] - public class UnmanagedDevicePropertiesBattery - { - [JsonConstructorAttribute] - protected UnmanagedDevicePropertiesBattery() { } - - public UnmanagedDevicePropertiesBattery( - float level = default, - UnmanagedDevicePropertiesBattery.StatusEnum status = default - ) - { - Level = level; - Status = status; - } - - /// - /// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum StatusEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "critical")] - Critical = 1, - - [EnumMember(Value = "low")] - Low = 2, - - [EnumMember(Value = "good")] - Good = 3, - - [EnumMember(Value = "full")] - Full = 4, - } - - /// - /// Battery charge level as a value between 0 and 1, inclusive. - /// - [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] - public float Level { get; set; } - - /// - /// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. - /// - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public UnmanagedDevicePropertiesBattery.StatusEnum Status { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedDevicePropertiesModel_model")] - public class UnmanagedDevicePropertiesModel - { - [JsonConstructorAttribute] - protected UnmanagedDevicePropertiesModel() { } - - public UnmanagedDevicePropertiesModel( - bool? accessoryKeypadSupported = default, - bool? canConnectAccessoryKeypad = default, - string displayName = default, - bool? hasBuiltInKeypad = default, - string manufacturerDisplayName = default, - bool? offlineAccessCodesSupported = default, - bool? onlineAccessCodesSupported = default - ) - { - AccessoryKeypadSupported = accessoryKeypadSupported; - CanConnectAccessoryKeypad = canConnectAccessoryKeypad; - DisplayName = displayName; - HasBuiltInKeypad = hasBuiltInKeypad; - ManufacturerDisplayName = manufacturerDisplayName; - OfflineAccessCodesSupported = offlineAccessCodesSupported; - OnlineAccessCodesSupported = onlineAccessCodesSupported; - } - - [Obsolete("use device.properties.model.can_connect_accessory_keypad")] - [DataMember( - Name = "accessory_keypad_supported", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? AccessoryKeypadSupported { get; set; } - - /// - /// Indicates whether the device can connect a accessory keypad. - /// - [DataMember( - Name = "can_connect_accessory_keypad", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? CanConnectAccessoryKeypad { get; set; } - - /// - /// Display name of the device model. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Indicates whether the device has a built in accessory keypad. - /// - [DataMember(Name = "has_built_in_keypad", IsRequired = false, EmitDefaultValue = false)] - public bool? HasBuiltInKeypad { get; set; } - - /// - /// Display name that corresponds to the manufacturer-specific terminology for the device. - /// - [DataMember( - Name = "manufacturer_display_name", - IsRequired = false, - EmitDefaultValue = false - )] - public string ManufacturerDisplayName { get; set; } - - [Obsolete("use device.can_program_offline_access_codes.")] - [DataMember( - Name = "offline_access_codes_supported", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OfflineAccessCodesSupported { get; set; } - - [Obsolete("use device.can_program_online_access_codes.")] - [DataMember( - Name = "online_access_codes_supported", - IsRequired = false, - EmitDefaultValue = false - )] - public bool? OnlineAccessCodesSupported { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } } diff --git a/src/Seam/Model/UnmanagedUserIdentity.cs b/src/Seam/Model/UnmanagedUserIdentity.cs index 4bada5ab..1d184dcc 100644 --- a/src/Seam/Model/UnmanagedUserIdentity.cs +++ b/src/Seam/Model/UnmanagedUserIdentity.cs @@ -8,479 +8,422 @@ namespace Seam.Model { - /// - /// Represents an unmanaged user identity. Unmanaged user identities do not have keys. - /// - [DataContract(Name = "seamModel_unmanagedUserIdentity_model")] - public class UnmanagedUserIdentity - { - [JsonConstructorAttribute] - protected UnmanagedUserIdentity() { } - - public UnmanagedUserIdentity( - List acsUserIds = default, - string createdAt = default, - string displayName = default, - string? emailAddress = default, - List errors = default, - string? fullName = default, - List mergedUserIdentityIds = default, - List mergedUserIdentityKeys = default, - string? phoneNumber = default, - string userIdentityId = default, - List warnings = default, - string workspaceId = default - ) - { - AcsUserIds = acsUserIds; - CreatedAt = createdAt; - DisplayName = displayName; - EmailAddress = emailAddress; - Errors = errors; - FullName = fullName; - MergedUserIdentityIds = mergedUserIdentityIds; - MergedUserIdentityKeys = mergedUserIdentityKeys; - PhoneNumber = phoneNumber; - UserIdentityId = userIdentityId; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedUserIdentityErrorsIssueWithAcsUser), - "issue_with_acs_user" - )] - public abstract class UnmanagedUserIdentityErrors - { - public abstract string ErrorCode { get; } - - public abstract string AcsSystemId { get; set; } - - public abstract string AcsUserId { get; set; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedUserIdentityErrorsIssueWithAcsUser_model")] - public class UnmanagedUserIdentityErrorsIssueWithAcsUser : UnmanagedUserIdentityErrors - { - [JsonConstructorAttribute] - protected UnmanagedUserIdentityErrorsIssueWithAcsUser() { } - - public UnmanagedUserIdentityErrorsIssueWithAcsUser( - string acsSystemId = default, - string acsUserId = default, - string createdAt = default, - string errorCode = default, - string message = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// ID of the access system that the user identity is associated with. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public override string AcsSystemId { get; set; } - - /// - /// ID of the access system user that has an issue. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public override string AcsUserId { get; set; } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "issue_with_acs_user"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedUserIdentityErrorsUnrecognized_model")] - public class UnmanagedUserIdentityErrorsUnrecognized : UnmanagedUserIdentityErrors - { - [JsonConstructorAttribute] - protected UnmanagedUserIdentityErrorsUnrecognized() { } - - public UnmanagedUserIdentityErrorsUnrecognized( - string errorCode = default, - string acsSystemId = default, - string acsUserId = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// ID of the access system that the user identity is associated with. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public override string AcsSystemId { get; set; } - - /// - /// ID of the access system user that has an issue. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public override string AcsUserId { get; set; } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), - "acs_user_profile_does_not_match_user_identity" - )] - [JsonSubtypes.KnownSubType( - typeof(UnmanagedUserIdentityWarningsBeingDeleted), - "being_deleted" - )] - public abstract class UnmanagedUserIdentityWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_unmanagedUserIdentityWarningsBeingDeleted_model")] - public class UnmanagedUserIdentityWarningsBeingDeleted : UnmanagedUserIdentityWarnings - { - [JsonConstructorAttribute] - protected UnmanagedUserIdentityWarningsBeingDeleted() { } - - public UnmanagedUserIdentityWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_unmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model" - )] - public class UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity - : UnmanagedUserIdentityWarnings - { - [JsonConstructorAttribute] - protected UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } - - public UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "acs_user_profile_does_not_match_user_identity"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_unmanagedUserIdentityWarningsUnrecognized_model")] - public class UnmanagedUserIdentityWarningsUnrecognized : UnmanagedUserIdentityWarnings - { - [JsonConstructorAttribute] - protected UnmanagedUserIdentityWarningsUnrecognized() { } - - public UnmanagedUserIdentityWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Array of access system user IDs associated with the user identity. - /// - [DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] - public List AcsUserIds { get; set; } - - /// - /// Date and time at which the user identity was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name for the user identity. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Unique email address for the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Full name of the user associated with the user identity. - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. - /// - [DataMember( - Name = "merged_user_identity_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List MergedUserIdentityIds { get; set; } - - /// - /// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. - /// - [DataMember( - Name = "merged_user_identity_keys", - IsRequired = false, - EmitDefaultValue = false - )] - public List MergedUserIdentityKeys { get; set; } - - /// - /// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// ID of the user identity. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - /// - /// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the user identity. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents an unmanaged user identity. Unmanaged user identities do not have keys. +/// +[DataContract(Name = "seamModel_unmanagedUserIdentity_model")] +public class UnmanagedUserIdentity +{ +[JsonConstructorAttribute] +protected UnmanagedUserIdentity() { } + +public UnmanagedUserIdentity(List acsUserIds = default, string createdAt = default, string displayName = default, string? emailAddress = default, List errors = default, string? fullName = default, List mergedUserIdentityIds = default, List mergedUserIdentityKeys = default, string? phoneNumber = default, string userIdentityId = default, List warnings = default, string workspaceId = default) +{ +AcsUserIds = acsUserIds; +CreatedAt = createdAt; +DisplayName = displayName; +EmailAddress = emailAddress; +Errors = errors; +FullName = fullName; +MergedUserIdentityIds = mergedUserIdentityIds; +MergedUserIdentityKeys = mergedUserIdentityKeys; +PhoneNumber = phoneNumber; +UserIdentityId = userIdentityId; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedUserIdentityErrorsIssueWithAcsUser), "issue_with_acs_user")] +public abstract class UnmanagedUserIdentityErrors +{ +public abstract string ErrorCode { get; } + +public abstract string AcsSystemId { get; set; } + +public abstract string AcsUserId { get; set; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedUserIdentityErrorsIssueWithAcsUser_model")] +public class UnmanagedUserIdentityErrorsIssueWithAcsUser : UnmanagedUserIdentityErrors +{ +[JsonConstructorAttribute] +protected UnmanagedUserIdentityErrorsIssueWithAcsUser() { } + +public UnmanagedUserIdentityErrorsIssueWithAcsUser(string acsSystemId = default, string acsUserId = default, string createdAt = default, string errorCode = default, string message = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// ID of the access system that the user identity is associated with. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public override string AcsSystemId { get; set; } + +/// +/// ID of the access system user that has an issue. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public override string AcsUserId { get; set; } + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "issue_with_acs_user"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedUserIdentityErrorsUnrecognized_model")] +public class UnmanagedUserIdentityErrorsUnrecognized : UnmanagedUserIdentityErrors +{ +[JsonConstructorAttribute] +protected UnmanagedUserIdentityErrorsUnrecognized() { } + +public UnmanagedUserIdentityErrorsUnrecognized(string errorCode = default, string acsSystemId = default, string acsUserId = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// ID of the access system that the user identity is associated with. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public override string AcsSystemId { get; set; } + +/// +/// ID of the access system user that has an issue. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public override string AcsUserId { get; set; } + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), "acs_user_profile_does_not_match_user_identity")] +[JsonSubtypes.KnownSubType(typeof(UnmanagedUserIdentityWarningsBeingDeleted), "being_deleted")] +public abstract class UnmanagedUserIdentityWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_unmanagedUserIdentityWarningsBeingDeleted_model")] +public class UnmanagedUserIdentityWarningsBeingDeleted : UnmanagedUserIdentityWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedUserIdentityWarningsBeingDeleted() { } + +public UnmanagedUserIdentityWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model")] +public class UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity : UnmanagedUserIdentityWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } + +public UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "acs_user_profile_does_not_match_user_identity"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_unmanagedUserIdentityWarningsUnrecognized_model")] +public class UnmanagedUserIdentityWarningsUnrecognized : UnmanagedUserIdentityWarnings +{ +[JsonConstructorAttribute] +protected UnmanagedUserIdentityWarningsUnrecognized() { } + +public UnmanagedUserIdentityWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Array of access system user IDs associated with the user identity. +/// +[DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] +public List AcsUserIds { get; set; } + +/// +/// Date and time at which the user identity was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name for the user identity. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Unique email address for the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Full name of the user associated with the user identity. +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. +/// +[DataMember(Name = "merged_user_identity_ids", IsRequired = false, EmitDefaultValue = false)] +public List MergedUserIdentityIds { get; set; } + +/// +/// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. +/// +[DataMember(Name = "merged_user_identity_keys", IsRequired = false, EmitDefaultValue = false)] +public List MergedUserIdentityKeys { get; set; } + +/// +/// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// ID of the user identity. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +/// +/// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the user identity. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/UserIdentity.cs b/src/Seam/Model/UserIdentity.cs index 7a28e98c..7e435fe4 100644 --- a/src/Seam/Model/UserIdentity.cs +++ b/src/Seam/Model/UserIdentity.cs @@ -8,484 +8,429 @@ namespace Seam.Model { - /// - /// Represents a [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. - /// - [DataContract(Name = "seamModel_userIdentity_model")] - public class UserIdentity - { - [JsonConstructorAttribute] - protected UserIdentity() { } - - public UserIdentity( - List acsUserIds = default, - string createdAt = default, - string displayName = default, - string? emailAddress = default, - List errors = default, - string? fullName = default, - List mergedUserIdentityIds = default, - List mergedUserIdentityKeys = default, - string? phoneNumber = default, - string userIdentityId = default, - string? userIdentityKey = default, - List warnings = default, - string workspaceId = default - ) - { - AcsUserIds = acsUserIds; - CreatedAt = createdAt; - DisplayName = displayName; - EmailAddress = emailAddress; - Errors = errors; - FullName = fullName; - MergedUserIdentityIds = mergedUserIdentityIds; - MergedUserIdentityKeys = mergedUserIdentityKeys; - PhoneNumber = phoneNumber; - UserIdentityId = userIdentityId; - UserIdentityKey = userIdentityKey; - Warnings = warnings; - WorkspaceId = workspaceId; - } - - [JsonConverter(typeof(JsonSubtypes), "error_code")] - [JsonSubtypes.FallBackSubType(typeof(UserIdentityErrorsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UserIdentityErrorsIssueWithAcsUser), - "issue_with_acs_user" - )] - public abstract class UserIdentityErrors - { - public abstract string ErrorCode { get; } - - public abstract string AcsSystemId { get; set; } - - public abstract string AcsUserId { get; set; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_userIdentityErrorsIssueWithAcsUser_model")] - public class UserIdentityErrorsIssueWithAcsUser : UserIdentityErrors - { - [JsonConstructorAttribute] - protected UserIdentityErrorsIssueWithAcsUser() { } - - public UserIdentityErrorsIssueWithAcsUser( - string acsSystemId = default, - string acsUserId = default, - string createdAt = default, - string errorCode = default, - string message = default - ) - { - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - CreatedAt = createdAt; - ErrorCode = errorCode; - Message = message; - } - - /// - /// ID of the access system that the user identity is associated with. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public override string AcsSystemId { get; set; } - - /// - /// ID of the access system user that has an issue. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public override string AcsUserId { get; set; } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "issue_with_acs_user"; - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_userIdentityErrorsUnrecognized_model")] - public class UserIdentityErrorsUnrecognized : UserIdentityErrors - { - [JsonConstructorAttribute] - protected UserIdentityErrorsUnrecognized() { } - - public UserIdentityErrorsUnrecognized( - string errorCode = default, - string acsSystemId = default, - string acsUserId = default, - string createdAt = default, - string message = default - ) - { - ErrorCode = errorCode; - AcsSystemId = acsSystemId; - AcsUserId = acsUserId; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] - public override string ErrorCode { get; } = "unrecognized"; - - /// - /// ID of the access system that the user identity is associated with. - /// - [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] - public override string AcsSystemId { get; set; } - - /// - /// ID of the access system user that has an issue. - /// - [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] - public override string AcsUserId { get; set; } - - /// - /// Date and time at which Seam created the error. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [JsonConverter(typeof(JsonSubtypes), "warning_code")] - [JsonSubtypes.FallBackSubType(typeof(UserIdentityWarningsUnrecognized))] - [JsonSubtypes.KnownSubType( - typeof(UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), - "acs_user_profile_does_not_match_user_identity" - )] - [JsonSubtypes.KnownSubType(typeof(UserIdentityWarningsBeingDeleted), "being_deleted")] - public abstract class UserIdentityWarnings - { - public abstract string WarningCode { get; } - - public abstract string CreatedAt { get; set; } - - public abstract string Message { get; set; } - - public abstract override string ToString(); - } - - [DataContract(Name = "seamModel_userIdentityWarningsBeingDeleted_model")] - public class UserIdentityWarningsBeingDeleted : UserIdentityWarnings - { - [JsonConstructorAttribute] - protected UserIdentityWarningsBeingDeleted() { } - - public UserIdentityWarningsBeingDeleted( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "being_deleted"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract( - Name = "seamModel_userIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model" - )] - public class UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity - : UserIdentityWarnings - { - [JsonConstructorAttribute] - protected UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } - - public UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity( - string createdAt = default, - string message = default, - string warningCode = default - ) - { - CreatedAt = createdAt; - Message = message; - WarningCode = warningCode; - } - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = - "acs_user_profile_does_not_match_user_identity"; - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_userIdentityWarningsUnrecognized_model")] - public class UserIdentityWarningsUnrecognized : UserIdentityWarnings - { - [JsonConstructorAttribute] - protected UserIdentityWarningsUnrecognized() { } - - public UserIdentityWarningsUnrecognized( - string warningCode = default, - string createdAt = default, - string message = default - ) - { - WarningCode = warningCode; - CreatedAt = createdAt; - Message = message; - } - - [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] - public override string WarningCode { get; } = "unrecognized"; - - /// - /// Date and time at which Seam created the warning. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public override string CreatedAt { get; set; } - - /// - /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public override string Message { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - /// - /// Array of access system user IDs associated with the user identity. - /// - [DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] - public List AcsUserIds { get; set; } - - /// - /// Date and time at which the user identity was created. - /// - [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Display name for the user identity. - /// - [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Unique email address for the user identity. - /// - [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] - public string? EmailAddress { get; set; } - - /// - /// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// Full name of the user associated with the user identity. - /// - [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] - public string? FullName { get; set; } - - /// - /// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. - /// - [DataMember( - Name = "merged_user_identity_ids", - IsRequired = false, - EmitDefaultValue = false - )] - public List MergedUserIdentityIds { get; set; } - - /// - /// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. - /// - [DataMember( - Name = "merged_user_identity_keys", - IsRequired = false, - EmitDefaultValue = false - )] - public List MergedUserIdentityKeys { get; set; } - - /// - /// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). - /// - [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] - public string? PhoneNumber { get; set; } - - /// - /// ID of the user identity. - /// - [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] - public string UserIdentityId { get; set; } - - /// - /// Unique key for the user identity. - /// - [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] - public string? UserIdentityKey { get; set; } - - /// - /// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. - /// - [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] - public List Warnings { get; set; } - - /// - /// ID of the workspace that contains the user identity. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. +/// +[DataContract(Name = "seamModel_userIdentity_model")] +public class UserIdentity +{ +[JsonConstructorAttribute] +protected UserIdentity() { } + +public UserIdentity(List acsUserIds = default, string createdAt = default, string displayName = default, string? emailAddress = default, List errors = default, string? fullName = default, List mergedUserIdentityIds = default, List mergedUserIdentityKeys = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default, List warnings = default, string workspaceId = default) +{ +AcsUserIds = acsUserIds; +CreatedAt = createdAt; +DisplayName = displayName; +EmailAddress = emailAddress; +Errors = errors; +FullName = fullName; +MergedUserIdentityIds = mergedUserIdentityIds; +MergedUserIdentityKeys = mergedUserIdentityKeys; +PhoneNumber = phoneNumber; +UserIdentityId = userIdentityId; +UserIdentityKey = userIdentityKey; +Warnings = warnings; +WorkspaceId = workspaceId; +} + +[JsonConverter(typeof(JsonSubtypes), "error_code")] +[JsonSubtypes.FallBackSubType(typeof(UserIdentityErrorsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UserIdentityErrorsIssueWithAcsUser), "issue_with_acs_user")] +public abstract class UserIdentityErrors +{ +public abstract string ErrorCode { get; } + +public abstract string AcsSystemId { get; set; } + +public abstract string AcsUserId { get; set; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_userIdentityErrorsIssueWithAcsUser_model")] +public class UserIdentityErrorsIssueWithAcsUser : UserIdentityErrors +{ +[JsonConstructorAttribute] +protected UserIdentityErrorsIssueWithAcsUser() { } + +public UserIdentityErrorsIssueWithAcsUser(string acsSystemId = default, string acsUserId = default, string createdAt = default, string errorCode = default, string message = default) +{ +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +CreatedAt = createdAt; +ErrorCode = errorCode; +Message = message; +} + +/// +/// ID of the access system that the user identity is associated with. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public override string AcsSystemId { get; set; } + +/// +/// ID of the access system user that has an issue. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public override string AcsUserId { get; set; } + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "issue_with_acs_user"; + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_userIdentityErrorsUnrecognized_model")] +public class UserIdentityErrorsUnrecognized : UserIdentityErrors +{ +[JsonConstructorAttribute] +protected UserIdentityErrorsUnrecognized() { } + +public UserIdentityErrorsUnrecognized(string errorCode = default, string acsSystemId = default, string acsUserId = default, string createdAt = default, string message = default) +{ +ErrorCode = errorCode; +AcsSystemId = acsSystemId; +AcsUserId = acsUserId; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] +public override string ErrorCode { get; } = "unrecognized"; + +/// +/// ID of the access system that the user identity is associated with. +/// +[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] +public override string AcsSystemId { get; set; } + +/// +/// ID of the access system user that has an issue. +/// +[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] +public override string AcsUserId { get; set; } + +/// +/// Date and time at which Seam created the error. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[JsonConverter(typeof(JsonSubtypes), "warning_code")] +[JsonSubtypes.FallBackSubType(typeof(UserIdentityWarningsUnrecognized))] +[JsonSubtypes.KnownSubType(typeof(UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), "acs_user_profile_does_not_match_user_identity")] +[JsonSubtypes.KnownSubType(typeof(UserIdentityWarningsBeingDeleted), "being_deleted")] +public abstract class UserIdentityWarnings +{ +public abstract string WarningCode { get; } + +public abstract string CreatedAt { get; set; } + +public abstract string Message { get; set; } + +public abstract override string ToString(); +} + +[DataContract(Name = "seamModel_userIdentityWarningsBeingDeleted_model")] +public class UserIdentityWarningsBeingDeleted : UserIdentityWarnings +{ +[JsonConstructorAttribute] +protected UserIdentityWarningsBeingDeleted() { } + +public UserIdentityWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "being_deleted"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_userIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model")] +public class UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity : UserIdentityWarnings +{ +[JsonConstructorAttribute] +protected UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } + +public UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity(string createdAt = default, string message = default, string warningCode = default) +{ +CreatedAt = createdAt; +Message = message; +WarningCode = warningCode; +} + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "acs_user_profile_does_not_match_user_identity"; + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_userIdentityWarningsUnrecognized_model")] +public class UserIdentityWarningsUnrecognized : UserIdentityWarnings +{ +[JsonConstructorAttribute] +protected UserIdentityWarningsUnrecognized() { } + +public UserIdentityWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) +{ +WarningCode = warningCode; +CreatedAt = createdAt; +Message = message; +} + +[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] +public override string WarningCode { get; } = "unrecognized"; + +/// +/// Date and time at which Seam created the warning. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public override string CreatedAt { get; set; } + +/// +/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] +public override string Message { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +/// +/// Array of access system user IDs associated with the user identity. +/// +[DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] +public List AcsUserIds { get; set; } + +/// +/// Date and time at which the user identity was created. +/// +[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] +public string CreatedAt { get; set; } + +/// +/// Display name for the user identity. +/// +[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] +public string DisplayName { get; set; } + +/// +/// Unique email address for the user identity. +/// +[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] +public string? EmailAddress { get; set; } + +/// +/// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] +public List Errors { get; set; } + +/// +/// Full name of the user associated with the user identity. +/// +[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] +public string? FullName { get; set; } + +/// +/// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. +/// +[DataMember(Name = "merged_user_identity_ids", IsRequired = false, EmitDefaultValue = false)] +public List MergedUserIdentityIds { get; set; } + +/// +/// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. +/// +[DataMember(Name = "merged_user_identity_keys", IsRequired = false, EmitDefaultValue = false)] +public List MergedUserIdentityKeys { get; set; } + +/// +/// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). +/// +[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] +public string? PhoneNumber { get; set; } + +/// +/// ID of the user identity. +/// +[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] +public string UserIdentityId { get; set; } + +/// +/// Unique key for the user identity. +/// +[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] +public string? UserIdentityKey { get; set; } + +/// +/// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. +/// +[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] +public List Warnings { get; set; } + +/// +/// ID of the workspace that contains the user identity. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } diff --git a/src/Seam/Model/Webhook.cs b/src/Seam/Model/Webhook.cs index ba425ddb..878a3a1e 100644 --- a/src/Seam/Model/Webhook.cs +++ b/src/Seam/Model/Webhook.cs @@ -8,69 +8,65 @@ namespace Seam.Model { - /// - /// Represents a [webhook](https://docs.seam.co/developer-tools/webhooks) that enables you to receive notifications of events. When you create a webhook, specify the endpoint URL at which you want to receive events and the set of event types that you want to receive. - /// - [DataContract(Name = "seamModel_webhook_model")] - public class Webhook - { - [JsonConstructorAttribute] - protected Webhook() { } +/// +/// Represents a [webhook](https://www.seam.co/docs/developer-tools/webhooks) that enables you to receive notifications of events. When you create a webhook, specify the endpoint URL at which you want to receive events and the set of event types that you want to receive. +/// +[DataContract(Name = "seamModel_webhook_model")] +public class Webhook +{ +[JsonConstructorAttribute] +protected Webhook() { } - public Webhook( - List? eventTypes = default, - string? secret = default, - string url = default, - string webhookId = default - ) - { - EventTypes = eventTypes; - Secret = secret; - Url = url; - WebhookId = webhookId; - } +public Webhook(List? eventTypes = default, string? secret = default, string url = default, string webhookId = default) +{ +EventTypes = eventTypes; +Secret = secret; +Url = url; +WebhookId = webhookId; +} - /// - /// Types of events that the [webhook](https://docs.seam.co/developer-tools/webhooks) should receive. - /// - [DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] - public List? EventTypes { get; set; } +/// +/// Types of events that the [webhook](https://www.seam.co/docs/developer-tools/webhooks) should receive. +/// +[DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] +public List? EventTypes { get; set; } - /// - /// Secret associated with the [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - [DataMember(Name = "secret", IsRequired = false, EmitDefaultValue = false)] - public string? Secret { get; set; } +/// +/// Secret associated with the [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +[DataMember(Name = "secret", IsRequired = false, EmitDefaultValue = false)] +public string? Secret { get; set; } - /// - /// URL for the [webhook](https://docs.seam.co/developer-tools/webhooks). - /// - [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] - public string Url { get; set; } +/// +/// URL for the [webhook](https://www.seam.co/docs/developer-tools/webhooks). +/// +[DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] +public string Url { get; set; } - /// - /// ID of the webhook. - /// - [DataMember(Name = "webhook_id", IsRequired = false, EmitDefaultValue = false)] - public string WebhookId { get; set; } +/// +/// ID of the webhook. +/// +[DataMember(Name = "webhook_id", IsRequired = false, EmitDefaultValue = false)] +public string WebhookId { get; set; } - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} - return stringWriter.ToString(); - } - } } diff --git a/src/Seam/Model/Workspace.cs b/src/Seam/Model/Workspace.cs index ed6f1991..17af08d8 100644 --- a/src/Seam/Model/Workspace.cs +++ b/src/Seam/Model/Workspace.cs @@ -8,214 +8,186 @@ namespace Seam.Model { - /// - /// Represents a Seam [workspace](https://docs.seam.co/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://docs.seam.co/core-concepts/workspaces#production-workspaces). - /// - [DataContract(Name = "seamModel_workspace_model")] - public class Workspace - { - [JsonConstructorAttribute] - protected Workspace() { } - - public Workspace( - string companyName = default, - string? connectPartnerName = default, - WorkspaceConnectWebviewCustomization connectWebviewCustomization = default, - bool isPublishableKeyAuthEnabled = default, - bool isSandbox = default, - bool isSuspended = default, - string name = default, - string? organizationId = default, - string? publishableKey = default, - string workspaceId = default - ) - { - CompanyName = companyName; - ConnectPartnerName = connectPartnerName; - ConnectWebviewCustomization = connectWebviewCustomization; - IsPublishableKeyAuthEnabled = isPublishableKeyAuthEnabled; - IsSandbox = isSandbox; - IsSuspended = isSuspended; - Name = name; - OrganizationId = organizationId; - PublishableKey = publishableKey; - WorkspaceId = workspaceId; - } - - /// - /// Company name associated with the [workspace](https://docs.seam.co/core-concepts/workspaces). - /// - [Obsolete("Use `connect_partner_name` instead.")] - [DataMember(Name = "company_name", IsRequired = false, EmitDefaultValue = false)] - public string CompanyName { get; set; } - - /// - /// Seam Connect partner name associated with the [workspace](https://docs.seam.co/core-concepts/workspaces). - /// - [DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] - public string? ConnectPartnerName { get; set; } - - [DataMember( - Name = "connect_webview_customization", - IsRequired = false, - EmitDefaultValue = false - )] - public WorkspaceConnectWebviewCustomization ConnectWebviewCustomization { get; set; } - - /// - /// Indicates whether publishable key authentication is enabled for this workspace. - /// - [DataMember( - Name = "is_publishable_key_auth_enabled", - IsRequired = false, - EmitDefaultValue = false - )] - public bool IsPublishableKeyAuthEnabled { get; set; } - - /// - /// Indicates whether the workspace is a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). - /// - [DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] - public bool IsSandbox { get; set; } - - /// - /// Indicates whether the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) is suspended. Seam suspends sandbox workspaces that have not been accessed in 14 days. - /// - [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] - public bool IsSuspended { get; set; } - - /// - /// Name of the [workspace](https://docs.seam.co/core-concepts/workspaces). - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// ID of the organization to which the workspace belongs, or `null` if the workspace is not assigned to an organization. - /// - [DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] - public string? OrganizationId { get; set; } - - /// - /// Publishable key for the [workspace](https://docs.seam.co/core-concepts/workspaces). This key is used to identify the workspace in client-side applications. - /// - [DataMember(Name = "publishable_key", IsRequired = false, EmitDefaultValue = false)] - public string? PublishableKey { get; set; } - - /// - /// ID of the workspace. - /// - [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] - public string WorkspaceId { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } - - [DataContract(Name = "seamModel_workspaceConnectWebviewCustomization_model")] - public class WorkspaceConnectWebviewCustomization - { - [JsonConstructorAttribute] - protected WorkspaceConnectWebviewCustomization() { } - - public WorkspaceConnectWebviewCustomization( - string? inviterLogoUrl = default, - WorkspaceConnectWebviewCustomization.LogoShapeEnum? logoShape = default, - string? primaryButtonColor = default, - string? primaryButtonTextColor = default, - string? successMessage = default - ) - { - InviterLogoUrl = inviterLogoUrl; - LogoShape = logoShape; - PrimaryButtonColor = primaryButtonColor; - PrimaryButtonTextColor = primaryButtonTextColor; - SuccessMessage = successMessage; - } - - /// - /// Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [JsonConverter(typeof(SafeStringEnumConverter))] - public enum LogoShapeEnum - { - [EnumMember(Value = "unrecognized")] - Unrecognized = 0, - - [EnumMember(Value = "circle")] - Circle = 1, - - [EnumMember(Value = "square")] - Square = 2, - } - - /// - /// URL of the inviter logo for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember(Name = "inviter_logo_url", IsRequired = false, EmitDefaultValue = false)] - public string? InviterLogoUrl { get; set; } - - /// - /// Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] - public WorkspaceConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } - - /// - /// Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] - public string? PrimaryButtonColor { get; set; } - - /// - /// Primary button text color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember( - Name = "primary_button_text_color", - IsRequired = false, - EmitDefaultValue = false - )] - public string? PrimaryButtonTextColor { get; set; } - - /// - /// Success message for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). - /// - [DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] - public string? SuccessMessage { get; set; } - - public override string ToString() - { - JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - - StringWriter stringWriter = new StringWriter( - new StringBuilder(256), - System.Globalization.CultureInfo.InvariantCulture - ); - using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) - { - jsonTextWriter.IndentChar = ' '; - jsonTextWriter.Indentation = 2; - jsonTextWriter.Formatting = Formatting.Indented; - jsonSerializer.Serialize(jsonTextWriter, this, null); - } - - return stringWriter.ToString(); - } - } +/// +/// Represents a Seam [workspace](https://www.seam.co/docs/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://www.seam.co/docs/core-concepts/workspaces#production-workspaces). +/// +[DataContract(Name = "seamModel_workspace_model")] +public class Workspace +{ +[JsonConstructorAttribute] +protected Workspace() { } + +public Workspace(string companyName = default, string? connectPartnerName = default, WorkspaceConnectWebviewCustomization connectWebviewCustomization = default, bool isPublishableKeyAuthEnabled = default, bool isSandbox = default, bool isSuspended = default, string name = default, string? organizationId = default, string? publishableKey = default, string workspaceId = default) +{ +CompanyName = companyName; +ConnectPartnerName = connectPartnerName; +ConnectWebviewCustomization = connectWebviewCustomization; +IsPublishableKeyAuthEnabled = isPublishableKeyAuthEnabled; +IsSandbox = isSandbox; +IsSuspended = isSuspended; +Name = name; +OrganizationId = organizationId; +PublishableKey = publishableKey; +WorkspaceId = workspaceId; +} + +/// +/// Company name associated with the [workspace](https://www.seam.co/docs/core-concepts/workspaces). +/// +[Obsolete("Use `connect_partner_name` instead.")] +[DataMember(Name = "company_name", IsRequired = false, EmitDefaultValue = false)] +public string CompanyName { get; set; } + +/// +/// Seam Connect partner name associated with the [workspace](https://www.seam.co/docs/core-concepts/workspaces). +/// +[DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] +public string? ConnectPartnerName { get; set; } + +[DataMember(Name = "connect_webview_customization", IsRequired = false, EmitDefaultValue = false)] +public WorkspaceConnectWebviewCustomization ConnectWebviewCustomization { get; set; } + +/// +/// Indicates whether publishable key authentication is enabled for this workspace. +/// +[DataMember(Name = "is_publishable_key_auth_enabled", IsRequired = false, EmitDefaultValue = false)] +public bool IsPublishableKeyAuthEnabled { get; set; } + +/// +/// Indicates whether the workspace is a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). +/// +[DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] +public bool IsSandbox { get; set; } + +/// +/// Indicates whether the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is suspended. Seam suspends sandbox workspaces that have not been accessed in 14 days. +/// +[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] +public bool IsSuspended { get; set; } + +/// +/// Name of the [workspace](https://www.seam.co/docs/core-concepts/workspaces). +/// +[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] +public string Name { get; set; } + +/// +/// ID of the organization to which the workspace belongs, or `null` if the workspace is not assigned to an organization. +/// +[DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] +public string? OrganizationId { get; set; } + +/// +/// Publishable key for the [workspace](https://www.seam.co/docs/core-concepts/workspaces). This key is used to identify the workspace in client-side applications. +/// +[DataMember(Name = "publishable_key", IsRequired = false, EmitDefaultValue = false)] +public string? PublishableKey { get; set; } + +/// +/// ID of the workspace. +/// +[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] +public string WorkspaceId { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + +[DataContract(Name = "seamModel_workspaceConnectWebviewCustomization_model")] +public class WorkspaceConnectWebviewCustomization +{ +[JsonConstructorAttribute] +protected WorkspaceConnectWebviewCustomization() { } + +public WorkspaceConnectWebviewCustomization(string? inviterLogoUrl = default, WorkspaceConnectWebviewCustomization.LogoShapeEnum? logoShape = default, string? primaryButtonColor = default, string? primaryButtonTextColor = default, string? successMessage = default) +{ +InviterLogoUrl = inviterLogoUrl; +LogoShape = logoShape; +PrimaryButtonColor = primaryButtonColor; +PrimaryButtonTextColor = primaryButtonTextColor; +SuccessMessage = successMessage; +} + +/// +/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[JsonConverter(typeof(SafeStringEnumConverter))] +public enum LogoShapeEnum +{ +[EnumMember(Value = "unrecognized")] +Unrecognized = 0, + +[EnumMember(Value = "circle")] +Circle = 1, + +[EnumMember(Value = "square")] +Square = 2, +} + +/// +/// URL of the inviter logo for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "inviter_logo_url", IsRequired = false, EmitDefaultValue = false)] +public string? InviterLogoUrl { get; set; } + +/// +/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] +public WorkspaceConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } + +/// +/// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] +public string? PrimaryButtonColor { get; set; } + +/// +/// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "primary_button_text_color", IsRequired = false, EmitDefaultValue = false)] +public string? PrimaryButtonTextColor { get; set; } + +/// +/// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). +/// +[DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] +public string? SuccessMessage { get; set; } + +public override string ToString() +{ +JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + +StringWriter stringWriter = new StringWriter( +new StringBuilder(256), +System.Globalization.CultureInfo.InvariantCulture +); +using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) +{ +jsonTextWriter.IndentChar = ' '; +jsonTextWriter.Indentation = 2; +jsonTextWriter.Formatting = Formatting.Indented; +jsonSerializer.Serialize(jsonTextWriter, this, null); +} + +return stringWriter.ToString(); +} +} + } From 3364f1a6c65f4bed066605b3e9361f1976f5c199 Mon Sep 17 00:00:00 2001 From: Philip Chmalts Date: Thu, 1 Oct 2026 11:08:17 -0700 Subject: [PATCH 2/3] fix: Resolve @seamapi packages from the public npm registry Co-Authored-By: Claude Opus 5.5 --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4df5e161..bb1e8906 100644 --- a/package-lock.json +++ b/package-lock.json @@ -791,7 +791,7 @@ }, "node_modules/@seamapi/blueprint": { "version": "1.12.0", - "resolved": "https://npm.pkg.github.com/download/@seamapi/blueprint/1.12.0/e72f21582831d9be77804b63aafcc9cf48b7e2cc", + "resolved": "https://registry.npmjs.org/@seamapi/blueprint/-/blueprint-1.12.0.tgz", "integrity": "sha512-cH6mpLIUm2q2YxuxEW4G6ODYZJFZihJcUtGyVWjwfdfrmGCyAJRl+S7XCyGz5LuNhdBRux5iShHxtsc/b0Y80g==", "dev": true, "license": "MIT", @@ -839,7 +839,7 @@ }, "node_modules/@seamapi/types": { "version": "1.1092.0", - "resolved": "https://npm.pkg.github.com/download/@seamapi/types/1.1092.0/35cfbdb6dbfb0023a1ea6c6353ff90d51cc858e8", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.1092.0.tgz", "integrity": "sha512-99Wi8sSk4RZ2g9/iRJiONtIp9Hc/c2Xe5SeIIacbwxKbqkpmiTi8tQO0+M2qGXVzYuoO3xM/lBkEy4kUAhe/Ew==", "dev": true, "license": "MIT", From c957c72d192e499b061c404123095cd2feb6776c Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 1 Oct 2026 18:08:47 +0000 Subject: [PATCH 3/3] ci: Generate code --- src/Seam/Api/AccessCodes.cs | 3625 +- src/Seam/Api/AccessGrants.cs | 2908 +- src/Seam/Api/AccessGroupsAcs.cs | 1614 +- src/Seam/Api/AccessMethods.cs | 2035 +- src/Seam/Api/ActionAttempts.cs | 571 +- src/Seam/Api/ClientSessions.cs | 1953 +- src/Seam/Api/ConnectWebviews.cs | 1703 +- src/Seam/Api/ConnectedAccounts.cs | 1304 +- src/Seam/Api/CredentialsAcs.cs | 2538 +- src/Seam/Api/Customers.cs | 9689 ++--- src/Seam/Api/DailyProgramsThermostats.cs | 952 +- src/Seam/Api/Devices.cs | 7922 +++-- src/Seam/Api/EncodersAcs.cs | 1611 +- src/Seam/Api/EntrancesAcs.cs | 1470 +- src/Seam/Api/Events.cs | 2053 +- src/Seam/Api/InstantKeys.cs | 669 +- src/Seam/Api/LiveViewsCameras.cs | 843 +- src/Seam/Api/Locks.cs | 1867 +- src/Seam/Api/Media.cs | 317 +- src/Seam/Api/NoiseSensors.cs | 478 +- src/Seam/Api/NoiseThresholdsNoiseSensors.cs | 1315 +- src/Seam/Api/Phones.cs | 687 +- src/Seam/Api/SchedulesThermostats.cs | 1344 +- src/Seam/Api/SimulateAccessCodes.cs | 323 +- src/Seam/Api/SimulateConnectedAccounts.cs | 167 +- src/Seam/Api/SimulateDevices.cs | 1022 +- src/Seam/Api/SimulateEncodersAcs.cs | 1003 +- src/Seam/Api/SimulateLocks.cs | 536 +- src/Seam/Api/SimulateNoiseSensors.cs | 167 +- src/Seam/Api/SimulatePhones.cs | 661 +- src/Seam/Api/SimulateThermostats.cs | 571 +- src/Seam/Api/Spaces.cs | 3176 +- src/Seam/Api/SystemsAcs.cs | 1407 +- src/Seam/Api/Thermostats.cs | 5374 +-- src/Seam/Api/UnmanagedAccessCodes.cs | 1314 +- src/Seam/Api/UnmanagedAccessGrants.cs | 847 +- src/Seam/Api/UnmanagedAccessMethods.cs | 575 +- src/Seam/Api/UnmanagedDevices.cs | 1696 +- src/Seam/Api/UnmanagedUserIdentities.cs | 796 +- src/Seam/Api/UserIdentities.cs | 3653 +- src/Seam/Api/UsersAcs.cs | 3077 +- src/Seam/Api/Webhooks.cs | 1040 +- src/Seam/Api/Workspaces.cs | 1713 +- src/Seam/Model/AccessCode.cs | 7063 ++-- src/Seam/Model/AccessGrant.cs | 2717 +- src/Seam/Model/AccessMethod.cs | 2409 +- src/Seam/Model/AcsAccessGroup.cs | 2736 +- src/Seam/Model/AcsCredential.cs | 2113 +- src/Seam/Model/AcsEncoder.cs | 329 +- src/Seam/Model/AcsEntrance.cs | 2893 +- src/Seam/Model/AcsSystem.cs | 2445 +- src/Seam/Model/AcsUser.cs | 4308 +-- src/Seam/Model/ActionAttempt.cs | 12888 +++---- src/Seam/Model/Batch.cs | 528 +- src/Seam/Model/CameraLiveViewAnswer.cs | 69 +- src/Seam/Model/CameraLiveViewSession.cs | 114 +- src/Seam/Model/ClientSession.cs | 264 +- src/Seam/Model/ConnectWebview.cs | 509 +- src/Seam/Model/ConnectedAccount.cs | 2683 +- src/Seam/Model/CustomerPortal.cs | 131 +- src/Seam/Model/Device.cs | 19629 +++++----- src/Seam/Model/DeviceProvider.cs | 884 +- src/Seam/Model/Event.cs | 33612 ++++++++++-------- src/Seam/Model/InstantKey.cs | 315 +- src/Seam/Model/Media.cs | 339 +- src/Seam/Model/NoiseThreshold.cs | 153 +- src/Seam/Model/Phone.cs | 819 +- src/Seam/Model/Space.cs | 440 +- src/Seam/Model/ThermostatDailyProgram.cs | 251 +- src/Seam/Model/ThermostatSchedule.cs | 341 +- src/Seam/Model/UnmanagedAccessCode.cs | 5640 +-- src/Seam/Model/UnmanagedAccessGrant.cs | 2671 +- src/Seam/Model/UnmanagedAccessMethod.cs | 2401 +- src/Seam/Model/UnmanagedDevice.cs | 6787 ++-- src/Seam/Model/UnmanagedUserIdentity.cs | 893 +- src/Seam/Model/UserIdentity.cs | 905 +- src/Seam/Model/Webhook.cs | 110 +- src/Seam/Model/Workspace.cs | 392 +- 78 files changed, 106917 insertions(+), 92450 deletions(-) diff --git a/src/Seam/Api/AccessCodes.cs b/src/Seam/Api/AccessCodes.cs index 71e46f8c..e2cc36c9 100644 --- a/src/Seam/Api/AccessCodes.cs +++ b/src/Seam/Api/AccessCodes.cs @@ -9,1573 +9,2070 @@ namespace Seam.Api { -public class AccessCodes -{ -private ISeamClient _seam; - -public AccessCodes(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create an Access Code. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? commonCodeKey = default, string deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isOfflineAccessCode = default, bool? isOneTimeUse = default, CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default, bool? useOfflineAccessCode = default) -{ -AllowExternalModification = allowExternalModification; -AttemptForOfflineDevice = attemptForOfflineDevice; -Code = code; -CommonCodeKey = commonCodeKey; -DeviceId = deviceId; -EndsAt = endsAt; -IsExternalModificationAllowed = isExternalModificationAllowed; -IsOfflineAccessCode = isOfflineAccessCode; -IsOneTimeUse = isOneTimeUse; -MaxTimeRounding = maxTimeRounding; -Name = name; -PreferNativeScheduling = preferNativeScheduling; -PreferredCodeLength = preferredCodeLength; -StartsAt = startsAt; -UseBackupAccessCodePool = useBackupAccessCodePool; -UseOfflineAccessCode = useOfflineAccessCode; -} - -/// -/// Maximum rounding adjustment. To create a daily-bound [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum MaxTimeRoundingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "1hour")] -_1hour = 1, - -[EnumMember(Value = "1day")] -_1day = 2, - -[EnumMember(Value = "1h")] -_1h = 3, - -[EnumMember(Value = "1d")] -_1d = 4, -} - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. -/// -[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] -public bool? AllowExternalModification { get; set; } - -[DataMember(Name = "attempt_for_offline_device", IsRequired = false, EmitDefaultValue = false)] -public bool? AttemptForOfflineDevice { get; set; } - -/// -/// Code to be used for access. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Key to identify access codes that should have the same code. Any two access codes with the same `common_code_key` are guaranteed to have the same `code`. See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). -/// -[DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] -public string? CommonCodeKey { get; set; } - -/// -/// ID of the device for which you want to create the new access code. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. -/// -[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsExternalModificationAllowed { get; set; } - -/// -/// Indicates whether the access code is an [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes). -/// -[DataMember(Name = "is_offline_access_code", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOfflineAccessCode { get; set; } - -/// -/// Indicates whether the [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) is a single-use access code. -/// -[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOneTimeUse { get; set; } - -/// -/// Maximum rounding adjustment. To create a daily-bound [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. -/// -[DataMember(Name = "max_time_rounding", IsRequired = false, EmitDefaultValue = false)] -public CreateRequest.MaxTimeRoundingEnum? MaxTimeRounding { get; set; } - -/// -/// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. -/// -/// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. -/// -/// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. -/// -/// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Indicates whether [native scheduling](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. -/// -[DataMember(Name = "prefer_native_scheduling", IsRequired = false, EmitDefaultValue = false)] -public bool? PreferNativeScheduling { get; set; } - -/// -/// Preferred code length. Only applicable if you do not specify a `code`. If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length. -/// -[DataMember(Name = "preferred_code_length", IsRequired = false, EmitDefaultValue = false)] -public float? PreferredCodeLength { get; set; } - -/// -/// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Indicates whether to use a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://www.seam.co/docs/api/access_codes/pull_backup_access_code). -/// -[DataMember(Name = "use_backup_access_code_pool", IsRequired = false, EmitDefaultValue = false)] -public bool? UseBackupAccessCodePool { get; set; } - -[Obsolete("Use `is_offline_access_code` instead.")] -[DataMember(Name = "use_offline_access_code", IsRequired = false, EmitDefaultValue = false)] -public bool? UseOfflineAccessCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(AccessCode accessCode = default) -{ -AccessCode = accessCode; -} - -/// -/// OK -/// -[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] -public AccessCode AccessCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. -/// -public AccessCode Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/access_codes/create", requestOptions).EnsureData("/access_codes/create").AccessCode; -} - -/// -/// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. -/// -public AccessCode Create(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? commonCodeKey = default, string deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isOfflineAccessCode = default, bool? isOneTimeUse = default, CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default, bool? useOfflineAccessCode = default) -{ -return Create(new CreateRequest(allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, code: code, commonCodeKey: commonCodeKey, deviceId: deviceId, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isOfflineAccessCode: isOfflineAccessCode, isOneTimeUse: isOneTimeUse, maxTimeRounding: maxTimeRounding, name: name, preferNativeScheduling: preferNativeScheduling, preferredCodeLength: preferredCodeLength, startsAt: startsAt, useBackupAccessCodePool: useBackupAccessCodePool, useOfflineAccessCode: useOfflineAccessCode)); -} - -/// -/// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/access_codes/create", requestOptions)).EnsureData("/access_codes/create").AccessCode; -} - -/// -/// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. -/// -public async Task CreateAsync(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? commonCodeKey = default, string deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isOfflineAccessCode = default, bool? isOneTimeUse = default, CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default, bool? useOfflineAccessCode = default) -{ -return (await CreateAsync(new CreateRequest(allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, code: code, commonCodeKey: commonCodeKey, deviceId: deviceId, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isOfflineAccessCode: isOfflineAccessCode, isOneTimeUse: isOneTimeUse, maxTimeRounding: maxTimeRounding, name: name, preferNativeScheduling: preferNativeScheduling, preferredCodeLength: preferredCodeLength, startsAt: startsAt, useBackupAccessCodePool: useBackupAccessCodePool, useOfflineAccessCode: useOfflineAccessCode))); -} - -/// -/// Request parameters for Create Multiple Linked Access Codes. -/// -[DataContract(Name = "createMultipleRequest_request")] -public class CreateMultipleRequest -{ -[JsonConstructorAttribute] -protected CreateMultipleRequest() { } - -public CreateMultipleRequest(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = default, string? code = default, List deviceIds = default, string? endsAt = default, bool? isExternalModificationAllowed = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default) -{ -AllowExternalModification = allowExternalModification; -AttemptForOfflineDevice = attemptForOfflineDevice; -BehaviorWhenCodeCannotBeShared = behaviorWhenCodeCannotBeShared; -Code = code; -DeviceIds = deviceIds; -EndsAt = endsAt; -IsExternalModificationAllowed = isExternalModificationAllowed; -Name = name; -PreferNativeScheduling = preferNativeScheduling; -PreferredCodeLength = preferredCodeLength; -StartsAt = startsAt; -UseBackupAccessCodePool = useBackupAccessCodePool; -} - -/// -/// Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum BehaviorWhenCodeCannotBeSharedEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "throw")] -Throw = 1, - -[EnumMember(Value = "create_random_code")] -CreateRandomCode = 2, -} - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. -/// -[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] -public bool? AllowExternalModification { get; set; } - -[DataMember(Name = "attempt_for_offline_device", IsRequired = false, EmitDefaultValue = false)] -public bool? AttemptForOfflineDevice { get; set; } - -/// -/// Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. -/// -[DataMember(Name = "behavior_when_code_cannot_be_shared", IsRequired = false, EmitDefaultValue = false)] -public CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? BehaviorWhenCodeCannotBeShared { get; set; } - -/// -/// Code to be used for access. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// IDs of the devices for which you want to create the new access codes. -/// -[DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -/// -/// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. -/// -[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsExternalModificationAllowed { get; set; } - -/// -/// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. -/// -/// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. -/// -/// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. -/// -/// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Indicates whether [native scheduling](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. -/// -[DataMember(Name = "prefer_native_scheduling", IsRequired = false, EmitDefaultValue = false)] -public bool? PreferNativeScheduling { get; set; } - -/// -/// Preferred code length. If the affected devices do not support the preferred code length, Seam reverts to using the shortest supported code length. -/// -[DataMember(Name = "preferred_code_length", IsRequired = false, EmitDefaultValue = false)] -public float? PreferredCodeLength { get; set; } - -/// -/// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Indicates whether to use a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://www.seam.co/docs/api/access_codes/pull_backup_access_code). -/// -[DataMember(Name = "use_backup_access_code_pool", IsRequired = false, EmitDefaultValue = false)] -public bool? UseBackupAccessCodePool { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createMultipleResponse_response")] -public class CreateMultipleResponse -{ -[JsonConstructorAttribute] -protected CreateMultipleResponse() { } - -public CreateMultipleResponse(List accessCodes = default) -{ -AccessCodes = accessCodes; -} - -/// -/// OK -/// -[DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodes { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. -/// -/// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. -/// -/// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. -/// -/// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. -/// -/// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). -/// -/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. -/// -public List CreateMultiple(CreateMultipleRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Put("/access_codes/create_multiple", requestOptions).EnsureData("/access_codes/create_multiple").AccessCodes; -} - -/// -/// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. -/// -/// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. -/// -/// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. -/// -/// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. -/// -/// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). -/// -/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. -/// -public List CreateMultiple(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = default, string? code = default, List deviceIds = default, string? endsAt = default, bool? isExternalModificationAllowed = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default) -{ -return CreateMultiple(new CreateMultipleRequest(allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, behaviorWhenCodeCannotBeShared: behaviorWhenCodeCannotBeShared, code: code, deviceIds: deviceIds, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, name: name, preferNativeScheduling: preferNativeScheduling, preferredCodeLength: preferredCodeLength, startsAt: startsAt, useBackupAccessCodePool: useBackupAccessCodePool)); -} - -/// -/// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. -/// -/// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. -/// -/// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. -/// -/// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. -/// -/// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). -/// -/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. -/// -public async Task> CreateMultipleAsync(CreateMultipleRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PutAsync("/access_codes/create_multiple", requestOptions)).EnsureData("/access_codes/create_multiple").AccessCodes; -} - -/// -/// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. -/// -/// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. -/// -/// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. -/// -/// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. -/// -/// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). -/// -/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. -/// -public async Task> CreateMultipleAsync(bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = default, string? code = default, List deviceIds = default, string? endsAt = default, bool? isExternalModificationAllowed = default, string? name = default, bool? preferNativeScheduling = default, float? preferredCodeLength = default, string? startsAt = default, bool? useBackupAccessCodePool = default) -{ -return (await CreateMultipleAsync(new CreateMultipleRequest(allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, behaviorWhenCodeCannotBeShared: behaviorWhenCodeCannotBeShared, code: code, deviceIds: deviceIds, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, name: name, preferNativeScheduling: preferNativeScheduling, preferredCodeLength: preferredCodeLength, startsAt: startsAt, useBackupAccessCodePool: useBackupAccessCodePool))); -} - -/// -/// Request parameters for Delete an Access Code. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string accessCodeId = default, string? deviceId = default) -{ -AccessCodeId = accessCodeId; -DeviceId = deviceId; -} - -/// -/// ID of the access code that you want to delete. -/// -[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// ID of the device for which you want to delete the access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/access_codes/delete", requestOptions); -} - -/// -/// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -public void Delete(string accessCodeId = default, string? deviceId = default) -{ -Delete(new DeleteRequest(accessCodeId: accessCodeId, deviceId: deviceId)); -} - -/// -/// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/access_codes/delete", requestOptions); -} - -/// -/// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -public async Task DeleteAsync(string accessCodeId = default, string? deviceId = default) -{ -await DeleteAsync(new DeleteRequest(accessCodeId: accessCodeId, deviceId: deviceId)); -} - -/// -/// Request parameters for Generate a Code. -/// -[DataContract(Name = "generateCodeRequest_request")] -public class GenerateCodeRequest -{ -[JsonConstructorAttribute] -protected GenerateCodeRequest() { } - -public GenerateCodeRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the device for which you want to generate a code. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "generateCodeResponse_response")] -public class GenerateCodeResponse -{ -[JsonConstructorAttribute] -protected GenerateCodeResponse() { } - -public GenerateCodeResponse(AccessCode generatedCode = default) -{ -GeneratedCode = generatedCode; -} - -/// -/// OK -/// -[DataMember(Name = "generated_code", IsRequired = false, EmitDefaultValue = false)] -public AccessCode GeneratedCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. -/// -public AccessCode GenerateCode(GenerateCodeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_codes/generate_code", requestOptions).EnsureData("/access_codes/generate_code").GeneratedCode; -} - -/// -/// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. -/// -public AccessCode GenerateCode(string deviceId = default) -{ -return GenerateCode(new GenerateCodeRequest(deviceId: deviceId)); -} - -/// -/// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. -/// -public async Task GenerateCodeAsync(GenerateCodeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_codes/generate_code", requestOptions)).EnsureData("/access_codes/generate_code").GeneratedCode; -} - -/// -/// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. -/// -public async Task GenerateCodeAsync(string deviceId = default) -{ -return (await GenerateCodeAsync(new GenerateCodeRequest(deviceId: deviceId))); -} - -/// -/// Request parameters for Get an Access Code. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? accessCodeId = default, string? code = default, string? deviceId = default) -{ -AccessCodeId = accessCodeId; -Code = code; -DeviceId = deviceId; -} - -/// -/// ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessCodeId { get; set; } - -/// -/// Code of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// ID of the device containing the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AccessCode accessCode = default) -{ -AccessCode = accessCode; -} - -/// -/// OK -/// -[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] -public AccessCode AccessCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// You must specify either `access_code_id` or both `device_id` and `code`. -/// -public AccessCode Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_codes/get", requestOptions).EnsureData("/access_codes/get").AccessCode; -} - -/// -/// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// You must specify either `access_code_id` or both `device_id` and `code`. -/// -public AccessCode Get(string? accessCodeId = default, string? code = default, string? deviceId = default) -{ -return Get(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId)); -} - -/// -/// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// You must specify either `access_code_id` or both `device_id` and `code`. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_codes/get", requestOptions)).EnsureData("/access_codes/get").AccessCode; -} - -/// -/// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// You must specify either `access_code_id` or both `device_id` and `code`. -/// -public async Task GetAsync(string? accessCodeId = default, string? code = default, string? deviceId = default) -{ -return (await GetAsync(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId))); -} - -/// -/// Request parameters for List Access Codes. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(List? accessCodeIds = default, string? accessGrantId = default, string? accessGrantKey = default, string? accessMethodId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -AccessCodeIds = accessCodeIds; -AccessGrantId = accessGrantId; -AccessGrantKey = accessGrantKey; -AccessMethodId = accessMethodId; -CustomerKey = customerKey; -DeviceId = deviceId; -Limit = limit; -PageCursor = pageCursor; -Search = search; -UserIdentifierKey = userIdentifierKey; -} - -/// -/// IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -[DataMember(Name = "access_code_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AccessCodeIds { get; set; } - -/// -/// ID of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantId { get; set; } - -/// -/// Key of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// ID of the access method for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessMethodId { get; set; } - -/// -/// Customer key for which you want to list access codes. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// ID of the device for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Numerical limit on the number of access codes to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// Your user ID for the user by which to filter access codes. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List accessCodes = default) -{ -AccessCodes = accessCodes; -} - -/// -/// OK -/// -[DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodes { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_codes/list", requestOptions).EnsureData("/access_codes/list").AccessCodes; -} - -/// -/// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -public List List(List? accessCodeIds = default, string? accessGrantId = default, string? accessGrantKey = default, string? accessMethodId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -return List(new ListRequest(accessCodeIds: accessCodeIds, accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, accessMethodId: accessMethodId, customerKey: customerKey, deviceId: deviceId, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey)); -} - -/// -/// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_codes/list", requestOptions)).EnsureData("/access_codes/list").AccessCodes; -} - -/// -/// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. -/// -public async Task> ListAsync(List? accessCodeIds = default, string? accessGrantId = default, string? accessGrantKey = default, string? accessMethodId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -return (await ListAsync(new ListRequest(accessCodeIds: accessCodeIds, accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, accessMethodId: accessMethodId, customerKey: customerKey, deviceId: deviceId, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey))); -} - -/// -/// Request parameters for Pull a Backup Access Code. -/// -[DataContract(Name = "pullBackupAccessCodeRequest_request")] -public class PullBackupAccessCodeRequest -{ -[JsonConstructorAttribute] -protected PullBackupAccessCodeRequest() { } - -public PullBackupAccessCodeRequest(string accessCodeId = default) -{ -AccessCodeId = accessCodeId; -} - -/// -/// ID of the access code for which you want to pull a backup access code. -/// -[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pullBackupAccessCodeResponse_response")] -public class PullBackupAccessCodeResponse -{ -[JsonConstructorAttribute] -protected PullBackupAccessCodeResponse() { } - -public PullBackupAccessCodeResponse(AccessCode accessCode = default) -{ -AccessCode = accessCode; -} - -/// -/// OK -/// -[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] -public AccessCode AccessCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). -/// -/// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. -/// -/// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. -/// -/// You can only pull backup access codes for time-bound access codes. -/// -/// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. -/// -public AccessCode PullBackupAccessCode(PullBackupAccessCodeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/access_codes/pull_backup_access_code", requestOptions).EnsureData("/access_codes/pull_backup_access_code").AccessCode; -} - -/// -/// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). -/// -/// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. -/// -/// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. -/// -/// You can only pull backup access codes for time-bound access codes. -/// -/// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. -/// -public AccessCode PullBackupAccessCode(string accessCodeId = default) -{ -return PullBackupAccessCode(new PullBackupAccessCodeRequest(accessCodeId: accessCodeId)); -} - -/// -/// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). -/// -/// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. -/// -/// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. -/// -/// You can only pull backup access codes for time-bound access codes. -/// -/// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. -/// -public async Task PullBackupAccessCodeAsync(PullBackupAccessCodeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/access_codes/pull_backup_access_code", requestOptions)).EnsureData("/access_codes/pull_backup_access_code").AccessCode; -} - -/// -/// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). -/// -/// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. -/// -/// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. -/// -/// You can only pull backup access codes for time-bound access codes. -/// -/// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. -/// -public async Task PullBackupAccessCodeAsync(string accessCodeId = default) -{ -return (await PullBackupAccessCodeAsync(new PullBackupAccessCodeRequest(accessCodeId: accessCodeId))); -} - -/// -/// Request parameters for Report Device Access Code Constraints. -/// -[DataContract(Name = "reportDeviceConstraintsRequest_request")] -public class ReportDeviceConstraintsRequest -{ -[JsonConstructorAttribute] -protected ReportDeviceConstraintsRequest() { } - -public ReportDeviceConstraintsRequest(string deviceId = default, int? maxCodeLength = default, int? minCodeLength = default, List? supportedCodeLengths = default) -{ -DeviceId = deviceId; -MaxCodeLength = maxCodeLength; -MinCodeLength = minCodeLength; -SupportedCodeLengths = supportedCodeLengths; -} - -/// -/// ID of the device for which you want to report constraints. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Maximum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. -/// -[DataMember(Name = "max_code_length", IsRequired = false, EmitDefaultValue = false)] -public int? MaxCodeLength { get; set; } - -/// -/// Minimum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. -/// -[DataMember(Name = "min_code_length", IsRequired = false, EmitDefaultValue = false)] -public int? MinCodeLength { get; set; } - -/// -/// Array of supported code lengths as integers between 4 and 20, inclusive. You can specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. -/// -[DataMember(Name = "supported_code_lengths", IsRequired = false, EmitDefaultValue = false)] -public List? SupportedCodeLengths { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. -/// -/// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. -/// -public void ReportDeviceConstraints(ReportDeviceConstraintsRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/access_codes/report_device_constraints", requestOptions); -} - -/// -/// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. -/// -/// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. -/// -public void ReportDeviceConstraints(string deviceId = default, int? maxCodeLength = default, int? minCodeLength = default, List? supportedCodeLengths = default) -{ -ReportDeviceConstraints(new ReportDeviceConstraintsRequest(deviceId: deviceId, maxCodeLength: maxCodeLength, minCodeLength: minCodeLength, supportedCodeLengths: supportedCodeLengths)); -} - -/// -/// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. -/// -/// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. -/// -public async Task ReportDeviceConstraintsAsync(ReportDeviceConstraintsRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/access_codes/report_device_constraints", requestOptions); -} - -/// -/// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. -/// -/// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. -/// -public async Task ReportDeviceConstraintsAsync(string deviceId = default, int? maxCodeLength = default, int? minCodeLength = default, List? supportedCodeLengths = default) -{ -await ReportDeviceConstraintsAsync(new ReportDeviceConstraintsRequest(deviceId: deviceId, maxCodeLength: maxCodeLength, minCodeLength: minCodeLength, supportedCodeLengths: supportedCodeLengths)); -} - -/// -/// Request parameters for Update an Access Code. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string accessCodeId = default, bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, string? name = default, string? startsAt = default, UpdateRequest.TypeEnum? type = default) -{ -AccessCodeId = accessCodeId; -AllowExternalModification = allowExternalModification; -AttemptForOfflineDevice = attemptForOfflineDevice; -Code = code; -DeviceId = deviceId; -EndsAt = endsAt; -IsExternalModificationAllowed = isExternalModificationAllowed; -IsManaged = isManaged; -Name = name; -StartsAt = startsAt; -Type = type; -} - -/// -/// Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "ongoing")] -Ongoing = 1, - -[EnumMember(Value = "time_bound")] -TimeBound = 2, -} - -/// -/// ID of the access code that you want to update. -/// -[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. -/// -[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] -public bool? AllowExternalModification { get; set; } - -[DataMember(Name = "attempt_for_offline_device", IsRequired = false, EmitDefaultValue = false)] -public bool? AttemptForOfflineDevice { get; set; } - -/// -/// Code to be used for access. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// ID of the device containing the access code that you want to update. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. -/// -[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsExternalModificationAllowed { get; set; } - -/// -/// Indicates whether the access code is managed through Seam. Note that to convert an unmanaged access code into a managed access code, use `/access_codes/unmanaged/convert_to_managed`. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsManaged { get; set; } - -/// -/// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. -/// -/// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. -/// -/// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. -/// -/// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public UpdateRequest.TypeEnum? Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/access_codes/update", requestOptions); -} - -/// -/// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). -/// -public void Update(string accessCodeId = default, bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, string? name = default, string? startsAt = default, UpdateRequest.TypeEnum? type = default) -{ -Update(new UpdateRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, code: code, deviceId: deviceId, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged, name: name, startsAt: startsAt, type: type)); -} - -/// -/// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/access_codes/update", requestOptions); -} - -/// -/// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). -/// -public async Task UpdateAsync(string accessCodeId = default, bool? allowExternalModification = default, bool? attemptForOfflineDevice = default, string? code = default, string? deviceId = default, string? endsAt = default, bool? isExternalModificationAllowed = default, bool? isManaged = default, string? name = default, string? startsAt = default, UpdateRequest.TypeEnum? type = default) -{ -await UpdateAsync(new UpdateRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, attemptForOfflineDevice: attemptForOfflineDevice, code: code, deviceId: deviceId, endsAt: endsAt, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged, name: name, startsAt: startsAt, type: type)); -} - -/// -/// Request parameters for Update Multiple Linked Access Codes. -/// -[DataContract(Name = "updateMultipleRequest_request")] -public class UpdateMultipleRequest -{ -[JsonConstructorAttribute] -protected UpdateMultipleRequest() { } - -public UpdateMultipleRequest(string commonCodeKey = default, string? endsAt = default, string? name = default, string? startsAt = default) -{ -CommonCodeKey = commonCodeKey; -EndsAt = endsAt; -Name = name; -StartsAt = startsAt; -} - -/// -/// Key that links the group of access codes, assigned on creation by `/access_codes/create_multiple`. -/// -[DataMember(Name = "common_code_key", IsRequired = true, EmitDefaultValue = false)] -public string CommonCodeKey { get; set; } - -/// -/// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. -/// -/// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. -/// -/// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. -/// -/// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. -/// -/// Specify the `common_code_key` to identify the set of access codes that you want to update. -/// -/// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). -/// -public void UpdateMultiple(UpdateMultipleRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/access_codes/update_multiple", requestOptions); -} - -/// -/// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. -/// -/// Specify the `common_code_key` to identify the set of access codes that you want to update. -/// -/// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). -/// -public void UpdateMultiple(string commonCodeKey = default, string? endsAt = default, string? name = default, string? startsAt = default) -{ -UpdateMultiple(new UpdateMultipleRequest(commonCodeKey: commonCodeKey, endsAt: endsAt, name: name, startsAt: startsAt)); -} - -/// -/// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. -/// -/// Specify the `common_code_key` to identify the set of access codes that you want to update. -/// -/// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). -/// -public async Task UpdateMultipleAsync(UpdateMultipleRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/access_codes/update_multiple", requestOptions); -} - -/// -/// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. -/// -/// Specify the `common_code_key` to identify the set of access codes that you want to update. -/// -/// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). -/// -public async Task UpdateMultipleAsync(string commonCodeKey = default, string? endsAt = default, string? name = default, string? startsAt = default) -{ -await UpdateMultipleAsync(new UpdateMultipleRequest(commonCodeKey: commonCodeKey, endsAt: endsAt, name: name, startsAt: startsAt)); -} -} + public class AccessCodes + { + private ISeamClient _seam; + + public AccessCodes(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create an Access Code. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + string? code = default, + string? commonCodeKey = default, + string deviceId = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + bool? isOfflineAccessCode = default, + bool? isOneTimeUse = default, + CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, + string? name = default, + bool? preferNativeScheduling = default, + float? preferredCodeLength = default, + string? startsAt = default, + bool? useBackupAccessCodePool = default, + bool? useOfflineAccessCode = default + ) + { + AllowExternalModification = allowExternalModification; + AttemptForOfflineDevice = attemptForOfflineDevice; + Code = code; + CommonCodeKey = commonCodeKey; + DeviceId = deviceId; + EndsAt = endsAt; + IsExternalModificationAllowed = isExternalModificationAllowed; + IsOfflineAccessCode = isOfflineAccessCode; + IsOneTimeUse = isOneTimeUse; + MaxTimeRounding = maxTimeRounding; + Name = name; + PreferNativeScheduling = preferNativeScheduling; + PreferredCodeLength = preferredCodeLength; + StartsAt = startsAt; + UseBackupAccessCodePool = useBackupAccessCodePool; + UseOfflineAccessCode = useOfflineAccessCode; + } + + /// + /// Maximum rounding adjustment. To create a daily-bound [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum MaxTimeRoundingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "1hour")] + _1hour = 1, + + [EnumMember(Value = "1day")] + _1day = 2, + + [EnumMember(Value = "1h")] + _1h = 3, + + [EnumMember(Value = "1d")] + _1d = 4, + } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + /// + [DataMember( + Name = "allow_external_modification", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AllowExternalModification { get; set; } + + [DataMember( + Name = "attempt_for_offline_device", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AttemptForOfflineDevice { get; set; } + + /// + /// Code to be used for access. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Key to identify access codes that should have the same code. Any two access codes with the same `common_code_key` are guaranteed to have the same `code`. See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). + /// + [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] + public string? CommonCodeKey { get; set; } + + /// + /// ID of the device for which you want to create the new access code. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + /// + [DataMember( + Name = "is_external_modification_allowed", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsExternalModificationAllowed { get; set; } + + /// + /// Indicates whether the access code is an [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes). + /// + [DataMember( + Name = "is_offline_access_code", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsOfflineAccessCode { get; set; } + + /// + /// Indicates whether the [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) is a single-use access code. + /// + [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOneTimeUse { get; set; } + + /// + /// Maximum rounding adjustment. To create a daily-bound [offline access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. + /// + [DataMember(Name = "max_time_rounding", IsRequired = false, EmitDefaultValue = false)] + public CreateRequest.MaxTimeRoundingEnum? MaxTimeRounding { get; set; } + + /// + /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. + /// + /// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. + /// + /// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. + /// + /// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Indicates whether [native scheduling](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. + /// + [DataMember( + Name = "prefer_native_scheduling", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? PreferNativeScheduling { get; set; } + + /// + /// Preferred code length. Only applicable if you do not specify a `code`. If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length. + /// + [DataMember( + Name = "preferred_code_length", + IsRequired = false, + EmitDefaultValue = false + )] + public float? PreferredCodeLength { get; set; } + + /// + /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Indicates whether to use a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://www.seam.co/docs/api/access_codes/pull_backup_access_code). + /// + [DataMember( + Name = "use_backup_access_code_pool", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? UseBackupAccessCodePool { get; set; } + + [Obsolete("Use `is_offline_access_code` instead.")] + [DataMember( + Name = "use_offline_access_code", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? UseOfflineAccessCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(AccessCode accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// OK + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public AccessCode AccessCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. + /// + public AccessCode Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/access_codes/create", requestOptions) + .EnsureData("/access_codes/create") + .AccessCode; + } + + /// + /// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. + /// + public AccessCode Create( + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + string? code = default, + string? commonCodeKey = default, + string deviceId = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + bool? isOfflineAccessCode = default, + bool? isOneTimeUse = default, + CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, + string? name = default, + bool? preferNativeScheduling = default, + float? preferredCodeLength = default, + string? startsAt = default, + bool? useBackupAccessCodePool = default, + bool? useOfflineAccessCode = default + ) + { + return Create( + new CreateRequest( + allowExternalModification: allowExternalModification, + attemptForOfflineDevice: attemptForOfflineDevice, + code: code, + commonCodeKey: commonCodeKey, + deviceId: deviceId, + endsAt: endsAt, + isExternalModificationAllowed: isExternalModificationAllowed, + isOfflineAccessCode: isOfflineAccessCode, + isOneTimeUse: isOneTimeUse, + maxTimeRounding: maxTimeRounding, + name: name, + preferNativeScheduling: preferNativeScheduling, + preferredCodeLength: preferredCodeLength, + startsAt: startsAt, + useBackupAccessCodePool: useBackupAccessCodePool, + useOfflineAccessCode: useOfflineAccessCode + ) + ); + } + + /// + /// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/access_codes/create", requestOptions)) + .EnsureData("/access_codes/create") + .AccessCode; + } + + /// + /// Creates a new [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. + /// + public async Task CreateAsync( + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + string? code = default, + string? commonCodeKey = default, + string deviceId = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + bool? isOfflineAccessCode = default, + bool? isOneTimeUse = default, + CreateRequest.MaxTimeRoundingEnum? maxTimeRounding = default, + string? name = default, + bool? preferNativeScheduling = default, + float? preferredCodeLength = default, + string? startsAt = default, + bool? useBackupAccessCodePool = default, + bool? useOfflineAccessCode = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + allowExternalModification: allowExternalModification, + attemptForOfflineDevice: attemptForOfflineDevice, + code: code, + commonCodeKey: commonCodeKey, + deviceId: deviceId, + endsAt: endsAt, + isExternalModificationAllowed: isExternalModificationAllowed, + isOfflineAccessCode: isOfflineAccessCode, + isOneTimeUse: isOneTimeUse, + maxTimeRounding: maxTimeRounding, + name: name, + preferNativeScheduling: preferNativeScheduling, + preferredCodeLength: preferredCodeLength, + startsAt: startsAt, + useBackupAccessCodePool: useBackupAccessCodePool, + useOfflineAccessCode: useOfflineAccessCode + ) + ) + ); + } + + /// + /// Request parameters for Create Multiple Linked Access Codes. + /// + [DataContract(Name = "createMultipleRequest_request")] + public class CreateMultipleRequest + { + [JsonConstructorAttribute] + protected CreateMultipleRequest() { } + + public CreateMultipleRequest( + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = + default, + string? code = default, + List deviceIds = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + string? name = default, + bool? preferNativeScheduling = default, + float? preferredCodeLength = default, + string? startsAt = default, + bool? useBackupAccessCodePool = default + ) + { + AllowExternalModification = allowExternalModification; + AttemptForOfflineDevice = attemptForOfflineDevice; + BehaviorWhenCodeCannotBeShared = behaviorWhenCodeCannotBeShared; + Code = code; + DeviceIds = deviceIds; + EndsAt = endsAt; + IsExternalModificationAllowed = isExternalModificationAllowed; + Name = name; + PreferNativeScheduling = preferNativeScheduling; + PreferredCodeLength = preferredCodeLength; + StartsAt = startsAt; + UseBackupAccessCodePool = useBackupAccessCodePool; + } + + /// + /// Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum BehaviorWhenCodeCannotBeSharedEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "throw")] + Throw = 1, + + [EnumMember(Value = "create_random_code")] + CreateRandomCode = 2, + } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + /// + [DataMember( + Name = "allow_external_modification", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AllowExternalModification { get; set; } + + [DataMember( + Name = "attempt_for_offline_device", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AttemptForOfflineDevice { get; set; } + + /// + /// Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. + /// + [DataMember( + Name = "behavior_when_code_cannot_be_shared", + IsRequired = false, + EmitDefaultValue = false + )] + public CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? BehaviorWhenCodeCannotBeShared { get; set; } + + /// + /// Code to be used for access. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// IDs of the devices for which you want to create the new access codes. + /// + [DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + /// + /// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + /// + [DataMember( + Name = "is_external_modification_allowed", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsExternalModificationAllowed { get; set; } + + /// + /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. + /// + /// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. + /// + /// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. + /// + /// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Indicates whether [native scheduling](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. + /// + [DataMember( + Name = "prefer_native_scheduling", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? PreferNativeScheduling { get; set; } + + /// + /// Preferred code length. If the affected devices do not support the preferred code length, Seam reverts to using the shortest supported code length. + /// + [DataMember( + Name = "preferred_code_length", + IsRequired = false, + EmitDefaultValue = false + )] + public float? PreferredCodeLength { get; set; } + + /// + /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Indicates whether to use a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://www.seam.co/docs/api/access_codes/pull_backup_access_code). + /// + [DataMember( + Name = "use_backup_access_code_pool", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? UseBackupAccessCodePool { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createMultipleResponse_response")] + public class CreateMultipleResponse + { + [JsonConstructorAttribute] + protected CreateMultipleResponse() { } + + public CreateMultipleResponse(List accessCodes = default) + { + AccessCodes = accessCodes; + } + + /// + /// OK + /// + [DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodes { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + /// + /// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. + /// + /// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. + /// + /// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. + /// + /// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). + /// + /// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + /// + public List CreateMultiple(CreateMultipleRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Put("/access_codes/create_multiple", requestOptions) + .EnsureData("/access_codes/create_multiple") + .AccessCodes; + } + + /// + /// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + /// + /// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. + /// + /// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. + /// + /// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. + /// + /// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). + /// + /// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + /// + public List CreateMultiple( + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = + default, + string? code = default, + List deviceIds = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + string? name = default, + bool? preferNativeScheduling = default, + float? preferredCodeLength = default, + string? startsAt = default, + bool? useBackupAccessCodePool = default + ) + { + return CreateMultiple( + new CreateMultipleRequest( + allowExternalModification: allowExternalModification, + attemptForOfflineDevice: attemptForOfflineDevice, + behaviorWhenCodeCannotBeShared: behaviorWhenCodeCannotBeShared, + code: code, + deviceIds: deviceIds, + endsAt: endsAt, + isExternalModificationAllowed: isExternalModificationAllowed, + name: name, + preferNativeScheduling: preferNativeScheduling, + preferredCodeLength: preferredCodeLength, + startsAt: startsAt, + useBackupAccessCodePool: useBackupAccessCodePool + ) + ); + } + + /// + /// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + /// + /// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. + /// + /// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. + /// + /// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. + /// + /// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). + /// + /// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + /// + public async Task> CreateMultipleAsync(CreateMultipleRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PutAsync( + "/access_codes/create_multiple", + requestOptions + ) + ) + .EnsureData("/access_codes/create_multiple") + .AccessCodes; + } + + /// + /// Creates new [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + /// + /// Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. + /// + /// If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. + /// + /// If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. + /// + /// See also [Creating and Updating Multiple Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). + /// + /// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + /// + public async Task> CreateMultipleAsync( + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + CreateMultipleRequest.BehaviorWhenCodeCannotBeSharedEnum? behaviorWhenCodeCannotBeShared = + default, + string? code = default, + List deviceIds = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + string? name = default, + bool? preferNativeScheduling = default, + float? preferredCodeLength = default, + string? startsAt = default, + bool? useBackupAccessCodePool = default + ) + { + return ( + await CreateMultipleAsync( + new CreateMultipleRequest( + allowExternalModification: allowExternalModification, + attemptForOfflineDevice: attemptForOfflineDevice, + behaviorWhenCodeCannotBeShared: behaviorWhenCodeCannotBeShared, + code: code, + deviceIds: deviceIds, + endsAt: endsAt, + isExternalModificationAllowed: isExternalModificationAllowed, + name: name, + preferNativeScheduling: preferNativeScheduling, + preferredCodeLength: preferredCodeLength, + startsAt: startsAt, + useBackupAccessCodePool: useBackupAccessCodePool + ) + ) + ); + } + + /// + /// Request parameters for Delete an Access Code. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string accessCodeId = default, string? deviceId = default) + { + AccessCodeId = accessCodeId; + DeviceId = deviceId; + } + + /// + /// ID of the access code that you want to delete. + /// + [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// ID of the device for which you want to delete the access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/access_codes/delete", requestOptions); + } + + /// + /// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + public void Delete(string accessCodeId = default, string? deviceId = default) + { + Delete(new DeleteRequest(accessCodeId: accessCodeId, deviceId: deviceId)); + } + + /// + /// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/access_codes/delete", requestOptions); + } + + /// + /// Deletes an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + public async Task DeleteAsync(string accessCodeId = default, string? deviceId = default) + { + await DeleteAsync(new DeleteRequest(accessCodeId: accessCodeId, deviceId: deviceId)); + } + + /// + /// Request parameters for Generate a Code. + /// + [DataContract(Name = "generateCodeRequest_request")] + public class GenerateCodeRequest + { + [JsonConstructorAttribute] + protected GenerateCodeRequest() { } + + public GenerateCodeRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the device for which you want to generate a code. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "generateCodeResponse_response")] + public class GenerateCodeResponse + { + [JsonConstructorAttribute] + protected GenerateCodeResponse() { } + + public GenerateCodeResponse(AccessCode generatedCode = default) + { + GeneratedCode = generatedCode; + } + + /// + /// OK + /// + [DataMember(Name = "generated_code", IsRequired = false, EmitDefaultValue = false)] + public AccessCode GeneratedCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. + /// + public AccessCode GenerateCode(GenerateCodeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_codes/generate_code", requestOptions) + .EnsureData("/access_codes/generate_code") + .GeneratedCode; + } + + /// + /// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. + /// + public AccessCode GenerateCode(string deviceId = default) + { + return GenerateCode(new GenerateCodeRequest(deviceId: deviceId)); + } + + /// + /// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. + /// + public async Task GenerateCodeAsync(GenerateCodeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/access_codes/generate_code", + requestOptions + ) + ) + .EnsureData("/access_codes/generate_code") + .GeneratedCode; + } + + /// + /// Generates a code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes), given a device ID. + /// + public async Task GenerateCodeAsync(string deviceId = default) + { + return (await GenerateCodeAsync(new GenerateCodeRequest(deviceId: deviceId))); + } + + /// + /// Request parameters for Get an Access Code. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest( + string? accessCodeId = default, + string? code = default, + string? deviceId = default + ) + { + AccessCodeId = accessCodeId; + Code = code; + DeviceId = deviceId; + } + + /// + /// ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessCodeId { get; set; } + + /// + /// Code of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// ID of the device containing the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AccessCode accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// OK + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public AccessCode AccessCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// You must specify either `access_code_id` or both `device_id` and `code`. + /// + public AccessCode Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_codes/get", requestOptions) + .EnsureData("/access_codes/get") + .AccessCode; + } + + /// + /// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// You must specify either `access_code_id` or both `device_id` and `code`. + /// + public AccessCode Get( + string? accessCodeId = default, + string? code = default, + string? deviceId = default + ) + { + return Get(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId)); + } + + /// + /// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// You must specify either `access_code_id` or both `device_id` and `code`. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/access_codes/get", requestOptions)) + .EnsureData("/access_codes/get") + .AccessCode; + } + + /// + /// Returns a specified [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// You must specify either `access_code_id` or both `device_id` and `code`. + /// + public async Task GetAsync( + string? accessCodeId = default, + string? code = default, + string? deviceId = default + ) + { + return ( + await GetAsync( + new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId) + ) + ); + } + + /// + /// Request parameters for List Access Codes. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + List? accessCodeIds = default, + string? accessGrantId = default, + string? accessGrantKey = default, + string? accessMethodId = default, + string? customerKey = default, + string? deviceId = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + AccessCodeIds = accessCodeIds; + AccessGrantId = accessGrantId; + AccessGrantKey = accessGrantKey; + AccessMethodId = accessMethodId; + CustomerKey = customerKey; + DeviceId = deviceId; + Limit = limit; + PageCursor = pageCursor; + Search = search; + UserIdentifierKey = userIdentifierKey; + } + + /// + /// IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + [DataMember(Name = "access_code_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AccessCodeIds { get; set; } + + /// + /// ID of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantId { get; set; } + + /// + /// Key of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// ID of the access method for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessMethodId { get; set; } + + /// + /// Customer key for which you want to list access codes. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// ID of the device for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Numerical limit on the number of access codes to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// Your user ID for the user by which to filter access codes. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List accessCodes = default) + { + AccessCodes = accessCodes; + } + + /// + /// OK + /// + [DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodes { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_codes/list", requestOptions) + .EnsureData("/access_codes/list") + .AccessCodes; + } + + /// + /// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + public List List( + List? accessCodeIds = default, + string? accessGrantId = default, + string? accessGrantKey = default, + string? accessMethodId = default, + string? customerKey = default, + string? deviceId = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + return List( + new ListRequest( + accessCodeIds: accessCodeIds, + accessGrantId: accessGrantId, + accessGrantKey: accessGrantKey, + accessMethodId: accessMethodId, + customerKey: customerKey, + deviceId: deviceId, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentifierKey: userIdentifierKey + ) + ); + } + + /// + /// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/access_codes/list", requestOptions)) + .EnsureData("/access_codes/list") + .AccessCodes; + } + + /// + /// Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + /// + public async Task> ListAsync( + List? accessCodeIds = default, + string? accessGrantId = default, + string? accessGrantKey = default, + string? accessMethodId = default, + string? customerKey = default, + string? deviceId = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + return ( + await ListAsync( + new ListRequest( + accessCodeIds: accessCodeIds, + accessGrantId: accessGrantId, + accessGrantKey: accessGrantKey, + accessMethodId: accessMethodId, + customerKey: customerKey, + deviceId: deviceId, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentifierKey: userIdentifierKey + ) + ) + ); + } + + /// + /// Request parameters for Pull a Backup Access Code. + /// + [DataContract(Name = "pullBackupAccessCodeRequest_request")] + public class PullBackupAccessCodeRequest + { + [JsonConstructorAttribute] + protected PullBackupAccessCodeRequest() { } + + public PullBackupAccessCodeRequest(string accessCodeId = default) + { + AccessCodeId = accessCodeId; + } + + /// + /// ID of the access code for which you want to pull a backup access code. + /// + [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pullBackupAccessCodeResponse_response")] + public class PullBackupAccessCodeResponse + { + [JsonConstructorAttribute] + protected PullBackupAccessCodeResponse() { } + + public PullBackupAccessCodeResponse(AccessCode accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// OK + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public AccessCode AccessCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). + /// + /// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. + /// + /// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. + /// + /// You can only pull backup access codes for time-bound access codes. + /// + /// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. + /// + public AccessCode PullBackupAccessCode(PullBackupAccessCodeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/access_codes/pull_backup_access_code", + requestOptions + ) + .EnsureData("/access_codes/pull_backup_access_code") + .AccessCode; + } + + /// + /// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). + /// + /// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. + /// + /// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. + /// + /// You can only pull backup access codes for time-bound access codes. + /// + /// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. + /// + public AccessCode PullBackupAccessCode(string accessCodeId = default) + { + return PullBackupAccessCode( + new PullBackupAccessCodeRequest(accessCodeId: accessCodeId) + ); + } + + /// + /// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). + /// + /// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. + /// + /// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. + /// + /// You can only pull backup access codes for time-bound access codes. + /// + /// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. + /// + public async Task PullBackupAccessCodeAsync(PullBackupAccessCodeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/access_codes/pull_backup_access_code", + requestOptions + ) + ) + .EnsureData("/access_codes/pull_backup_access_code") + .AccessCode; + } + + /// + /// Retrieves a backup access code for an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). + /// + /// A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. + /// + /// You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. + /// + /// You can only pull backup access codes for time-bound access codes. + /// + /// Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. + /// + public async Task PullBackupAccessCodeAsync(string accessCodeId = default) + { + return ( + await PullBackupAccessCodeAsync( + new PullBackupAccessCodeRequest(accessCodeId: accessCodeId) + ) + ); + } + + /// + /// Request parameters for Report Device Access Code Constraints. + /// + [DataContract(Name = "reportDeviceConstraintsRequest_request")] + public class ReportDeviceConstraintsRequest + { + [JsonConstructorAttribute] + protected ReportDeviceConstraintsRequest() { } + + public ReportDeviceConstraintsRequest( + string deviceId = default, + int? maxCodeLength = default, + int? minCodeLength = default, + List? supportedCodeLengths = default + ) + { + DeviceId = deviceId; + MaxCodeLength = maxCodeLength; + MinCodeLength = minCodeLength; + SupportedCodeLengths = supportedCodeLengths; + } + + /// + /// ID of the device for which you want to report constraints. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Maximum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. + /// + [DataMember(Name = "max_code_length", IsRequired = false, EmitDefaultValue = false)] + public int? MaxCodeLength { get; set; } + + /// + /// Minimum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. + /// + [DataMember(Name = "min_code_length", IsRequired = false, EmitDefaultValue = false)] + public int? MinCodeLength { get; set; } + + /// + /// Array of supported code lengths as integers between 4 and 20, inclusive. You can specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. + /// + [DataMember( + Name = "supported_code_lengths", + IsRequired = false, + EmitDefaultValue = false + )] + public List? SupportedCodeLengths { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. + /// + /// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. + /// + public void ReportDeviceConstraints(ReportDeviceConstraintsRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/access_codes/report_device_constraints", requestOptions); + } + + /// + /// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. + /// + /// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. + /// + public void ReportDeviceConstraints( + string deviceId = default, + int? maxCodeLength = default, + int? minCodeLength = default, + List? supportedCodeLengths = default + ) + { + ReportDeviceConstraints( + new ReportDeviceConstraintsRequest( + deviceId: deviceId, + maxCodeLength: maxCodeLength, + minCodeLength: minCodeLength, + supportedCodeLengths: supportedCodeLengths + ) + ); + } + + /// + /// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. + /// + /// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. + /// + public async Task ReportDeviceConstraintsAsync(ReportDeviceConstraintsRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/access_codes/report_device_constraints", + requestOptions + ); + } + + /// + /// Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. + /// + /// Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. + /// + public async Task ReportDeviceConstraintsAsync( + string deviceId = default, + int? maxCodeLength = default, + int? minCodeLength = default, + List? supportedCodeLengths = default + ) + { + await ReportDeviceConstraintsAsync( + new ReportDeviceConstraintsRequest( + deviceId: deviceId, + maxCodeLength: maxCodeLength, + minCodeLength: minCodeLength, + supportedCodeLengths: supportedCodeLengths + ) + ); + } + + /// + /// Request parameters for Update an Access Code. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + string? code = default, + string? deviceId = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + bool? isManaged = default, + string? name = default, + string? startsAt = default, + UpdateRequest.TypeEnum? type = default + ) + { + AccessCodeId = accessCodeId; + AllowExternalModification = allowExternalModification; + AttemptForOfflineDevice = attemptForOfflineDevice; + Code = code; + DeviceId = deviceId; + EndsAt = endsAt; + IsExternalModificationAllowed = isExternalModificationAllowed; + IsManaged = isManaged; + Name = name; + StartsAt = startsAt; + Type = type; + } + + /// + /// Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "ongoing")] + Ongoing = 1, + + [EnumMember(Value = "time_bound")] + TimeBound = 2, + } + + /// + /// ID of the access code that you want to update. + /// + [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + /// + [DataMember( + Name = "allow_external_modification", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AllowExternalModification { get; set; } + + [DataMember( + Name = "attempt_for_offline_device", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AttemptForOfflineDevice { get; set; } + + /// + /// Code to be used for access. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// ID of the device containing the access code that you want to update. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + /// + [DataMember( + Name = "is_external_modification_allowed", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsExternalModificationAllowed { get; set; } + + /// + /// Indicates whether the access code is managed through Seam. Note that to convert an unmanaged access code into a managed access code, use `/access_codes/unmanaged/convert_to_managed`. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsManaged { get; set; } + + /// + /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. + /// + /// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. + /// + /// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. + /// + /// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public UpdateRequest.TypeEnum? Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/access_codes/update", requestOptions); + } + + /// + /// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). + /// + public void Update( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + string? code = default, + string? deviceId = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + bool? isManaged = default, + string? name = default, + string? startsAt = default, + UpdateRequest.TypeEnum? type = default + ) + { + Update( + new UpdateRequest( + accessCodeId: accessCodeId, + allowExternalModification: allowExternalModification, + attemptForOfflineDevice: attemptForOfflineDevice, + code: code, + deviceId: deviceId, + endsAt: endsAt, + isExternalModificationAllowed: isExternalModificationAllowed, + isManaged: isManaged, + name: name, + startsAt: startsAt, + type: type + ) + ); + } + + /// + /// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/access_codes/update", requestOptions); + } + + /// + /// Updates a specified active or upcoming [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// See also [Modifying Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/modifying-access-codes). + /// + public async Task UpdateAsync( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? attemptForOfflineDevice = default, + string? code = default, + string? deviceId = default, + string? endsAt = default, + bool? isExternalModificationAllowed = default, + bool? isManaged = default, + string? name = default, + string? startsAt = default, + UpdateRequest.TypeEnum? type = default + ) + { + await UpdateAsync( + new UpdateRequest( + accessCodeId: accessCodeId, + allowExternalModification: allowExternalModification, + attemptForOfflineDevice: attemptForOfflineDevice, + code: code, + deviceId: deviceId, + endsAt: endsAt, + isExternalModificationAllowed: isExternalModificationAllowed, + isManaged: isManaged, + name: name, + startsAt: startsAt, + type: type + ) + ); + } + + /// + /// Request parameters for Update Multiple Linked Access Codes. + /// + [DataContract(Name = "updateMultipleRequest_request")] + public class UpdateMultipleRequest + { + [JsonConstructorAttribute] + protected UpdateMultipleRequest() { } + + public UpdateMultipleRequest( + string commonCodeKey = default, + string? endsAt = default, + string? name = default, + string? startsAt = default + ) + { + CommonCodeKey = commonCodeKey; + EndsAt = endsAt; + Name = name; + StartsAt = startsAt; + } + + /// + /// Key that links the group of access codes, assigned on creation by `/access_codes/create_multiple`. + /// + [DataMember(Name = "common_code_key", IsRequired = true, EmitDefaultValue = false)] + public string CommonCodeKey { get; set; } + + /// + /// Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. + /// + /// Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. + /// + /// To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. + /// + /// To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + /// + /// Specify the `common_code_key` to identify the set of access codes that you want to update. + /// + /// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). + /// + public void UpdateMultiple(UpdateMultipleRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/access_codes/update_multiple", requestOptions); + } + + /// + /// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + /// + /// Specify the `common_code_key` to identify the set of access codes that you want to update. + /// + /// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). + /// + public void UpdateMultiple( + string commonCodeKey = default, + string? endsAt = default, + string? name = default, + string? startsAt = default + ) + { + UpdateMultiple( + new UpdateMultipleRequest( + commonCodeKey: commonCodeKey, + endsAt: endsAt, + name: name, + startsAt: startsAt + ) + ); + } + + /// + /// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + /// + /// Specify the `common_code_key` to identify the set of access codes that you want to update. + /// + /// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). + /// + public async Task UpdateMultipleAsync(UpdateMultipleRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/access_codes/update_multiple", requestOptions); + } + + /// + /// Updates [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + /// + /// Specify the `common_code_key` to identify the set of access codes that you want to update. + /// + /// See also [Update Linked Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). + /// + public async Task UpdateMultipleAsync( + string commonCodeKey = default, + string? endsAt = default, + string? name = default, + string? startsAt = default + ) + { + await UpdateMultipleAsync( + new UpdateMultipleRequest( + commonCodeKey: commonCodeKey, + endsAt: endsAt, + name: name, + startsAt: startsAt + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.AccessCodes AccessCodes => new(this); -} + public partial class SeamClient + { + public Api.AccessCodes AccessCodes => new(this); + } -public partial interface ISeamClient -{ -public Api.AccessCodes AccessCodes { get; } -} + public partial interface ISeamClient + { + public Api.AccessCodes AccessCodes { get; } + } } diff --git a/src/Seam/Api/AccessGrants.cs b/src/Seam/Api/AccessGrants.cs index bdca55d8..68fab453 100644 --- a/src/Seam/Api/AccessGrants.cs +++ b/src/Seam/Api/AccessGrants.cs @@ -9,1293 +9,1633 @@ namespace Seam.Api { -public class AccessGrants -{ -private ISeamClient _seam; - -public AccessGrants(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create an Access Grant. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(string? accessGrantKey = default, List? acsEntranceIds = default, string? customizationProfileId = default, List? deviceIds = default, string? endsAt = default, CreateRequestLocation? location = default, List? locationIds = default, string? name = default, List requestedAccessMethods = default, string? reservationKey = default, List? spaceIds = default, List? spaceKeys = default, string? startsAt = default, CreateRequestUserIdentity? userIdentity = default, string? userIdentityId = default) -{ -AccessGrantKey = accessGrantKey; -AcsEntranceIds = acsEntranceIds; -CustomizationProfileId = customizationProfileId; -DeviceIds = deviceIds; -EndsAt = endsAt; -Location = location; -LocationIds = locationIds; -Name = name; -RequestedAccessMethods = requestedAccessMethods; -ReservationKey = reservationKey; -SpaceIds = spaceIds; -SpaceKeys = spaceKeys; -StartsAt = startsAt; -UserIdentity = userIdentity; -UserIdentityId = userIdentityId; -} - -/// -/// Unique key for the access grant within the workspace. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// Set of IDs of the [entrances](https://www.seam.co/docs/api/acs/systems/list) to which access is being granted. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsEntranceIds { get; set; } - -/// -/// ID of the customization profile to apply to the Access Grant and its access methods. -/// -[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomizationProfileId { get; set; } - -/// -/// Set of IDs of the [devices](https://www.seam.co/docs/api/devices/list) to which access is being granted. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceIds { get; set; } - -/// -/// Date and time at which the validity of the new grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -[Obsolete("Create a space first, then reference it using `space_ids`.")] -[DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestLocation? Location { get; set; } - -[Obsolete("Use `space_ids`.")] -[DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] -public List? LocationIds { get; set; } - -/// -/// Name for the access grant. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -[DataMember(Name = "requested_access_methods", IsRequired = true, EmitDefaultValue = false)] -public List RequestedAccessMethods { get; set; } - -/// -/// Reservation key for the access grant. -/// -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -/// -/// Set of IDs of existing spaces to which access is being granted. -/// -[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceIds { get; set; } - -/// -/// Set of keys of existing spaces to which access is being granted. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Date and time at which the validity of the new grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// When used, creates a new user identity with the given details, and grants them access. -/// -[DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestUserIdentity? UserIdentity { get; set; } - -/// -/// ID of user identity for whom access is being granted. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestLocation_model")] -public class CreateRequestLocation -{ -[JsonConstructorAttribute] -protected CreateRequestLocation() { } - -public CreateRequestLocation(List? acsEntranceIds = default, List? deviceIds = default, string? name = default) -{ -AcsEntranceIds = acsEntranceIds; -DeviceIds = deviceIds; -Name = name; -} - -[Obsolete("Use `acs_entrance_ids` at the top level.")] -[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsEntranceIds { get; set; } - -[Obsolete("Use `device_ids` at the top level.")] -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceIds { get; set; } - -/// -/// Name of the location. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestRequestedAccessMethods_model")] -public class CreateRequestRequestedAccessMethods -{ -[JsonConstructorAttribute] -protected CreateRequestRequestedAccessMethods() { } - -public CreateRequestRequestedAccessMethods(string? code = default, int? instantKeyMaxUseCount = default, CreateRequestRequestedAccessMethods.ModeEnum? mode = default) -{ -Code = code; -InstantKeyMaxUseCount = instantKeyMaxUseCount; -Mode = mode; -} - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Specific PIN code to use for this access method. Only applicable when mode is 'code'. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. -/// -[DataMember(Name = "instant_key_max_use_count", IsRequired = false, EmitDefaultValue = false)] -public int? InstantKeyMaxUseCount { get; set; } - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestRequestedAccessMethods.ModeEnum? Mode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestUserIdentity_model")] -public class CreateRequestUserIdentity -{ -[JsonConstructorAttribute] -protected CreateRequestUserIdentity() { } - -public CreateRequestUserIdentity(string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string? userIdentityKey = default) -{ -EmailAddress = emailAddress; -FullName = fullName; -PhoneNumber = phoneNumber; -UserIdentityKey = userIdentityKey; -} - -/// -/// Unique email address for the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Full name of the user associated with the user identity. -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Unique key for the user identity. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(AccessGrant accessGrant = default) -{ -AccessGrant = accessGrant; -} - -/// -/// OK -/// -[DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] -public AccessGrant AccessGrant { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. -/// -public AccessGrant Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/access_grants/create", requestOptions).EnsureData("/access_grants/create").AccessGrant; -} - -/// -/// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. -/// -public AccessGrant Create(string? accessGrantKey = default, List? acsEntranceIds = default, string? customizationProfileId = default, List? deviceIds = default, string? endsAt = default, CreateRequestLocation? location = default, List? locationIds = default, string? name = default, List requestedAccessMethods = default, string? reservationKey = default, List? spaceIds = default, List? spaceKeys = default, string? startsAt = default, CreateRequestUserIdentity? userIdentity = default, string? userIdentityId = default) -{ -return Create(new CreateRequest(accessGrantKey: accessGrantKey, acsEntranceIds: acsEntranceIds, customizationProfileId: customizationProfileId, deviceIds: deviceIds, endsAt: endsAt, location: location, locationIds: locationIds, name: name, requestedAccessMethods: requestedAccessMethods, reservationKey: reservationKey, spaceIds: spaceIds, spaceKeys: spaceKeys, startsAt: startsAt, userIdentity: userIdentity, userIdentityId: userIdentityId)); -} - -/// -/// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/access_grants/create", requestOptions)).EnsureData("/access_grants/create").AccessGrant; -} - -/// -/// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. -/// -public async Task CreateAsync(string? accessGrantKey = default, List? acsEntranceIds = default, string? customizationProfileId = default, List? deviceIds = default, string? endsAt = default, CreateRequestLocation? location = default, List? locationIds = default, string? name = default, List requestedAccessMethods = default, string? reservationKey = default, List? spaceIds = default, List? spaceKeys = default, string? startsAt = default, CreateRequestUserIdentity? userIdentity = default, string? userIdentityId = default) -{ -return (await CreateAsync(new CreateRequest(accessGrantKey: accessGrantKey, acsEntranceIds: acsEntranceIds, customizationProfileId: customizationProfileId, deviceIds: deviceIds, endsAt: endsAt, location: location, locationIds: locationIds, name: name, requestedAccessMethods: requestedAccessMethods, reservationKey: reservationKey, spaceIds: spaceIds, spaceKeys: spaceKeys, startsAt: startsAt, userIdentity: userIdentity, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for Delete an Access Grant. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string accessGrantId = default) -{ -AccessGrantId = accessGrantId; -} - -/// -/// ID of Access Grant to delete. -/// -[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Delete an Access Grant. -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/access_grants/delete", requestOptions); -} - -/// -/// Delete an Access Grant. -/// -public void Delete(string accessGrantId = default) -{ -Delete(new DeleteRequest(accessGrantId: accessGrantId)); -} - -/// -/// Delete an Access Grant. -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/access_grants/delete", requestOptions); -} - -/// -/// Delete an Access Grant. -/// -public async Task DeleteAsync(string accessGrantId = default) -{ -await DeleteAsync(new DeleteRequest(accessGrantId: accessGrantId)); -} - -/// -/// Request parameters for Get an Access Grant. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? accessGrantId = default, string? accessGrantKey = default) -{ -AccessGrantId = accessGrantId; -AccessGrantKey = accessGrantKey; -} - -/// -/// ID of Access Grant to get. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantId { get; set; } - -/// -/// Unique key of Access Grant to get. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AccessGrant accessGrant = default) -{ -AccessGrant = accessGrant; -} - -/// -/// OK -/// -[DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] -public AccessGrant AccessGrant { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Get an Access Grant. -/// -public AccessGrant Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_grants/get", requestOptions).EnsureData("/access_grants/get").AccessGrant; -} - -/// -/// Get an Access Grant. -/// -public AccessGrant Get(string? accessGrantId = default, string? accessGrantKey = default) -{ -return Get(new GetRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey)); -} - -/// -/// Get an Access Grant. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_grants/get", requestOptions)).EnsureData("/access_grants/get").AccessGrant; -} - -/// -/// Get an Access Grant. -/// -public async Task GetAsync(string? accessGrantId = default, string? accessGrantKey = default) -{ -return (await GetAsync(new GetRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey))); -} - -/// -/// Request parameters for Get related Access Grant resources. -/// -[DataContract(Name = "getRelatedRequest_request")] -public class GetRelatedRequest -{ -[JsonConstructorAttribute] -protected GetRelatedRequest() { } - -public GetRelatedRequest(List? accessGrantIds = default, List? accessGrantKeys = default, List? exclude = default, List? include = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -Exclude = exclude; -Include = include; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExcludeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "spaces")] -Spaces = 1, - -[EnumMember(Value = "devices")] -Devices = 2, - -[EnumMember(Value = "acs_entrances")] -AcsEntrances = 3, - -[EnumMember(Value = "connected_accounts")] -ConnectedAccounts = 4, - -[EnumMember(Value = "acs_systems")] -AcsSystems = 5, - -[EnumMember(Value = "user_identities")] -UserIdentities = 6, - -[EnumMember(Value = "acs_access_groups")] -AcsAccessGroups = 7, - -[EnumMember(Value = "access_methods")] -AccessMethods = 8, -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum IncludeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "spaces")] -Spaces = 1, - -[EnumMember(Value = "devices")] -Devices = 2, - -[EnumMember(Value = "acs_entrances")] -AcsEntrances = 3, - -[EnumMember(Value = "connected_accounts")] -ConnectedAccounts = 4, - -[EnumMember(Value = "acs_systems")] -AcsSystems = 5, - -[EnumMember(Value = "user_identities")] -UserIdentities = 6, - -[EnumMember(Value = "acs_access_groups")] -AcsAccessGroups = 7, - -[EnumMember(Value = "access_methods")] -AccessMethods = 8, -} - -/// -/// IDs of the access grants that you want to get along with their related resources. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantIds { get; set; } - -/// -/// Keys of the access grants that you want to get along with their related resources. -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] -public List? Exclude { get; set; } - -[DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] -public List? Include { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getRelatedResponse_response")] -public class GetRelatedResponse -{ -[JsonConstructorAttribute] -protected GetRelatedResponse() { } - -public GetRelatedResponse(Batch batch = default) -{ -Batch = batch; -} - -/// -/// OK -/// -[DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] -public Batch Batch { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets all related resources for one or more Access Grants. -/// -public Batch GetRelated(GetRelatedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_grants/get_related", requestOptions).EnsureData("/access_grants/get_related").Batch; -} - -/// -/// Gets all related resources for one or more Access Grants. -/// -public Batch GetRelated(List? accessGrantIds = default, List? accessGrantKeys = default, List? exclude = default, List? include = default) -{ -return GetRelated(new GetRelatedRequest(accessGrantIds: accessGrantIds, accessGrantKeys: accessGrantKeys, exclude: exclude, include: include)); -} - -/// -/// Gets all related resources for one or more Access Grants. -/// -public async Task GetRelatedAsync(GetRelatedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_grants/get_related", requestOptions)).EnsureData("/access_grants/get_related").Batch; -} - -/// -/// Gets all related resources for one or more Access Grants. -/// -public async Task GetRelatedAsync(List? accessGrantIds = default, List? accessGrantKeys = default, List? exclude = default, List? include = default) -{ -return (await GetRelatedAsync(new GetRelatedRequest(accessGrantIds: accessGrantIds, accessGrantKeys: accessGrantKeys, exclude: exclude, include: include))); -} - -/// -/// Request parameters for List Access Grants. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? accessCodeId = default, List? accessGrantIds = default, string? accessGrantKey = default, string? acsEntranceId = default, string? acsSystemId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? locationId = default, string? pageCursor = default, string? reservationKey = default, string? search = default, string? spaceId = default, string? userIdentityId = default) -{ -AccessCodeId = accessCodeId; -AccessGrantIds = accessGrantIds; -AccessGrantKey = accessGrantKey; -AcsEntranceId = acsEntranceId; -AcsSystemId = acsSystemId; -CustomerKey = customerKey; -DeviceId = deviceId; -Limit = limit; -LocationId = locationId; -PageCursor = pageCursor; -ReservationKey = reservationKey; -Search = search; -SpaceId = spaceId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access code by which you want to filter the list of Access Grants. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessCodeId { get; set; } - -/// -/// IDs of the access grants to retrieve. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantIds { get; set; } - -/// -/// Filter Access Grants by access_grant_key. Use null to filter for Access Grants without an access_grant_key. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// ID of the entrance by which you want to filter the list of Access Grants. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsEntranceId { get; set; } - -/// -/// ID of the access system by which you want to filter the list of Access Grants. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// Customer key for which you want to list access grants. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// ID of the device by which you want to filter the list of Access Grants. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Numerical limit on the number of access grants to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -[Obsolete("Use `space_id`.")] -[DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] -public string? LocationId { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// Filter Access Grants by reservation_key. -/// -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -/// -/// String for which to search. Filters returned Access Grants to include all records that satisfy a partial match using `name`, `access_grant_key`, `reservation_key`, `access_grant_id`, `user_identity_id`, `user_identity_full_name`, `user_identity_email_address` or `user_identity_phone_number`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// ID of the space by which you want to filter the list of Access Grants. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -/// -/// ID of user identity by which you want to filter the list of Access Grants. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List accessGrants = default) -{ -AccessGrants = accessGrants; -} - -/// -/// OK -/// -[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrants { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets an Access Grant. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_grants/list", requestOptions).EnsureData("/access_grants/list").AccessGrants; -} - -/// -/// Gets an Access Grant. -/// -public List List(string? accessCodeId = default, List? accessGrantIds = default, string? accessGrantKey = default, string? acsEntranceId = default, string? acsSystemId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? locationId = default, string? pageCursor = default, string? reservationKey = default, string? search = default, string? spaceId = default, string? userIdentityId = default) -{ -return List(new ListRequest(accessCodeId: accessCodeId, accessGrantIds: accessGrantIds, accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, customerKey: customerKey, deviceId: deviceId, limit: limit, locationId: locationId, pageCursor: pageCursor, reservationKey: reservationKey, search: search, spaceId: spaceId, userIdentityId: userIdentityId)); -} - -/// -/// Gets an Access Grant. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_grants/list", requestOptions)).EnsureData("/access_grants/list").AccessGrants; -} - -/// -/// Gets an Access Grant. -/// -public async Task> ListAsync(string? accessCodeId = default, List? accessGrantIds = default, string? accessGrantKey = default, string? acsEntranceId = default, string? acsSystemId = default, string? customerKey = default, string? deviceId = default, float? limit = default, string? locationId = default, string? pageCursor = default, string? reservationKey = default, string? search = default, string? spaceId = default, string? userIdentityId = default) -{ -return (await ListAsync(new ListRequest(accessCodeId: accessCodeId, accessGrantIds: accessGrantIds, accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, customerKey: customerKey, deviceId: deviceId, limit: limit, locationId: locationId, pageCursor: pageCursor, reservationKey: reservationKey, search: search, spaceId: spaceId, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for Add Requested Access Methods to Access Grant. -/// -[DataContract(Name = "requestAccessMethodsRequest_request")] -public class RequestAccessMethodsRequest -{ -[JsonConstructorAttribute] -protected RequestAccessMethodsRequest() { } - -public RequestAccessMethodsRequest(string accessGrantId = default, List requestedAccessMethods = default) -{ -AccessGrantId = accessGrantId; -RequestedAccessMethods = requestedAccessMethods; -} - -/// -/// ID of the Access Grant to add access methods to. -/// -[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// Array of requested access methods to add to the access grant. -/// -[DataMember(Name = "requested_access_methods", IsRequired = true, EmitDefaultValue = false)] -public List RequestedAccessMethods { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "requestAccessMethodsRequestRequestedAccessMethods_model")] -public class RequestAccessMethodsRequestRequestedAccessMethods -{ -[JsonConstructorAttribute] -protected RequestAccessMethodsRequestRequestedAccessMethods() { } - -public RequestAccessMethodsRequestRequestedAccessMethods(string? code = default, int? instantKeyMaxUseCount = default, RequestAccessMethodsRequestRequestedAccessMethods.ModeEnum? mode = default) -{ -Code = code; -InstantKeyMaxUseCount = instantKeyMaxUseCount; -Mode = mode; -} - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Specific PIN code to use for this access method. Only applicable when mode is 'code'. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. -/// -[DataMember(Name = "instant_key_max_use_count", IsRequired = false, EmitDefaultValue = false)] -public int? InstantKeyMaxUseCount { get; set; } - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] -public RequestAccessMethodsRequestRequestedAccessMethods.ModeEnum? Mode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "requestAccessMethodsResponse_response")] -public class RequestAccessMethodsResponse -{ -[JsonConstructorAttribute] -protected RequestAccessMethodsResponse() { } - -public RequestAccessMethodsResponse(AccessGrant accessGrant = default) -{ -AccessGrant = accessGrant; -} - -/// -/// OK -/// -[DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] -public AccessGrant AccessGrant { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Adds additional requested access methods to an existing Access Grant. -/// -public AccessGrant RequestAccessMethods(RequestAccessMethodsRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/access_grants/request_access_methods", requestOptions).EnsureData("/access_grants/request_access_methods").AccessGrant; -} - -/// -/// Adds additional requested access methods to an existing Access Grant. -/// -public AccessGrant RequestAccessMethods(string accessGrantId = default, List requestedAccessMethods = default) -{ -return RequestAccessMethods(new RequestAccessMethodsRequest(accessGrantId: accessGrantId, requestedAccessMethods: requestedAccessMethods)); -} - -/// -/// Adds additional requested access methods to an existing Access Grant. -/// -public async Task RequestAccessMethodsAsync(RequestAccessMethodsRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/access_grants/request_access_methods", requestOptions)).EnsureData("/access_grants/request_access_methods").AccessGrant; -} - -/// -/// Adds additional requested access methods to an existing Access Grant. -/// -public async Task RequestAccessMethodsAsync(string accessGrantId = default, List requestedAccessMethods = default) -{ -return (await RequestAccessMethodsAsync(new RequestAccessMethodsRequest(accessGrantId: accessGrantId, requestedAccessMethods: requestedAccessMethods))); -} - -/// -/// Request parameters for Update an Access Grant. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string? accessGrantId = default, string? accessGrantKey = default, string? endsAt = default, string? name = default, string? startsAt = default) -{ -AccessGrantId = accessGrantId; -AccessGrantKey = accessGrantKey; -EndsAt = endsAt; -Name = name; -StartsAt = startsAt; -} - -/// -/// ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantId { get; set; } - -/// -/// Key of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// Date and time at which the validity of the grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Display name for the access grant. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Date and time at which the validity of the grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates an existing Access Grant's time window. -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/access_grants/update", requestOptions); -} - -/// -/// Updates an existing Access Grant's time window. -/// -public void Update(string? accessGrantId = default, string? accessGrantKey = default, string? endsAt = default, string? name = default, string? startsAt = default) -{ -Update(new UpdateRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, endsAt: endsAt, name: name, startsAt: startsAt)); -} - -/// -/// Updates an existing Access Grant's time window. -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/access_grants/update", requestOptions); -} - -/// -/// Updates an existing Access Grant's time window. -/// -public async Task UpdateAsync(string? accessGrantId = default, string? accessGrantKey = default, string? endsAt = default, string? name = default, string? startsAt = default) -{ -await UpdateAsync(new UpdateRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, endsAt: endsAt, name: name, startsAt: startsAt)); -} -} + public class AccessGrants + { + private ISeamClient _seam; + + public AccessGrants(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create an Access Grant. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + string? accessGrantKey = default, + List? acsEntranceIds = default, + string? customizationProfileId = default, + List? deviceIds = default, + string? endsAt = default, + CreateRequestLocation? location = default, + List? locationIds = default, + string? name = default, + List requestedAccessMethods = default, + string? reservationKey = default, + List? spaceIds = default, + List? spaceKeys = default, + string? startsAt = default, + CreateRequestUserIdentity? userIdentity = default, + string? userIdentityId = default + ) + { + AccessGrantKey = accessGrantKey; + AcsEntranceIds = acsEntranceIds; + CustomizationProfileId = customizationProfileId; + DeviceIds = deviceIds; + EndsAt = endsAt; + Location = location; + LocationIds = locationIds; + Name = name; + RequestedAccessMethods = requestedAccessMethods; + ReservationKey = reservationKey; + SpaceIds = spaceIds; + SpaceKeys = spaceKeys; + StartsAt = startsAt; + UserIdentity = userIdentity; + UserIdentityId = userIdentityId; + } + + /// + /// Unique key for the access grant within the workspace. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// Set of IDs of the [entrances](https://www.seam.co/docs/api/acs/systems/list) to which access is being granted. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEntranceIds { get; set; } + + /// + /// ID of the customization profile to apply to the Access Grant and its access methods. + /// + [DataMember( + Name = "customization_profile_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomizationProfileId { get; set; } + + /// + /// Set of IDs of the [devices](https://www.seam.co/docs/api/devices/list) to which access is being granted. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceIds { get; set; } + + /// + /// Date and time at which the validity of the new grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + [Obsolete("Create a space first, then reference it using `space_ids`.")] + [DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestLocation? Location { get; set; } + + [Obsolete("Use `space_ids`.")] + [DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] + public List? LocationIds { get; set; } + + /// + /// Name for the access grant. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + [DataMember( + Name = "requested_access_methods", + IsRequired = true, + EmitDefaultValue = false + )] + public List RequestedAccessMethods { get; set; } + + /// + /// Reservation key for the access grant. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + /// + /// Set of IDs of existing spaces to which access is being granted. + /// + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceIds { get; set; } + + /// + /// Set of keys of existing spaces to which access is being granted. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Date and time at which the validity of the new grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// When used, creates a new user identity with the given details, and grants them access. + /// + [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestUserIdentity? UserIdentity { get; set; } + + /// + /// ID of user identity for whom access is being granted. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestLocation_model")] + public class CreateRequestLocation + { + [JsonConstructorAttribute] + protected CreateRequestLocation() { } + + public CreateRequestLocation( + List? acsEntranceIds = default, + List? deviceIds = default, + string? name = default + ) + { + AcsEntranceIds = acsEntranceIds; + DeviceIds = deviceIds; + Name = name; + } + + [Obsolete("Use `acs_entrance_ids` at the top level.")] + [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEntranceIds { get; set; } + + [Obsolete("Use `device_ids` at the top level.")] + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceIds { get; set; } + + /// + /// Name of the location. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestRequestedAccessMethods_model")] + public class CreateRequestRequestedAccessMethods + { + [JsonConstructorAttribute] + protected CreateRequestRequestedAccessMethods() { } + + public CreateRequestRequestedAccessMethods( + string? code = default, + int? instantKeyMaxUseCount = default, + CreateRequestRequestedAccessMethods.ModeEnum? mode = default + ) + { + Code = code; + InstantKeyMaxUseCount = instantKeyMaxUseCount; + Mode = mode; + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + /// + [DataMember( + Name = "instant_key_max_use_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int? InstantKeyMaxUseCount { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestRequestedAccessMethods.ModeEnum? Mode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestUserIdentity_model")] + public class CreateRequestUserIdentity + { + [JsonConstructorAttribute] + protected CreateRequestUserIdentity() { } + + public CreateRequestUserIdentity( + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default, + string? userIdentityKey = default + ) + { + EmailAddress = emailAddress; + FullName = fullName; + PhoneNumber = phoneNumber; + UserIdentityKey = userIdentityKey; + } + + /// + /// Unique email address for the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Full name of the user associated with the user identity. + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Unique key for the user identity. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(AccessGrant accessGrant = default) + { + AccessGrant = accessGrant; + } + + /// + /// OK + /// + [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] + public AccessGrant AccessGrant { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. + /// + public AccessGrant Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/access_grants/create", requestOptions) + .EnsureData("/access_grants/create") + .AccessGrant; + } + + /// + /// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. + /// + public AccessGrant Create( + string? accessGrantKey = default, + List? acsEntranceIds = default, + string? customizationProfileId = default, + List? deviceIds = default, + string? endsAt = default, + CreateRequestLocation? location = default, + List? locationIds = default, + string? name = default, + List requestedAccessMethods = default, + string? reservationKey = default, + List? spaceIds = default, + List? spaceKeys = default, + string? startsAt = default, + CreateRequestUserIdentity? userIdentity = default, + string? userIdentityId = default + ) + { + return Create( + new CreateRequest( + accessGrantKey: accessGrantKey, + acsEntranceIds: acsEntranceIds, + customizationProfileId: customizationProfileId, + deviceIds: deviceIds, + endsAt: endsAt, + location: location, + locationIds: locationIds, + name: name, + requestedAccessMethods: requestedAccessMethods, + reservationKey: reservationKey, + spaceIds: spaceIds, + spaceKeys: spaceKeys, + startsAt: startsAt, + userIdentity: userIdentity, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/access_grants/create", requestOptions)) + .EnsureData("/access_grants/create") + .AccessGrant; + } + + /// + /// Creates a new [Access Grant](https://www.seam.co/docs/use-cases/granting-access). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. + /// + public async Task CreateAsync( + string? accessGrantKey = default, + List? acsEntranceIds = default, + string? customizationProfileId = default, + List? deviceIds = default, + string? endsAt = default, + CreateRequestLocation? location = default, + List? locationIds = default, + string? name = default, + List requestedAccessMethods = default, + string? reservationKey = default, + List? spaceIds = default, + List? spaceKeys = default, + string? startsAt = default, + CreateRequestUserIdentity? userIdentity = default, + string? userIdentityId = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + accessGrantKey: accessGrantKey, + acsEntranceIds: acsEntranceIds, + customizationProfileId: customizationProfileId, + deviceIds: deviceIds, + endsAt: endsAt, + location: location, + locationIds: locationIds, + name: name, + requestedAccessMethods: requestedAccessMethods, + reservationKey: reservationKey, + spaceIds: spaceIds, + spaceKeys: spaceKeys, + startsAt: startsAt, + userIdentity: userIdentity, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for Delete an Access Grant. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string accessGrantId = default) + { + AccessGrantId = accessGrantId; + } + + /// + /// ID of Access Grant to delete. + /// + [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Delete an Access Grant. + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/access_grants/delete", requestOptions); + } + + /// + /// Delete an Access Grant. + /// + public void Delete(string accessGrantId = default) + { + Delete(new DeleteRequest(accessGrantId: accessGrantId)); + } + + /// + /// Delete an Access Grant. + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/access_grants/delete", requestOptions); + } + + /// + /// Delete an Access Grant. + /// + public async Task DeleteAsync(string accessGrantId = default) + { + await DeleteAsync(new DeleteRequest(accessGrantId: accessGrantId)); + } + + /// + /// Request parameters for Get an Access Grant. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string? accessGrantId = default, string? accessGrantKey = default) + { + AccessGrantId = accessGrantId; + AccessGrantKey = accessGrantKey; + } + + /// + /// ID of Access Grant to get. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantId { get; set; } + + /// + /// Unique key of Access Grant to get. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AccessGrant accessGrant = default) + { + AccessGrant = accessGrant; + } + + /// + /// OK + /// + [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] + public AccessGrant AccessGrant { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Get an Access Grant. + /// + public AccessGrant Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_grants/get", requestOptions) + .EnsureData("/access_grants/get") + .AccessGrant; + } + + /// + /// Get an Access Grant. + /// + public AccessGrant Get(string? accessGrantId = default, string? accessGrantKey = default) + { + return Get( + new GetRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey) + ); + } + + /// + /// Get an Access Grant. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/access_grants/get", requestOptions)) + .EnsureData("/access_grants/get") + .AccessGrant; + } + + /// + /// Get an Access Grant. + /// + public async Task GetAsync( + string? accessGrantId = default, + string? accessGrantKey = default + ) + { + return ( + await GetAsync( + new GetRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey) + ) + ); + } + + /// + /// Request parameters for Get related Access Grant resources. + /// + [DataContract(Name = "getRelatedRequest_request")] + public class GetRelatedRequest + { + [JsonConstructorAttribute] + protected GetRelatedRequest() { } + + public GetRelatedRequest( + List? accessGrantIds = default, + List? accessGrantKeys = default, + List? exclude = default, + List? include = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + Exclude = exclude; + Include = include; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExcludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "connected_accounts")] + ConnectedAccounts = 4, + + [EnumMember(Value = "acs_systems")] + AcsSystems = 5, + + [EnumMember(Value = "user_identities")] + UserIdentities = 6, + + [EnumMember(Value = "acs_access_groups")] + AcsAccessGroups = 7, + + [EnumMember(Value = "access_methods")] + AccessMethods = 8, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum IncludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "connected_accounts")] + ConnectedAccounts = 4, + + [EnumMember(Value = "acs_systems")] + AcsSystems = 5, + + [EnumMember(Value = "user_identities")] + UserIdentities = 6, + + [EnumMember(Value = "acs_access_groups")] + AcsAccessGroups = 7, + + [EnumMember(Value = "access_methods")] + AccessMethods = 8, + } + + /// + /// IDs of the access grants that you want to get along with their related resources. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantIds { get; set; } + + /// + /// Keys of the access grants that you want to get along with their related resources. + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public List? Exclude { get; set; } + + [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] + public List? Include { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getRelatedResponse_response")] + public class GetRelatedResponse + { + [JsonConstructorAttribute] + protected GetRelatedResponse() { } + + public GetRelatedResponse(Batch batch = default) + { + Batch = batch; + } + + /// + /// OK + /// + [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] + public Batch Batch { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets all related resources for one or more Access Grants. + /// + public Batch GetRelated(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_grants/get_related", requestOptions) + .EnsureData("/access_grants/get_related") + .Batch; + } + + /// + /// Gets all related resources for one or more Access Grants. + /// + public Batch GetRelated( + List? accessGrantIds = default, + List? accessGrantKeys = default, + List? exclude = default, + List? include = default + ) + { + return GetRelated( + new GetRelatedRequest( + accessGrantIds: accessGrantIds, + accessGrantKeys: accessGrantKeys, + exclude: exclude, + include: include + ) + ); + } + + /// + /// Gets all related resources for one or more Access Grants. + /// + public async Task GetRelatedAsync(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/access_grants/get_related", + requestOptions + ) + ) + .EnsureData("/access_grants/get_related") + .Batch; + } + + /// + /// Gets all related resources for one or more Access Grants. + /// + public async Task GetRelatedAsync( + List? accessGrantIds = default, + List? accessGrantKeys = default, + List? exclude = default, + List? include = default + ) + { + return ( + await GetRelatedAsync( + new GetRelatedRequest( + accessGrantIds: accessGrantIds, + accessGrantKeys: accessGrantKeys, + exclude: exclude, + include: include + ) + ) + ); + } + + /// + /// Request parameters for List Access Grants. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? accessCodeId = default, + List? accessGrantIds = default, + string? accessGrantKey = default, + string? acsEntranceId = default, + string? acsSystemId = default, + string? customerKey = default, + string? deviceId = default, + float? limit = default, + string? locationId = default, + string? pageCursor = default, + string? reservationKey = default, + string? search = default, + string? spaceId = default, + string? userIdentityId = default + ) + { + AccessCodeId = accessCodeId; + AccessGrantIds = accessGrantIds; + AccessGrantKey = accessGrantKey; + AcsEntranceId = acsEntranceId; + AcsSystemId = acsSystemId; + CustomerKey = customerKey; + DeviceId = deviceId; + Limit = limit; + LocationId = locationId; + PageCursor = pageCursor; + ReservationKey = reservationKey; + Search = search; + SpaceId = spaceId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access code by which you want to filter the list of Access Grants. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessCodeId { get; set; } + + /// + /// IDs of the access grants to retrieve. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantIds { get; set; } + + /// + /// Filter Access Grants by access_grant_key. Use null to filter for Access Grants without an access_grant_key. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// ID of the entrance by which you want to filter the list of Access Grants. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsEntranceId { get; set; } + + /// + /// ID of the access system by which you want to filter the list of Access Grants. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// Customer key for which you want to list access grants. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// ID of the device by which you want to filter the list of Access Grants. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Numerical limit on the number of access grants to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + [Obsolete("Use `space_id`.")] + [DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] + public string? LocationId { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// Filter Access Grants by reservation_key. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + /// + /// String for which to search. Filters returned Access Grants to include all records that satisfy a partial match using `name`, `access_grant_key`, `reservation_key`, `access_grant_id`, `user_identity_id`, `user_identity_full_name`, `user_identity_email_address` or `user_identity_phone_number`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// ID of the space by which you want to filter the list of Access Grants. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + /// + /// ID of user identity by which you want to filter the list of Access Grants. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List accessGrants = default) + { + AccessGrants = accessGrants; + } + + /// + /// OK + /// + [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrants { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets an Access Grant. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_grants/list", requestOptions) + .EnsureData("/access_grants/list") + .AccessGrants; + } + + /// + /// Gets an Access Grant. + /// + public List List( + string? accessCodeId = default, + List? accessGrantIds = default, + string? accessGrantKey = default, + string? acsEntranceId = default, + string? acsSystemId = default, + string? customerKey = default, + string? deviceId = default, + float? limit = default, + string? locationId = default, + string? pageCursor = default, + string? reservationKey = default, + string? search = default, + string? spaceId = default, + string? userIdentityId = default + ) + { + return List( + new ListRequest( + accessCodeId: accessCodeId, + accessGrantIds: accessGrantIds, + accessGrantKey: accessGrantKey, + acsEntranceId: acsEntranceId, + acsSystemId: acsSystemId, + customerKey: customerKey, + deviceId: deviceId, + limit: limit, + locationId: locationId, + pageCursor: pageCursor, + reservationKey: reservationKey, + search: search, + spaceId: spaceId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Gets an Access Grant. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/access_grants/list", requestOptions)) + .EnsureData("/access_grants/list") + .AccessGrants; + } + + /// + /// Gets an Access Grant. + /// + public async Task> ListAsync( + string? accessCodeId = default, + List? accessGrantIds = default, + string? accessGrantKey = default, + string? acsEntranceId = default, + string? acsSystemId = default, + string? customerKey = default, + string? deviceId = default, + float? limit = default, + string? locationId = default, + string? pageCursor = default, + string? reservationKey = default, + string? search = default, + string? spaceId = default, + string? userIdentityId = default + ) + { + return ( + await ListAsync( + new ListRequest( + accessCodeId: accessCodeId, + accessGrantIds: accessGrantIds, + accessGrantKey: accessGrantKey, + acsEntranceId: acsEntranceId, + acsSystemId: acsSystemId, + customerKey: customerKey, + deviceId: deviceId, + limit: limit, + locationId: locationId, + pageCursor: pageCursor, + reservationKey: reservationKey, + search: search, + spaceId: spaceId, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for Add Requested Access Methods to Access Grant. + /// + [DataContract(Name = "requestAccessMethodsRequest_request")] + public class RequestAccessMethodsRequest + { + [JsonConstructorAttribute] + protected RequestAccessMethodsRequest() { } + + public RequestAccessMethodsRequest( + string accessGrantId = default, + List requestedAccessMethods = + default + ) + { + AccessGrantId = accessGrantId; + RequestedAccessMethods = requestedAccessMethods; + } + + /// + /// ID of the Access Grant to add access methods to. + /// + [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// Array of requested access methods to add to the access grant. + /// + [DataMember( + Name = "requested_access_methods", + IsRequired = true, + EmitDefaultValue = false + )] + public List RequestedAccessMethods { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "requestAccessMethodsRequestRequestedAccessMethods_model")] + public class RequestAccessMethodsRequestRequestedAccessMethods + { + [JsonConstructorAttribute] + protected RequestAccessMethodsRequestRequestedAccessMethods() { } + + public RequestAccessMethodsRequestRequestedAccessMethods( + string? code = default, + int? instantKeyMaxUseCount = default, + RequestAccessMethodsRequestRequestedAccessMethods.ModeEnum? mode = default + ) + { + Code = code; + InstantKeyMaxUseCount = instantKeyMaxUseCount; + Mode = mode; + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + /// + [DataMember( + Name = "instant_key_max_use_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int? InstantKeyMaxUseCount { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public RequestAccessMethodsRequestRequestedAccessMethods.ModeEnum? Mode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "requestAccessMethodsResponse_response")] + public class RequestAccessMethodsResponse + { + [JsonConstructorAttribute] + protected RequestAccessMethodsResponse() { } + + public RequestAccessMethodsResponse(AccessGrant accessGrant = default) + { + AccessGrant = accessGrant; + } + + /// + /// OK + /// + [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] + public AccessGrant AccessGrant { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Adds additional requested access methods to an existing Access Grant. + /// + public AccessGrant RequestAccessMethods(RequestAccessMethodsRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/access_grants/request_access_methods", + requestOptions + ) + .EnsureData("/access_grants/request_access_methods") + .AccessGrant; + } + + /// + /// Adds additional requested access methods to an existing Access Grant. + /// + public AccessGrant RequestAccessMethods( + string accessGrantId = default, + List requestedAccessMethods = default + ) + { + return RequestAccessMethods( + new RequestAccessMethodsRequest( + accessGrantId: accessGrantId, + requestedAccessMethods: requestedAccessMethods + ) + ); + } + + /// + /// Adds additional requested access methods to an existing Access Grant. + /// + public async Task RequestAccessMethodsAsync( + RequestAccessMethodsRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/access_grants/request_access_methods", + requestOptions + ) + ) + .EnsureData("/access_grants/request_access_methods") + .AccessGrant; + } + + /// + /// Adds additional requested access methods to an existing Access Grant. + /// + public async Task RequestAccessMethodsAsync( + string accessGrantId = default, + List requestedAccessMethods = default + ) + { + return ( + await RequestAccessMethodsAsync( + new RequestAccessMethodsRequest( + accessGrantId: accessGrantId, + requestedAccessMethods: requestedAccessMethods + ) + ) + ); + } + + /// + /// Request parameters for Update an Access Grant. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string? accessGrantId = default, + string? accessGrantKey = default, + string? endsAt = default, + string? name = default, + string? startsAt = default + ) + { + AccessGrantId = accessGrantId; + AccessGrantKey = accessGrantKey; + EndsAt = endsAt; + Name = name; + StartsAt = startsAt; + } + + /// + /// ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantId { get; set; } + + /// + /// Key of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// Date and time at which the validity of the grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Display name for the access grant. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Date and time at which the validity of the grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates an existing Access Grant's time window. + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/access_grants/update", requestOptions); + } + + /// + /// Updates an existing Access Grant's time window. + /// + public void Update( + string? accessGrantId = default, + string? accessGrantKey = default, + string? endsAt = default, + string? name = default, + string? startsAt = default + ) + { + Update( + new UpdateRequest( + accessGrantId: accessGrantId, + accessGrantKey: accessGrantKey, + endsAt: endsAt, + name: name, + startsAt: startsAt + ) + ); + } + + /// + /// Updates an existing Access Grant's time window. + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/access_grants/update", requestOptions); + } + + /// + /// Updates an existing Access Grant's time window. + /// + public async Task UpdateAsync( + string? accessGrantId = default, + string? accessGrantKey = default, + string? endsAt = default, + string? name = default, + string? startsAt = default + ) + { + await UpdateAsync( + new UpdateRequest( + accessGrantId: accessGrantId, + accessGrantKey: accessGrantKey, + endsAt: endsAt, + name: name, + startsAt: startsAt + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.AccessGrants AccessGrants => new(this); -} + public partial class SeamClient + { + public Api.AccessGrants AccessGrants => new(this); + } -public partial interface ISeamClient -{ -public Api.AccessGrants AccessGrants { get; } -} + public partial interface ISeamClient + { + public Api.AccessGrants AccessGrants { get; } + } } diff --git a/src/Seam/Api/AccessGroupsAcs.cs b/src/Seam/Api/AccessGroupsAcs.cs index 545fe6ad..a463c27d 100644 --- a/src/Seam/Api/AccessGroupsAcs.cs +++ b/src/Seam/Api/AccessGroupsAcs.cs @@ -9,755 +9,877 @@ namespace Seam.Api { -public class AccessGroupsAcs -{ -private ISeamClient _seam; - -public AccessGroupsAcs(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Add an ACS User to an Access Group. -/// -[DataContract(Name = "addUserRequest_request")] -public class AddUserRequest -{ -[JsonConstructorAttribute] -protected AddUserRequest() { } - -public AddUserRequest(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access group to which you want to add an access system user. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -/// -/// ID of the access system user that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the desired user identity that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void AddUser(AddUserRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Put("/acs/access_groups/add_user", requestOptions); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void AddUser(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AddUser(new AddUserRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task AddUserAsync(AddUserRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PutAsync("/acs/access_groups/add_user", requestOptions); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task AddUserAsync(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await AddUserAsync(new AddUserRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Delete an Access Group. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string acsAccessGroupId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -} - -/// -/// ID of the access group that you want to delete. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/acs/access_groups/delete", requestOptions); -} - -/// -/// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void Delete(string acsAccessGroupId = default) -{ -Delete(new DeleteRequest(acsAccessGroupId: acsAccessGroupId)); -} - -/// -/// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/acs/access_groups/delete", requestOptions); -} - -/// -/// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task DeleteAsync(string acsAccessGroupId = default) -{ -await DeleteAsync(new DeleteRequest(acsAccessGroupId: acsAccessGroupId)); -} - -/// -/// Request parameters for Get an Access Group. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string acsAccessGroupId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -} - -/// -/// ID of the access group that you want to get. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AcsAccessGroup acsAccessGroup = default) -{ -AcsAccessGroup = acsAccessGroup; -} - -/// -/// OK -/// -[DataMember(Name = "acs_access_group", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroup AcsAccessGroup { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public AcsAccessGroup Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/access_groups/get", requestOptions).EnsureData("/acs/access_groups/get").AcsAccessGroup; -} - -/// -/// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public AcsAccessGroup Get(string acsAccessGroupId = default) -{ -return Get(new GetRequest(acsAccessGroupId: acsAccessGroupId)); -} - -/// -/// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/access_groups/get", requestOptions)).EnsureData("/acs/access_groups/get").AcsAccessGroup; -} - -/// -/// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task GetAsync(string acsAccessGroupId = default) -{ -return (await GetAsync(new GetRequest(acsAccessGroupId: acsAccessGroupId))); -} - -/// -/// Request parameters for List Access Groups. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? acsSystemId = default, string? acsUserId = default, string? search = default, string? userIdentityId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -Search = search; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system for which you want to retrieve all access groups. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user for which you want to retrieve all access groups. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// String for which to search. Filters returned access groups to include all records that satisfy a partial match using `name` or `acs_access_group_id`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// ID of the user identity for which you want to retrieve all access groups. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List acsAccessGroups = default) -{ -AcsAccessGroups = acsAccessGroups; -} - -/// -/// OK -/// -[DataMember(Name = "acs_access_groups", IsRequired = false, EmitDefaultValue = false)] -public List AcsAccessGroups { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/access_groups/list", requestOptions).EnsureData("/acs/access_groups/list").AcsAccessGroups; -} - -/// -/// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public List List(string? acsSystemId = default, string? acsUserId = default, string? search = default, string? userIdentityId = default) -{ -return List(new ListRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, search: search, userIdentityId: userIdentityId)); -} - -/// -/// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/access_groups/list", requestOptions)).EnsureData("/acs/access_groups/list").AcsAccessGroups; -} - -/// -/// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task> ListAsync(string? acsSystemId = default, string? acsUserId = default, string? search = default, string? userIdentityId = default) -{ -return (await ListAsync(new ListRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, search: search, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for List Entrances Accessible to an Access Group. -/// -[DataContract(Name = "listAccessibleEntrancesRequest_request")] -public class ListAccessibleEntrancesRequest -{ -[JsonConstructorAttribute] -protected ListAccessibleEntrancesRequest() { } - -public ListAccessibleEntrancesRequest(string acsAccessGroupId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -} - -/// -/// ID of the access group for which you want to retrieve all accessible entrances. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listAccessibleEntrancesResponse_response")] -public class ListAccessibleEntrancesResponse -{ -[JsonConstructorAttribute] -protected ListAccessibleEntrancesResponse() { } - -public ListAccessibleEntrancesResponse(List acsEntrances = default) -{ -AcsEntrances = acsEntrances; -} - -/// -/// OK -/// -[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public List AcsEntrances { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/access_groups/list_accessible_entrances", requestOptions).EnsureData("/acs/access_groups/list_accessible_entrances").AcsEntrances; -} - -/// -/// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public List ListAccessibleEntrances(string acsAccessGroupId = default) -{ -return ListAccessibleEntrances(new ListAccessibleEntrancesRequest(acsAccessGroupId: acsAccessGroupId)); -} - -/// -/// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task> ListAccessibleEntrancesAsync(ListAccessibleEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/access_groups/list_accessible_entrances", requestOptions)).EnsureData("/acs/access_groups/list_accessible_entrances").AcsEntrances; -} - -/// -/// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task> ListAccessibleEntrancesAsync(string acsAccessGroupId = default) -{ -return (await ListAccessibleEntrancesAsync(new ListAccessibleEntrancesRequest(acsAccessGroupId: acsAccessGroupId))); -} - -/// -/// Request parameters for List ACS Users in an Access Group. -/// -[DataContract(Name = "listUsersRequest_request")] -public class ListUsersRequest -{ -[JsonConstructorAttribute] -protected ListUsersRequest() { } - -public ListUsersRequest(string acsAccessGroupId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -} - -/// -/// ID of the access group for which you want to retrieve all access system users. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listUsersResponse_response")] -public class ListUsersResponse -{ -[JsonConstructorAttribute] -protected ListUsersResponse() { } - -public ListUsersResponse(List acsUsers = default) -{ -AcsUsers = acsUsers; -} - -/// -/// OK -/// -[DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] -public List AcsUsers { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public List ListUsers(ListUsersRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/access_groups/list_users", requestOptions).EnsureData("/acs/access_groups/list_users").AcsUsers; -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public List ListUsers(string acsAccessGroupId = default) -{ -return ListUsers(new ListUsersRequest(acsAccessGroupId: acsAccessGroupId)); -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task> ListUsersAsync(ListUsersRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/access_groups/list_users", requestOptions)).EnsureData("/acs/access_groups/list_users").AcsUsers; -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task> ListUsersAsync(string acsAccessGroupId = default) -{ -return (await ListUsersAsync(new ListUsersRequest(acsAccessGroupId: acsAccessGroupId))); -} - -/// -/// Request parameters for Remove an ACS User from an Access Group. -/// -[DataContract(Name = "removeUserRequest_request")] -public class RemoveUserRequest -{ -[JsonConstructorAttribute] -protected RemoveUserRequest() { } - -public RemoveUserRequest(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access group from which you want to remove an access system user. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -/// -/// ID of the access system user that you want to remove from an access group. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity associated with the user that you want to remove from an access group. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void RemoveUser(RemoveUserRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/acs/access_groups/remove_user", requestOptions); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void RemoveUser(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -RemoveUser(new RemoveUserRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task RemoveUserAsync(RemoveUserRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/acs/access_groups/remove_user", requestOptions); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task RemoveUserAsync(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await RemoveUserAsync(new RemoveUserRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} -} + public class AccessGroupsAcs + { + private ISeamClient _seam; + + public AccessGroupsAcs(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Add an ACS User to an Access Group. + /// + [DataContract(Name = "addUserRequest_request")] + public class AddUserRequest + { + [JsonConstructorAttribute] + protected AddUserRequest() { } + + public AddUserRequest( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsAccessGroupId = acsAccessGroupId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access group to which you want to add an access system user. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + /// + /// ID of the access system user that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the desired user identity that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void AddUser(AddUserRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Put("/acs/access_groups/add_user", requestOptions); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void AddUser( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AddUser( + new AddUserRequest( + acsAccessGroupId: acsAccessGroupId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task AddUserAsync(AddUserRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PutAsync("/acs/access_groups/add_user", requestOptions); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task AddUserAsync( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await AddUserAsync( + new AddUserRequest( + acsAccessGroupId: acsAccessGroupId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for Delete an Access Group. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string acsAccessGroupId = default) + { + AcsAccessGroupId = acsAccessGroupId; + } + + /// + /// ID of the access group that you want to delete. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/acs/access_groups/delete", requestOptions); + } + + /// + /// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void Delete(string acsAccessGroupId = default) + { + Delete(new DeleteRequest(acsAccessGroupId: acsAccessGroupId)); + } + + /// + /// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/acs/access_groups/delete", requestOptions); + } + + /// + /// Deletes a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task DeleteAsync(string acsAccessGroupId = default) + { + await DeleteAsync(new DeleteRequest(acsAccessGroupId: acsAccessGroupId)); + } + + /// + /// Request parameters for Get an Access Group. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string acsAccessGroupId = default) + { + AcsAccessGroupId = acsAccessGroupId; + } + + /// + /// ID of the access group that you want to get. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AcsAccessGroup acsAccessGroup = default) + { + AcsAccessGroup = acsAccessGroup; + } + + /// + /// OK + /// + [DataMember(Name = "acs_access_group", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroup AcsAccessGroup { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public AcsAccessGroup Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/access_groups/get", requestOptions) + .EnsureData("/acs/access_groups/get") + .AcsAccessGroup; + } + + /// + /// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public AcsAccessGroup Get(string acsAccessGroupId = default) + { + return Get(new GetRequest(acsAccessGroupId: acsAccessGroupId)); + } + + /// + /// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/access_groups/get", requestOptions)) + .EnsureData("/acs/access_groups/get") + .AcsAccessGroup; + } + + /// + /// Returns a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task GetAsync(string acsAccessGroupId = default) + { + return (await GetAsync(new GetRequest(acsAccessGroupId: acsAccessGroupId))); + } + + /// + /// Request parameters for List Access Groups. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? acsSystemId = default, + string? acsUserId = default, + string? search = default, + string? userIdentityId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + Search = search; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system for which you want to retrieve all access groups. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user for which you want to retrieve all access groups. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// String for which to search. Filters returned access groups to include all records that satisfy a partial match using `name` or `acs_access_group_id`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// ID of the user identity for which you want to retrieve all access groups. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List acsAccessGroups = default) + { + AcsAccessGroups = acsAccessGroups; + } + + /// + /// OK + /// + [DataMember(Name = "acs_access_groups", IsRequired = false, EmitDefaultValue = false)] + public List AcsAccessGroups { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/access_groups/list", requestOptions) + .EnsureData("/acs/access_groups/list") + .AcsAccessGroups; + } + + /// + /// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public List List( + string? acsSystemId = default, + string? acsUserId = default, + string? search = default, + string? userIdentityId = default + ) + { + return List( + new ListRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + search: search, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/access_groups/list", requestOptions)) + .EnsureData("/acs/access_groups/list") + .AcsAccessGroups; + } + + /// + /// Returns a list of all [access groups](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task> ListAsync( + string? acsSystemId = default, + string? acsUserId = default, + string? search = default, + string? userIdentityId = default + ) + { + return ( + await ListAsync( + new ListRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + search: search, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for List Entrances Accessible to an Access Group. + /// + [DataContract(Name = "listAccessibleEntrancesRequest_request")] + public class ListAccessibleEntrancesRequest + { + [JsonConstructorAttribute] + protected ListAccessibleEntrancesRequest() { } + + public ListAccessibleEntrancesRequest(string acsAccessGroupId = default) + { + AcsAccessGroupId = acsAccessGroupId; + } + + /// + /// ID of the access group for which you want to retrieve all accessible entrances. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listAccessibleEntrancesResponse_response")] + public class ListAccessibleEntrancesResponse + { + [JsonConstructorAttribute] + protected ListAccessibleEntrancesResponse() { } + + public ListAccessibleEntrancesResponse(List acsEntrances = default) + { + AcsEntrances = acsEntrances; + } + + /// + /// OK + /// + [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] + public List AcsEntrances { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get( + "/acs/access_groups/list_accessible_entrances", + requestOptions + ) + .EnsureData("/acs/access_groups/list_accessible_entrances") + .AcsEntrances; + } + + /// + /// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public List ListAccessibleEntrances(string acsAccessGroupId = default) + { + return ListAccessibleEntrances( + new ListAccessibleEntrancesRequest(acsAccessGroupId: acsAccessGroupId) + ); + } + + /// + /// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task> ListAccessibleEntrancesAsync( + ListAccessibleEntrancesRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/acs/access_groups/list_accessible_entrances", + requestOptions + ) + ) + .EnsureData("/acs/access_groups/list_accessible_entrances") + .AcsEntrances; + } + + /// + /// Returns a list of all accessible entrances for a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task> ListAccessibleEntrancesAsync( + string acsAccessGroupId = default + ) + { + return ( + await ListAccessibleEntrancesAsync( + new ListAccessibleEntrancesRequest(acsAccessGroupId: acsAccessGroupId) + ) + ); + } + + /// + /// Request parameters for List ACS Users in an Access Group. + /// + [DataContract(Name = "listUsersRequest_request")] + public class ListUsersRequest + { + [JsonConstructorAttribute] + protected ListUsersRequest() { } + + public ListUsersRequest(string acsAccessGroupId = default) + { + AcsAccessGroupId = acsAccessGroupId; + } + + /// + /// ID of the access group for which you want to retrieve all access system users. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listUsersResponse_response")] + public class ListUsersResponse + { + [JsonConstructorAttribute] + protected ListUsersResponse() { } + + public ListUsersResponse(List acsUsers = default) + { + AcsUsers = acsUsers; + } + + /// + /// OK + /// + [DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] + public List AcsUsers { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public List ListUsers(ListUsersRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/access_groups/list_users", requestOptions) + .EnsureData("/acs/access_groups/list_users") + .AcsUsers; + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public List ListUsers(string acsAccessGroupId = default) + { + return ListUsers(new ListUsersRequest(acsAccessGroupId: acsAccessGroupId)); + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task> ListUsersAsync(ListUsersRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/acs/access_groups/list_users", + requestOptions + ) + ) + .EnsureData("/acs/access_groups/list_users") + .AcsUsers; + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task> ListUsersAsync(string acsAccessGroupId = default) + { + return (await ListUsersAsync(new ListUsersRequest(acsAccessGroupId: acsAccessGroupId))); + } + + /// + /// Request parameters for Remove an ACS User from an Access Group. + /// + [DataContract(Name = "removeUserRequest_request")] + public class RemoveUserRequest + { + [JsonConstructorAttribute] + protected RemoveUserRequest() { } + + public RemoveUserRequest( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsAccessGroupId = acsAccessGroupId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access group from which you want to remove an access system user. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + /// + /// ID of the access system user that you want to remove from an access group. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity associated with the user that you want to remove from an access group. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void RemoveUser(RemoveUserRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/acs/access_groups/remove_user", requestOptions); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void RemoveUser( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + RemoveUser( + new RemoveUserRequest( + acsAccessGroupId: acsAccessGroupId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task RemoveUserAsync(RemoveUserRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/acs/access_groups/remove_user", requestOptions); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task RemoveUserAsync( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await RemoveUserAsync( + new RemoveUserRequest( + acsAccessGroupId: acsAccessGroupId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.AccessGroupsAcs AccessGroupsAcs => new(this); -} + public partial class SeamClient + { + public Api.AccessGroupsAcs AccessGroupsAcs => new(this); + } -public partial interface ISeamClient -{ -public Api.AccessGroupsAcs AccessGroupsAcs { get; } -} + public partial interface ISeamClient + { + public Api.AccessGroupsAcs AccessGroupsAcs { get; } + } } diff --git a/src/Seam/Api/AccessMethods.cs b/src/Seam/Api/AccessMethods.cs index 3e287f13..030b60e6 100644 --- a/src/Seam/Api/AccessMethods.cs +++ b/src/Seam/Api/AccessMethods.cs @@ -9,934 +9,1119 @@ namespace Seam.Api { -public class AccessMethods -{ -private ISeamClient _seam; - -public AccessMethods(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Assign a Card Credential to an Access Method. -/// -[DataContract(Name = "assignCardRequest_request")] -public class AssignCardRequest -{ -[JsonConstructorAttribute] -protected AssignCardRequest() { } - -public AssignCardRequest(string accessMethodId = default, string cardNumber = default) -{ -AccessMethodId = accessMethodId; -CardNumber = cardNumber; -} - -/// -/// ID of the `access_method` to assign the credential to. -/// -[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Card number of the credential to assign. -/// -[DataMember(Name = "card_number", IsRequired = true, EmitDefaultValue = false)] -public string CardNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "assignCardResponse_response")] -public class AssignCardResponse -{ -[JsonConstructorAttribute] -protected AssignCardResponse() { } - -public AssignCardResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. -/// -public ActionAttempt AssignCard(AssignCardRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/access_methods/assign_card", requestOptions).EnsureData("/access_methods/assign_card").ActionAttempt; -} - -/// -/// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. -/// -public ActionAttempt AssignCard(string accessMethodId = default, string cardNumber = default) -{ -return AssignCard(new AssignCardRequest(accessMethodId: accessMethodId, cardNumber: cardNumber)); -} - -/// -/// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. -/// -public async Task AssignCardAsync(AssignCardRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/access_methods/assign_card", requestOptions)).EnsureData("/access_methods/assign_card").ActionAttempt; -} - -/// -/// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. -/// -public async Task AssignCardAsync(string accessMethodId = default, string cardNumber = default) -{ -return (await AssignCardAsync(new AssignCardRequest(accessMethodId: accessMethodId, cardNumber: cardNumber))); -} - -/// -/// Request parameters for Delete an Access Method. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string? accessGrantId = default, string? accessMethodId = default, string? reservationKey = default) -{ -AccessGrantId = accessGrantId; -AccessMethodId = accessMethodId; -ReservationKey = reservationKey; -} - -/// -/// ID of access grant whose access methods should be deleted. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantId { get; set; } - -/// -/// ID of access method to delete. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessMethodId { get; set; } - -/// -/// Reservation key of the access grant whose access methods should be deleted. -/// -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes an access method. -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/access_methods/delete", requestOptions); -} - -/// -/// Deletes an access method. -/// -public void Delete(string? accessGrantId = default, string? accessMethodId = default, string? reservationKey = default) -{ -Delete(new DeleteRequest(accessGrantId: accessGrantId, accessMethodId: accessMethodId, reservationKey: reservationKey)); -} - -/// -/// Deletes an access method. -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/access_methods/delete", requestOptions); -} - -/// -/// Deletes an access method. -/// -public async Task DeleteAsync(string? accessGrantId = default, string? accessMethodId = default, string? reservationKey = default) -{ -await DeleteAsync(new DeleteRequest(accessGrantId: accessGrantId, accessMethodId: accessMethodId, reservationKey: reservationKey)); -} - -/// -/// Request parameters for Encode an Access Method. -/// -[DataContract(Name = "encodeRequest_request")] -public class EncodeRequest -{ -[JsonConstructorAttribute] -protected EncodeRequest() { } - -public EncodeRequest(string accessMethodId = default, string acsEncoderId = default) -{ -AccessMethodId = accessMethodId; -AcsEncoderId = acsEncoderId; -} - -/// -/// ID of the `access_method` to encode onto a card. -/// -[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// ID of the `acs_encoder` to use to encode the `access_method`. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "encodeResponse_response")] -public class EncodeResponse -{ -[JsonConstructorAttribute] -protected EncodeResponse() { } - -public EncodeResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public ActionAttempt Encode(EncodeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/access_methods/encode", requestOptions).EnsureData("/access_methods/encode").ActionAttempt; -} - -/// -/// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public ActionAttempt Encode(string accessMethodId = default, string acsEncoderId = default) -{ -return Encode(new EncodeRequest(accessMethodId: accessMethodId, acsEncoderId: acsEncoderId)); -} - -/// -/// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public async Task EncodeAsync(EncodeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/access_methods/encode", requestOptions)).EnsureData("/access_methods/encode").ActionAttempt; -} - -/// -/// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public async Task EncodeAsync(string accessMethodId = default, string acsEncoderId = default) -{ -return (await EncodeAsync(new EncodeRequest(accessMethodId: accessMethodId, acsEncoderId: acsEncoderId))); -} - -/// -/// Request parameters for Get an Access Method. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string accessMethodId = default) -{ -AccessMethodId = accessMethodId; -} - -/// -/// ID of access method to get. -/// -[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AccessMethod accessMethod = default) -{ -AccessMethod = accessMethod; -} - -/// -/// OK -/// -[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] -public AccessMethod AccessMethod { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets an access method. -/// -public AccessMethod Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_methods/get", requestOptions).EnsureData("/access_methods/get").AccessMethod; -} - -/// -/// Gets an access method. -/// -public AccessMethod Get(string accessMethodId = default) -{ -return Get(new GetRequest(accessMethodId: accessMethodId)); -} - -/// -/// Gets an access method. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_methods/get", requestOptions)).EnsureData("/access_methods/get").AccessMethod; -} - -/// -/// Gets an access method. -/// -public async Task GetAsync(string accessMethodId = default) -{ -return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); -} - -/// -/// Request parameters for Get related Access Method resources. -/// -[DataContract(Name = "getRelatedRequest_request")] -public class GetRelatedRequest -{ -[JsonConstructorAttribute] -protected GetRelatedRequest() { } - -public GetRelatedRequest(List accessMethodIds = default, List? exclude = default, List? include = default) -{ -AccessMethodIds = accessMethodIds; -Exclude = exclude; -Include = include; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExcludeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "spaces")] -Spaces = 1, - -[EnumMember(Value = "devices")] -Devices = 2, - -[EnumMember(Value = "acs_entrances")] -AcsEntrances = 3, - -[EnumMember(Value = "access_grants")] -AccessGrants = 4, - -[EnumMember(Value = "access_methods")] -AccessMethods = 5, - -[EnumMember(Value = "instant_keys")] -InstantKeys = 6, - -[EnumMember(Value = "client_sessions")] -ClientSessions = 7, - -[EnumMember(Value = "acs_credentials")] -AcsCredentials = 8, -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum IncludeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "spaces")] -Spaces = 1, - -[EnumMember(Value = "devices")] -Devices = 2, - -[EnumMember(Value = "acs_entrances")] -AcsEntrances = 3, - -[EnumMember(Value = "access_grants")] -AccessGrants = 4, - -[EnumMember(Value = "access_methods")] -AccessMethods = 5, - -[EnumMember(Value = "instant_keys")] -InstantKeys = 6, - -[EnumMember(Value = "client_sessions")] -ClientSessions = 7, - -[EnumMember(Value = "acs_credentials")] -AcsCredentials = 8, -} - -/// -/// IDs of the access methods that you want to get along with their related resources. -/// -[DataMember(Name = "access_method_ids", IsRequired = true, EmitDefaultValue = false)] -public List AccessMethodIds { get; set; } - -[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] -public List? Exclude { get; set; } - -[DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] -public List? Include { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getRelatedResponse_response")] -public class GetRelatedResponse -{ -[JsonConstructorAttribute] -protected GetRelatedResponse() { } - -public GetRelatedResponse(Batch batch = default) -{ -Batch = batch; -} - -/// -/// OK -/// -[DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] -public Batch Batch { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets all related resources for one or more Access Methods. -/// -public Batch GetRelated(GetRelatedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_methods/get_related", requestOptions).EnsureData("/access_methods/get_related").Batch; -} - -/// -/// Gets all related resources for one or more Access Methods. -/// -public Batch GetRelated(List accessMethodIds = default, List? exclude = default, List? include = default) -{ -return GetRelated(new GetRelatedRequest(accessMethodIds: accessMethodIds, exclude: exclude, include: include)); -} - -/// -/// Gets all related resources for one or more Access Methods. -/// -public async Task GetRelatedAsync(GetRelatedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_methods/get_related", requestOptions)).EnsureData("/access_methods/get_related").Batch; -} - -/// -/// Gets all related resources for one or more Access Methods. -/// -public async Task GetRelatedAsync(List accessMethodIds = default, List? exclude = default, List? include = default) -{ -return (await GetRelatedAsync(new GetRelatedRequest(accessMethodIds: accessMethodIds, exclude: exclude, include: include))); -} - -/// -/// Request parameters for List Access Methods. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? accessCodeId = default, string? accessGrantId = default, string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, int? limit = default, string? pageCursor = default, string? spaceId = default) -{ -AccessCodeId = accessCodeId; -AccessGrantId = accessGrantId; -AccessGrantKey = accessGrantKey; -AcsEntranceId = acsEntranceId; -DeviceId = deviceId; -Limit = limit; -PageCursor = pageCursor; -SpaceId = spaceId; -} - -/// -/// ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessCodeId { get; set; } - -/// -/// ID of Access Grant to list access methods for. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantId { get; set; } - -/// -/// Key of Access Grant to list access methods for. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// ID of the entrance for which you want to retrieve all access methods that grant access to it. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsEntranceId { get; set; } - -/// -/// ID of the device by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public int? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// ID of the space by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List accessMethods = default) -{ -AccessMethods = accessMethods; -} - -/// -/// OK -/// -[DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] -public List AccessMethods { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Lists all access methods, usually filtered by Access Grant. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_methods/list", requestOptions).EnsureData("/access_methods/list").AccessMethods; -} - -/// -/// Lists all access methods, usually filtered by Access Grant. -/// -public List List(string? accessCodeId = default, string? accessGrantId = default, string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, int? limit = default, string? pageCursor = default, string? spaceId = default) -{ -return List(new ListRequest(accessCodeId: accessCodeId, accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, deviceId: deviceId, limit: limit, pageCursor: pageCursor, spaceId: spaceId)); -} - -/// -/// Lists all access methods, usually filtered by Access Grant. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_methods/list", requestOptions)).EnsureData("/access_methods/list").AccessMethods; -} - -/// -/// Lists all access methods, usually filtered by Access Grant. -/// -public async Task> ListAsync(string? accessCodeId = default, string? accessGrantId = default, string? accessGrantKey = default, string? acsEntranceId = default, string? deviceId = default, int? limit = default, string? pageCursor = default, string? spaceId = default) -{ -return (await ListAsync(new ListRequest(accessCodeId: accessCodeId, accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, acsEntranceId: acsEntranceId, deviceId: deviceId, limit: limit, pageCursor: pageCursor, spaceId: spaceId))); -} - -/// -/// Request parameters for Unlock a Door with an Access Method. -/// -[DataContract(Name = "unlockDoorRequest_request")] -public class UnlockDoorRequest -{ -[JsonConstructorAttribute] -protected UnlockDoorRequest() { } - -public UnlockDoorRequest(string accessMethodId = default, string acsEntranceId = default) -{ -AccessMethodId = accessMethodId; -AcsEntranceId = acsEntranceId; -} - -/// -/// ID of the cloud_key `access_method` to use for the unlock operation. -/// -[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// ID of the entrance to unlock. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "unlockDoorResponse_response")] -public class UnlockDoorResponse -{ -[JsonConstructorAttribute] -protected UnlockDoorResponse() { } - -public UnlockDoorResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. -/// -public ActionAttempt UnlockDoor(UnlockDoorRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/access_methods/unlock_door", requestOptions).EnsureData("/access_methods/unlock_door").ActionAttempt; -} - -/// -/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. -/// -public ActionAttempt UnlockDoor(string accessMethodId = default, string acsEntranceId = default) -{ -return UnlockDoor(new UnlockDoorRequest(accessMethodId: accessMethodId, acsEntranceId: acsEntranceId)); -} - -/// -/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. -/// -public async Task UnlockDoorAsync(UnlockDoorRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/access_methods/unlock_door", requestOptions)).EnsureData("/access_methods/unlock_door").ActionAttempt; -} - -/// -/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. -/// -public async Task UnlockDoorAsync(string accessMethodId = default, string acsEntranceId = default) -{ -return (await UnlockDoorAsync(new UnlockDoorRequest(accessMethodId: accessMethodId, acsEntranceId: acsEntranceId))); -} -} + public class AccessMethods + { + private ISeamClient _seam; + + public AccessMethods(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Assign a Card Credential to an Access Method. + /// + [DataContract(Name = "assignCardRequest_request")] + public class AssignCardRequest + { + [JsonConstructorAttribute] + protected AssignCardRequest() { } + + public AssignCardRequest(string accessMethodId = default, string cardNumber = default) + { + AccessMethodId = accessMethodId; + CardNumber = cardNumber; + } + + /// + /// ID of the `access_method` to assign the credential to. + /// + [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Card number of the credential to assign. + /// + [DataMember(Name = "card_number", IsRequired = true, EmitDefaultValue = false)] + public string CardNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "assignCardResponse_response")] + public class AssignCardResponse + { + [JsonConstructorAttribute] + protected AssignCardResponse() { } + + public AssignCardResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. + /// + public ActionAttempt AssignCard(AssignCardRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/access_methods/assign_card", requestOptions) + .EnsureData("/access_methods/assign_card") + .ActionAttempt; + } + + /// + /// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. + /// + public ActionAttempt AssignCard( + string accessMethodId = default, + string cardNumber = default + ) + { + return AssignCard( + new AssignCardRequest(accessMethodId: accessMethodId, cardNumber: cardNumber) + ); + } + + /// + /// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. + /// + public async Task AssignCardAsync(AssignCardRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/access_methods/assign_card", + requestOptions + ) + ) + .EnsureData("/access_methods/assign_card") + .ActionAttempt; + } + + /// + /// Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. + /// + public async Task AssignCardAsync( + string accessMethodId = default, + string cardNumber = default + ) + { + return ( + await AssignCardAsync( + new AssignCardRequest(accessMethodId: accessMethodId, cardNumber: cardNumber) + ) + ); + } + + /// + /// Request parameters for Delete an Access Method. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest( + string? accessGrantId = default, + string? accessMethodId = default, + string? reservationKey = default + ) + { + AccessGrantId = accessGrantId; + AccessMethodId = accessMethodId; + ReservationKey = reservationKey; + } + + /// + /// ID of access grant whose access methods should be deleted. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantId { get; set; } + + /// + /// ID of access method to delete. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessMethodId { get; set; } + + /// + /// Reservation key of the access grant whose access methods should be deleted. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes an access method. + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/access_methods/delete", requestOptions); + } + + /// + /// Deletes an access method. + /// + public void Delete( + string? accessGrantId = default, + string? accessMethodId = default, + string? reservationKey = default + ) + { + Delete( + new DeleteRequest( + accessGrantId: accessGrantId, + accessMethodId: accessMethodId, + reservationKey: reservationKey + ) + ); + } + + /// + /// Deletes an access method. + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/access_methods/delete", requestOptions); + } + + /// + /// Deletes an access method. + /// + public async Task DeleteAsync( + string? accessGrantId = default, + string? accessMethodId = default, + string? reservationKey = default + ) + { + await DeleteAsync( + new DeleteRequest( + accessGrantId: accessGrantId, + accessMethodId: accessMethodId, + reservationKey: reservationKey + ) + ); + } + + /// + /// Request parameters for Encode an Access Method. + /// + [DataContract(Name = "encodeRequest_request")] + public class EncodeRequest + { + [JsonConstructorAttribute] + protected EncodeRequest() { } + + public EncodeRequest(string accessMethodId = default, string acsEncoderId = default) + { + AccessMethodId = accessMethodId; + AcsEncoderId = acsEncoderId; + } + + /// + /// ID of the `access_method` to encode onto a card. + /// + [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// ID of the `acs_encoder` to use to encode the `access_method`. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "encodeResponse_response")] + public class EncodeResponse + { + [JsonConstructorAttribute] + protected EncodeResponse() { } + + public EncodeResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public ActionAttempt Encode(EncodeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/access_methods/encode", requestOptions) + .EnsureData("/access_methods/encode") + .ActionAttempt; + } + + /// + /// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public ActionAttempt Encode(string accessMethodId = default, string acsEncoderId = default) + { + return Encode( + new EncodeRequest(accessMethodId: accessMethodId, acsEncoderId: acsEncoderId) + ); + } + + /// + /// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public async Task EncodeAsync(EncodeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/access_methods/encode", requestOptions)) + .EnsureData("/access_methods/encode") + .ActionAttempt; + } + + /// + /// Encodes an existing access method onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public async Task EncodeAsync( + string accessMethodId = default, + string acsEncoderId = default + ) + { + return ( + await EncodeAsync( + new EncodeRequest(accessMethodId: accessMethodId, acsEncoderId: acsEncoderId) + ) + ); + } + + /// + /// Request parameters for Get an Access Method. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string accessMethodId = default) + { + AccessMethodId = accessMethodId; + } + + /// + /// ID of access method to get. + /// + [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AccessMethod accessMethod = default) + { + AccessMethod = accessMethod; + } + + /// + /// OK + /// + [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] + public AccessMethod AccessMethod { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets an access method. + /// + public AccessMethod Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_methods/get", requestOptions) + .EnsureData("/access_methods/get") + .AccessMethod; + } + + /// + /// Gets an access method. + /// + public AccessMethod Get(string accessMethodId = default) + { + return Get(new GetRequest(accessMethodId: accessMethodId)); + } + + /// + /// Gets an access method. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/access_methods/get", requestOptions)) + .EnsureData("/access_methods/get") + .AccessMethod; + } + + /// + /// Gets an access method. + /// + public async Task GetAsync(string accessMethodId = default) + { + return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); + } + + /// + /// Request parameters for Get related Access Method resources. + /// + [DataContract(Name = "getRelatedRequest_request")] + public class GetRelatedRequest + { + [JsonConstructorAttribute] + protected GetRelatedRequest() { } + + public GetRelatedRequest( + List accessMethodIds = default, + List? exclude = default, + List? include = default + ) + { + AccessMethodIds = accessMethodIds; + Exclude = exclude; + Include = include; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExcludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "access_grants")] + AccessGrants = 4, + + [EnumMember(Value = "access_methods")] + AccessMethods = 5, + + [EnumMember(Value = "instant_keys")] + InstantKeys = 6, + + [EnumMember(Value = "client_sessions")] + ClientSessions = 7, + + [EnumMember(Value = "acs_credentials")] + AcsCredentials = 8, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum IncludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "access_grants")] + AccessGrants = 4, + + [EnumMember(Value = "access_methods")] + AccessMethods = 5, + + [EnumMember(Value = "instant_keys")] + InstantKeys = 6, + + [EnumMember(Value = "client_sessions")] + ClientSessions = 7, + + [EnumMember(Value = "acs_credentials")] + AcsCredentials = 8, + } + + /// + /// IDs of the access methods that you want to get along with their related resources. + /// + [DataMember(Name = "access_method_ids", IsRequired = true, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public List? Exclude { get; set; } + + [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] + public List? Include { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getRelatedResponse_response")] + public class GetRelatedResponse + { + [JsonConstructorAttribute] + protected GetRelatedResponse() { } + + public GetRelatedResponse(Batch batch = default) + { + Batch = batch; + } + + /// + /// OK + /// + [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] + public Batch Batch { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets all related resources for one or more Access Methods. + /// + public Batch GetRelated(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_methods/get_related", requestOptions) + .EnsureData("/access_methods/get_related") + .Batch; + } + + /// + /// Gets all related resources for one or more Access Methods. + /// + public Batch GetRelated( + List accessMethodIds = default, + List? exclude = default, + List? include = default + ) + { + return GetRelated( + new GetRelatedRequest( + accessMethodIds: accessMethodIds, + exclude: exclude, + include: include + ) + ); + } + + /// + /// Gets all related resources for one or more Access Methods. + /// + public async Task GetRelatedAsync(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/access_methods/get_related", + requestOptions + ) + ) + .EnsureData("/access_methods/get_related") + .Batch; + } + + /// + /// Gets all related resources for one or more Access Methods. + /// + public async Task GetRelatedAsync( + List accessMethodIds = default, + List? exclude = default, + List? include = default + ) + { + return ( + await GetRelatedAsync( + new GetRelatedRequest( + accessMethodIds: accessMethodIds, + exclude: exclude, + include: include + ) + ) + ); + } + + /// + /// Request parameters for List Access Methods. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? accessCodeId = default, + string? accessGrantId = default, + string? accessGrantKey = default, + string? acsEntranceId = default, + string? deviceId = default, + int? limit = default, + string? pageCursor = default, + string? spaceId = default + ) + { + AccessCodeId = accessCodeId; + AccessGrantId = accessGrantId; + AccessGrantKey = accessGrantKey; + AcsEntranceId = acsEntranceId; + DeviceId = deviceId; + Limit = limit; + PageCursor = pageCursor; + SpaceId = spaceId; + } + + /// + /// ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessCodeId { get; set; } + + /// + /// ID of Access Grant to list access methods for. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantId { get; set; } + + /// + /// Key of Access Grant to list access methods for. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// ID of the entrance for which you want to retrieve all access methods that grant access to it. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsEntranceId { get; set; } + + /// + /// ID of the device by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public int? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// ID of the space by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List accessMethods = default) + { + AccessMethods = accessMethods; + } + + /// + /// OK + /// + [DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethods { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Lists all access methods, usually filtered by Access Grant. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_methods/list", requestOptions) + .EnsureData("/access_methods/list") + .AccessMethods; + } + + /// + /// Lists all access methods, usually filtered by Access Grant. + /// + public List List( + string? accessCodeId = default, + string? accessGrantId = default, + string? accessGrantKey = default, + string? acsEntranceId = default, + string? deviceId = default, + int? limit = default, + string? pageCursor = default, + string? spaceId = default + ) + { + return List( + new ListRequest( + accessCodeId: accessCodeId, + accessGrantId: accessGrantId, + accessGrantKey: accessGrantKey, + acsEntranceId: acsEntranceId, + deviceId: deviceId, + limit: limit, + pageCursor: pageCursor, + spaceId: spaceId + ) + ); + } + + /// + /// Lists all access methods, usually filtered by Access Grant. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/access_methods/list", requestOptions)) + .EnsureData("/access_methods/list") + .AccessMethods; + } + + /// + /// Lists all access methods, usually filtered by Access Grant. + /// + public async Task> ListAsync( + string? accessCodeId = default, + string? accessGrantId = default, + string? accessGrantKey = default, + string? acsEntranceId = default, + string? deviceId = default, + int? limit = default, + string? pageCursor = default, + string? spaceId = default + ) + { + return ( + await ListAsync( + new ListRequest( + accessCodeId: accessCodeId, + accessGrantId: accessGrantId, + accessGrantKey: accessGrantKey, + acsEntranceId: acsEntranceId, + deviceId: deviceId, + limit: limit, + pageCursor: pageCursor, + spaceId: spaceId + ) + ) + ); + } + + /// + /// Request parameters for Unlock a Door with an Access Method. + /// + [DataContract(Name = "unlockDoorRequest_request")] + public class UnlockDoorRequest + { + [JsonConstructorAttribute] + protected UnlockDoorRequest() { } + + public UnlockDoorRequest( + string accessMethodId = default, + string acsEntranceId = default + ) + { + AccessMethodId = accessMethodId; + AcsEntranceId = acsEntranceId; + } + + /// + /// ID of the cloud_key `access_method` to use for the unlock operation. + /// + [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// ID of the entrance to unlock. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "unlockDoorResponse_response")] + public class UnlockDoorResponse + { + [JsonConstructorAttribute] + protected UnlockDoorResponse() { } + + public UnlockDoorResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. + /// + public ActionAttempt UnlockDoor(UnlockDoorRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/access_methods/unlock_door", requestOptions) + .EnsureData("/access_methods/unlock_door") + .ActionAttempt; + } + + /// + /// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. + /// + public ActionAttempt UnlockDoor( + string accessMethodId = default, + string acsEntranceId = default + ) + { + return UnlockDoor( + new UnlockDoorRequest(accessMethodId: accessMethodId, acsEntranceId: acsEntranceId) + ); + } + + /// + /// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. + /// + public async Task UnlockDoorAsync(UnlockDoorRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/access_methods/unlock_door", + requestOptions + ) + ) + .EnsureData("/access_methods/unlock_door") + .ActionAttempt; + } + + /// + /// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. + /// + public async Task UnlockDoorAsync( + string accessMethodId = default, + string acsEntranceId = default + ) + { + return ( + await UnlockDoorAsync( + new UnlockDoorRequest( + accessMethodId: accessMethodId, + acsEntranceId: acsEntranceId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.AccessMethods AccessMethods => new(this); -} + public partial class SeamClient + { + public Api.AccessMethods AccessMethods => new(this); + } -public partial interface ISeamClient -{ -public Api.AccessMethods AccessMethods { get; } -} + public partial interface ISeamClient + { + public Api.AccessMethods AccessMethods { get; } + } } diff --git a/src/Seam/Api/ActionAttempts.cs b/src/Seam/Api/ActionAttempts.cs index 7773d33a..615fc87b 100644 --- a/src/Seam/Api/ActionAttempts.cs +++ b/src/Seam/Api/ActionAttempts.cs @@ -9,273 +9,314 @@ namespace Seam.Api { -public class ActionAttempts -{ -private ISeamClient _seam; - -public ActionAttempts(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get an Action Attempt. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string actionAttemptId = default) -{ -ActionAttemptId = actionAttemptId; -} - -/// -/// ID of the action attempt that you want to get. -/// -[DataMember(Name = "action_attempt_id", IsRequired = true, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). -/// -public ActionAttempt Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/action_attempts/get", requestOptions).EnsureData("/action_attempts/get").ActionAttempt; -} - -/// -/// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). -/// -public ActionAttempt Get(string actionAttemptId = default) -{ -return Get(new GetRequest(actionAttemptId: actionAttemptId)); -} - -/// -/// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/action_attempts/get", requestOptions)).EnsureData("/action_attempts/get").ActionAttempt; -} - -/// -/// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). -/// -public async Task GetAsync(string actionAttemptId = default) -{ -return (await GetAsync(new GetRequest(actionAttemptId: actionAttemptId))); -} - -/// -/// Request parameters for List Action Attempts. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(List? actionAttemptIds = default, string? deviceId = default, int? limit = default, string? pageCursor = default) -{ -ActionAttemptIds = actionAttemptIds; -DeviceId = deviceId; -Limit = limit; -PageCursor = pageCursor; -} - -/// -/// IDs of the action attempts that you want to retrieve. -/// -[DataMember(Name = "action_attempt_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ActionAttemptIds { get; set; } - -/// -/// ID of the device to filter action attempts by. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public int? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List actionAttempts = default) -{ -ActionAttempts = actionAttempts; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempts", IsRequired = false, EmitDefaultValue = false)] -public List ActionAttempts { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/action_attempts/list", requestOptions).EnsureData("/action_attempts/list").ActionAttempts; -} - -/// -/// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. -/// -public List List(List? actionAttemptIds = default, string? deviceId = default, int? limit = default, string? pageCursor = default) -{ -return List(new ListRequest(actionAttemptIds: actionAttemptIds, deviceId: deviceId, limit: limit, pageCursor: pageCursor)); -} - -/// -/// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/action_attempts/list", requestOptions)).EnsureData("/action_attempts/list").ActionAttempts; -} - -/// -/// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. -/// -public async Task> ListAsync(List? actionAttemptIds = default, string? deviceId = default, int? limit = default, string? pageCursor = default) -{ -return (await ListAsync(new ListRequest(actionAttemptIds: actionAttemptIds, deviceId: deviceId, limit: limit, pageCursor: pageCursor))); -} -} + public class ActionAttempts + { + private ISeamClient _seam; + + public ActionAttempts(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get an Action Attempt. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string actionAttemptId = default) + { + ActionAttemptId = actionAttemptId; + } + + /// + /// ID of the action attempt that you want to get. + /// + [DataMember(Name = "action_attempt_id", IsRequired = true, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). + /// + public ActionAttempt Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/action_attempts/get", requestOptions) + .EnsureData("/action_attempts/get") + .ActionAttempt; + } + + /// + /// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). + /// + public ActionAttempt Get(string actionAttemptId = default) + { + return Get(new GetRequest(actionAttemptId: actionAttemptId)); + } + + /// + /// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/action_attempts/get", requestOptions)) + .EnsureData("/action_attempts/get") + .ActionAttempt; + } + + /// + /// Returns a specified [action attempt](https://www.seam.co/docs/core-concepts/action-attempts). + /// + public async Task GetAsync(string actionAttemptId = default) + { + return (await GetAsync(new GetRequest(actionAttemptId: actionAttemptId))); + } + + /// + /// Request parameters for List Action Attempts. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + List? actionAttemptIds = default, + string? deviceId = default, + int? limit = default, + string? pageCursor = default + ) + { + ActionAttemptIds = actionAttemptIds; + DeviceId = deviceId; + Limit = limit; + PageCursor = pageCursor; + } + + /// + /// IDs of the action attempts that you want to retrieve. + /// + [DataMember(Name = "action_attempt_ids", IsRequired = false, EmitDefaultValue = false)] + public List? ActionAttemptIds { get; set; } + + /// + /// ID of the device to filter action attempts by. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public int? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List actionAttempts = default) + { + ActionAttempts = actionAttempts; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempts", IsRequired = false, EmitDefaultValue = false)] + public List ActionAttempts { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/action_attempts/list", requestOptions) + .EnsureData("/action_attempts/list") + .ActionAttempts; + } + + /// + /// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. + /// + public List List( + List? actionAttemptIds = default, + string? deviceId = default, + int? limit = default, + string? pageCursor = default + ) + { + return List( + new ListRequest( + actionAttemptIds: actionAttemptIds, + deviceId: deviceId, + limit: limit, + pageCursor: pageCursor + ) + ); + } + + /// + /// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/action_attempts/list", requestOptions)) + .EnsureData("/action_attempts/list") + .ActionAttempts; + } + + /// + /// Returns a list of the [action attempts](https://www.seam.co/docs/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. + /// + public async Task> ListAsync( + List? actionAttemptIds = default, + string? deviceId = default, + int? limit = default, + string? pageCursor = default + ) + { + return ( + await ListAsync( + new ListRequest( + actionAttemptIds: actionAttemptIds, + deviceId: deviceId, + limit: limit, + pageCursor: pageCursor + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.ActionAttempts ActionAttempts => new(this); -} - -public partial interface ISeamClient -{ -public Api.ActionAttempts ActionAttempts { get; } -} + public partial class SeamClient + { + public Api.ActionAttempts ActionAttempts => new(this); + } + + public partial interface ISeamClient + { + public Api.ActionAttempts ActionAttempts { get; } + } } diff --git a/src/Seam/Api/ClientSessions.cs b/src/Seam/Api/ClientSessions.cs index 4b20d525..255e5fe2 100644 --- a/src/Seam/Api/ClientSessions.cs +++ b/src/Seam/Api/ClientSessions.cs @@ -9,871 +9,1100 @@ namespace Seam.Api { -public class ClientSessions -{ -private ISeamClient _seam; - -public ClientSessions(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Client Session. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(List? connectWebviewIds = default, List? connectedAccountIds = default, string? customerId = default, string? customerKey = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -ConnectWebviewIds = connectWebviewIds; -ConnectedAccountIds = connectedAccountIds; -CustomerId = customerId; -CustomerKey = customerKey; -ExpiresAt = expiresAt; -UserIdentifierKey = userIdentifierKey; -UserIdentityId = userIdentityId; -UserIdentityIds = userIdentityIds; -} - -/// -/// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) for which you want to create a client session. -/// -[DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectWebviewIds { get; set; } - -/// -/// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) for which you want to create a client session. -/// -[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectedAccountIds { get; set; } - -/// -/// Customer ID that you want to associate with the new client session. -/// -[DataMember(Name = "customer_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerId { get; set; } - -/// -/// Customer key that you want to associate with the new client session. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] -public string? ExpiresAt { get; set; } - -/// -/// Your user ID for the user for whom you want to create a client session. When you authenticate with a publishable key, the `user_identifier_key` must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the `user_identifier_key` can retrieve the client session. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. -/// -[Obsolete("Use `user_identity_id` instead.")] -[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] -public List? UserIdentityIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(ClientSession clientSession = default) -{ -ClientSession = clientSession; -} - -/// -/// OK -/// -[DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] -public ClientSession ClientSession { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public ClientSession Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Put("/client_sessions/create", requestOptions).EnsureData("/client_sessions/create").ClientSession; -} - -/// -/// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public ClientSession Create(List? connectWebviewIds = default, List? connectedAccountIds = default, string? customerId = default, string? customerKey = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -return Create(new CreateRequest(connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, customerId: customerId, customerKey: customerKey, expiresAt: expiresAt, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds)); -} - -/// -/// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PutAsync("/client_sessions/create", requestOptions)).EnsureData("/client_sessions/create").ClientSession; -} - -/// -/// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public async Task CreateAsync(List? connectWebviewIds = default, List? connectedAccountIds = default, string? customerId = default, string? customerKey = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -return (await CreateAsync(new CreateRequest(connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, customerId: customerId, customerKey: customerKey, expiresAt: expiresAt, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds))); -} - -/// -/// Request parameters for Delete a Client Session. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string clientSessionId = default) -{ -ClientSessionId = clientSessionId; -} - -/// -/// ID of the client session that you want to delete. -/// -[DataMember(Name = "client_session_id", IsRequired = true, EmitDefaultValue = false)] -public string ClientSessionId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/client_sessions/delete", requestOptions); -} - -/// -/// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public void Delete(string clientSessionId = default) -{ -Delete(new DeleteRequest(clientSessionId: clientSessionId)); -} - -/// -/// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/client_sessions/delete", requestOptions); -} - -/// -/// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public async Task DeleteAsync(string clientSessionId = default) -{ -await DeleteAsync(new DeleteRequest(clientSessionId: clientSessionId)); -} - -/// -/// Request parameters for Get a Client Session. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? clientSessionId = default, string? userIdentifierKey = default) -{ -ClientSessionId = clientSessionId; -UserIdentifierKey = userIdentifierKey; -} - -/// -/// ID of the client session that you want to get. -/// -[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] -public string? ClientSessionId { get; set; } - -/// -/// User identifier key associated with the client session that you want to get. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(ClientSession clientSession = default) -{ -ClientSession = clientSession; -} - -/// -/// OK -/// -[DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] -public ClientSession ClientSession { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public ClientSession Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/client_sessions/get", requestOptions).EnsureData("/client_sessions/get").ClientSession; -} - -/// -/// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public ClientSession Get(string? clientSessionId = default, string? userIdentifierKey = default) -{ -return Get(new GetRequest(clientSessionId: clientSessionId, userIdentifierKey: userIdentifierKey)); -} - -/// -/// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/client_sessions/get", requestOptions)).EnsureData("/client_sessions/get").ClientSession; -} - -/// -/// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public async Task GetAsync(string? clientSessionId = default, string? userIdentifierKey = default) -{ -return (await GetAsync(new GetRequest(clientSessionId: clientSessionId, userIdentifierKey: userIdentifierKey))); -} - -/// -/// Request parameters for Get or Create a Client Session. -/// -[DataContract(Name = "getOrCreateRequest_request")] -public class GetOrCreateRequest -{ -[JsonConstructorAttribute] -protected GetOrCreateRequest() { } - -public GetOrCreateRequest(List? connectWebviewIds = default, List? connectedAccountIds = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -ConnectWebviewIds = connectWebviewIds; -ConnectedAccountIds = connectedAccountIds; -ExpiresAt = expiresAt; -UserIdentifierKey = userIdentifierKey; -UserIdentityId = userIdentityId; -UserIdentityIds = userIdentityIds; -} - -/// -/// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session). -/// -[DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectWebviewIds { get; set; } - -/// -/// IDs of the [connected accounts](https://www.seam.co/docs/api/connected_accounts/object) that you want to associate with the client session (or that are already associated with the existing client session). -/// -[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectedAccountIds { get; set; } - -/// -/// Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it. -/// -[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] -public string? ExpiresAt { get; set; } - -/// -/// Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session). When you authenticate with a publishable key, the `user_identifier_key` must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the `user_identifier_key` can retrieve the client session. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session). -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. -/// -[Obsolete("Use `user_identity_id`.")] -[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] -public List? UserIdentityIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getOrCreateResponse_response")] -public class GetOrCreateResponse -{ -[JsonConstructorAttribute] -protected GetOrCreateResponse() { } - -public GetOrCreateResponse(ClientSession clientSession = default) -{ -ClientSession = clientSession; -} - -/// -/// OK -/// -[DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] -public ClientSession ClientSession { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. -/// -public ClientSession GetOrCreate(GetOrCreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/client_sessions/get_or_create", requestOptions).EnsureData("/client_sessions/get_or_create").ClientSession; -} - -/// -/// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. -/// -public ClientSession GetOrCreate(List? connectWebviewIds = default, List? connectedAccountIds = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -return GetOrCreate(new GetOrCreateRequest(connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, expiresAt: expiresAt, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds)); -} - -/// -/// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. -/// -public async Task GetOrCreateAsync(GetOrCreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/client_sessions/get_or_create", requestOptions)).EnsureData("/client_sessions/get_or_create").ClientSession; -} - -/// -/// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. -/// -public async Task GetOrCreateAsync(List? connectWebviewIds = default, List? connectedAccountIds = default, string? expiresAt = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -return (await GetOrCreateAsync(new GetOrCreateRequest(connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, expiresAt: expiresAt, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds))); -} - -/// -/// Request parameters for Grant Access to a Client Session. -/// -[DataContract(Name = "grantAccessRequest_request")] -public class GrantAccessRequest -{ -[JsonConstructorAttribute] -protected GrantAccessRequest() { } - -public GrantAccessRequest(string? clientSessionId = default, List? connectWebviewIds = default, List? connectedAccountIds = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -ClientSessionId = clientSessionId; -ConnectWebviewIds = connectWebviewIds; -ConnectedAccountIds = connectedAccountIds; -UserIdentifierKey = userIdentifierKey; -UserIdentityId = userIdentityId; -UserIdentityIds = userIdentityIds; -} - -/// -/// ID of the client session to which you want to grant access to resources. -/// -[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] -public string? ClientSessionId { get; set; } - -/// -/// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) that you want to associate with the client session. -/// -[DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectWebviewIds { get; set; } - -/// -/// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) that you want to associate with the client session. -/// -[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectedAccountIds { get; set; } - -/// -/// Your user ID for the user that you want to associate with the client session. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. -/// -[Obsolete("Use `user_identity_id`.")] -[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] -public List? UserIdentityIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. -/// -public void GrantAccess(GrantAccessRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/client_sessions/grant_access", requestOptions); -} - -/// -/// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. -/// -public void GrantAccess(string? clientSessionId = default, List? connectWebviewIds = default, List? connectedAccountIds = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -GrantAccess(new GrantAccessRequest(clientSessionId: clientSessionId, connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds)); -} - -/// -/// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. -/// -public async Task GrantAccessAsync(GrantAccessRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/client_sessions/grant_access", requestOptions); -} - -/// -/// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. -/// -public async Task GrantAccessAsync(string? clientSessionId = default, List? connectWebviewIds = default, List? connectedAccountIds = default, string? userIdentifierKey = default, string? userIdentityId = default, List? userIdentityIds = default) -{ -await GrantAccessAsync(new GrantAccessRequest(clientSessionId: clientSessionId, connectWebviewIds: connectWebviewIds, connectedAccountIds: connectedAccountIds, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, userIdentityIds: userIdentityIds)); -} - -/// -/// Request parameters for List Client Sessions. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? clientSessionId = default, string? connectWebviewId = default, string? userIdentifierKey = default, string? userIdentityId = default, bool? withoutUserIdentifierKey = default) -{ -ClientSessionId = clientSessionId; -ConnectWebviewId = connectWebviewId; -UserIdentifierKey = userIdentifierKey; -UserIdentityId = userIdentityId; -WithoutUserIdentifierKey = withoutUserIdentifierKey; -} - -/// -/// ID of the client session that you want to retrieve. -/// -[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] -public string? ClientSessionId { get; set; } - -/// -/// ID of the [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a Connect Webview. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectWebviewId { get; set; } - -/// -/// Your user ID for the user by which you want to filter client sessions. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a user identity. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Indicates whether to retrieve only client sessions without associated user identifier keys. -/// -[DataMember(Name = "without_user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public bool? WithoutUserIdentifierKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List clientSessions = default) -{ -ClientSessions = clientSessions; -} - -/// -/// OK -/// -[DataMember(Name = "client_sessions", IsRequired = false, EmitDefaultValue = false)] -public List ClientSessions { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/client_sessions/list", requestOptions).EnsureData("/client_sessions/list").ClientSessions; -} - -/// -/// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public List List(string? clientSessionId = default, string? connectWebviewId = default, string? userIdentifierKey = default, string? userIdentityId = default, bool? withoutUserIdentifierKey = default) -{ -return List(new ListRequest(clientSessionId: clientSessionId, connectWebviewId: connectWebviewId, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, withoutUserIdentifierKey: withoutUserIdentifierKey)); -} - -/// -/// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/client_sessions/list", requestOptions)).EnsureData("/client_sessions/list").ClientSessions; -} - -/// -/// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -public async Task> ListAsync(string? clientSessionId = default, string? connectWebviewId = default, string? userIdentifierKey = default, string? userIdentityId = default, bool? withoutUserIdentifierKey = default) -{ -return (await ListAsync(new ListRequest(clientSessionId: clientSessionId, connectWebviewId: connectWebviewId, userIdentifierKey: userIdentifierKey, userIdentityId: userIdentityId, withoutUserIdentifierKey: withoutUserIdentifierKey))); -} - -/// -/// Request parameters for Revoke a Client Session. -/// -[DataContract(Name = "revokeRequest_request")] -public class RevokeRequest -{ -[JsonConstructorAttribute] -protected RevokeRequest() { } - -public RevokeRequest(string clientSessionId = default) -{ -ClientSessionId = clientSessionId; -} - -/// -/// ID of the client session that you want to revoke. -/// -[DataMember(Name = "client_session_id", IsRequired = true, EmitDefaultValue = false)] -public string ClientSessionId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -/// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. -/// -public void Revoke(RevokeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/client_sessions/revoke", requestOptions); -} - -/// -/// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -/// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. -/// -public void Revoke(string clientSessionId = default) -{ -Revoke(new RevokeRequest(clientSessionId: clientSessionId)); -} - -/// -/// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -/// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. -/// -public async Task RevokeAsync(RevokeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/client_sessions/revoke", requestOptions); -} - -/// -/// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -/// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. -/// -public async Task RevokeAsync(string clientSessionId = default) -{ -await RevokeAsync(new RevokeRequest(clientSessionId: clientSessionId)); -} -} + public class ClientSessions + { + private ISeamClient _seam; + + public ClientSessions(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Client Session. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? customerId = default, + string? customerKey = default, + string? expiresAt = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + ConnectWebviewIds = connectWebviewIds; + ConnectedAccountIds = connectedAccountIds; + CustomerId = customerId; + CustomerKey = customerKey; + ExpiresAt = expiresAt; + UserIdentifierKey = userIdentifierKey; + UserIdentityId = userIdentityId; + UserIdentityIds = userIdentityIds; + } + + /// + /// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) for which you want to create a client session. + /// + [DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] + public List? ConnectWebviewIds { get; set; } + + /// + /// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) for which you want to create a client session. + /// + [DataMember( + Name = "connected_account_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? ConnectedAccountIds { get; set; } + + /// + /// Customer ID that you want to associate with the new client session. + /// + [DataMember(Name = "customer_id", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerId { get; set; } + + /// + /// Customer key that you want to associate with the new client session. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] + public string? ExpiresAt { get; set; } + + /// + /// Your user ID for the user for whom you want to create a client session. When you authenticate with a publishable key, the `user_identifier_key` must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the `user_identifier_key` can retrieve the client session. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + /// + [Obsolete("Use `user_identity_id` instead.")] + [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] + public List? UserIdentityIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(ClientSession clientSession = default) + { + ClientSession = clientSession; + } + + /// + /// OK + /// + [DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] + public ClientSession ClientSession { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public ClientSession Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Put("/client_sessions/create", requestOptions) + .EnsureData("/client_sessions/create") + .ClientSession; + } + + /// + /// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public ClientSession Create( + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? customerId = default, + string? customerKey = default, + string? expiresAt = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + return Create( + new CreateRequest( + connectWebviewIds: connectWebviewIds, + connectedAccountIds: connectedAccountIds, + customerId: customerId, + customerKey: customerKey, + expiresAt: expiresAt, + userIdentifierKey: userIdentifierKey, + userIdentityId: userIdentityId, + userIdentityIds: userIdentityIds + ) + ); + } + + /// + /// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PutAsync("/client_sessions/create", requestOptions)) + .EnsureData("/client_sessions/create") + .ClientSession; + } + + /// + /// Creates a new [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public async Task CreateAsync( + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? customerId = default, + string? customerKey = default, + string? expiresAt = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + connectWebviewIds: connectWebviewIds, + connectedAccountIds: connectedAccountIds, + customerId: customerId, + customerKey: customerKey, + expiresAt: expiresAt, + userIdentifierKey: userIdentifierKey, + userIdentityId: userIdentityId, + userIdentityIds: userIdentityIds + ) + ) + ); + } + + /// + /// Request parameters for Delete a Client Session. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string clientSessionId = default) + { + ClientSessionId = clientSessionId; + } + + /// + /// ID of the client session that you want to delete. + /// + [DataMember(Name = "client_session_id", IsRequired = true, EmitDefaultValue = false)] + public string ClientSessionId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/client_sessions/delete", requestOptions); + } + + /// + /// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public void Delete(string clientSessionId = default) + { + Delete(new DeleteRequest(clientSessionId: clientSessionId)); + } + + /// + /// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/client_sessions/delete", requestOptions); + } + + /// + /// Deletes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public async Task DeleteAsync(string clientSessionId = default) + { + await DeleteAsync(new DeleteRequest(clientSessionId: clientSessionId)); + } + + /// + /// Request parameters for Get a Client Session. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest( + string? clientSessionId = default, + string? userIdentifierKey = default + ) + { + ClientSessionId = clientSessionId; + UserIdentifierKey = userIdentifierKey; + } + + /// + /// ID of the client session that you want to get. + /// + [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] + public string? ClientSessionId { get; set; } + + /// + /// User identifier key associated with the client session that you want to get. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(ClientSession clientSession = default) + { + ClientSession = clientSession; + } + + /// + /// OK + /// + [DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] + public ClientSession ClientSession { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public ClientSession Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/client_sessions/get", requestOptions) + .EnsureData("/client_sessions/get") + .ClientSession; + } + + /// + /// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public ClientSession Get( + string? clientSessionId = default, + string? userIdentifierKey = default + ) + { + return Get( + new GetRequest( + clientSessionId: clientSessionId, + userIdentifierKey: userIdentifierKey + ) + ); + } + + /// + /// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/client_sessions/get", requestOptions)) + .EnsureData("/client_sessions/get") + .ClientSession; + } + + /// + /// Returns a specified [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public async Task GetAsync( + string? clientSessionId = default, + string? userIdentifierKey = default + ) + { + return ( + await GetAsync( + new GetRequest( + clientSessionId: clientSessionId, + userIdentifierKey: userIdentifierKey + ) + ) + ); + } + + /// + /// Request parameters for Get or Create a Client Session. + /// + [DataContract(Name = "getOrCreateRequest_request")] + public class GetOrCreateRequest + { + [JsonConstructorAttribute] + protected GetOrCreateRequest() { } + + public GetOrCreateRequest( + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? expiresAt = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + ConnectWebviewIds = connectWebviewIds; + ConnectedAccountIds = connectedAccountIds; + ExpiresAt = expiresAt; + UserIdentifierKey = userIdentifierKey; + UserIdentityId = userIdentityId; + UserIdentityIds = userIdentityIds; + } + + /// + /// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session). + /// + [DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] + public List? ConnectWebviewIds { get; set; } + + /// + /// IDs of the [connected accounts](https://www.seam.co/docs/api/connected_accounts/object) that you want to associate with the client session (or that are already associated with the existing client session). + /// + [DataMember( + Name = "connected_account_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? ConnectedAccountIds { get; set; } + + /// + /// Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it. + /// + [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] + public string? ExpiresAt { get; set; } + + /// + /// Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session). When you authenticate with a publishable key, the `user_identifier_key` must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the `user_identifier_key` can retrieve the client session. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session). + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + /// + [Obsolete("Use `user_identity_id`.")] + [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] + public List? UserIdentityIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getOrCreateResponse_response")] + public class GetOrCreateResponse + { + [JsonConstructorAttribute] + protected GetOrCreateResponse() { } + + public GetOrCreateResponse(ClientSession clientSession = default) + { + ClientSession = clientSession; + } + + /// + /// OK + /// + [DataMember(Name = "client_session", IsRequired = false, EmitDefaultValue = false)] + public ClientSession ClientSession { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. + /// + public ClientSession GetOrCreate(GetOrCreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/client_sessions/get_or_create", requestOptions) + .EnsureData("/client_sessions/get_or_create") + .ClientSession; + } + + /// + /// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. + /// + public ClientSession GetOrCreate( + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? expiresAt = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + return GetOrCreate( + new GetOrCreateRequest( + connectWebviewIds: connectWebviewIds, + connectedAccountIds: connectedAccountIds, + expiresAt: expiresAt, + userIdentifierKey: userIdentifierKey, + userIdentityId: userIdentityId, + userIdentityIds: userIdentityIds + ) + ); + } + + /// + /// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. + /// + public async Task GetOrCreateAsync(GetOrCreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/client_sessions/get_or_create", + requestOptions + ) + ) + .EnsureData("/client_sessions/get_or_create") + .ClientSession; + } + + /// + /// Returns a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. + /// + public async Task GetOrCreateAsync( + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? expiresAt = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + return ( + await GetOrCreateAsync( + new GetOrCreateRequest( + connectWebviewIds: connectWebviewIds, + connectedAccountIds: connectedAccountIds, + expiresAt: expiresAt, + userIdentifierKey: userIdentifierKey, + userIdentityId: userIdentityId, + userIdentityIds: userIdentityIds + ) + ) + ); + } + + /// + /// Request parameters for Grant Access to a Client Session. + /// + [DataContract(Name = "grantAccessRequest_request")] + public class GrantAccessRequest + { + [JsonConstructorAttribute] + protected GrantAccessRequest() { } + + public GrantAccessRequest( + string? clientSessionId = default, + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + ClientSessionId = clientSessionId; + ConnectWebviewIds = connectWebviewIds; + ConnectedAccountIds = connectedAccountIds; + UserIdentifierKey = userIdentifierKey; + UserIdentityId = userIdentityId; + UserIdentityIds = userIdentityIds; + } + + /// + /// ID of the client session to which you want to grant access to resources. + /// + [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] + public string? ClientSessionId { get; set; } + + /// + /// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) that you want to associate with the client session. + /// + [DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] + public List? ConnectWebviewIds { get; set; } + + /// + /// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) that you want to associate with the client session. + /// + [DataMember( + Name = "connected_account_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? ConnectedAccountIds { get; set; } + + /// + /// Your user ID for the user that you want to associate with the client session. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + /// + [Obsolete("Use `user_identity_id`.")] + [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] + public List? UserIdentityIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. + /// + public void GrantAccess(GrantAccessRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/client_sessions/grant_access", requestOptions); + } + + /// + /// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. + /// + public void GrantAccess( + string? clientSessionId = default, + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + GrantAccess( + new GrantAccessRequest( + clientSessionId: clientSessionId, + connectWebviewIds: connectWebviewIds, + connectedAccountIds: connectedAccountIds, + userIdentifierKey: userIdentifierKey, + userIdentityId: userIdentityId, + userIdentityIds: userIdentityIds + ) + ); + } + + /// + /// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. + /// + public async Task GrantAccessAsync(GrantAccessRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/client_sessions/grant_access", requestOptions); + } + + /// + /// Grants a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews), [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. + /// + public async Task GrantAccessAsync( + string? clientSessionId = default, + List? connectWebviewIds = default, + List? connectedAccountIds = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List? userIdentityIds = default + ) + { + await GrantAccessAsync( + new GrantAccessRequest( + clientSessionId: clientSessionId, + connectWebviewIds: connectWebviewIds, + connectedAccountIds: connectedAccountIds, + userIdentifierKey: userIdentifierKey, + userIdentityId: userIdentityId, + userIdentityIds: userIdentityIds + ) + ); + } + + /// + /// Request parameters for List Client Sessions. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? clientSessionId = default, + string? connectWebviewId = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + bool? withoutUserIdentifierKey = default + ) + { + ClientSessionId = clientSessionId; + ConnectWebviewId = connectWebviewId; + UserIdentifierKey = userIdentifierKey; + UserIdentityId = userIdentityId; + WithoutUserIdentifierKey = withoutUserIdentifierKey; + } + + /// + /// ID of the client session that you want to retrieve. + /// + [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] + public string? ClientSessionId { get; set; } + + /// + /// ID of the [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a Connect Webview. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectWebviewId { get; set; } + + /// + /// Your user ID for the user by which you want to filter client sessions. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions. Specify `null` to retrieve client sessions that are not associated with a user identity. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Indicates whether to retrieve only client sessions without associated user identifier keys. + /// + [DataMember( + Name = "without_user_identifier_key", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? WithoutUserIdentifierKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List clientSessions = default) + { + ClientSessions = clientSessions; + } + + /// + /// OK + /// + [DataMember(Name = "client_sessions", IsRequired = false, EmitDefaultValue = false)] + public List ClientSessions { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/client_sessions/list", requestOptions) + .EnsureData("/client_sessions/list") + .ClientSessions; + } + + /// + /// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public List List( + string? clientSessionId = default, + string? connectWebviewId = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + bool? withoutUserIdentifierKey = default + ) + { + return List( + new ListRequest( + clientSessionId: clientSessionId, + connectWebviewId: connectWebviewId, + userIdentifierKey: userIdentifierKey, + userIdentityId: userIdentityId, + withoutUserIdentifierKey: withoutUserIdentifierKey + ) + ); + } + + /// + /// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/client_sessions/list", requestOptions)) + .EnsureData("/client_sessions/list") + .ClientSessions; + } + + /// + /// Returns a list of all [client sessions](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + public async Task> ListAsync( + string? clientSessionId = default, + string? connectWebviewId = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + bool? withoutUserIdentifierKey = default + ) + { + return ( + await ListAsync( + new ListRequest( + clientSessionId: clientSessionId, + connectWebviewId: connectWebviewId, + userIdentifierKey: userIdentifierKey, + userIdentityId: userIdentityId, + withoutUserIdentifierKey: withoutUserIdentifierKey + ) + ) + ); + } + + /// + /// Request parameters for Revoke a Client Session. + /// + [DataContract(Name = "revokeRequest_request")] + public class RevokeRequest + { + [JsonConstructorAttribute] + protected RevokeRequest() { } + + public RevokeRequest(string clientSessionId = default) + { + ClientSessionId = clientSessionId; + } + + /// + /// ID of the client session that you want to revoke. + /// + [DataMember(Name = "client_session_id", IsRequired = true, EmitDefaultValue = false)] + public string ClientSessionId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + /// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. + /// + public void Revoke(RevokeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/client_sessions/revoke", requestOptions); + } + + /// + /// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + /// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. + /// + public void Revoke(string clientSessionId = default) + { + Revoke(new RevokeRequest(clientSessionId: clientSessionId)); + } + + /// + /// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + /// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. + /// + public async Task RevokeAsync(RevokeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/client_sessions/revoke", requestOptions); + } + + /// + /// Revokes a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + /// Note that [deleting a client session](https://www.seam.co/docs/api/client_sessions/delete) is a separate action. + /// + public async Task RevokeAsync(string clientSessionId = default) + { + await RevokeAsync(new RevokeRequest(clientSessionId: clientSessionId)); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.ClientSessions ClientSessions => new(this); -} + public partial class SeamClient + { + public Api.ClientSessions ClientSessions => new(this); + } -public partial interface ISeamClient -{ -public Api.ClientSessions ClientSessions { get; } -} + public partial interface ISeamClient + { + public Api.ClientSessions ClientSessions { get; } + } } diff --git a/src/Seam/Api/ConnectWebviews.cs b/src/Seam/Api/ConnectWebviews.cs index f322b146..88a3f2f3 100644 --- a/src/Seam/Api/ConnectWebviews.cs +++ b/src/Seam/Api/ConnectWebviews.cs @@ -9,867 +9,1002 @@ namespace Seam.Api { -public class ConnectWebviews -{ -private ISeamClient _seam; - -public ConnectWebviews(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Connect Webview. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(List? acceptedCapabilities = default, List? acceptedProviders = default, bool? automaticallyManageNewDevices = default, object? customMetadata = default, string? customRedirectFailureUrl = default, string? customRedirectUrl = default, string? customerKey = default, List? excludedProviders = default, CreateRequest.ProviderCategoryEnum? providerCategory = default, bool? waitForDeviceCreation = default) -{ -AcceptedCapabilities = acceptedCapabilities; -AcceptedProviders = acceptedProviders; -AutomaticallyManageNewDevices = automaticallyManageNewDevices; -CustomMetadata = customMetadata; -CustomRedirectFailureUrl = customRedirectFailureUrl; -CustomRedirectUrl = customRedirectUrl; -CustomerKey = customerKey; -ExcludedProviders = excludedProviders; -ProviderCategory = providerCategory; -WaitForDeviceCreation = waitForDeviceCreation; -} - -/// -/// List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AcceptedCapabilitiesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "lock")] -Lock = 1, - -[EnumMember(Value = "thermostat")] -Thermostat = 2, - -[EnumMember(Value = "noise_sensor")] -NoiseSensor = 3, - -[EnumMember(Value = "access_control")] -AccessControl = 4, - -[EnumMember(Value = "camera")] -Camera = 5, -} - -/// -/// Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with no filters. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AcceptedProvidersEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "hotek")] -Hotek = 1, - -[EnumMember(Value = "dormakaba_community")] -DormakabaCommunity = 2, - -[EnumMember(Value = "legic_connect")] -LegicConnect = 3, - -[EnumMember(Value = "akuvox")] -Akuvox = 4, - -[EnumMember(Value = "august")] -August = 5, - -[EnumMember(Value = "avigilon_alta")] -AvigilonAlta = 6, - -[EnumMember(Value = "brivo")] -Brivo = 7, - -[EnumMember(Value = "butterflymx")] -Butterflymx = 8, - -[EnumMember(Value = "schlage")] -Schlage = 9, - -[EnumMember(Value = "smartthings")] -Smartthings = 10, - -[EnumMember(Value = "yale")] -Yale = 11, - -[EnumMember(Value = "genie")] -Genie = 12, - -[EnumMember(Value = "doorking")] -Doorking = 13, - -[EnumMember(Value = "salto")] -Salto = 14, - -[EnumMember(Value = "salto_ks")] -SaltoKs = 15, - -[EnumMember(Value = "salto_ks_accept")] -SaltoKsAccept = 16, - -[EnumMember(Value = "lockly")] -Lockly = 17, - -[EnumMember(Value = "ttlock")] -Ttlock = 18, - -[EnumMember(Value = "linear")] -Linear = 19, - -[EnumMember(Value = "noiseaware")] -Noiseaware = 20, - -[EnumMember(Value = "nuki")] -Nuki = 21, - -[EnumMember(Value = "igloo")] -Igloo = 22, - -[EnumMember(Value = "kwikset")] -Kwikset = 23, - -[EnumMember(Value = "minut")] -Minut = 24, - -[EnumMember(Value = "my_2n")] -My_2n = 25, + public class ConnectWebviews + { + private ISeamClient _seam; + + public ConnectWebviews(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Connect Webview. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + List? acceptedCapabilities = default, + List? acceptedProviders = default, + bool? automaticallyManageNewDevices = default, + object? customMetadata = default, + string? customRedirectFailureUrl = default, + string? customRedirectUrl = default, + string? customerKey = default, + List? excludedProviders = default, + CreateRequest.ProviderCategoryEnum? providerCategory = default, + bool? waitForDeviceCreation = default + ) + { + AcceptedCapabilities = acceptedCapabilities; + AcceptedProviders = acceptedProviders; + AutomaticallyManageNewDevices = automaticallyManageNewDevices; + CustomMetadata = customMetadata; + CustomRedirectFailureUrl = customRedirectFailureUrl; + CustomRedirectUrl = customRedirectUrl; + CustomerKey = customerKey; + ExcludedProviders = excludedProviders; + ProviderCategory = providerCategory; + WaitForDeviceCreation = waitForDeviceCreation; + } + + /// + /// List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AcceptedCapabilitiesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "lock")] + Lock = 1, + + [EnumMember(Value = "thermostat")] + Thermostat = 2, + + [EnumMember(Value = "noise_sensor")] + NoiseSensor = 3, + + [EnumMember(Value = "access_control")] + AccessControl = 4, + + [EnumMember(Value = "camera")] + Camera = 5, + } + + /// + /// Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with no filters. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AcceptedProvidersEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "controlbyweb")] -Controlbyweb = 26, + [EnumMember(Value = "hotek")] + Hotek = 1, -[EnumMember(Value = "nest")] -Nest = 27, + [EnumMember(Value = "dormakaba_community")] + DormakabaCommunity = 2, -[EnumMember(Value = "igloohome")] -Igloohome = 28, + [EnumMember(Value = "legic_connect")] + LegicConnect = 3, -[EnumMember(Value = "ecobee")] -Ecobee = 29, + [EnumMember(Value = "akuvox")] + Akuvox = 4, -[EnumMember(Value = "four_suites")] -FourSuites = 30, + [EnumMember(Value = "august")] + August = 5, -[EnumMember(Value = "dormakaba_oracode")] -DormakabaOracode = 31, + [EnumMember(Value = "avigilon_alta")] + AvigilonAlta = 6, -[EnumMember(Value = "dormakaba_oracode_iho")] -DormakabaOracodeIho = 32, + [EnumMember(Value = "brivo")] + Brivo = 7, -[EnumMember(Value = "pti")] -Pti = 33, + [EnumMember(Value = "butterflymx")] + Butterflymx = 8, -[EnumMember(Value = "wyze")] -Wyze = 34, + [EnumMember(Value = "schlage")] + Schlage = 9, -[EnumMember(Value = "seam_passport")] -SeamPassport = 35, + [EnumMember(Value = "smartthings")] + Smartthings = 10, -[EnumMember(Value = "visionline")] -Visionline = 36, + [EnumMember(Value = "yale")] + Yale = 11, -[EnumMember(Value = "assa_abloy_credential_service")] -AssaAbloyCredentialService = 37, + [EnumMember(Value = "genie")] + Genie = 12, -[EnumMember(Value = "tedee")] -Tedee = 38, + [EnumMember(Value = "doorking")] + Doorking = 13, -[EnumMember(Value = "honeywell_resideo")] -HoneywellResideo = 39, + [EnumMember(Value = "salto")] + Salto = 14, -[EnumMember(Value = "first_alert")] -FirstAlert = 40, + [EnumMember(Value = "salto_ks")] + SaltoKs = 15, -[EnumMember(Value = "latch")] -Latch = 41, + [EnumMember(Value = "salto_ks_accept")] + SaltoKsAccept = 16, -[EnumMember(Value = "akiles")] -Akiles = 42, + [EnumMember(Value = "lockly")] + Lockly = 17, -[EnumMember(Value = "assa_abloy_vostio")] -AssaAbloyVostio = 43, + [EnumMember(Value = "ttlock")] + Ttlock = 18, -[EnumMember(Value = "assa_abloy_vostio_credential_service")] -AssaAbloyVostioCredentialService = 44, + [EnumMember(Value = "linear")] + Linear = 19, -[EnumMember(Value = "tado")] -Tado = 45, + [EnumMember(Value = "noiseaware")] + Noiseaware = 20, -[EnumMember(Value = "salto_space")] -SaltoSpace = 46, + [EnumMember(Value = "nuki")] + Nuki = 21, -[EnumMember(Value = "sensi")] -Sensi = 47, - -[EnumMember(Value = "keynest")] -Keynest = 48, - -[EnumMember(Value = "korelock")] -Korelock = 49, - -[EnumMember(Value = "keyincode")] -Keyincode = 50, - -[EnumMember(Value = "dormakaba_ambiance")] -DormakabaAmbiance = 51, - -[EnumMember(Value = "ultraloq")] -Ultraloq = 52, - -[EnumMember(Value = "yacan")] -Yacan = 53, - -[EnumMember(Value = "dusaw")] -Dusaw = 54, - -[EnumMember(Value = "sifely")] -Sifely = 55, - -[EnumMember(Value = "thirty_three_lock")] -ThirtyThreeLock = 56, - -[EnumMember(Value = "ring")] -Ring = 57, - -[EnumMember(Value = "tapo")] -Tapo = 58, - -[EnumMember(Value = "arlo")] -Arlo = 59, - -[EnumMember(Value = "reolink")] -Reolink = 60, - -[EnumMember(Value = "ical")] -Ical = 61, - -[EnumMember(Value = "lodgify")] -Lodgify = 62, - -[EnumMember(Value = "hostaway")] -Hostaway = 63, - -[EnumMember(Value = "guesty")] -Guesty = 64, - -[EnumMember(Value = "acuity_scheduling")] -AcuityScheduling = 65, - -[EnumMember(Value = "omnitec")] -Omnitec = 66, - -[EnumMember(Value = "kisi")] -Kisi = 67, - -[EnumMember(Value = "aqara")] -Aqara = 68, - -[EnumMember(Value = "yale_access")] -YaleAccess = 69, - -[EnumMember(Value = "hid_cm")] -HidCm = 70, - -[EnumMember(Value = "google_nest")] -GoogleNest = 71, - -[EnumMember(Value = "slack")] -Slack = 72, -} - -/// -/// Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with the desired `provider_category` filter. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ProviderCategoryEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "stable")] -Stable = 1, - -[EnumMember(Value = "consumer_smartlocks")] -ConsumerSmartlocks = 2, - -[EnumMember(Value = "beta")] -Beta = 3, - -[EnumMember(Value = "thermostats")] -Thermostats = 4, - -[EnumMember(Value = "noise_sensors")] -NoiseSensors = 5, - -[EnumMember(Value = "access_control_systems")] -AccessControlSystems = 6, - -[EnumMember(Value = "cameras")] -Cameras = 7, - -[EnumMember(Value = "connectors")] -Connectors = 8, - -[EnumMember(Value = "internal_beta")] -InternalBeta = 9, -} - -/// -/// List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. -/// -[DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] -public List? AcceptedCapabilities { get; set; } - -/// -/// Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with no filters. -/// -[DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] -public List? AcceptedProviders { get; set; } - -/// -/// Indicates whether newly-added devices should appear as [managed devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). -/// -[DataMember(Name = "automatically_manage_new_devices", IsRequired = false, EmitDefaultValue = false)] -public bool? AutomaticallyManageNewDevices { get; set; } - -/// -/// Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://www.seam.co/docs/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://www.seam.co/docs/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadata { get; set; } - -/// -/// Alternative URL that you want to redirect the user to on an error. If you do not set this parameter, the Connect Webview falls back to the `custom_redirect_url`. -/// -[DataMember(Name = "custom_redirect_failure_url", IsRequired = false, EmitDefaultValue = false)] -public string? CustomRedirectFailureUrl { get; set; } - -/// -/// URL that you want to redirect the user to after the provider login is complete. -/// -[DataMember(Name = "custom_redirect_url", IsRequired = false, EmitDefaultValue = false)] -public string? CustomRedirectUrl { get; set; } - -/// -/// Associate the Connect Webview, the connected account, and all resources under the connected account with a customer. If the connected account already exists, it will be associated with the customer. If the connected account already exists, but is already associated with a customer, the Connect Webview will show an error. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// List of provider keys to exclude from the Connect Webview. These providers will not be shown when the user tries to connect an account. -/// -[DataMember(Name = "excluded_providers", IsRequired = false, EmitDefaultValue = false)] -public List? ExcludedProviders { get; set; } - -/// -/// Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with the desired `provider_category` filter. -/// -[DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] -public CreateRequest.ProviderCategoryEnum? ProviderCategory { get; set; } - -/// -/// Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). -/// -[DataMember(Name = "wait_for_device_creation", IsRequired = false, EmitDefaultValue = false)] -public bool? WaitForDeviceCreation { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "igloo")] + Igloo = 22, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "kwikset")] + Kwikset = 23, -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } + [EnumMember(Value = "minut")] + Minut = 24, -public CreateResponse(ConnectWebview connectWebview = default) -{ -ConnectWebview = connectWebview; -} + [EnumMember(Value = "my_2n")] + My_2n = 25, -/// -/// OK -/// -[DataMember(Name = "connect_webview", IsRequired = false, EmitDefaultValue = false)] -public ConnectWebview ConnectWebview { get; set; } + [EnumMember(Value = "controlbyweb")] + Controlbyweb = 26, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "nest")] + Nest = 27, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "igloohome")] + Igloohome = 28, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "ecobee")] + Ecobee = 29, -/// -/// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. -/// -/// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. -/// -/// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). -/// -public ConnectWebview Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/connect_webviews/create", requestOptions).EnsureData("/connect_webviews/create").ConnectWebview; -} + [EnumMember(Value = "four_suites")] + FourSuites = 30, -/// -/// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. -/// -/// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. -/// -/// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). -/// -public ConnectWebview Create(List? acceptedCapabilities = default, List? acceptedProviders = default, bool? automaticallyManageNewDevices = default, object? customMetadata = default, string? customRedirectFailureUrl = default, string? customRedirectUrl = default, string? customerKey = default, List? excludedProviders = default, CreateRequest.ProviderCategoryEnum? providerCategory = default, bool? waitForDeviceCreation = default) -{ -return Create(new CreateRequest(acceptedCapabilities: acceptedCapabilities, acceptedProviders: acceptedProviders, automaticallyManageNewDevices: automaticallyManageNewDevices, customMetadata: customMetadata, customRedirectFailureUrl: customRedirectFailureUrl, customRedirectUrl: customRedirectUrl, customerKey: customerKey, excludedProviders: excludedProviders, providerCategory: providerCategory, waitForDeviceCreation: waitForDeviceCreation)); -} + [EnumMember(Value = "dormakaba_oracode")] + DormakabaOracode = 31, -/// -/// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. -/// -/// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. -/// -/// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/connect_webviews/create", requestOptions)).EnsureData("/connect_webviews/create").ConnectWebview; -} + [EnumMember(Value = "dormakaba_oracode_iho")] + DormakabaOracodeIho = 32, -/// -/// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. -/// -/// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. -/// -/// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). -/// -public async Task CreateAsync(List? acceptedCapabilities = default, List? acceptedProviders = default, bool? automaticallyManageNewDevices = default, object? customMetadata = default, string? customRedirectFailureUrl = default, string? customRedirectUrl = default, string? customerKey = default, List? excludedProviders = default, CreateRequest.ProviderCategoryEnum? providerCategory = default, bool? waitForDeviceCreation = default) -{ -return (await CreateAsync(new CreateRequest(acceptedCapabilities: acceptedCapabilities, acceptedProviders: acceptedProviders, automaticallyManageNewDevices: automaticallyManageNewDevices, customMetadata: customMetadata, customRedirectFailureUrl: customRedirectFailureUrl, customRedirectUrl: customRedirectUrl, customerKey: customerKey, excludedProviders: excludedProviders, providerCategory: providerCategory, waitForDeviceCreation: waitForDeviceCreation))); -} + [EnumMember(Value = "pti")] + Pti = 33, -/// -/// Request parameters for Delete a Connect Webview. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } + [EnumMember(Value = "wyze")] + Wyze = 34, -public DeleteRequest(string connectWebviewId = default) -{ -ConnectWebviewId = connectWebviewId; -} + [EnumMember(Value = "seam_passport")] + SeamPassport = 35, -/// -/// ID of the Connect Webview that you want to delete. -/// -[DataMember(Name = "connect_webview_id", IsRequired = true, EmitDefaultValue = false)] -public string ConnectWebviewId { get; set; } + [EnumMember(Value = "visionline")] + Visionline = 36, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "assa_abloy_credential_service")] + AssaAbloyCredentialService = 37, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "tedee")] + Tedee = 38, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "honeywell_resideo")] + HoneywellResideo = 39, -/// -/// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/connect_webviews/delete", requestOptions); -} + [EnumMember(Value = "first_alert")] + FirstAlert = 40, -/// -/// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. -/// -public void Delete(string connectWebviewId = default) -{ -Delete(new DeleteRequest(connectWebviewId: connectWebviewId)); -} + [EnumMember(Value = "latch")] + Latch = 41, -/// -/// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/connect_webviews/delete", requestOptions); -} + [EnumMember(Value = "akiles")] + Akiles = 42, -/// -/// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. -/// -public async Task DeleteAsync(string connectWebviewId = default) -{ -await DeleteAsync(new DeleteRequest(connectWebviewId: connectWebviewId)); -} + [EnumMember(Value = "assa_abloy_vostio")] + AssaAbloyVostio = 43, -/// -/// Request parameters for Get a Connect Webview. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } + [EnumMember(Value = "assa_abloy_vostio_credential_service")] + AssaAbloyVostioCredentialService = 44, -public GetRequest(string connectWebviewId = default) -{ -ConnectWebviewId = connectWebviewId; -} + [EnumMember(Value = "tado")] + Tado = 45, -/// -/// ID of the Connect Webview that you want to get. -/// -[DataMember(Name = "connect_webview_id", IsRequired = true, EmitDefaultValue = false)] -public string ConnectWebviewId { get; set; } + [EnumMember(Value = "salto_space")] + SaltoSpace = 46, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "sensi")] + Sensi = 47, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "keynest")] + Keynest = 48, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "korelock")] + Korelock = 49, -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } + [EnumMember(Value = "keyincode")] + Keyincode = 50, -public GetResponse(ConnectWebview connectWebview = default) -{ -ConnectWebview = connectWebview; -} + [EnumMember(Value = "dormakaba_ambiance")] + DormakabaAmbiance = 51, -/// -/// OK -/// -[DataMember(Name = "connect_webview", IsRequired = false, EmitDefaultValue = false)] -public ConnectWebview ConnectWebview { get; set; } + [EnumMember(Value = "ultraloq")] + Ultraloq = 52, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "yacan")] + Yacan = 53, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "dusaw")] + Dusaw = 54, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "sifely")] + Sifely = 55, -/// -/// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. -/// -public ConnectWebview Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/connect_webviews/get", requestOptions).EnsureData("/connect_webviews/get").ConnectWebview; -} + [EnumMember(Value = "thirty_three_lock")] + ThirtyThreeLock = 56, -/// -/// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. -/// -public ConnectWebview Get(string connectWebviewId = default) -{ -return Get(new GetRequest(connectWebviewId: connectWebviewId)); -} + [EnumMember(Value = "ring")] + Ring = 57, -/// -/// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/connect_webviews/get", requestOptions)).EnsureData("/connect_webviews/get").ConnectWebview; -} + [EnumMember(Value = "tapo")] + Tapo = 58, -/// -/// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. -/// -public async Task GetAsync(string connectWebviewId = default) -{ -return (await GetAsync(new GetRequest(connectWebviewId: connectWebviewId))); -} + [EnumMember(Value = "arlo")] + Arlo = 59, -/// -/// Request parameters for List Connect Webviews. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } + [EnumMember(Value = "reolink")] + Reolink = 60, -public ListRequest(object? customMetadataHas = default, string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -CustomMetadataHas = customMetadataHas; -CustomerKey = customerKey; -Limit = limit; -PageCursor = pageCursor; -Search = search; -UserIdentifierKey = userIdentifierKey; -} + [EnumMember(Value = "ical")] + Ical = 61, -/// -/// Custom metadata pairs by which you want to [filter Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. -/// -[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadataHas { get; set; } - -/// -/// Customer key for which you want to list connect webviews. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned Connect Webviews to include all records that satisfy a partial match using `connect_webview_id`, `accepted_providers`, `custom_metadata`, or `customer_key`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// Your user ID for the user by which you want to filter Connect Webviews. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "lodgify")] + Lodgify = 62, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "hostaway")] + Hostaway = 63, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "guesty")] + Guesty = 64, -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } + [EnumMember(Value = "acuity_scheduling")] + AcuityScheduling = 65, -public ListResponse(List connectWebviews = default) -{ -ConnectWebviews = connectWebviews; -} + [EnumMember(Value = "omnitec")] + Omnitec = 66, -/// -/// OK -/// -[DataMember(Name = "connect_webviews", IsRequired = false, EmitDefaultValue = false)] -public List ConnectWebviews { get; set; } + [EnumMember(Value = "kisi")] + Kisi = 67, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "aqara")] + Aqara = 68, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "yale_access")] + YaleAccess = 69, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "hid_cm")] + HidCm = 70, -/// -/// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/connect_webviews/list", requestOptions).EnsureData("/connect_webviews/list").ConnectWebviews; -} + [EnumMember(Value = "google_nest")] + GoogleNest = 71, -/// -/// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -public List List(object? customMetadataHas = default, string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -return List(new ListRequest(customMetadataHas: customMetadataHas, customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey)); -} + [EnumMember(Value = "slack")] + Slack = 72, + } -/// -/// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/connect_webviews/list", requestOptions)).EnsureData("/connect_webviews/list").ConnectWebviews; -} + /// + /// Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with the desired `provider_category` filter. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ProviderCategoryEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -/// -/// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -public async Task> ListAsync(object? customMetadataHas = default, string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -return (await ListAsync(new ListRequest(customMetadataHas: customMetadataHas, customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey))); -} -} + [EnumMember(Value = "stable")] + Stable = 1, + + [EnumMember(Value = "consumer_smartlocks")] + ConsumerSmartlocks = 2, + + [EnumMember(Value = "beta")] + Beta = 3, + + [EnumMember(Value = "thermostats")] + Thermostats = 4, + + [EnumMember(Value = "noise_sensors")] + NoiseSensors = 5, + + [EnumMember(Value = "access_control_systems")] + AccessControlSystems = 6, + + [EnumMember(Value = "cameras")] + Cameras = 7, + + [EnumMember(Value = "connectors")] + Connectors = 8, + + [EnumMember(Value = "internal_beta")] + InternalBeta = 9, + } + + /// + /// List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. + /// + [DataMember( + Name = "accepted_capabilities", + IsRequired = false, + EmitDefaultValue = false + )] + public List? AcceptedCapabilities { get; set; } + + /// + /// Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with no filters. + /// + [DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] + public List? AcceptedProviders { get; set; } + + /// + /// Indicates whether newly-added devices should appear as [managed devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). + /// + [DataMember( + Name = "automatically_manage_new_devices", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AutomaticallyManageNewDevices { get; set; } + + /// + /// Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://www.seam.co/docs/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://www.seam.co/docs/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadata { get; set; } + + /// + /// Alternative URL that you want to redirect the user to on an error. If you do not set this parameter, the Connect Webview falls back to the `custom_redirect_url`. + /// + [DataMember( + Name = "custom_redirect_failure_url", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomRedirectFailureUrl { get; set; } + + /// + /// URL that you want to redirect the user to after the provider login is complete. + /// + [DataMember(Name = "custom_redirect_url", IsRequired = false, EmitDefaultValue = false)] + public string? CustomRedirectUrl { get; set; } + + /// + /// Associate the Connect Webview, the connected account, and all resources under the connected account with a customer. If the connected account already exists, it will be associated with the customer. If the connected account already exists, but is already associated with a customer, the Connect Webview will show an error. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// List of provider keys to exclude from the Connect Webview. These providers will not be shown when the user tries to connect an account. + /// + [DataMember(Name = "excluded_providers", IsRequired = false, EmitDefaultValue = false)] + public List? ExcludedProviders { get; set; } + + /// + /// Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with the desired `provider_category` filter. + /// + [DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] + public CreateRequest.ProviderCategoryEnum? ProviderCategory { get; set; } + + /// + /// Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). + /// + [DataMember( + Name = "wait_for_device_creation", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? WaitForDeviceCreation { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(ConnectWebview connectWebview = default) + { + ConnectWebview = connectWebview; + } + + /// + /// OK + /// + [DataMember(Name = "connect_webview", IsRequired = false, EmitDefaultValue = false)] + public ConnectWebview ConnectWebview { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. + /// + /// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. + /// + /// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). + /// + public ConnectWebview Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/connect_webviews/create", requestOptions) + .EnsureData("/connect_webviews/create") + .ConnectWebview; + } + + /// + /// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. + /// + /// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. + /// + /// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). + /// + public ConnectWebview Create( + List? acceptedCapabilities = default, + List? acceptedProviders = default, + bool? automaticallyManageNewDevices = default, + object? customMetadata = default, + string? customRedirectFailureUrl = default, + string? customRedirectUrl = default, + string? customerKey = default, + List? excludedProviders = default, + CreateRequest.ProviderCategoryEnum? providerCategory = default, + bool? waitForDeviceCreation = default + ) + { + return Create( + new CreateRequest( + acceptedCapabilities: acceptedCapabilities, + acceptedProviders: acceptedProviders, + automaticallyManageNewDevices: automaticallyManageNewDevices, + customMetadata: customMetadata, + customRedirectFailureUrl: customRedirectFailureUrl, + customRedirectUrl: customRedirectUrl, + customerKey: customerKey, + excludedProviders: excludedProviders, + providerCategory: providerCategory, + waitForDeviceCreation: waitForDeviceCreation + ) + ); + } + + /// + /// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. + /// + /// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. + /// + /// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync("/connect_webviews/create", requestOptions) + ) + .EnsureData("/connect_webviews/create") + .ConnectWebview; + } + + /// + /// Creates a new [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. + /// + /// You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. + /// + /// See also: [Connect Webview Process](https://www.seam.co/docs/core-concepts/connect-webviews/connect-webview-process). + /// + public async Task CreateAsync( + List? acceptedCapabilities = default, + List? acceptedProviders = default, + bool? automaticallyManageNewDevices = default, + object? customMetadata = default, + string? customRedirectFailureUrl = default, + string? customRedirectUrl = default, + string? customerKey = default, + List? excludedProviders = default, + CreateRequest.ProviderCategoryEnum? providerCategory = default, + bool? waitForDeviceCreation = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + acceptedCapabilities: acceptedCapabilities, + acceptedProviders: acceptedProviders, + automaticallyManageNewDevices: automaticallyManageNewDevices, + customMetadata: customMetadata, + customRedirectFailureUrl: customRedirectFailureUrl, + customRedirectUrl: customRedirectUrl, + customerKey: customerKey, + excludedProviders: excludedProviders, + providerCategory: providerCategory, + waitForDeviceCreation: waitForDeviceCreation + ) + ) + ); + } + + /// + /// Request parameters for Delete a Connect Webview. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string connectWebviewId = default) + { + ConnectWebviewId = connectWebviewId; + } + + /// + /// ID of the Connect Webview that you want to delete. + /// + [DataMember(Name = "connect_webview_id", IsRequired = true, EmitDefaultValue = false)] + public string ConnectWebviewId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/connect_webviews/delete", requestOptions); + } + + /// + /// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. + /// + public void Delete(string connectWebviewId = default) + { + Delete(new DeleteRequest(connectWebviewId: connectWebviewId)); + } + + /// + /// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/connect_webviews/delete", requestOptions); + } + + /// + /// Deletes a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. + /// + public async Task DeleteAsync(string connectWebviewId = default) + { + await DeleteAsync(new DeleteRequest(connectWebviewId: connectWebviewId)); + } + + /// + /// Request parameters for Get a Connect Webview. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string connectWebviewId = default) + { + ConnectWebviewId = connectWebviewId; + } + + /// + /// ID of the Connect Webview that you want to get. + /// + [DataMember(Name = "connect_webview_id", IsRequired = true, EmitDefaultValue = false)] + public string ConnectWebviewId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(ConnectWebview connectWebview = default) + { + ConnectWebview = connectWebview; + } + + /// + /// OK + /// + [DataMember(Name = "connect_webview", IsRequired = false, EmitDefaultValue = false)] + public ConnectWebview ConnectWebview { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. + /// + public ConnectWebview Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/connect_webviews/get", requestOptions) + .EnsureData("/connect_webviews/get") + .ConnectWebview; + } + + /// + /// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. + /// + public ConnectWebview Get(string connectWebviewId = default) + { + return Get(new GetRequest(connectWebviewId: connectWebviewId)); + } + + /// + /// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/connect_webviews/get", requestOptions)) + .EnsureData("/connect_webviews/get") + .ConnectWebview; + } + + /// + /// Returns a specified [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. + /// + public async Task GetAsync(string connectWebviewId = default) + { + return (await GetAsync(new GetRequest(connectWebviewId: connectWebviewId))); + } + + /// + /// Request parameters for List Connect Webviews. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + object? customMetadataHas = default, + string? customerKey = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + CustomMetadataHas = customMetadataHas; + CustomerKey = customerKey; + Limit = limit; + PageCursor = pageCursor; + Search = search; + UserIdentifierKey = userIdentifierKey; + } + + /// + /// Custom metadata pairs by which you want to [filter Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. + /// + [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadataHas { get; set; } + + /// + /// Customer key for which you want to list connect webviews. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned Connect Webviews to include all records that satisfy a partial match using `connect_webview_id`, `accepted_providers`, `custom_metadata`, or `customer_key`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// Your user ID for the user by which you want to filter Connect Webviews. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List connectWebviews = default) + { + ConnectWebviews = connectWebviews; + } + + /// + /// OK + /// + [DataMember(Name = "connect_webviews", IsRequired = false, EmitDefaultValue = false)] + public List ConnectWebviews { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/connect_webviews/list", requestOptions) + .EnsureData("/connect_webviews/list") + .ConnectWebviews; + } + + /// + /// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + public List List( + object? customMetadataHas = default, + string? customerKey = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + return List( + new ListRequest( + customMetadataHas: customMetadataHas, + customerKey: customerKey, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentifierKey: userIdentifierKey + ) + ); + } + + /// + /// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/connect_webviews/list", requestOptions)) + .EnsureData("/connect_webviews/list") + .ConnectWebviews; + } + + /// + /// Returns a list of all [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + public async Task> ListAsync( + object? customMetadataHas = default, + string? customerKey = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + return ( + await ListAsync( + new ListRequest( + customMetadataHas: customMetadataHas, + customerKey: customerKey, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentifierKey: userIdentifierKey + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.ConnectWebviews ConnectWebviews => new(this); -} + public partial class SeamClient + { + public Api.ConnectWebviews ConnectWebviews => new(this); + } -public partial interface ISeamClient -{ -public Api.ConnectWebviews ConnectWebviews { get; } -} + public partial interface ISeamClient + { + public Api.ConnectWebviews ConnectWebviews { get; } + } } diff --git a/src/Seam/Api/ConnectedAccounts.cs b/src/Seam/Api/ConnectedAccounts.cs index 10f7d333..3258faa2 100644 --- a/src/Seam/Api/ConnectedAccounts.cs +++ b/src/Seam/Api/ConnectedAccounts.cs @@ -9,605 +9,717 @@ namespace Seam.Api { -public class ConnectedAccounts -{ -private ISeamClient _seam; - -public ConnectedAccounts(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Delete a Connected Account. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string connectedAccountId = default) -{ -ConnectedAccountId = connectedAccountId; -} - -/// -/// ID of the connected account that you want to delete. -/// -[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -/// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. -/// -/// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/connected_accounts/delete", requestOptions); -} - -/// -/// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -/// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. -/// -/// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. -/// -public void Delete(string connectedAccountId = default) -{ -Delete(new DeleteRequest(connectedAccountId: connectedAccountId)); -} - -/// -/// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -/// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. -/// -/// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/connected_accounts/delete", requestOptions); -} - -/// -/// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -/// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. -/// -/// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. -/// -public async Task DeleteAsync(string connectedAccountId = default) -{ -await DeleteAsync(new DeleteRequest(connectedAccountId: connectedAccountId)); -} - -/// -/// Request parameters for Get a Connected Account. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? connectedAccountId = default, string? email = default) -{ -ConnectedAccountId = connectedAccountId; -Email = email; -} - -/// -/// ID of the connected account that you want to get. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Email address associated with the connected account that you want to get. -/// -[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] -public string? Email { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(ConnectedAccount connectedAccount = default) -{ -ConnectedAccount = connectedAccount; -} - -/// -/// OK -/// -[DataMember(Name = "connected_account", IsRequired = false, EmitDefaultValue = false)] -public ConnectedAccount ConnectedAccount { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public ConnectedAccount Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/connected_accounts/get", requestOptions).EnsureData("/connected_accounts/get").ConnectedAccount; -} - -/// -/// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public ConnectedAccount Get(string? connectedAccountId = default, string? email = default) -{ -return Get(new GetRequest(connectedAccountId: connectedAccountId, email: email)); -} - -/// -/// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/connected_accounts/get", requestOptions)).EnsureData("/connected_accounts/get").ConnectedAccount; -} - -/// -/// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public async Task GetAsync(string? connectedAccountId = default, string? email = default) -{ -return (await GetAsync(new GetRequest(connectedAccountId: connectedAccountId, email: email))); -} - -/// -/// Request parameters for List Connected Accounts. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(object? customMetadataHas = default, string? customerKey = default, int? limit = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? userIdentifierKey = default) -{ -CustomMetadataHas = customMetadataHas; -CustomerKey = customerKey; -Limit = limit; -PageCursor = pageCursor; -Search = search; -SpaceId = spaceId; -UserIdentifierKey = userIdentifierKey; -} - -/// -/// Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. -/// -[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadataHas { get; set; } - -/// -/// Customer key by which you want to filter connected accounts. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public int? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned connected accounts to include all records that satisfy a partial match using `connected_account_id`, `account_type`, `customer_key`, `custom_metadata`, `user_identifier.username`, `user_identifier.email` or `user_identifier.phone`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// ID of the space by which you want to filter connected accounts. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -/// -/// Your user ID for the user by which you want to filter connected accounts. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List connectedAccounts = default) -{ -ConnectedAccounts = connectedAccounts; -} - -/// -/// OK -/// -[DataMember(Name = "connected_accounts", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccounts { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/connected_accounts/list", requestOptions).EnsureData("/connected_accounts/list").ConnectedAccounts; -} - -/// -/// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public List List(object? customMetadataHas = default, string? customerKey = default, int? limit = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? userIdentifierKey = default) -{ -return List(new ListRequest(customMetadataHas: customMetadataHas, customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, spaceId: spaceId, userIdentifierKey: userIdentifierKey)); -} - -/// -/// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/connected_accounts/list", requestOptions)).EnsureData("/connected_accounts/list").ConnectedAccounts; -} - -/// -/// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public async Task> ListAsync(object? customMetadataHas = default, string? customerKey = default, int? limit = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? userIdentifierKey = default) -{ -return (await ListAsync(new ListRequest(customMetadataHas: customMetadataHas, customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, spaceId: spaceId, userIdentifierKey: userIdentifierKey))); -} - -/// -/// Request parameters for Sync a Connected Account. -/// -[DataContract(Name = "syncRequest_request")] -public class SyncRequest -{ -[JsonConstructorAttribute] -protected SyncRequest() { } - -public SyncRequest(string connectedAccountId = default) -{ -ConnectedAccountId = connectedAccountId; -} - -/// -/// ID of the connected account that you want to sync. -/// -[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. -/// -public void Sync(SyncRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/connected_accounts/sync", requestOptions); -} - -/// -/// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. -/// -public void Sync(string connectedAccountId = default) -{ -Sync(new SyncRequest(connectedAccountId: connectedAccountId)); -} - -/// -/// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. -/// -public async Task SyncAsync(SyncRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/connected_accounts/sync", requestOptions); -} - -/// -/// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. -/// -public async Task SyncAsync(string connectedAccountId = default) -{ -await SyncAsync(new SyncRequest(connectedAccountId: connectedAccountId)); -} - -/// -/// Request parameters for Update a Connected Account. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(List? acceptedCapabilities = default, bool? automaticallyManageNewDevices = default, string connectedAccountId = default, object? customMetadata = default, string? customerKey = default, string? displayName = default) -{ -AcceptedCapabilities = acceptedCapabilities; -AutomaticallyManageNewDevices = automaticallyManageNewDevices; -ConnectedAccountId = connectedAccountId; -CustomMetadata = customMetadata; -CustomerKey = customerKey; -DisplayName = displayName; -} - -/// -/// List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AcceptedCapabilitiesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "lock")] -Lock = 1, - -[EnumMember(Value = "thermostat")] -Thermostat = 2, - -[EnumMember(Value = "noise_sensor")] -NoiseSensor = 3, - -[EnumMember(Value = "access_control")] -AccessControl = 4, - -[EnumMember(Value = "camera")] -Camera = 5, -} - -/// -/// List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. -/// -[DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] -public List? AcceptedCapabilities { get; set; } - -/// -/// Indicates whether newly-added devices should appear as [managed devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -[DataMember(Name = "automatically_manage_new_devices", IsRequired = false, EmitDefaultValue = false)] -public bool? AutomaticallyManageNewDevices { get; set; } - -/// -/// ID of the connected account that you want to update. -/// -[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://www.seam.co/docs/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadata { get; set; } - -/// -/// The customer key to associate with this connected account. If provided, the connected account and all resources under the connected account will be moved to this customer. May only be provided if the connected account is not already associated with a customer. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Human-readable name for the connected account, shown in the dashboard. For example, `Booking from Airbnb House 1`. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string? DisplayName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/connected_accounts/update", requestOptions); -} - -/// -/// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public void Update(List? acceptedCapabilities = default, bool? automaticallyManageNewDevices = default, string connectedAccountId = default, object? customMetadata = default, string? customerKey = default, string? displayName = default) -{ -Update(new UpdateRequest(acceptedCapabilities: acceptedCapabilities, automaticallyManageNewDevices: automaticallyManageNewDevices, connectedAccountId: connectedAccountId, customMetadata: customMetadata, customerKey: customerKey, displayName: displayName)); -} - -/// -/// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/connected_accounts/update", requestOptions); -} - -/// -/// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). -/// -public async Task UpdateAsync(List? acceptedCapabilities = default, bool? automaticallyManageNewDevices = default, string connectedAccountId = default, object? customMetadata = default, string? customerKey = default, string? displayName = default) -{ -await UpdateAsync(new UpdateRequest(acceptedCapabilities: acceptedCapabilities, automaticallyManageNewDevices: automaticallyManageNewDevices, connectedAccountId: connectedAccountId, customMetadata: customMetadata, customerKey: customerKey, displayName: displayName)); -} -} + public class ConnectedAccounts + { + private ISeamClient _seam; + + public ConnectedAccounts(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Delete a Connected Account. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string connectedAccountId = default) + { + ConnectedAccountId = connectedAccountId; + } + + /// + /// ID of the connected account that you want to delete. + /// + [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + /// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. + /// + /// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/connected_accounts/delete", requestOptions); + } + + /// + /// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + /// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. + /// + /// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. + /// + public void Delete(string connectedAccountId = default) + { + Delete(new DeleteRequest(connectedAccountId: connectedAccountId)); + } + + /// + /// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + /// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. + /// + /// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/connected_accounts/delete", requestOptions); + } + + /// + /// Deletes a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + /// Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. + /// + /// For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. + /// + public async Task DeleteAsync(string connectedAccountId = default) + { + await DeleteAsync(new DeleteRequest(connectedAccountId: connectedAccountId)); + } + + /// + /// Request parameters for Get a Connected Account. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string? connectedAccountId = default, string? email = default) + { + ConnectedAccountId = connectedAccountId; + Email = email; + } + + /// + /// ID of the connected account that you want to get. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Email address associated with the connected account that you want to get. + /// + [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] + public string? Email { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(ConnectedAccount connectedAccount = default) + { + ConnectedAccount = connectedAccount; + } + + /// + /// OK + /// + [DataMember(Name = "connected_account", IsRequired = false, EmitDefaultValue = false)] + public ConnectedAccount ConnectedAccount { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public ConnectedAccount Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/connected_accounts/get", requestOptions) + .EnsureData("/connected_accounts/get") + .ConnectedAccount; + } + + /// + /// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public ConnectedAccount Get(string? connectedAccountId = default, string? email = default) + { + return Get(new GetRequest(connectedAccountId: connectedAccountId, email: email)); + } + + /// + /// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/connected_accounts/get", requestOptions)) + .EnsureData("/connected_accounts/get") + .ConnectedAccount; + } + + /// + /// Returns a specified [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public async Task GetAsync( + string? connectedAccountId = default, + string? email = default + ) + { + return ( + await GetAsync(new GetRequest(connectedAccountId: connectedAccountId, email: email)) + ); + } + + /// + /// Request parameters for List Connected Accounts. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + object? customMetadataHas = default, + string? customerKey = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default, + string? userIdentifierKey = default + ) + { + CustomMetadataHas = customMetadataHas; + CustomerKey = customerKey; + Limit = limit; + PageCursor = pageCursor; + Search = search; + SpaceId = spaceId; + UserIdentifierKey = userIdentifierKey; + } + + /// + /// Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. + /// + [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadataHas { get; set; } + + /// + /// Customer key by which you want to filter connected accounts. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public int? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned connected accounts to include all records that satisfy a partial match using `connected_account_id`, `account_type`, `customer_key`, `custom_metadata`, `user_identifier.username`, `user_identifier.email` or `user_identifier.phone`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// ID of the space by which you want to filter connected accounts. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + /// + /// Your user ID for the user by which you want to filter connected accounts. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List connectedAccounts = default) + { + ConnectedAccounts = connectedAccounts; + } + + /// + /// OK + /// + [DataMember(Name = "connected_accounts", IsRequired = false, EmitDefaultValue = false)] + public List ConnectedAccounts { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/connected_accounts/list", requestOptions) + .EnsureData("/connected_accounts/list") + .ConnectedAccounts; + } + + /// + /// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public List List( + object? customMetadataHas = default, + string? customerKey = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default, + string? userIdentifierKey = default + ) + { + return List( + new ListRequest( + customMetadataHas: customMetadataHas, + customerKey: customerKey, + limit: limit, + pageCursor: pageCursor, + search: search, + spaceId: spaceId, + userIdentifierKey: userIdentifierKey + ) + ); + } + + /// + /// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/connected_accounts/list", requestOptions)) + .EnsureData("/connected_accounts/list") + .ConnectedAccounts; + } + + /// + /// Returns a list of all [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public async Task> ListAsync( + object? customMetadataHas = default, + string? customerKey = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default, + string? userIdentifierKey = default + ) + { + return ( + await ListAsync( + new ListRequest( + customMetadataHas: customMetadataHas, + customerKey: customerKey, + limit: limit, + pageCursor: pageCursor, + search: search, + spaceId: spaceId, + userIdentifierKey: userIdentifierKey + ) + ) + ); + } + + /// + /// Request parameters for Sync a Connected Account. + /// + [DataContract(Name = "syncRequest_request")] + public class SyncRequest + { + [JsonConstructorAttribute] + protected SyncRequest() { } + + public SyncRequest(string connectedAccountId = default) + { + ConnectedAccountId = connectedAccountId; + } + + /// + /// ID of the connected account that you want to sync. + /// + [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. + /// + public void Sync(SyncRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/connected_accounts/sync", requestOptions); + } + + /// + /// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. + /// + public void Sync(string connectedAccountId = default) + { + Sync(new SyncRequest(connectedAccountId: connectedAccountId)); + } + + /// + /// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. + /// + public async Task SyncAsync(SyncRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/connected_accounts/sync", requestOptions); + } + + /// + /// Request a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. + /// + public async Task SyncAsync(string connectedAccountId = default) + { + await SyncAsync(new SyncRequest(connectedAccountId: connectedAccountId)); + } + + /// + /// Request parameters for Update a Connected Account. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + List? acceptedCapabilities = default, + bool? automaticallyManageNewDevices = default, + string connectedAccountId = default, + object? customMetadata = default, + string? customerKey = default, + string? displayName = default + ) + { + AcceptedCapabilities = acceptedCapabilities; + AutomaticallyManageNewDevices = automaticallyManageNewDevices; + ConnectedAccountId = connectedAccountId; + CustomMetadata = customMetadata; + CustomerKey = customerKey; + DisplayName = displayName; + } + + /// + /// List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AcceptedCapabilitiesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "lock")] + Lock = 1, + + [EnumMember(Value = "thermostat")] + Thermostat = 2, + + [EnumMember(Value = "noise_sensor")] + NoiseSensor = 3, + + [EnumMember(Value = "access_control")] + AccessControl = 4, + + [EnumMember(Value = "camera")] + Camera = 5, + } + + /// + /// List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. + /// + [DataMember( + Name = "accepted_capabilities", + IsRequired = false, + EmitDefaultValue = false + )] + public List? AcceptedCapabilities { get; set; } + + /// + /// Indicates whether newly-added devices should appear as [managed devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + [DataMember( + Name = "automatically_manage_new_devices", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AutomaticallyManageNewDevices { get; set; } + + /// + /// ID of the connected account that you want to update. + /// + [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://www.seam.co/docs/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadata { get; set; } + + /// + /// The customer key to associate with this connected account. If provided, the connected account and all resources under the connected account will be moved to this customer. May only be provided if the connected account is not already associated with a customer. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Human-readable name for the connected account, shown in the dashboard. For example, `Booking from Airbnb House 1`. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string? DisplayName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/connected_accounts/update", requestOptions); + } + + /// + /// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public void Update( + List? acceptedCapabilities = default, + bool? automaticallyManageNewDevices = default, + string connectedAccountId = default, + object? customMetadata = default, + string? customerKey = default, + string? displayName = default + ) + { + Update( + new UpdateRequest( + acceptedCapabilities: acceptedCapabilities, + automaticallyManageNewDevices: automaticallyManageNewDevices, + connectedAccountId: connectedAccountId, + customMetadata: customMetadata, + customerKey: customerKey, + displayName: displayName + ) + ); + } + + /// + /// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/connected_accounts/update", requestOptions); + } + + /// + /// Updates a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). + /// + public async Task UpdateAsync( + List? acceptedCapabilities = default, + bool? automaticallyManageNewDevices = default, + string connectedAccountId = default, + object? customMetadata = default, + string? customerKey = default, + string? displayName = default + ) + { + await UpdateAsync( + new UpdateRequest( + acceptedCapabilities: acceptedCapabilities, + automaticallyManageNewDevices: automaticallyManageNewDevices, + connectedAccountId: connectedAccountId, + customMetadata: customMetadata, + customerKey: customerKey, + displayName: displayName + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.ConnectedAccounts ConnectedAccounts => new(this); -} + public partial class SeamClient + { + public Api.ConnectedAccounts ConnectedAccounts => new(this); + } -public partial interface ISeamClient -{ -public Api.ConnectedAccounts ConnectedAccounts { get; } -} + public partial interface ISeamClient + { + public Api.ConnectedAccounts ConnectedAccounts { get; } + } } diff --git a/src/Seam/Api/CredentialsAcs.cs b/src/Seam/Api/CredentialsAcs.cs index 1ee3bc72..8398a1d8 100644 --- a/src/Seam/Api/CredentialsAcs.cs +++ b/src/Seam/Api/CredentialsAcs.cs @@ -9,1138 +9,1418 @@ namespace Seam.Api { -public class CredentialsAcs -{ -private ISeamClient _seam; - -public CredentialsAcs(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Assign a Credential to an ACS User. -/// -[DataContract(Name = "assignRequest_request")] -public class AssignRequest -{ -[JsonConstructorAttribute] -protected AssignRequest() { } - -public AssignRequest(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsCredentialId = acsCredentialId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the credential that you want to assign to an access system user. -/// -[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the access system user to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public void Assign(AssignRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/acs/credentials/assign", requestOptions); -} - -/// -/// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public void Assign(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) -{ -Assign(new AssignRequest(acsCredentialId: acsCredentialId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task AssignAsync(AssignRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/acs/credentials/assign", requestOptions); -} - -/// -/// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task AssignAsync(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await AssignAsync(new AssignRequest(acsCredentialId: acsCredentialId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Create a Credential for an ACS User. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(CreateRequest.AccessMethodEnum accessMethod = default, string? acsSystemId = default, string? acsUserId = default, List? allowedAcsEntranceIds = default, CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? code = default, string? credentialManagerAcsSystemId = default, string? endsAt = default, bool? isMultiPhoneSyncCredential = default, CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, string? startsAt = default, string? userIdentityId = default, CreateRequestVisionlineMetadata? visionlineMetadata = default) -{ -AccessMethod = accessMethod; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -AllowedAcsEntranceIds = allowedAcsEntranceIds; -AssaAbloyVostioMetadata = assaAbloyVostioMetadata; -Code = code; -CredentialManagerAcsSystemId = credentialManagerAcsSystemId; -EndsAt = endsAt; -IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; -SaltoSpaceMetadata = saltoSpaceMetadata; -StartsAt = startsAt; -UserIdentityId = userIdentityId; -VisionlineMetadata = visionlineMetadata; -} - -/// -/// Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AccessMethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "access_method", IsRequired = true, EmitDefaultValue = false)] -public CreateRequest.AccessMethodEnum AccessMethod { get; set; } - -/// -/// ID of the access system to which the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// Set of IDs of the [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for which the new credential grants access. -/// -[DataMember(Name = "allowed_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AllowedAcsEntranceIds { get; set; } - -/// -/// Vostio-specific metadata for the new credential. -/// -[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - -/// -/// Access (PIN) code for the new credential. There may be manufacturer-specific code restrictions. For details, see the applicable [device or system integration guide](https://www.seam.co/docs/device-and-system-integration-guides). -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// ACS system ID of the credential manager for the new credential. -/// -[DataMember(Name = "credential_manager_acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? CredentialManagerAcsSystemId { get; set; } - -/// -/// Date and time at which the validity of the new credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Indicates whether the new credential is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). -/// -[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] -public bool? IsMultiPhoneSyncCredential { get; set; } - -/// -/// Salto Space-specific metadata for the new credential. -/// -[DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } - -/// -/// Date and time at which the validity of the new credential starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// ID of the user identity to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. If the access system contains a user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the access system user. If the access system does not have a corresponding user, one is created. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Visionline-specific metadata for the new credential. -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestVisionlineMetadata? VisionlineMetadata { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestAssaAbloyVostioMetadata_model")] -public class CreateRequestAssaAbloyVostioMetadata -{ -[JsonConstructorAttribute] -protected CreateRequestAssaAbloyVostioMetadata() { } - -public CreateRequestAssaAbloyVostioMetadata(bool? autoJoin = default, bool? joinAllGuestAcsEntrances = default, bool? overrideAllGuestAcsEntrances = default, List? overrideGuestAcsEntranceIds = default) -{ -AutoJoin = autoJoin; -JoinAllGuestAcsEntrances = joinAllGuestAcsEntrances; -OverrideAllGuestAcsEntrances = overrideAllGuestAcsEntrances; -OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; -} - -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -[DataMember(Name = "join_all_guest_acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public bool? JoinAllGuestAcsEntrances { get; set; } - -[DataMember(Name = "override_all_guest_acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public bool? OverrideAllGuestAcsEntrances { get; set; } - -[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? OverrideGuestAcsEntranceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestSaltoSpaceMetadata_model")] -public class CreateRequestSaltoSpaceMetadata -{ -[JsonConstructorAttribute] -protected CreateRequestSaltoSpaceMetadata() { } - -public CreateRequestSaltoSpaceMetadata(bool? assignNewKey = default) -{ -AssignNewKey = assignNewKey; -} - -/// -/// Indicates whether to assign a first, new card to a user. See also [Programming Salto Space Card-based Credentials](https://www.seam.co/docs/device-and-system-integration-guides/salto-proaccess-space-access-system/programming-salto-space-card-based-credentials). -/// -[DataMember(Name = "assign_new_key", IsRequired = false, EmitDefaultValue = false)] -public bool? AssignNewKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestVisionlineMetadata_model")] -public class CreateRequestVisionlineMetadata -{ -[JsonConstructorAttribute] -protected CreateRequestVisionlineMetadata() { } - -public CreateRequestVisionlineMetadata(bool? autoJoin = default, CreateRequestVisionlineMetadata.CardFormatEnum? cardFormat = default, CreateRequestVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, List? joinerAcsCredentialIds = default, bool? mustOverride = default) -{ -AutoJoin = autoJoin; -CardFormat = cardFormat; -CardFunctionType = cardFunctionType; -JoinerAcsCredentialIds = joinerAcsCredentialIds; -Override = mustOverride; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CardFormatEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "TLCode")] -TlCode = 1, - -[EnumMember(Value = "rfid48")] -Rfid48 = 2, -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CardFunctionTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "guest")] -Guest = 1, - -[EnumMember(Value = "staff")] -Staff = 2, -} - -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -[DataMember(Name = "card_format", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestVisionlineMetadata.CardFormatEnum? CardFormat { get; set; } - -[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - -[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] -public List? JoinerAcsCredentialIds { get; set; } - -[DataMember(Name = "override", IsRequired = false, EmitDefaultValue = false)] -public bool? Override { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(AcsCredential acsCredential = default) -{ -AcsCredential = acsCredential; -} - -/// -/// OK -/// -[DataMember(Name = "acs_credential", IsRequired = false, EmitDefaultValue = false)] -public AcsCredential AcsCredential { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. -/// -public AcsCredential Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/acs/credentials/create", requestOptions).EnsureData("/acs/credentials/create").AcsCredential; -} - -/// -/// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. -/// -public AcsCredential Create(CreateRequest.AccessMethodEnum accessMethod = default, string? acsSystemId = default, string? acsUserId = default, List? allowedAcsEntranceIds = default, CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? code = default, string? credentialManagerAcsSystemId = default, string? endsAt = default, bool? isMultiPhoneSyncCredential = default, CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, string? startsAt = default, string? userIdentityId = default, CreateRequestVisionlineMetadata? visionlineMetadata = default) -{ -return Create(new CreateRequest(accessMethod: accessMethod, acsSystemId: acsSystemId, acsUserId: acsUserId, allowedAcsEntranceIds: allowedAcsEntranceIds, assaAbloyVostioMetadata: assaAbloyVostioMetadata, code: code, credentialManagerAcsSystemId: credentialManagerAcsSystemId, endsAt: endsAt, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, saltoSpaceMetadata: saltoSpaceMetadata, startsAt: startsAt, userIdentityId: userIdentityId, visionlineMetadata: visionlineMetadata)); -} - -/// -/// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/acs/credentials/create", requestOptions)).EnsureData("/acs/credentials/create").AcsCredential; -} - -/// -/// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. -/// -public async Task CreateAsync(CreateRequest.AccessMethodEnum accessMethod = default, string? acsSystemId = default, string? acsUserId = default, List? allowedAcsEntranceIds = default, CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? code = default, string? credentialManagerAcsSystemId = default, string? endsAt = default, bool? isMultiPhoneSyncCredential = default, CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, string? startsAt = default, string? userIdentityId = default, CreateRequestVisionlineMetadata? visionlineMetadata = default) -{ -return (await CreateAsync(new CreateRequest(accessMethod: accessMethod, acsSystemId: acsSystemId, acsUserId: acsUserId, allowedAcsEntranceIds: allowedAcsEntranceIds, assaAbloyVostioMetadata: assaAbloyVostioMetadata, code: code, credentialManagerAcsSystemId: credentialManagerAcsSystemId, endsAt: endsAt, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, saltoSpaceMetadata: saltoSpaceMetadata, startsAt: startsAt, userIdentityId: userIdentityId, visionlineMetadata: visionlineMetadata))); -} - -/// -/// Request parameters for Delete a Credential. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string acsCredentialId = default) -{ -AcsCredentialId = acsCredentialId; -} - -/// -/// ID of the credential that you want to delete. -/// -[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/acs/credentials/delete", requestOptions); -} - -/// -/// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public void Delete(string acsCredentialId = default) -{ -Delete(new DeleteRequest(acsCredentialId: acsCredentialId)); -} - -/// -/// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/acs/credentials/delete", requestOptions); -} - -/// -/// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task DeleteAsync(string acsCredentialId = default) -{ -await DeleteAsync(new DeleteRequest(acsCredentialId: acsCredentialId)); -} - -/// -/// Request parameters for Get a Credential. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string acsCredentialId = default) -{ -AcsCredentialId = acsCredentialId; -} - -/// -/// ID of the credential that you want to get. -/// -[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AcsCredential acsCredential = default) -{ -AcsCredential = acsCredential; -} - -/// -/// OK -/// -[DataMember(Name = "acs_credential", IsRequired = false, EmitDefaultValue = false)] -public AcsCredential AcsCredential { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public AcsCredential Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/credentials/get", requestOptions).EnsureData("/acs/credentials/get").AcsCredential; -} - -/// -/// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public AcsCredential Get(string acsCredentialId = default) -{ -return Get(new GetRequest(acsCredentialId: acsCredentialId)); -} - -/// -/// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/credentials/get", requestOptions)).EnsureData("/acs/credentials/get").AcsCredential; -} - -/// -/// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task GetAsync(string acsCredentialId = default) -{ -return (await GetAsync(new GetRequest(acsCredentialId: acsCredentialId))); -} - -/// -/// Request parameters for List Credentials. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? acsSystemId = default, string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentityId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -CreatedBefore = createdBefore; -IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; -Limit = limit; -PageCursor = pageCursor; -Search = search; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system for which you want to retrieve all credentials. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user for which you want to retrieve all credentials. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// Date and time, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, before which events to return were created. -/// -[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedBefore { get; set; } - -/// -/// Indicates whether you want to retrieve only multi-phone sync credentials or non-multi-phone sync credentials. -/// -[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] -public bool? IsMultiPhoneSyncCredential { get; set; } - -/// -/// Number of credentials to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned credentials to include all records that satisfy a partial match using `display_name`, `code`, `card_number`, `acs_user_id` or `acs_credential_id`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// ID of the user identity for which you want to retrieve all credentials. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List acsCredentials = default) -{ -AcsCredentials = acsCredentials; -} - -/// -/// OK -/// -[DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] -public List AcsCredentials { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/credentials/list", requestOptions).EnsureData("/acs/credentials/list").AcsCredentials; -} - -/// -/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public List List(string? acsSystemId = default, string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentityId = default) -{ -return List(new ListRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, createdBefore: createdBefore, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, limit: limit, pageCursor: pageCursor, search: search, userIdentityId: userIdentityId)); -} - -/// -/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/credentials/list", requestOptions)).EnsureData("/acs/credentials/list").AcsCredentials; -} - -/// -/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task> ListAsync(string? acsSystemId = default, string? acsUserId = default, string? createdBefore = default, bool? isMultiPhoneSyncCredential = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentityId = default) -{ -return (await ListAsync(new ListRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, createdBefore: createdBefore, isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, limit: limit, pageCursor: pageCursor, search: search, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for List Accessible Entrances. -/// -[DataContract(Name = "listAccessibleEntrancesRequest_request")] -public class ListAccessibleEntrancesRequest -{ -[JsonConstructorAttribute] -protected ListAccessibleEntrancesRequest() { } - -public ListAccessibleEntrancesRequest(string acsCredentialId = default) -{ -AcsCredentialId = acsCredentialId; -} - -/// -/// ID of the credential for which you want to retrieve all entrances to which the credential grants access. -/// -[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listAccessibleEntrancesResponse_response")] -public class ListAccessibleEntrancesResponse -{ -[JsonConstructorAttribute] -protected ListAccessibleEntrancesResponse() { } - -public ListAccessibleEntrancesResponse(List acsEntrances = default) -{ -AcsEntrances = acsEntrances; -} - -/// -/// OK -/// -[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public List AcsEntrances { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. -/// -public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/credentials/list_accessible_entrances", requestOptions).EnsureData("/acs/credentials/list_accessible_entrances").AcsEntrances; -} - -/// -/// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. -/// -public List ListAccessibleEntrances(string acsCredentialId = default) -{ -return ListAccessibleEntrances(new ListAccessibleEntrancesRequest(acsCredentialId: acsCredentialId)); -} - -/// -/// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. -/// -public async Task> ListAccessibleEntrancesAsync(ListAccessibleEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/credentials/list_accessible_entrances", requestOptions)).EnsureData("/acs/credentials/list_accessible_entrances").AcsEntrances; -} - -/// -/// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. -/// -public async Task> ListAccessibleEntrancesAsync(string acsCredentialId = default) -{ -return (await ListAccessibleEntrancesAsync(new ListAccessibleEntrancesRequest(acsCredentialId: acsCredentialId))); -} - -/// -/// Request parameters for Unassign a Credential from an ACS User. -/// -[DataContract(Name = "unassignRequest_request")] -public class UnassignRequest -{ -[JsonConstructorAttribute] -protected UnassignRequest() { } - -public UnassignRequest(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsCredentialId = acsCredentialId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the credential that you want to unassign from an access system user. -/// -[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the access system user from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public void Unassign(UnassignRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/acs/credentials/unassign", requestOptions); -} - -/// -/// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public void Unassign(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) -{ -Unassign(new UnassignRequest(acsCredentialId: acsCredentialId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task UnassignAsync(UnassignRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/acs/credentials/unassign", requestOptions); -} - -/// -/// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task UnassignAsync(string acsCredentialId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await UnassignAsync(new UnassignRequest(acsCredentialId: acsCredentialId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Update a Credential. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string acsCredentialId = default, string? code = default, string? endsAt = default) -{ -AcsCredentialId = acsCredentialId; -Code = code; -EndsAt = endsAt; -} - -/// -/// ID of the credential that you want to update. -/// -[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// Replacement access (PIN) code for the credential that you want to update. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Replacement date and time at which the validity of the credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after the `starts_at` value that you set when creating the credential. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/acs/credentials/update", requestOptions); -} - -/// -/// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public void Update(string acsCredentialId = default, string? code = default, string? endsAt = default) -{ -Update(new UpdateRequest(acsCredentialId: acsCredentialId, code: code, endsAt: endsAt)); -} - -/// -/// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/acs/credentials/update", requestOptions); -} - -/// -/// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task UpdateAsync(string acsCredentialId = default, string? code = default, string? endsAt = default) -{ -await UpdateAsync(new UpdateRequest(acsCredentialId: acsCredentialId, code: code, endsAt: endsAt)); -} -} + public class CredentialsAcs + { + private ISeamClient _seam; + + public CredentialsAcs(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Assign a Credential to an ACS User. + /// + [DataContract(Name = "assignRequest_request")] + public class AssignRequest + { + [JsonConstructorAttribute] + protected AssignRequest() { } + + public AssignRequest( + string acsCredentialId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsCredentialId = acsCredentialId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the credential that you want to assign to an access system user. + /// + [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the access system user to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public void Assign(AssignRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/acs/credentials/assign", requestOptions); + } + + /// + /// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public void Assign( + string acsCredentialId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + Assign( + new AssignRequest( + acsCredentialId: acsCredentialId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task AssignAsync(AssignRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/acs/credentials/assign", requestOptions); + } + + /// + /// Assigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task AssignAsync( + string acsCredentialId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await AssignAsync( + new AssignRequest( + acsCredentialId: acsCredentialId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for Create a Credential for an ACS User. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + CreateRequest.AccessMethodEnum accessMethod = default, + string? acsSystemId = default, + string? acsUserId = default, + List? allowedAcsEntranceIds = default, + CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, + string? code = default, + string? credentialManagerAcsSystemId = default, + string? endsAt = default, + bool? isMultiPhoneSyncCredential = default, + CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, + string? startsAt = default, + string? userIdentityId = default, + CreateRequestVisionlineMetadata? visionlineMetadata = default + ) + { + AccessMethod = accessMethod; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + AllowedAcsEntranceIds = allowedAcsEntranceIds; + AssaAbloyVostioMetadata = assaAbloyVostioMetadata; + Code = code; + CredentialManagerAcsSystemId = credentialManagerAcsSystemId; + EndsAt = endsAt; + IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; + SaltoSpaceMetadata = saltoSpaceMetadata; + StartsAt = startsAt; + UserIdentityId = userIdentityId; + VisionlineMetadata = visionlineMetadata; + } + + /// + /// Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AccessMethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "access_method", IsRequired = true, EmitDefaultValue = false)] + public CreateRequest.AccessMethodEnum AccessMethod { get; set; } + + /// + /// ID of the access system to which the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// Set of IDs of the [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for which the new credential grants access. + /// + [DataMember( + Name = "allowed_acs_entrance_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? AllowedAcsEntranceIds { get; set; } + + /// + /// Vostio-specific metadata for the new credential. + /// + [DataMember( + Name = "assa_abloy_vostio_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public CreateRequestAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + + /// + /// Access (PIN) code for the new credential. There may be manufacturer-specific code restrictions. For details, see the applicable [device or system integration guide](https://www.seam.co/docs/device-and-system-integration-guides). + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// ACS system ID of the credential manager for the new credential. + /// + [DataMember( + Name = "credential_manager_acs_system_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CredentialManagerAcsSystemId { get; set; } + + /// + /// Date and time at which the validity of the new credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Indicates whether the new credential is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + /// + [DataMember( + Name = "is_multi_phone_sync_credential", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsMultiPhoneSyncCredential { get; set; } + + /// + /// Salto Space-specific metadata for the new credential. + /// + [DataMember( + Name = "salto_space_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public CreateRequestSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } + + /// + /// Date and time at which the validity of the new credential starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// ID of the user identity to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. If the access system contains a user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the access system user. If the access system does not have a corresponding user, one is created. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Visionline-specific metadata for the new credential. + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestVisionlineMetadata? VisionlineMetadata { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestAssaAbloyVostioMetadata_model")] + public class CreateRequestAssaAbloyVostioMetadata + { + [JsonConstructorAttribute] + protected CreateRequestAssaAbloyVostioMetadata() { } + + public CreateRequestAssaAbloyVostioMetadata( + bool? autoJoin = default, + bool? joinAllGuestAcsEntrances = default, + bool? overrideAllGuestAcsEntrances = default, + List? overrideGuestAcsEntranceIds = default + ) + { + AutoJoin = autoJoin; + JoinAllGuestAcsEntrances = joinAllGuestAcsEntrances; + OverrideAllGuestAcsEntrances = overrideAllGuestAcsEntrances; + OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; + } + + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + [DataMember( + Name = "join_all_guest_acs_entrances", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? JoinAllGuestAcsEntrances { get; set; } + + [DataMember( + Name = "override_all_guest_acs_entrances", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OverrideAllGuestAcsEntrances { get; set; } + + [DataMember( + Name = "override_guest_acs_entrance_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? OverrideGuestAcsEntranceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestSaltoSpaceMetadata_model")] + public class CreateRequestSaltoSpaceMetadata + { + [JsonConstructorAttribute] + protected CreateRequestSaltoSpaceMetadata() { } + + public CreateRequestSaltoSpaceMetadata(bool? assignNewKey = default) + { + AssignNewKey = assignNewKey; + } + + /// + /// Indicates whether to assign a first, new card to a user. See also [Programming Salto Space Card-based Credentials](https://www.seam.co/docs/device-and-system-integration-guides/salto-proaccess-space-access-system/programming-salto-space-card-based-credentials). + /// + [DataMember(Name = "assign_new_key", IsRequired = false, EmitDefaultValue = false)] + public bool? AssignNewKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestVisionlineMetadata_model")] + public class CreateRequestVisionlineMetadata + { + [JsonConstructorAttribute] + protected CreateRequestVisionlineMetadata() { } + + public CreateRequestVisionlineMetadata( + bool? autoJoin = default, + CreateRequestVisionlineMetadata.CardFormatEnum? cardFormat = default, + CreateRequestVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, + List? joinerAcsCredentialIds = default, + bool? mustOverride = default + ) + { + AutoJoin = autoJoin; + CardFormat = cardFormat; + CardFunctionType = cardFunctionType; + JoinerAcsCredentialIds = joinerAcsCredentialIds; + Override = mustOverride; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CardFormatEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "TLCode")] + TlCode = 1, + + [EnumMember(Value = "rfid48")] + Rfid48 = 2, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CardFunctionTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "guest")] + Guest = 1, + + [EnumMember(Value = "staff")] + Staff = 2, + } + + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + [DataMember(Name = "card_format", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestVisionlineMetadata.CardFormatEnum? CardFormat { get; set; } + + [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + + [DataMember( + Name = "joiner_acs_credential_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? JoinerAcsCredentialIds { get; set; } + + [DataMember(Name = "override", IsRequired = false, EmitDefaultValue = false)] + public bool? Override { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(AcsCredential acsCredential = default) + { + AcsCredential = acsCredential; + } + + /// + /// OK + /// + [DataMember(Name = "acs_credential", IsRequired = false, EmitDefaultValue = false)] + public AcsCredential AcsCredential { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. + /// + public AcsCredential Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/acs/credentials/create", requestOptions) + .EnsureData("/acs/credentials/create") + .AcsCredential; + } + + /// + /// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. + /// + public AcsCredential Create( + CreateRequest.AccessMethodEnum accessMethod = default, + string? acsSystemId = default, + string? acsUserId = default, + List? allowedAcsEntranceIds = default, + CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, + string? code = default, + string? credentialManagerAcsSystemId = default, + string? endsAt = default, + bool? isMultiPhoneSyncCredential = default, + CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, + string? startsAt = default, + string? userIdentityId = default, + CreateRequestVisionlineMetadata? visionlineMetadata = default + ) + { + return Create( + new CreateRequest( + accessMethod: accessMethod, + acsSystemId: acsSystemId, + acsUserId: acsUserId, + allowedAcsEntranceIds: allowedAcsEntranceIds, + assaAbloyVostioMetadata: assaAbloyVostioMetadata, + code: code, + credentialManagerAcsSystemId: credentialManagerAcsSystemId, + endsAt: endsAt, + isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, + saltoSpaceMetadata: saltoSpaceMetadata, + startsAt: startsAt, + userIdentityId: userIdentityId, + visionlineMetadata: visionlineMetadata + ) + ); + } + + /// + /// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync("/acs/credentials/create", requestOptions) + ) + .EnsureData("/acs/credentials/create") + .AcsCredential; + } + + /// + /// Creates a new [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) for a specified [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://www.seam.co/docs/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. + /// + public async Task CreateAsync( + CreateRequest.AccessMethodEnum accessMethod = default, + string? acsSystemId = default, + string? acsUserId = default, + List? allowedAcsEntranceIds = default, + CreateRequestAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, + string? code = default, + string? credentialManagerAcsSystemId = default, + string? endsAt = default, + bool? isMultiPhoneSyncCredential = default, + CreateRequestSaltoSpaceMetadata? saltoSpaceMetadata = default, + string? startsAt = default, + string? userIdentityId = default, + CreateRequestVisionlineMetadata? visionlineMetadata = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + accessMethod: accessMethod, + acsSystemId: acsSystemId, + acsUserId: acsUserId, + allowedAcsEntranceIds: allowedAcsEntranceIds, + assaAbloyVostioMetadata: assaAbloyVostioMetadata, + code: code, + credentialManagerAcsSystemId: credentialManagerAcsSystemId, + endsAt: endsAt, + isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, + saltoSpaceMetadata: saltoSpaceMetadata, + startsAt: startsAt, + userIdentityId: userIdentityId, + visionlineMetadata: visionlineMetadata + ) + ) + ); + } + + /// + /// Request parameters for Delete a Credential. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string acsCredentialId = default) + { + AcsCredentialId = acsCredentialId; + } + + /// + /// ID of the credential that you want to delete. + /// + [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/acs/credentials/delete", requestOptions); + } + + /// + /// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public void Delete(string acsCredentialId = default) + { + Delete(new DeleteRequest(acsCredentialId: acsCredentialId)); + } + + /// + /// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/acs/credentials/delete", requestOptions); + } + + /// + /// Deletes a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task DeleteAsync(string acsCredentialId = default) + { + await DeleteAsync(new DeleteRequest(acsCredentialId: acsCredentialId)); + } + + /// + /// Request parameters for Get a Credential. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string acsCredentialId = default) + { + AcsCredentialId = acsCredentialId; + } + + /// + /// ID of the credential that you want to get. + /// + [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AcsCredential acsCredential = default) + { + AcsCredential = acsCredential; + } + + /// + /// OK + /// + [DataMember(Name = "acs_credential", IsRequired = false, EmitDefaultValue = false)] + public AcsCredential AcsCredential { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public AcsCredential Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/credentials/get", requestOptions) + .EnsureData("/acs/credentials/get") + .AcsCredential; + } + + /// + /// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public AcsCredential Get(string acsCredentialId = default) + { + return Get(new GetRequest(acsCredentialId: acsCredentialId)); + } + + /// + /// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/credentials/get", requestOptions)) + .EnsureData("/acs/credentials/get") + .AcsCredential; + } + + /// + /// Returns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task GetAsync(string acsCredentialId = default) + { + return (await GetAsync(new GetRequest(acsCredentialId: acsCredentialId))); + } + + /// + /// Request parameters for List Credentials. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? acsSystemId = default, + string? acsUserId = default, + string? createdBefore = default, + bool? isMultiPhoneSyncCredential = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentityId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + CreatedBefore = createdBefore; + IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; + Limit = limit; + PageCursor = pageCursor; + Search = search; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system for which you want to retrieve all credentials. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user for which you want to retrieve all credentials. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// Date and time, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, before which events to return were created. + /// + [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedBefore { get; set; } + + /// + /// Indicates whether you want to retrieve only multi-phone sync credentials or non-multi-phone sync credentials. + /// + [DataMember( + Name = "is_multi_phone_sync_credential", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsMultiPhoneSyncCredential { get; set; } + + /// + /// Number of credentials to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned credentials to include all records that satisfy a partial match using `display_name`, `code`, `card_number`, `acs_user_id` or `acs_credential_id`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// ID of the user identity for which you want to retrieve all credentials. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List acsCredentials = default) + { + AcsCredentials = acsCredentials; + } + + /// + /// OK + /// + [DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] + public List AcsCredentials { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/credentials/list", requestOptions) + .EnsureData("/acs/credentials/list") + .AcsCredentials; + } + + /// + /// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public List List( + string? acsSystemId = default, + string? acsUserId = default, + string? createdBefore = default, + bool? isMultiPhoneSyncCredential = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentityId = default + ) + { + return List( + new ListRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + createdBefore: createdBefore, + isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/credentials/list", requestOptions)) + .EnsureData("/acs/credentials/list") + .AcsCredentials; + } + + /// + /// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task> ListAsync( + string? acsSystemId = default, + string? acsUserId = default, + string? createdBefore = default, + bool? isMultiPhoneSyncCredential = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentityId = default + ) + { + return ( + await ListAsync( + new ListRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + createdBefore: createdBefore, + isMultiPhoneSyncCredential: isMultiPhoneSyncCredential, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for List Accessible Entrances. + /// + [DataContract(Name = "listAccessibleEntrancesRequest_request")] + public class ListAccessibleEntrancesRequest + { + [JsonConstructorAttribute] + protected ListAccessibleEntrancesRequest() { } + + public ListAccessibleEntrancesRequest(string acsCredentialId = default) + { + AcsCredentialId = acsCredentialId; + } + + /// + /// ID of the credential for which you want to retrieve all entrances to which the credential grants access. + /// + [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listAccessibleEntrancesResponse_response")] + public class ListAccessibleEntrancesResponse + { + [JsonConstructorAttribute] + protected ListAccessibleEntrancesResponse() { } + + public ListAccessibleEntrancesResponse(List acsEntrances = default) + { + AcsEntrances = acsEntrances; + } + + /// + /// OK + /// + [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] + public List AcsEntrances { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. + /// + public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get( + "/acs/credentials/list_accessible_entrances", + requestOptions + ) + .EnsureData("/acs/credentials/list_accessible_entrances") + .AcsEntrances; + } + + /// + /// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. + /// + public List ListAccessibleEntrances(string acsCredentialId = default) + { + return ListAccessibleEntrances( + new ListAccessibleEntrancesRequest(acsCredentialId: acsCredentialId) + ); + } + + /// + /// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. + /// + public async Task> ListAccessibleEntrancesAsync( + ListAccessibleEntrancesRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/acs/credentials/list_accessible_entrances", + requestOptions + ) + ) + .EnsureData("/acs/credentials/list_accessible_entrances") + .AcsEntrances; + } + + /// + /// Returns a list of all [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a [credential](https://www.seam.co/docs/api/acs/credentials/object) grants access. + /// + public async Task> ListAccessibleEntrancesAsync( + string acsCredentialId = default + ) + { + return ( + await ListAccessibleEntrancesAsync( + new ListAccessibleEntrancesRequest(acsCredentialId: acsCredentialId) + ) + ); + } + + /// + /// Request parameters for Unassign a Credential from an ACS User. + /// + [DataContract(Name = "unassignRequest_request")] + public class UnassignRequest + { + [JsonConstructorAttribute] + protected UnassignRequest() { } + + public UnassignRequest( + string acsCredentialId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsCredentialId = acsCredentialId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the credential that you want to unassign from an access system user. + /// + [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the access system user from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public void Unassign(UnassignRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/acs/credentials/unassign", requestOptions); + } + + /// + /// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public void Unassign( + string acsCredentialId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + Unassign( + new UnassignRequest( + acsCredentialId: acsCredentialId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task UnassignAsync(UnassignRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/acs/credentials/unassign", requestOptions); + } + + /// + /// Unassigns a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task UnassignAsync( + string acsCredentialId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await UnassignAsync( + new UnassignRequest( + acsCredentialId: acsCredentialId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for Update a Credential. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string acsCredentialId = default, + string? code = default, + string? endsAt = default + ) + { + AcsCredentialId = acsCredentialId; + Code = code; + EndsAt = endsAt; + } + + /// + /// ID of the credential that you want to update. + /// + [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// Replacement access (PIN) code for the credential that you want to update. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Replacement date and time at which the validity of the credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after the `starts_at` value that you set when creating the credential. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/acs/credentials/update", requestOptions); + } + + /// + /// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public void Update( + string acsCredentialId = default, + string? code = default, + string? endsAt = default + ) + { + Update(new UpdateRequest(acsCredentialId: acsCredentialId, code: code, endsAt: endsAt)); + } + + /// + /// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/acs/credentials/update", requestOptions); + } + + /// + /// Updates the code and ends at date and time for a specified [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task UpdateAsync( + string acsCredentialId = default, + string? code = default, + string? endsAt = default + ) + { + await UpdateAsync( + new UpdateRequest(acsCredentialId: acsCredentialId, code: code, endsAt: endsAt) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.CredentialsAcs CredentialsAcs => new(this); -} + public partial class SeamClient + { + public Api.CredentialsAcs CredentialsAcs => new(this); + } -public partial interface ISeamClient -{ -public Api.CredentialsAcs CredentialsAcs { get; } -} + public partial interface ISeamClient + { + public Api.CredentialsAcs CredentialsAcs { get; } + } } diff --git a/src/Seam/Api/Customers.cs b/src/Seam/Api/Customers.cs index c0137b10..f66be24b 100644 --- a/src/Seam/Api/Customers.cs +++ b/src/Seam/Api/Customers.cs @@ -9,4492 +9,5215 @@ namespace Seam.Api { -public class Customers -{ -private ISeamClient _seam; - -public Customers(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create Customer Portal. -/// -[DataContract(Name = "createPortalRequest_request")] -public class CreatePortalRequest -{ -[JsonConstructorAttribute] -protected CreatePortalRequest() { } - -public CreatePortalRequest(CreatePortalRequestCustomerData? customerData = default, List? customerResourcesFilters = default, string? customizationProfileId = default, CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, bool? readOnly = default) -{ -CustomerData = customerData; -CustomerResourcesFilters = customerResourcesFilters; -CustomizationProfileId = customizationProfileId; -DeepLink = deepLink; -ExcludeLocalePicker = excludeLocalePicker; -Features = features; -IsEmbedded = isEmbedded; -LandingPage = landingPage; -Locale = locale; -NavigationMode = navigationMode; -ReadOnly = readOnly; -} - -/// -/// The locale to use for the portal. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum LocaleEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "en-US")] -EnUs = 1, - -[EnumMember(Value = "pt-PT")] -PtPt = 2, - -[EnumMember(Value = "fr-FR")] -FrFr = 3, - -[EnumMember(Value = "it-IT")] -ItIt = 4, - -[EnumMember(Value = "es-ES")] -EsEs = 5, - -[EnumMember(Value = "de-DE")] -DeDe = 6, - -[EnumMember(Value = "nl-NL")] -NlNl = 7, - -[EnumMember(Value = "el-GR")] -ElGr = 8, - -[EnumMember(Value = "pl-PL")] -PlPl = 9, - -[EnumMember(Value = "ru-RU")] -RuRu = 10, -} - -/// -/// Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum NavigationModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "full")] -Full = 1, - -[EnumMember(Value = "restricted")] -Restricted = 2, -} - -[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestCustomerData? CustomerData { get; set; } - -/// -/// Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata. -/// -[DataMember(Name = "customer_resources_filters", IsRequired = false, EmitDefaultValue = false)] -public List? CustomerResourcesFilters { get; set; } - -/// -/// The ID of the customization profile to use for the portal. -/// -[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomizationProfileId { get; set; } - -/// -/// Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. -/// -[DataMember(Name = "deep_link", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestDeepLink? DeepLink { get; set; } - -/// -/// Whether to exclude the option to select a locale within the portal UI. -/// -[DataMember(Name = "exclude_locale_picker", IsRequired = false, EmitDefaultValue = false)] -public bool? ExcludeLocalePicker { get; set; } - -[DataMember(Name = "features", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestFeatures? Features { get; set; } - -/// -/// Whether the portal is embedded in another application. -/// -[DataMember(Name = "is_embedded", IsRequired = false, EmitDefaultValue = false)] -public bool? IsEmbedded { get; set; } - -/// -/// Configuration for the landing page when the portal loads. -/// -[DataMember(Name = "landing_page", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestLandingPage? LandingPage { get; set; } - -/// -/// The locale to use for the portal. -/// -[DataMember(Name = "locale", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequest.LocaleEnum? Locale { get; set; } - -/// -/// Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. -/// -[DataMember(Name = "navigation_mode", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequest.NavigationModeEnum? NavigationMode { get; set; } - -/// -/// Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. -/// -[DataMember(Name = "read_only", IsRequired = false, EmitDefaultValue = false)] -public bool? ReadOnly { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerData_model")] -public class CreatePortalRequestCustomerData -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerData() { } - -public CreatePortalRequestCustomerData(List? accessGrants = default, List? bookings = default, List? buildings = default, List? commonAreas = default, string? customerKey = default, List? facilities = default, List? guests = default, List? listings = default, List? properties = default, List? propertyListings = default, List? reservations = default, List? residents = default, List? rooms = default, List? sites = default, List? spaces = default, List? staffMembers = default, List? tenants = default, List? units = default, List? userIdentities = default, List? users = default) -{ -AccessGrants = accessGrants; -Bookings = bookings; -Buildings = buildings; -CommonAreas = commonAreas; -CustomerKey = customerKey; -Facilities = facilities; -Guests = guests; -Listings = listings; -Properties = properties; -PropertyListings = propertyListings; -Reservations = reservations; -Residents = residents; -Rooms = rooms; -Sites = sites; -Spaces = spaces; -StaffMembers = staffMembers; -Tenants = tenants; -Units = units; -UserIdentities = userIdentities; -Users = users; -} - -/// -/// List of access grants. -/// -[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrants { get; set; } - -/// -/// List of bookings. -/// -[DataMember(Name = "bookings", IsRequired = false, EmitDefaultValue = false)] -public List? Bookings { get; set; } - -/// -/// List of buildings. -/// -[DataMember(Name = "buildings", IsRequired = false, EmitDefaultValue = false)] -public List? Buildings { get; set; } - -/// -/// List of shared common areas. -/// -[DataMember(Name = "common_areas", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreas { get; set; } - -/// -/// Your unique identifier for the customer. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// List of gym or fitness facilities. -/// -[DataMember(Name = "facilities", IsRequired = false, EmitDefaultValue = false)] -public List? Facilities { get; set; } - -/// -/// List of guests. -/// -[DataMember(Name = "guests", IsRequired = false, EmitDefaultValue = false)] -public List? Guests { get; set; } - -/// -/// List of property listings. -/// -[DataMember(Name = "listings", IsRequired = false, EmitDefaultValue = false)] -public List? Listings { get; set; } - -/// -/// List of short-term rental properties. -/// -[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] -public List? Properties { get; set; } - -/// -/// List of property listings. -/// -[DataMember(Name = "property_listings", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyListings { get; set; } - -/// -/// List of reservations. -/// -[DataMember(Name = "reservations", IsRequired = false, EmitDefaultValue = false)] -public List? Reservations { get; set; } - -/// -/// List of residents. -/// -[DataMember(Name = "residents", IsRequired = false, EmitDefaultValue = false)] -public List? Residents { get; set; } - -/// -/// List of hotel or hospitality rooms. -/// -[DataMember(Name = "rooms", IsRequired = false, EmitDefaultValue = false)] -public List? Rooms { get; set; } - -/// -/// List of general sites or areas. -/// -[DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] -public List? Sites { get; set; } - -/// -/// List of general spaces or areas. -/// -[DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] -public List? Spaces { get; set; } - -/// -/// List of staff members. -/// -[DataMember(Name = "staff_members", IsRequired = false, EmitDefaultValue = false)] -public List? StaffMembers { get; set; } - -/// -/// List of tenants. -/// -[DataMember(Name = "tenants", IsRequired = false, EmitDefaultValue = false)] -public List? Tenants { get; set; } - -/// -/// List of multi-family residential units. -/// -[DataMember(Name = "units", IsRequired = false, EmitDefaultValue = false)] -public List? Units { get; set; } - -/// -/// List of user identities. -/// -[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] -public List? UserIdentities { get; set; } - -/// -/// List of users. -/// -[DataMember(Name = "users", IsRequired = false, EmitDefaultValue = false)] -public List? Users { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataAccessGrants_model")] -public class CreatePortalRequestCustomerDataAccessGrants -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataAccessGrants() { } - -public CreatePortalRequestCustomerDataAccessGrants(string? accessGrantKey = default, List? buildingKeys = default, List? commonAreaKeys = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) -{ -AccessGrantKey = accessGrantKey; -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -EndsAt = endsAt; -FacilityKeys = facilityKeys; -GuestKey = guestKey; -ListingKeys = listingKeys; -Name = name; -PreferredCode = preferredCode; -PropertyKeys = propertyKeys; -ResidentKey = residentKey; -RoomKeys = roomKeys; -SpaceKeys = spaceKeys; -StartsAt = startsAt; -TenantKey = tenantKey; -UnitKeys = unitKeys; -UserIdentityKey = userIdentityKey; -UserKey = userKey; -} - -/// -/// Your unique identifier for the access grant. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// Building keys associated with the access grant. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// Common area keys associated with the access grant. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// Ending date and time for the access grant. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Facility keys associated with the access grant. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// Guest key associated with the access grant. -/// -[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] -public string? GuestKey { get; set; } - -/// -/// Listing keys associated with the access grant. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// Your name for this access grant resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Preferred PIN code to use when creating access for this reservation. -/// -[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] -public string? PreferredCode { get; set; } - -/// -/// Property keys associated with the access grant. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// Resident key associated with the access grant. -/// -[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResidentKey { get; set; } - -/// -/// Room keys associated with the access grant. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// Space keys associated with the access grant. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Starting date and time for the access grant. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Tenant key associated with the access grant. -/// -[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] -public string? TenantKey { get; set; } - -/// -/// Unit keys associated with the access grant. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -/// -/// User identity key associated with the access grant. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -/// -/// User key associated with the access grant. -/// -[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataBookings_model")] -public class CreatePortalRequestCustomerDataBookings -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataBookings() { } - -public CreatePortalRequestCustomerDataBookings(string? bookingKey = default, List? buildingKeys = default, List? commonAreaKeys = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) -{ -BookingKey = bookingKey; -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -EndsAt = endsAt; -FacilityKeys = facilityKeys; -GuestKey = guestKey; -ListingKeys = listingKeys; -Name = name; -PreferredCode = preferredCode; -PropertyKeys = propertyKeys; -ResidentKey = residentKey; -RoomKeys = roomKeys; -SpaceKeys = spaceKeys; -StartsAt = startsAt; -TenantKey = tenantKey; -UnitKeys = unitKeys; -UserIdentityKey = userIdentityKey; -UserKey = userKey; -} - -/// -/// Your unique identifier for the booking. -/// -[DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] -public string? BookingKey { get; set; } - -/// -/// Building keys associated with the access grant. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// Common area keys associated with the access grant. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// Ending date and time for the access grant. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Facility keys associated with the access grant. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// Guest key associated with the access grant. -/// -[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] -public string? GuestKey { get; set; } - -/// -/// Listing keys associated with the access grant. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// Your name for this access grant resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Preferred PIN code to use when creating access for this reservation. -/// -[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] -public string? PreferredCode { get; set; } - -/// -/// Property keys associated with the access grant. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// Resident key associated with the access grant. -/// -[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResidentKey { get; set; } - -/// -/// Room keys associated with the access grant. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// Space keys associated with the access grant. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Starting date and time for the access grant. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Tenant key associated with the access grant. -/// -[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] -public string? TenantKey { get; set; } - -/// -/// Unit keys associated with the access grant. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -/// -/// User identity key associated with the access grant. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -/// -/// User key associated with the access grant. -/// -[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataBuildings_model")] -public class CreatePortalRequestCustomerDataBuildings -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataBuildings() { } - -public CreatePortalRequestCustomerDataBuildings(string? buildingKey = default, string? name = default) -{ -BuildingKey = buildingKey; -Name = name; -} - -/// -/// Your unique identifier for the building. -/// -[DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] -public string? BuildingKey { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataCommonAreas_model")] -public class CreatePortalRequestCustomerDataCommonAreas -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataCommonAreas() { } - -public CreatePortalRequestCustomerDataCommonAreas(string? commonAreaKey = default, string? name = default, string? parentSiteKey = default) -{ -CommonAreaKey = commonAreaKey; -Name = name; -ParentSiteKey = parentSiteKey; -} - -/// -/// Your unique identifier for the common area. -/// -[DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] -public string? CommonAreaKey { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] -public string? ParentSiteKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataFacilities_model")] -public class CreatePortalRequestCustomerDataFacilities -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataFacilities() { } - -public CreatePortalRequestCustomerDataFacilities(string? facilityKey = default, string? name = default) -{ -FacilityKey = facilityKey; -Name = name; -} - -/// -/// Your unique identifier for the facility. -/// -[DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] -public string? FacilityKey { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataGuests_model")] -public class CreatePortalRequestCustomerDataGuests -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataGuests() { } - -public CreatePortalRequestCustomerDataGuests(string? emailAddress = default, string? guestKey = default, string? name = default, string? phoneNumber = default) -{ -EmailAddress = emailAddress; -GuestKey = guestKey; -Name = name; -PhoneNumber = phoneNumber; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your unique identifier for the guest. -/// -[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] -public string? GuestKey { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataListings_model")] -public class CreatePortalRequestCustomerDataListings -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataListings() { } - -public CreatePortalRequestCustomerDataListings(string? listingKey = default, string? name = default) -{ -ListingKey = listingKey; -Name = name; -} - -/// -/// Your unique identifier for the listing. -/// -[DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] -public string? ListingKey { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataProperties_model")] -public class CreatePortalRequestCustomerDataProperties -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataProperties() { } - -public CreatePortalRequestCustomerDataProperties(string? name = default, string? propertyKey = default) -{ -Name = name; -PropertyKey = propertyKey; -} - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the property. -/// -[DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] -public string? PropertyKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataPropertyListings_model")] -public class CreatePortalRequestCustomerDataPropertyListings -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataPropertyListings() { } - -public CreatePortalRequestCustomerDataPropertyListings(object? customMetadata = default, string? name = default, string? propertyListingKey = default) -{ -CustomMetadata = customMetadata; -Name = name; -PropertyListingKey = propertyListingKey; -} - -/// -/// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadata { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the property listing. -/// -[DataMember(Name = "property_listing_key", IsRequired = false, EmitDefaultValue = false)] -public string? PropertyListingKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataReservations_model")] -public class CreatePortalRequestCustomerDataReservations -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataReservations() { } - -public CreatePortalRequestCustomerDataReservations(List? buildingKeys = default, List? commonAreaKeys = default, object? customMetadata = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? reservationKey = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) -{ -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -CustomMetadata = customMetadata; -EndsAt = endsAt; -FacilityKeys = facilityKeys; -GuestKey = guestKey; -ListingKeys = listingKeys; -Name = name; -PreferredCode = preferredCode; -PropertyKeys = propertyKeys; -ReservationKey = reservationKey; -ResidentKey = residentKey; -RoomKeys = roomKeys; -SpaceKeys = spaceKeys; -StartsAt = startsAt; -TenantKey = tenantKey; -UnitKeys = unitKeys; -UserIdentityKey = userIdentityKey; -UserKey = userKey; -} - -/// -/// Building keys associated with the access grant. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// Common area keys associated with the access grant. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadata { get; set; } - -/// -/// Ending date and time for the access grant. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Facility keys associated with the access grant. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// Guest key associated with the access grant. -/// -[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] -public string? GuestKey { get; set; } - -/// -/// Listing keys associated with the access grant. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// Your name for this access grant resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Preferred PIN code to use when creating access for this reservation. -/// -[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] -public string? PreferredCode { get; set; } - -/// -/// Property keys associated with the access grant. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// Your unique identifier for the reservation. -/// -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -/// -/// Resident key associated with the access grant. -/// -[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResidentKey { get; set; } - -/// -/// Room keys associated with the access grant. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// Space keys associated with the access grant. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Starting date and time for the access grant. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Tenant key associated with the access grant. -/// -[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] -public string? TenantKey { get; set; } - -/// -/// Unit keys associated with the access grant. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -/// -/// User identity key associated with the access grant. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -/// -/// User key associated with the access grant. -/// -[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataResidents_model")] -public class CreatePortalRequestCustomerDataResidents -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataResidents() { } - -public CreatePortalRequestCustomerDataResidents(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? residentKey = default) -{ -EmailAddress = emailAddress; -Name = name; -PhoneNumber = phoneNumber; -ResidentKey = residentKey; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Your unique identifier for the resident. -/// -[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResidentKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataRooms_model")] -public class CreatePortalRequestCustomerDataRooms -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataRooms() { } - -public CreatePortalRequestCustomerDataRooms(string? name = default, string? parentSiteKey = default, string? roomKey = default) -{ -Name = name; -ParentSiteKey = parentSiteKey; -RoomKey = roomKey; -} - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] -public string? ParentSiteKey { get; set; } - -/// -/// Your unique identifier for the room. -/// -[DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] -public string? RoomKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataSites_model")] -public class CreatePortalRequestCustomerDataSites -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataSites() { } - -public CreatePortalRequestCustomerDataSites(string? name = default, string? siteKey = default) -{ -Name = name; -SiteKey = siteKey; -} - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] -public string? SiteKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataSpaces_model")] -public class CreatePortalRequestCustomerDataSpaces -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataSpaces() { } - -public CreatePortalRequestCustomerDataSpaces(CreatePortalRequestCustomerDataSpacesCustomerData? customerData = default, int? durationMinutes = default, CreatePortalRequestCustomerDataSpacesGeolocation? geolocation = default, string? name = default, string? parentSiteKey = default, string? spaceKey = default) -{ -CustomerData = customerData; -DurationMinutes = durationMinutes; -Geolocation = geolocation; -Name = name; -ParentSiteKey = parentSiteKey; -SpaceKey = spaceKey; -} - -/// -/// Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). -/// -[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestCustomerDataSpacesCustomerData? CustomerData { get; set; } - -/// -/// Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. -/// -[DataMember(Name = "duration_minutes", IsRequired = false, EmitDefaultValue = false)] -public int? DurationMinutes { get; set; } - -/// -/// Geographic coordinates (latitude and longitude) of the space. -/// -[DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestCustomerDataSpacesGeolocation? Geolocation { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] -public string? ParentSiteKey { get; set; } - -/// -/// Your unique identifier for the space. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataSpacesCustomerData_model")] -public class CreatePortalRequestCustomerDataSpacesCustomerData -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataSpacesCustomerData() { } - -public CreatePortalRequestCustomerDataSpacesCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) -{ -Address = address; -DefaultCheckinTime = defaultCheckinTime; -DefaultCheckoutTime = defaultCheckoutTime; -TimeZone = timeZone; -} - -/// -/// Postal address for the space. -/// -[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] -public string? Address { get; set; } - -/// -/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckinTime { get; set; } - -/// -/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckoutTime { get; set; } - -/// -/// IANA time zone for the space, e.g. America/Los_Angeles. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataSpacesGeolocation_model")] -public class CreatePortalRequestCustomerDataSpacesGeolocation -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataSpacesGeolocation() { } - -public CreatePortalRequestCustomerDataSpacesGeolocation(float? latitude = default, float? longitude = default) -{ -Latitude = latitude; -Longitude = longitude; -} - -/// -/// Latitude of the space, in decimal degrees. -/// -[DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] -public float? Latitude { get; set; } - -/// -/// Longitude of the space, in decimal degrees. -/// -[DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] -public float? Longitude { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataStaffMembers_model")] -public class CreatePortalRequestCustomerDataStaffMembers -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataStaffMembers() { } - -public CreatePortalRequestCustomerDataStaffMembers(List? buildingKeys = default, List? commonAreaKeys = default, string? emailAddress = default, List? facilityKeys = default, List? listingKeys = default, string? name = default, string? phoneNumber = default, List? propertyKeys = default, List? propertyListingKeys = default, List? roomKeys = default, List? siteKeys = default, List? spaceKeys = default, string? staffMemberKey = default, List? unitKeys = default) -{ -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -EmailAddress = emailAddress; -FacilityKeys = facilityKeys; -ListingKeys = listingKeys; -Name = name; -PhoneNumber = phoneNumber; -PropertyKeys = propertyKeys; -PropertyListingKeys = propertyListingKeys; -RoomKeys = roomKeys; -SiteKeys = siteKeys; -SpaceKeys = spaceKeys; -StaffMemberKey = staffMemberKey; -UnitKeys = unitKeys; -} - -/// -/// List of unique identifiers for the buildings the staff member is associated with. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// List of unique identifiers for the common areas the staff member is associated with. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// List of unique identifiers for the facilities the staff member is associated with. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// List of unique identifiers for the listings the staff member is associated with. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// List of unique identifiers for the properties the staff member is associated with. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// List of unique identifiers for the property listings the staff member is associated with. -/// -[DataMember(Name = "property_listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyListingKeys { get; set; } - -/// -/// List of unique identifiers for the rooms the staff member is associated with. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// List of unique identifiers for the sites the staff member is associated with. -/// -[DataMember(Name = "site_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SiteKeys { get; set; } - -/// -/// List of unique identifiers for the spaces the staff member is associated with. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Your unique identifier for the staff. -/// -[DataMember(Name = "staff_member_key", IsRequired = false, EmitDefaultValue = false)] -public string? StaffMemberKey { get; set; } - -/// -/// List of unique identifiers for the units the staff member is associated with. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataTenants_model")] -public class CreatePortalRequestCustomerDataTenants -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataTenants() { } - -public CreatePortalRequestCustomerDataTenants(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? tenantKey = default) -{ -EmailAddress = emailAddress; -Name = name; -PhoneNumber = phoneNumber; -TenantKey = tenantKey; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Your unique identifier for the tenant. -/// -[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] -public string? TenantKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataUnits_model")] -public class CreatePortalRequestCustomerDataUnits -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataUnits() { } - -public CreatePortalRequestCustomerDataUnits(string? name = default, string? parentSiteKey = default, string? unitKey = default) -{ -Name = name; -ParentSiteKey = parentSiteKey; -UnitKey = unitKey; -} - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] -public string? ParentSiteKey { get; set; } - -/// -/// Your unique identifier for the unit. -/// -[DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] -public string? UnitKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataUserIdentities_model")] -public class CreatePortalRequestCustomerDataUserIdentities -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataUserIdentities() { } - -public CreatePortalRequestCustomerDataUserIdentities(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? userIdentityKey = default) -{ -EmailAddress = emailAddress; -Name = name; -PhoneNumber = phoneNumber; -UserIdentityKey = userIdentityKey; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Your unique identifier for the user identity. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerDataUsers_model")] -public class CreatePortalRequestCustomerDataUsers -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerDataUsers() { } - -public CreatePortalRequestCustomerDataUsers(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? userKey = default) -{ -EmailAddress = emailAddress; -Name = name; -PhoneNumber = phoneNumber; -UserKey = userKey; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Your unique identifier for the user. -/// -[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestCustomerResourcesFilters_model")] -public class CreatePortalRequestCustomerResourcesFilters -{ -[JsonConstructorAttribute] -protected CreatePortalRequestCustomerResourcesFilters() { } - -public CreatePortalRequestCustomerResourcesFilters(string? field = default, CreatePortalRequestCustomerResourcesFilters.OperationEnum? operation = default, string? value = default) -{ -Field = field; -Operation = operation; -Value = value; -} - -/// -/// The comparison operation. Currently only '=' is supported. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum OperationEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "=")] -empty = 1, -} - -/// -/// The custom_metadata field name to filter on. -/// -[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] -public string? Field { get; set; } - -/// -/// The comparison operation. Currently only '=' is supported. -/// -[DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestCustomerResourcesFilters.OperationEnum? Operation { get; set; } - -/// -/// The value to compare against. -/// -[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] -public string? Value { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestDeepLink_model")] -public class CreatePortalRequestDeepLink -{ -[JsonConstructorAttribute] -protected CreatePortalRequestDeepLink() { } - -public CreatePortalRequestDeepLink(string? resourceId = default, string? resourceKey = default, CreatePortalRequestDeepLink.ResourceTypeEnum? resourceType = default) -{ -ResourceId = resourceId; -ResourceKey = resourceKey; -ResourceType = resourceType; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ResourceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "reservation")] -Reservation = 1, - -[EnumMember(Value = "space")] -Space = 2, - -[EnumMember(Value = "device")] -Device = 3, - -[EnumMember(Value = "acs_entrance")] -AcsEntrance = 4, -} - -[DataMember(Name = "resource_id", IsRequired = false, EmitDefaultValue = false)] -public string? ResourceId { get; set; } - -[DataMember(Name = "resource_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResourceKey { get; set; } - -[DataMember(Name = "resource_type", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestDeepLink.ResourceTypeEnum? ResourceType { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestFeatures_model")] -public class CreatePortalRequestFeatures -{ -[JsonConstructorAttribute] -protected CreatePortalRequestFeatures() { } - -public CreatePortalRequestFeatures(CreatePortalRequestFeaturesConfigure? configure = default, CreatePortalRequestFeaturesConnect? connect = default, CreatePortalRequestFeaturesManage? manage = default, CreatePortalRequestFeaturesManageDevices? manageDevices = default, CreatePortalRequestFeaturesOrganize? organize = default) -{ -Configure = configure; -Connect = connect; -Manage = manage; -ManageDevices = manageDevices; -Organize = organize; -} - -/// -/// Configuration for the configure feature. -/// -[DataMember(Name = "configure", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestFeaturesConfigure? Configure { get; set; } - -/// -/// Configuration for the connect accounts feature. -/// -[DataMember(Name = "connect", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestFeaturesConnect? Connect { get; set; } - -/// -/// Configuration for the manage feature. -/// -[DataMember(Name = "manage", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestFeaturesManage? Manage { get; set; } - -/// -/// Configuration for the manage devices feature. -/// --- -/// deprecated: Use `manage` instead. -/// --- -/// -[DataMember(Name = "manage_devices", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestFeaturesManageDevices? ManageDevices { get; set; } - -/// -/// Configuration for the organize feature. -/// -[DataMember(Name = "organize", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestFeaturesOrganize? Organize { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestFeaturesConfigure_model")] -public class CreatePortalRequestFeaturesConfigure -{ -[JsonConstructorAttribute] -protected CreatePortalRequestFeaturesConfigure() { } - -public CreatePortalRequestFeaturesConfigure(bool? allowAccessAutomationRuleCustomization = default, bool? allowClimateAutomationRuleCustomization = default, bool? allowInstantKeyCustomization = default, bool? exclude = default) -{ -AllowAccessAutomationRuleCustomization = allowAccessAutomationRuleCustomization; -AllowClimateAutomationRuleCustomization = allowClimateAutomationRuleCustomization; -AllowInstantKeyCustomization = allowInstantKeyCustomization; -Exclude = exclude; -} - -/// -/// Indicates whether the customer can customize the access automation rules for their properties. -/// -[DataMember(Name = "allow_access_automation_rule_customization", IsRequired = false, EmitDefaultValue = false)] -public bool? AllowAccessAutomationRuleCustomization { get; set; } - -/// -/// Indicates whether the customer can customize the climate automation rules for their properties. -/// -[DataMember(Name = "allow_climate_automation_rule_customization", IsRequired = false, EmitDefaultValue = false)] -public bool? AllowClimateAutomationRuleCustomization { get; set; } - -/// -/// Indicates whether the customer can customize the Instant Key profile for their properties. -/// -[DataMember(Name = "allow_instant_key_customization", IsRequired = false, EmitDefaultValue = false)] -public bool? AllowInstantKeyCustomization { get; set; } - -/// -/// Whether to exclude this feature from the portal. -/// -[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] -public bool? Exclude { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestFeaturesConnect_model")] -public class CreatePortalRequestFeaturesConnect -{ -[JsonConstructorAttribute] -protected CreatePortalRequestFeaturesConnect() { } - -public CreatePortalRequestFeaturesConnect(List? acceptedProviders = default, bool? exclude = default, List? excludedProviders = default) -{ -AcceptedProviders = acceptedProviders; -Exclude = exclude; -ExcludedProviders = excludedProviders; -} - -/// -/// List of provider keys to allow for the connect feature. These providers will be shown when the customer tries to connect an account. -/// -[DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] -public List? AcceptedProviders { get; set; } - -/// -/// Whether to exclude this feature from the portal. -/// -[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] -public bool? Exclude { get; set; } - -/// -/// List of provider keys to exclude from the connect feature. These providers will not be shown when the customer tries to connect an account. -/// -[DataMember(Name = "excluded_providers", IsRequired = false, EmitDefaultValue = false)] -public List? ExcludedProviders { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestFeaturesManage_model")] -public class CreatePortalRequestFeaturesManage -{ -[JsonConstructorAttribute] -protected CreatePortalRequestFeaturesManage() { } - -public CreatePortalRequestFeaturesManage(CreatePortalRequestFeaturesManageDeviceManagementConfirmation? deviceManagementConfirmation = default, CreatePortalRequestFeaturesManageEvents? events = default, bool? exclude = default, bool? excludeReservationManagement = default, bool? excludeReservationTechnicalDetails = default, bool? excludeStaffManagement = default) -{ -DeviceManagementConfirmation = deviceManagementConfirmation; -Events = events; -Exclude = exclude; -ExcludeReservationManagement = excludeReservationManagement; -ExcludeReservationTechnicalDetails = excludeReservationTechnicalDetails; -ExcludeStaffManagement = excludeStaffManagement; -} - -/// -/// Custom copy for the confirmation modal shown before unmanaged devices are added to a space and begin being managed (and billed). Only takes effect when the MANAGE_DEVICES_CONFIRMATION_MODAL feature flag is enabled for the workspace. Any omitted string falls back to a localized default. -/// -[DataMember(Name = "device_management_confirmation", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestFeaturesManageDeviceManagementConfirmation? DeviceManagementConfirmation { get; set; } - -/// -/// Configuration for event type filtering in the manage feature. -/// -[DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestFeaturesManageEvents? Events { get; set; } - -/// -/// Whether to exclude this feature from the portal. -/// -[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] -public bool? Exclude { get; set; } - -/// -/// Indicates whether the customer can manage reservations for their properties. -/// -[DataMember(Name = "exclude_reservation_management", IsRequired = false, EmitDefaultValue = false)] -public bool? ExcludeReservationManagement { get; set; } - -/// -/// Indicates whether to exclude technical details from reservation views. -/// -[DataMember(Name = "exclude_reservation_technical_details", IsRequired = false, EmitDefaultValue = false)] -public bool? ExcludeReservationTechnicalDetails { get; set; } - -/// -/// Indicates whether the customer can manage staff for their properties. -/// -[DataMember(Name = "exclude_staff_management", IsRequired = false, EmitDefaultValue = false)] -public bool? ExcludeStaffManagement { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestFeaturesManageDeviceManagementConfirmation_model")] -public class CreatePortalRequestFeaturesManageDeviceManagementConfirmation -{ -[JsonConstructorAttribute] -protected CreatePortalRequestFeaturesManageDeviceManagementConfirmation() { } - -public CreatePortalRequestFeaturesManageDeviceManagementConfirmation(string? body = default, string? cancelButtonLabel = default, string? confirmButtonLabel = default, string? title = default) -{ -Body = body; -CancelButtonLabel = cancelButtonLabel; -ConfirmButtonLabel = confirmButtonLabel; -Title = title; -} - -/// -/// Custom body text for the confirmation modal. May include the {count} token, which is replaced with the number of devices that will begin being managed. -/// -[DataMember(Name = "body", IsRequired = false, EmitDefaultValue = false)] -public string? Body { get; set; } - -/// -/// Custom label for the cancel button. -/// -[DataMember(Name = "cancel_button_label", IsRequired = false, EmitDefaultValue = false)] -public string? CancelButtonLabel { get; set; } - -/// -/// Custom label for the confirm button. -/// -[DataMember(Name = "confirm_button_label", IsRequired = false, EmitDefaultValue = false)] -public string? ConfirmButtonLabel { get; set; } - -/// -/// Custom title for the confirmation modal. -/// -[DataMember(Name = "title", IsRequired = false, EmitDefaultValue = false)] -public string? Title { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestFeaturesManageEvents_model")] -public class CreatePortalRequestFeaturesManageEvents -{ -[JsonConstructorAttribute] -protected CreatePortalRequestFeaturesManageEvents() { } - -public CreatePortalRequestFeaturesManageEvents(List? allowedEvents = default, List? defaultEvents = default) -{ -AllowedEvents = allowedEvents; -DefaultEvents = defaultEvents; -} - -/// -/// List of event types to show in the events filter. When set, only these event types will be available. Leave empty to show all events. -/// -[DataMember(Name = "allowed_events", IsRequired = false, EmitDefaultValue = false)] -public List? AllowedEvents { get; set; } - -/// -/// List of event types that are pre-selected in the events filter when the user first loads the events tab. -/// -[DataMember(Name = "default_events", IsRequired = false, EmitDefaultValue = false)] -public List? DefaultEvents { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestFeaturesManageDevices_model")] -public class CreatePortalRequestFeaturesManageDevices -{ -[JsonConstructorAttribute] -protected CreatePortalRequestFeaturesManageDevices() { } - -public CreatePortalRequestFeaturesManageDevices(bool? exclude = default) -{ -Exclude = exclude; -} - -/// -/// Whether to exclude this feature from the portal. -/// -[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] -public bool? Exclude { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestFeaturesOrganize_model")] -public class CreatePortalRequestFeaturesOrganize -{ -[JsonConstructorAttribute] -protected CreatePortalRequestFeaturesOrganize() { } - -public CreatePortalRequestFeaturesOrganize(bool? exclude = default) -{ -Exclude = exclude; -} - -/// -/// Whether to exclude this feature from the portal. -/// -[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] -public bool? Exclude { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestLandingPage_model")] -public class CreatePortalRequestLandingPage -{ -[JsonConstructorAttribute] -protected CreatePortalRequestLandingPage() { } - -public CreatePortalRequestLandingPage(CreatePortalRequestLandingPageManage? manage = default) -{ -Manage = manage; -} - -[DataMember(Name = "manage", IsRequired = false, EmitDefaultValue = false)] -public CreatePortalRequestLandingPageManage? Manage { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalRequestLandingPageManage_model")] -public class CreatePortalRequestLandingPageManage -{ -[JsonConstructorAttribute] -protected CreatePortalRequestLandingPageManage() { } - -public CreatePortalRequestLandingPageManage(string? accessGrantKey = default, string? bookingKey = default, string? buildingKey = default, string? commonAreaKey = default, string? facilityKey = default, string? listingKey = default, string? propertyKey = default, string? propertyListingKey = default, string? reservationKey = default, string? roomKey = default, string? siteKey = default, string? spaceKey = default, string? unitKey = default) -{ -AccessGrantKey = accessGrantKey; -BookingKey = bookingKey; -BuildingKey = buildingKey; -CommonAreaKey = commonAreaKey; -FacilityKey = facilityKey; -ListingKey = listingKey; -PropertyKey = propertyKey; -PropertyListingKey = propertyListingKey; -ReservationKey = reservationKey; -RoomKey = roomKey; -SiteKey = siteKey; -SpaceKey = spaceKey; -UnitKey = unitKey; -} - -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -[DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] -public string? BookingKey { get; set; } - -[DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] -public string? BuildingKey { get; set; } - -[DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] -public string? CommonAreaKey { get; set; } - -[DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] -public string? FacilityKey { get; set; } - -[DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] -public string? ListingKey { get; set; } - -[DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] -public string? PropertyKey { get; set; } - -[DataMember(Name = "property_listing_key", IsRequired = false, EmitDefaultValue = false)] -public string? PropertyListingKey { get; set; } - -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -[DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] -public string? RoomKey { get; set; } - -[DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] -public string? SiteKey { get; set; } - -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -[DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] -public string? UnitKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createPortalResponse_response")] -public class CreatePortalResponse -{ -[JsonConstructorAttribute] -protected CreatePortalResponse() { } - -public CreatePortalResponse(CustomerPortal customerPortal = default) -{ -CustomerPortal = customerPortal; -} - -/// -/// OK -/// -[DataMember(Name = "customer_portal", IsRequired = false, EmitDefaultValue = false)] -public CustomerPortal CustomerPortal { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new customer portal magic link with configurable features. -/// -public CustomerPortal CreatePortal(CreatePortalRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/customers/create_portal", requestOptions).EnsureData("/customers/create_portal").CustomerPortal; -} - -/// -/// Creates a new customer portal magic link with configurable features. -/// -public CustomerPortal CreatePortal(CreatePortalRequestCustomerData? customerData = default, List? customerResourcesFilters = default, string? customizationProfileId = default, CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, bool? readOnly = default) -{ -return CreatePortal(new CreatePortalRequest(customerData: customerData, customerResourcesFilters: customerResourcesFilters, customizationProfileId: customizationProfileId, deepLink: deepLink, excludeLocalePicker: excludeLocalePicker, features: features, isEmbedded: isEmbedded, landingPage: landingPage, locale: locale, navigationMode: navigationMode, readOnly: readOnly)); -} - -/// -/// Creates a new customer portal magic link with configurable features. -/// -public async Task CreatePortalAsync(CreatePortalRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/customers/create_portal", requestOptions)).EnsureData("/customers/create_portal").CustomerPortal; -} - -/// -/// Creates a new customer portal magic link with configurable features. -/// -public async Task CreatePortalAsync(CreatePortalRequestCustomerData? customerData = default, List? customerResourcesFilters = default, string? customizationProfileId = default, CreatePortalRequestDeepLink? deepLink = default, bool? excludeLocalePicker = default, CreatePortalRequestFeatures? features = default, bool? isEmbedded = default, CreatePortalRequestLandingPage? landingPage = default, CreatePortalRequest.LocaleEnum? locale = default, CreatePortalRequest.NavigationModeEnum? navigationMode = default, bool? readOnly = default) -{ -return (await CreatePortalAsync(new CreatePortalRequest(customerData: customerData, customerResourcesFilters: customerResourcesFilters, customizationProfileId: customizationProfileId, deepLink: deepLink, excludeLocalePicker: excludeLocalePicker, features: features, isEmbedded: isEmbedded, landingPage: landingPage, locale: locale, navigationMode: navigationMode, readOnly: readOnly))); -} - -/// -/// Request parameters for Delete Customer Data. -/// -[DataContract(Name = "deleteDataRequest_request")] -public class DeleteDataRequest -{ -[JsonConstructorAttribute] -protected DeleteDataRequest() { } - -public DeleteDataRequest(List? accessGrantKeys = default, List? bookingKeys = default, List? buildingKeys = default, List? commonAreaKeys = default, List? customerKeys = default, List? facilityKeys = default, List? guestKeys = default, List? listingKeys = default, List? propertyKeys = default, List? propertyListingKeys = default, List? reservationKeys = default, List? residentKeys = default, List? roomKeys = default, List? spaceKeys = default, List? staffMemberKeys = default, List? tenantKeys = default, List? unitKeys = default, List? userIdentityKeys = default, List? userKeys = default) -{ -AccessGrantKeys = accessGrantKeys; -BookingKeys = bookingKeys; -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -CustomerKeys = customerKeys; -FacilityKeys = facilityKeys; -GuestKeys = guestKeys; -ListingKeys = listingKeys; -PropertyKeys = propertyKeys; -PropertyListingKeys = propertyListingKeys; -ReservationKeys = reservationKeys; -ResidentKeys = residentKeys; -RoomKeys = roomKeys; -SpaceKeys = spaceKeys; -StaffMemberKeys = staffMemberKeys; -TenantKeys = tenantKeys; -UnitKeys = unitKeys; -UserIdentityKeys = userIdentityKeys; -UserKeys = userKeys; -} - -/// -/// List of access grant keys to delete. -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// List of booking keys to delete. -/// -[DataMember(Name = "booking_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BookingKeys { get; set; } - -/// -/// List of building keys to delete. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// List of common area keys to delete. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// List of customer keys to delete all data for. -/// -[DataMember(Name = "customer_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CustomerKeys { get; set; } - -/// -/// List of facility keys to delete. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// List of guest keys to delete. -/// -[DataMember(Name = "guest_keys", IsRequired = false, EmitDefaultValue = false)] -public List? GuestKeys { get; set; } - -/// -/// List of listing keys to delete. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// List of property keys to delete. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// List of property listing keys to delete. -/// -[DataMember(Name = "property_listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyListingKeys { get; set; } - -/// -/// List of reservation keys to delete. -/// -[DataMember(Name = "reservation_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ReservationKeys { get; set; } - -/// -/// List of resident keys to delete. -/// -[DataMember(Name = "resident_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ResidentKeys { get; set; } - -/// -/// List of room keys to delete. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// List of space keys to delete. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// List of staff member keys to delete. -/// -[DataMember(Name = "staff_member_keys", IsRequired = false, EmitDefaultValue = false)] -public List? StaffMemberKeys { get; set; } - -/// -/// List of tenant keys to delete. -/// -[DataMember(Name = "tenant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? TenantKeys { get; set; } - -/// -/// List of unit keys to delete. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -/// -/// List of user identity keys to delete. -/// -[DataMember(Name = "user_identity_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UserIdentityKeys { get; set; } - -/// -/// List of user keys to delete. -/// -[DataMember(Name = "user_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UserKeys { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes customer data including resources like spaces, properties, rooms, users, etc. -/// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). -/// -public void DeleteData(DeleteDataRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/customers/delete_data", requestOptions); -} - -/// -/// Deletes customer data including resources like spaces, properties, rooms, users, etc. -/// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). -/// -public void DeleteData(List? accessGrantKeys = default, List? bookingKeys = default, List? buildingKeys = default, List? commonAreaKeys = default, List? customerKeys = default, List? facilityKeys = default, List? guestKeys = default, List? listingKeys = default, List? propertyKeys = default, List? propertyListingKeys = default, List? reservationKeys = default, List? residentKeys = default, List? roomKeys = default, List? spaceKeys = default, List? staffMemberKeys = default, List? tenantKeys = default, List? unitKeys = default, List? userIdentityKeys = default, List? userKeys = default) -{ -DeleteData(new DeleteDataRequest(accessGrantKeys: accessGrantKeys, bookingKeys: bookingKeys, buildingKeys: buildingKeys, commonAreaKeys: commonAreaKeys, customerKeys: customerKeys, facilityKeys: facilityKeys, guestKeys: guestKeys, listingKeys: listingKeys, propertyKeys: propertyKeys, propertyListingKeys: propertyListingKeys, reservationKeys: reservationKeys, residentKeys: residentKeys, roomKeys: roomKeys, spaceKeys: spaceKeys, staffMemberKeys: staffMemberKeys, tenantKeys: tenantKeys, unitKeys: unitKeys, userIdentityKeys: userIdentityKeys, userKeys: userKeys)); -} - -/// -/// Deletes customer data including resources like spaces, properties, rooms, users, etc. -/// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). -/// -public async Task DeleteDataAsync(DeleteDataRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/customers/delete_data", requestOptions); -} - -/// -/// Deletes customer data including resources like spaces, properties, rooms, users, etc. -/// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). -/// -public async Task DeleteDataAsync(List? accessGrantKeys = default, List? bookingKeys = default, List? buildingKeys = default, List? commonAreaKeys = default, List? customerKeys = default, List? facilityKeys = default, List? guestKeys = default, List? listingKeys = default, List? propertyKeys = default, List? propertyListingKeys = default, List? reservationKeys = default, List? residentKeys = default, List? roomKeys = default, List? spaceKeys = default, List? staffMemberKeys = default, List? tenantKeys = default, List? unitKeys = default, List? userIdentityKeys = default, List? userKeys = default) -{ -await DeleteDataAsync(new DeleteDataRequest(accessGrantKeys: accessGrantKeys, bookingKeys: bookingKeys, buildingKeys: buildingKeys, commonAreaKeys: commonAreaKeys, customerKeys: customerKeys, facilityKeys: facilityKeys, guestKeys: guestKeys, listingKeys: listingKeys, propertyKeys: propertyKeys, propertyListingKeys: propertyListingKeys, reservationKeys: reservationKeys, residentKeys: residentKeys, roomKeys: roomKeys, spaceKeys: spaceKeys, staffMemberKeys: staffMemberKeys, tenantKeys: tenantKeys, unitKeys: unitKeys, userIdentityKeys: userIdentityKeys, userKeys: userKeys)); -} - -/// -/// Request parameters for Push Customer Data. -/// -[DataContract(Name = "pushDataRequest_request")] -public class PushDataRequest -{ -[JsonConstructorAttribute] -protected PushDataRequest() { } - -public PushDataRequest(List? accessGrants = default, List? bookings = default, List? buildings = default, List? commonAreas = default, string customerKey = default, List? facilities = default, List? guests = default, List? listings = default, List? properties = default, List? propertyListings = default, List? reservations = default, List? residents = default, List? rooms = default, List? sites = default, List? spaces = default, List? staffMembers = default, List? tenants = default, List? units = default, List? userIdentities = default, List? users = default) -{ -AccessGrants = accessGrants; -Bookings = bookings; -Buildings = buildings; -CommonAreas = commonAreas; -CustomerKey = customerKey; -Facilities = facilities; -Guests = guests; -Listings = listings; -Properties = properties; -PropertyListings = propertyListings; -Reservations = reservations; -Residents = residents; -Rooms = rooms; -Sites = sites; -Spaces = spaces; -StaffMembers = staffMembers; -Tenants = tenants; -Units = units; -UserIdentities = userIdentities; -Users = users; -} - -/// -/// List of access grants. -/// -[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrants { get; set; } - -/// -/// List of bookings. -/// -[DataMember(Name = "bookings", IsRequired = false, EmitDefaultValue = false)] -public List? Bookings { get; set; } - -/// -/// List of buildings. -/// -[DataMember(Name = "buildings", IsRequired = false, EmitDefaultValue = false)] -public List? Buildings { get; set; } - -/// -/// List of shared common areas. -/// -[DataMember(Name = "common_areas", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreas { get; set; } - -/// -/// Your unique identifier for the customer. -/// -[DataMember(Name = "customer_key", IsRequired = true, EmitDefaultValue = false)] -public string CustomerKey { get; set; } - -/// -/// List of gym or fitness facilities. -/// -[DataMember(Name = "facilities", IsRequired = false, EmitDefaultValue = false)] -public List? Facilities { get; set; } - -/// -/// List of guests. -/// -[DataMember(Name = "guests", IsRequired = false, EmitDefaultValue = false)] -public List? Guests { get; set; } - -/// -/// List of property listings. -/// -[DataMember(Name = "listings", IsRequired = false, EmitDefaultValue = false)] -public List? Listings { get; set; } - -/// -/// List of short-term rental properties. -/// -[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] -public List? Properties { get; set; } - -/// -/// List of property listings. -/// -[DataMember(Name = "property_listings", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyListings { get; set; } - -/// -/// List of reservations. -/// -[DataMember(Name = "reservations", IsRequired = false, EmitDefaultValue = false)] -public List? Reservations { get; set; } - -/// -/// List of residents. -/// -[DataMember(Name = "residents", IsRequired = false, EmitDefaultValue = false)] -public List? Residents { get; set; } - -/// -/// List of hotel or hospitality rooms. -/// -[DataMember(Name = "rooms", IsRequired = false, EmitDefaultValue = false)] -public List? Rooms { get; set; } - -/// -/// List of general sites or areas. -/// -[DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] -public List? Sites { get; set; } - -/// -/// List of general spaces or areas. -/// -[DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] -public List? Spaces { get; set; } - -/// -/// List of staff members. -/// -[DataMember(Name = "staff_members", IsRequired = false, EmitDefaultValue = false)] -public List? StaffMembers { get; set; } - -/// -/// List of tenants. -/// -[DataMember(Name = "tenants", IsRequired = false, EmitDefaultValue = false)] -public List? Tenants { get; set; } - -/// -/// List of multi-family residential units. -/// -[DataMember(Name = "units", IsRequired = false, EmitDefaultValue = false)] -public List? Units { get; set; } - -/// -/// List of user identities. -/// -[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] -public List? UserIdentities { get; set; } - -/// -/// List of users. -/// -[DataMember(Name = "users", IsRequired = false, EmitDefaultValue = false)] -public List? Users { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestAccessGrants_model")] -public class PushDataRequestAccessGrants -{ -[JsonConstructorAttribute] -protected PushDataRequestAccessGrants() { } - -public PushDataRequestAccessGrants(string? accessGrantKey = default, List? buildingKeys = default, List? commonAreaKeys = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) -{ -AccessGrantKey = accessGrantKey; -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -EndsAt = endsAt; -FacilityKeys = facilityKeys; -GuestKey = guestKey; -ListingKeys = listingKeys; -Name = name; -PreferredCode = preferredCode; -PropertyKeys = propertyKeys; -ResidentKey = residentKey; -RoomKeys = roomKeys; -SpaceKeys = spaceKeys; -StartsAt = startsAt; -TenantKey = tenantKey; -UnitKeys = unitKeys; -UserIdentityKey = userIdentityKey; -UserKey = userKey; -} - -/// -/// Your unique identifier for the access grant. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// Building keys associated with the access grant. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// Common area keys associated with the access grant. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// Ending date and time for the access grant. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Facility keys associated with the access grant. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// Guest key associated with the access grant. -/// -[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] -public string? GuestKey { get; set; } - -/// -/// Listing keys associated with the access grant. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// Your name for this access grant resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Preferred PIN code to use when creating access for this reservation. -/// -[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] -public string? PreferredCode { get; set; } - -/// -/// Property keys associated with the access grant. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// Resident key associated with the access grant. -/// -[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResidentKey { get; set; } - -/// -/// Room keys associated with the access grant. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// Space keys associated with the access grant. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Starting date and time for the access grant. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Tenant key associated with the access grant. -/// -[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] -public string? TenantKey { get; set; } - -/// -/// Unit keys associated with the access grant. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -/// -/// User identity key associated with the access grant. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -/// -/// User key associated with the access grant. -/// -[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestBookings_model")] -public class PushDataRequestBookings -{ -[JsonConstructorAttribute] -protected PushDataRequestBookings() { } - -public PushDataRequestBookings(string? bookingKey = default, List? buildingKeys = default, List? commonAreaKeys = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) -{ -BookingKey = bookingKey; -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -EndsAt = endsAt; -FacilityKeys = facilityKeys; -GuestKey = guestKey; -ListingKeys = listingKeys; -Name = name; -PreferredCode = preferredCode; -PropertyKeys = propertyKeys; -ResidentKey = residentKey; -RoomKeys = roomKeys; -SpaceKeys = spaceKeys; -StartsAt = startsAt; -TenantKey = tenantKey; -UnitKeys = unitKeys; -UserIdentityKey = userIdentityKey; -UserKey = userKey; -} - -/// -/// Your unique identifier for the booking. -/// -[DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] -public string? BookingKey { get; set; } - -/// -/// Building keys associated with the access grant. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// Common area keys associated with the access grant. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// Ending date and time for the access grant. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Facility keys associated with the access grant. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// Guest key associated with the access grant. -/// -[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] -public string? GuestKey { get; set; } - -/// -/// Listing keys associated with the access grant. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// Your name for this access grant resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Preferred PIN code to use when creating access for this reservation. -/// -[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] -public string? PreferredCode { get; set; } - -/// -/// Property keys associated with the access grant. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// Resident key associated with the access grant. -/// -[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResidentKey { get; set; } - -/// -/// Room keys associated with the access grant. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// Space keys associated with the access grant. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Starting date and time for the access grant. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Tenant key associated with the access grant. -/// -[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] -public string? TenantKey { get; set; } - -/// -/// Unit keys associated with the access grant. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -/// -/// User identity key associated with the access grant. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -/// -/// User key associated with the access grant. -/// -[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestBuildings_model")] -public class PushDataRequestBuildings -{ -[JsonConstructorAttribute] -protected PushDataRequestBuildings() { } - -public PushDataRequestBuildings(string? buildingKey = default, string? name = default) -{ -BuildingKey = buildingKey; -Name = name; -} - -/// -/// Your unique identifier for the building. -/// -[DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] -public string? BuildingKey { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestCommonAreas_model")] -public class PushDataRequestCommonAreas -{ -[JsonConstructorAttribute] -protected PushDataRequestCommonAreas() { } - -public PushDataRequestCommonAreas(string? commonAreaKey = default, string? name = default, string? parentSiteKey = default) -{ -CommonAreaKey = commonAreaKey; -Name = name; -ParentSiteKey = parentSiteKey; -} - -/// -/// Your unique identifier for the common area. -/// -[DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] -public string? CommonAreaKey { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] -public string? ParentSiteKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestFacilities_model")] -public class PushDataRequestFacilities -{ -[JsonConstructorAttribute] -protected PushDataRequestFacilities() { } - -public PushDataRequestFacilities(string? facilityKey = default, string? name = default) -{ -FacilityKey = facilityKey; -Name = name; -} - -/// -/// Your unique identifier for the facility. -/// -[DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] -public string? FacilityKey { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestGuests_model")] -public class PushDataRequestGuests -{ -[JsonConstructorAttribute] -protected PushDataRequestGuests() { } - -public PushDataRequestGuests(string? emailAddress = default, string? guestKey = default, string? name = default, string? phoneNumber = default) -{ -EmailAddress = emailAddress; -GuestKey = guestKey; -Name = name; -PhoneNumber = phoneNumber; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your unique identifier for the guest. -/// -[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] -public string? GuestKey { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestListings_model")] -public class PushDataRequestListings -{ -[JsonConstructorAttribute] -protected PushDataRequestListings() { } - -public PushDataRequestListings(string? listingKey = default, string? name = default) -{ -ListingKey = listingKey; -Name = name; -} - -/// -/// Your unique identifier for the listing. -/// -[DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] -public string? ListingKey { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestProperties_model")] -public class PushDataRequestProperties -{ -[JsonConstructorAttribute] -protected PushDataRequestProperties() { } - -public PushDataRequestProperties(string? name = default, string? propertyKey = default) -{ -Name = name; -PropertyKey = propertyKey; -} - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the property. -/// -[DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] -public string? PropertyKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestPropertyListings_model")] -public class PushDataRequestPropertyListings -{ -[JsonConstructorAttribute] -protected PushDataRequestPropertyListings() { } - -public PushDataRequestPropertyListings(object? customMetadata = default, string? name = default, string? propertyListingKey = default) -{ -CustomMetadata = customMetadata; -Name = name; -PropertyListingKey = propertyListingKey; -} - -/// -/// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadata { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the property listing. -/// -[DataMember(Name = "property_listing_key", IsRequired = false, EmitDefaultValue = false)] -public string? PropertyListingKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestReservations_model")] -public class PushDataRequestReservations -{ -[JsonConstructorAttribute] -protected PushDataRequestReservations() { } - -public PushDataRequestReservations(List? buildingKeys = default, List? commonAreaKeys = default, object? customMetadata = default, string? endsAt = default, List? facilityKeys = default, string? guestKey = default, List? listingKeys = default, string? name = default, string? preferredCode = default, List? propertyKeys = default, string? reservationKey = default, string? residentKey = default, List? roomKeys = default, List? spaceKeys = default, string? startsAt = default, string? tenantKey = default, List? unitKeys = default, string? userIdentityKey = default, string? userKey = default) -{ -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -CustomMetadata = customMetadata; -EndsAt = endsAt; -FacilityKeys = facilityKeys; -GuestKey = guestKey; -ListingKeys = listingKeys; -Name = name; -PreferredCode = preferredCode; -PropertyKeys = propertyKeys; -ReservationKey = reservationKey; -ResidentKey = residentKey; -RoomKeys = roomKeys; -SpaceKeys = spaceKeys; -StartsAt = startsAt; -TenantKey = tenantKey; -UnitKeys = unitKeys; -UserIdentityKey = userIdentityKey; -UserKey = userKey; -} - -/// -/// Building keys associated with the access grant. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// Common area keys associated with the access grant. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadata { get; set; } - -/// -/// Ending date and time for the access grant. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Facility keys associated with the access grant. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// Guest key associated with the access grant. -/// -[DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] -public string? GuestKey { get; set; } - -/// -/// Listing keys associated with the access grant. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// Your name for this access grant resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Preferred PIN code to use when creating access for this reservation. -/// -[DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] -public string? PreferredCode { get; set; } - -/// -/// Property keys associated with the access grant. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// Your unique identifier for the reservation. -/// -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -/// -/// Resident key associated with the access grant. -/// -[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResidentKey { get; set; } - -/// -/// Room keys associated with the access grant. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// Space keys associated with the access grant. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Starting date and time for the access grant. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Tenant key associated with the access grant. -/// -[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] -public string? TenantKey { get; set; } - -/// -/// Unit keys associated with the access grant. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -/// -/// User identity key associated with the access grant. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -/// -/// User key associated with the access grant. -/// -[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestResidents_model")] -public class PushDataRequestResidents -{ -[JsonConstructorAttribute] -protected PushDataRequestResidents() { } - -public PushDataRequestResidents(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? residentKey = default) -{ -EmailAddress = emailAddress; -Name = name; -PhoneNumber = phoneNumber; -ResidentKey = residentKey; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Your unique identifier for the resident. -/// -[DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] -public string? ResidentKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestRooms_model")] -public class PushDataRequestRooms -{ -[JsonConstructorAttribute] -protected PushDataRequestRooms() { } - -public PushDataRequestRooms(string? name = default, string? parentSiteKey = default, string? roomKey = default) -{ -Name = name; -ParentSiteKey = parentSiteKey; -RoomKey = roomKey; -} - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] -public string? ParentSiteKey { get; set; } - -/// -/// Your unique identifier for the room. -/// -[DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] -public string? RoomKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestSites_model")] -public class PushDataRequestSites -{ -[JsonConstructorAttribute] -protected PushDataRequestSites() { } - -public PushDataRequestSites(string? name = default, string? siteKey = default) -{ -Name = name; -SiteKey = siteKey; -} - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] -public string? SiteKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestSpaces_model")] -public class PushDataRequestSpaces -{ -[JsonConstructorAttribute] -protected PushDataRequestSpaces() { } - -public PushDataRequestSpaces(PushDataRequestSpacesCustomerData? customerData = default, int? durationMinutes = default, PushDataRequestSpacesGeolocation? geolocation = default, string? name = default, string? parentSiteKey = default, string? spaceKey = default) -{ -CustomerData = customerData; -DurationMinutes = durationMinutes; -Geolocation = geolocation; -Name = name; -ParentSiteKey = parentSiteKey; -SpaceKey = spaceKey; -} - -/// -/// Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). -/// -[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] -public PushDataRequestSpacesCustomerData? CustomerData { get; set; } - -/// -/// Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. -/// -[DataMember(Name = "duration_minutes", IsRequired = false, EmitDefaultValue = false)] -public int? DurationMinutes { get; set; } - -/// -/// Geographic coordinates (latitude and longitude) of the space. -/// -[DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] -public PushDataRequestSpacesGeolocation? Geolocation { get; set; } - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] -public string? ParentSiteKey { get; set; } - -/// -/// Your unique identifier for the space. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestSpacesCustomerData_model")] -public class PushDataRequestSpacesCustomerData -{ -[JsonConstructorAttribute] -protected PushDataRequestSpacesCustomerData() { } - -public PushDataRequestSpacesCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) -{ -Address = address; -DefaultCheckinTime = defaultCheckinTime; -DefaultCheckoutTime = defaultCheckoutTime; -TimeZone = timeZone; -} - -/// -/// Postal address for the space. -/// -[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] -public string? Address { get; set; } - -/// -/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckinTime { get; set; } - -/// -/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckoutTime { get; set; } - -/// -/// IANA time zone for the space, e.g. America/Los_Angeles. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestSpacesGeolocation_model")] -public class PushDataRequestSpacesGeolocation -{ -[JsonConstructorAttribute] -protected PushDataRequestSpacesGeolocation() { } - -public PushDataRequestSpacesGeolocation(float? latitude = default, float? longitude = default) -{ -Latitude = latitude; -Longitude = longitude; -} - -/// -/// Latitude of the space, in decimal degrees. -/// -[DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] -public float? Latitude { get; set; } - -/// -/// Longitude of the space, in decimal degrees. -/// -[DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] -public float? Longitude { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestStaffMembers_model")] -public class PushDataRequestStaffMembers -{ -[JsonConstructorAttribute] -protected PushDataRequestStaffMembers() { } - -public PushDataRequestStaffMembers(List? buildingKeys = default, List? commonAreaKeys = default, string? emailAddress = default, List? facilityKeys = default, List? listingKeys = default, string? name = default, string? phoneNumber = default, List? propertyKeys = default, List? propertyListingKeys = default, List? roomKeys = default, List? siteKeys = default, List? spaceKeys = default, string? staffMemberKey = default, List? unitKeys = default) -{ -BuildingKeys = buildingKeys; -CommonAreaKeys = commonAreaKeys; -EmailAddress = emailAddress; -FacilityKeys = facilityKeys; -ListingKeys = listingKeys; -Name = name; -PhoneNumber = phoneNumber; -PropertyKeys = propertyKeys; -PropertyListingKeys = propertyListingKeys; -RoomKeys = roomKeys; -SiteKeys = siteKeys; -SpaceKeys = spaceKeys; -StaffMemberKey = staffMemberKey; -UnitKeys = unitKeys; -} - -/// -/// List of unique identifiers for the buildings the staff member is associated with. -/// -[DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] -public List? BuildingKeys { get; set; } - -/// -/// List of unique identifiers for the common areas the staff member is associated with. -/// -[DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAreaKeys { get; set; } - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// List of unique identifiers for the facilities the staff member is associated with. -/// -[DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] -public List? FacilityKeys { get; set; } - -/// -/// List of unique identifiers for the listings the staff member is associated with. -/// -[DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? ListingKeys { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// List of unique identifiers for the properties the staff member is associated with. -/// -[DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyKeys { get; set; } - -/// -/// List of unique identifiers for the property listings the staff member is associated with. -/// -[DataMember(Name = "property_listing_keys", IsRequired = false, EmitDefaultValue = false)] -public List? PropertyListingKeys { get; set; } - -/// -/// List of unique identifiers for the rooms the staff member is associated with. -/// -[DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] -public List? RoomKeys { get; set; } - -/// -/// List of unique identifiers for the sites the staff member is associated with. -/// -[DataMember(Name = "site_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SiteKeys { get; set; } - -/// -/// List of unique identifiers for the spaces the staff member is associated with. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -/// -/// Your unique identifier for the staff. -/// -[DataMember(Name = "staff_member_key", IsRequired = false, EmitDefaultValue = false)] -public string? StaffMemberKey { get; set; } - -/// -/// List of unique identifiers for the units the staff member is associated with. -/// -[DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] -public List? UnitKeys { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestTenants_model")] -public class PushDataRequestTenants -{ -[JsonConstructorAttribute] -protected PushDataRequestTenants() { } - -public PushDataRequestTenants(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? tenantKey = default) -{ -EmailAddress = emailAddress; -Name = name; -PhoneNumber = phoneNumber; -TenantKey = tenantKey; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Your unique identifier for the tenant. -/// -[DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] -public string? TenantKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestUnits_model")] -public class PushDataRequestUnits -{ -[JsonConstructorAttribute] -protected PushDataRequestUnits() { } - -public PushDataRequestUnits(string? name = default, string? parentSiteKey = default, string? unitKey = default) -{ -Name = name; -ParentSiteKey = parentSiteKey; -UnitKey = unitKey; -} - -/// -/// Your display name for this location resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Your unique identifier for the site. -/// -[DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] -public string? ParentSiteKey { get; set; } - -/// -/// Your unique identifier for the unit. -/// -[DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] -public string? UnitKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestUserIdentities_model")] -public class PushDataRequestUserIdentities -{ -[JsonConstructorAttribute] -protected PushDataRequestUserIdentities() { } - -public PushDataRequestUserIdentities(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? userIdentityKey = default) -{ -EmailAddress = emailAddress; -Name = name; -PhoneNumber = phoneNumber; -UserIdentityKey = userIdentityKey; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Your unique identifier for the user identity. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "pushDataRequestUsers_model")] -public class PushDataRequestUsers -{ -[JsonConstructorAttribute] -protected PushDataRequestUsers() { } - -public PushDataRequestUsers(string? emailAddress = default, string? name = default, string? phoneNumber = default, string? userKey = default) -{ -EmailAddress = emailAddress; -Name = name; -PhoneNumber = phoneNumber; -UserKey = userKey; -} - -/// -/// Email address associated with the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Your display name for this user identity resource. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Phone number associated with the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Your unique identifier for the user. -/// -[DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Pushes customer data including resources like spaces, properties, rooms, users, etc. -/// -public void PushData(PushDataRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/customers/push_data", requestOptions); -} - -/// -/// Pushes customer data including resources like spaces, properties, rooms, users, etc. -/// -public void PushData(List? accessGrants = default, List? bookings = default, List? buildings = default, List? commonAreas = default, string customerKey = default, List? facilities = default, List? guests = default, List? listings = default, List? properties = default, List? propertyListings = default, List? reservations = default, List? residents = default, List? rooms = default, List? sites = default, List? spaces = default, List? staffMembers = default, List? tenants = default, List? units = default, List? userIdentities = default, List? users = default) -{ -PushData(new PushDataRequest(accessGrants: accessGrants, bookings: bookings, buildings: buildings, commonAreas: commonAreas, customerKey: customerKey, facilities: facilities, guests: guests, listings: listings, properties: properties, propertyListings: propertyListings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staffMembers: staffMembers, tenants: tenants, units: units, userIdentities: userIdentities, users: users)); -} - -/// -/// Pushes customer data including resources like spaces, properties, rooms, users, etc. -/// -public async Task PushDataAsync(PushDataRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/customers/push_data", requestOptions); -} - -/// -/// Pushes customer data including resources like spaces, properties, rooms, users, etc. -/// -public async Task PushDataAsync(List? accessGrants = default, List? bookings = default, List? buildings = default, List? commonAreas = default, string customerKey = default, List? facilities = default, List? guests = default, List? listings = default, List? properties = default, List? propertyListings = default, List? reservations = default, List? residents = default, List? rooms = default, List? sites = default, List? spaces = default, List? staffMembers = default, List? tenants = default, List? units = default, List? userIdentities = default, List? users = default) -{ -await PushDataAsync(new PushDataRequest(accessGrants: accessGrants, bookings: bookings, buildings: buildings, commonAreas: commonAreas, customerKey: customerKey, facilities: facilities, guests: guests, listings: listings, properties: properties, propertyListings: propertyListings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staffMembers: staffMembers, tenants: tenants, units: units, userIdentities: userIdentities, users: users)); -} -} + public class Customers + { + private ISeamClient _seam; + + public Customers(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create Customer Portal. + /// + [DataContract(Name = "createPortalRequest_request")] + public class CreatePortalRequest + { + [JsonConstructorAttribute] + protected CreatePortalRequest() { } + + public CreatePortalRequest( + CreatePortalRequestCustomerData? customerData = default, + List? customerResourcesFilters = + default, + string? customizationProfileId = default, + CreatePortalRequestDeepLink? deepLink = default, + bool? excludeLocalePicker = default, + CreatePortalRequestFeatures? features = default, + bool? isEmbedded = default, + CreatePortalRequestLandingPage? landingPage = default, + CreatePortalRequest.LocaleEnum? locale = default, + CreatePortalRequest.NavigationModeEnum? navigationMode = default, + bool? readOnly = default + ) + { + CustomerData = customerData; + CustomerResourcesFilters = customerResourcesFilters; + CustomizationProfileId = customizationProfileId; + DeepLink = deepLink; + ExcludeLocalePicker = excludeLocalePicker; + Features = features; + IsEmbedded = isEmbedded; + LandingPage = landingPage; + Locale = locale; + NavigationMode = navigationMode; + ReadOnly = readOnly; + } + + /// + /// The locale to use for the portal. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum LocaleEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "en-US")] + EnUs = 1, + + [EnumMember(Value = "pt-PT")] + PtPt = 2, + + [EnumMember(Value = "fr-FR")] + FrFr = 3, + + [EnumMember(Value = "it-IT")] + ItIt = 4, + + [EnumMember(Value = "es-ES")] + EsEs = 5, + + [EnumMember(Value = "de-DE")] + DeDe = 6, + + [EnumMember(Value = "nl-NL")] + NlNl = 7, + + [EnumMember(Value = "el-GR")] + ElGr = 8, + + [EnumMember(Value = "pl-PL")] + PlPl = 9, + + [EnumMember(Value = "ru-RU")] + RuRu = 10, + } + + /// + /// Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum NavigationModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "full")] + Full = 1, + + [EnumMember(Value = "restricted")] + Restricted = 2, + } + + [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestCustomerData? CustomerData { get; set; } + + /// + /// Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata. + /// + [DataMember( + Name = "customer_resources_filters", + IsRequired = false, + EmitDefaultValue = false + )] + public List? CustomerResourcesFilters { get; set; } + + /// + /// The ID of the customization profile to use for the portal. + /// + [DataMember( + Name = "customization_profile_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomizationProfileId { get; set; } + + /// + /// Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. + /// + [DataMember(Name = "deep_link", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestDeepLink? DeepLink { get; set; } + + /// + /// Whether to exclude the option to select a locale within the portal UI. + /// + [DataMember( + Name = "exclude_locale_picker", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? ExcludeLocalePicker { get; set; } + + [DataMember(Name = "features", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestFeatures? Features { get; set; } + + /// + /// Whether the portal is embedded in another application. + /// + [DataMember(Name = "is_embedded", IsRequired = false, EmitDefaultValue = false)] + public bool? IsEmbedded { get; set; } + + /// + /// Configuration for the landing page when the portal loads. + /// + [DataMember(Name = "landing_page", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestLandingPage? LandingPage { get; set; } + + /// + /// The locale to use for the portal. + /// + [DataMember(Name = "locale", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequest.LocaleEnum? Locale { get; set; } + + /// + /// Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. + /// + [DataMember(Name = "navigation_mode", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequest.NavigationModeEnum? NavigationMode { get; set; } + + /// + /// Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. + /// + [DataMember(Name = "read_only", IsRequired = false, EmitDefaultValue = false)] + public bool? ReadOnly { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerData_model")] + public class CreatePortalRequestCustomerData + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerData() { } + + public CreatePortalRequestCustomerData( + List? accessGrants = default, + List? bookings = default, + List? buildings = default, + List? commonAreas = default, + string? customerKey = default, + List? facilities = default, + List? guests = default, + List? listings = default, + List? properties = default, + List? propertyListings = default, + List? reservations = default, + List? residents = default, + List? rooms = default, + List? sites = default, + List? spaces = default, + List? staffMembers = default, + List? tenants = default, + List? units = default, + List? userIdentities = default, + List? users = default + ) + { + AccessGrants = accessGrants; + Bookings = bookings; + Buildings = buildings; + CommonAreas = commonAreas; + CustomerKey = customerKey; + Facilities = facilities; + Guests = guests; + Listings = listings; + Properties = properties; + PropertyListings = propertyListings; + Reservations = reservations; + Residents = residents; + Rooms = rooms; + Sites = sites; + Spaces = spaces; + StaffMembers = staffMembers; + Tenants = tenants; + Units = units; + UserIdentities = userIdentities; + Users = users; + } + + /// + /// List of access grants. + /// + [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrants { get; set; } + + /// + /// List of bookings. + /// + [DataMember(Name = "bookings", IsRequired = false, EmitDefaultValue = false)] + public List? Bookings { get; set; } + + /// + /// List of buildings. + /// + [DataMember(Name = "buildings", IsRequired = false, EmitDefaultValue = false)] + public List? Buildings { get; set; } + + /// + /// List of shared common areas. + /// + [DataMember(Name = "common_areas", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreas { get; set; } + + /// + /// Your unique identifier for the customer. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// List of gym or fitness facilities. + /// + [DataMember(Name = "facilities", IsRequired = false, EmitDefaultValue = false)] + public List? Facilities { get; set; } + + /// + /// List of guests. + /// + [DataMember(Name = "guests", IsRequired = false, EmitDefaultValue = false)] + public List? Guests { get; set; } + + /// + /// List of property listings. + /// + [DataMember(Name = "listings", IsRequired = false, EmitDefaultValue = false)] + public List? Listings { get; set; } + + /// + /// List of short-term rental properties. + /// + [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] + public List? Properties { get; set; } + + /// + /// List of property listings. + /// + [DataMember(Name = "property_listings", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyListings { get; set; } + + /// + /// List of reservations. + /// + [DataMember(Name = "reservations", IsRequired = false, EmitDefaultValue = false)] + public List? Reservations { get; set; } + + /// + /// List of residents. + /// + [DataMember(Name = "residents", IsRequired = false, EmitDefaultValue = false)] + public List? Residents { get; set; } + + /// + /// List of hotel or hospitality rooms. + /// + [DataMember(Name = "rooms", IsRequired = false, EmitDefaultValue = false)] + public List? Rooms { get; set; } + + /// + /// List of general sites or areas. + /// + [DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] + public List? Sites { get; set; } + + /// + /// List of general spaces or areas. + /// + [DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] + public List? Spaces { get; set; } + + /// + /// List of staff members. + /// + [DataMember(Name = "staff_members", IsRequired = false, EmitDefaultValue = false)] + public List? StaffMembers { get; set; } + + /// + /// List of tenants. + /// + [DataMember(Name = "tenants", IsRequired = false, EmitDefaultValue = false)] + public List? Tenants { get; set; } + + /// + /// List of multi-family residential units. + /// + [DataMember(Name = "units", IsRequired = false, EmitDefaultValue = false)] + public List? Units { get; set; } + + /// + /// List of user identities. + /// + [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] + public List? UserIdentities { get; set; } + + /// + /// List of users. + /// + [DataMember(Name = "users", IsRequired = false, EmitDefaultValue = false)] + public List? Users { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataAccessGrants_model")] + public class CreatePortalRequestCustomerDataAccessGrants + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataAccessGrants() { } + + public CreatePortalRequestCustomerDataAccessGrants( + string? accessGrantKey = default, + List? buildingKeys = default, + List? commonAreaKeys = default, + string? endsAt = default, + List? facilityKeys = default, + string? guestKey = default, + List? listingKeys = default, + string? name = default, + string? preferredCode = default, + List? propertyKeys = default, + string? residentKey = default, + List? roomKeys = default, + List? spaceKeys = default, + string? startsAt = default, + string? tenantKey = default, + List? unitKeys = default, + string? userIdentityKey = default, + string? userKey = default + ) + { + AccessGrantKey = accessGrantKey; + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + EndsAt = endsAt; + FacilityKeys = facilityKeys; + GuestKey = guestKey; + ListingKeys = listingKeys; + Name = name; + PreferredCode = preferredCode; + PropertyKeys = propertyKeys; + ResidentKey = residentKey; + RoomKeys = roomKeys; + SpaceKeys = spaceKeys; + StartsAt = startsAt; + TenantKey = tenantKey; + UnitKeys = unitKeys; + UserIdentityKey = userIdentityKey; + UserKey = userKey; + } + + /// + /// Your unique identifier for the access grant. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// Building keys associated with the access grant. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// Common area keys associated with the access grant. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// Ending date and time for the access grant. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Facility keys associated with the access grant. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// Guest key associated with the access grant. + /// + [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] + public string? GuestKey { get; set; } + + /// + /// Listing keys associated with the access grant. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// Your name for this access grant resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Preferred PIN code to use when creating access for this reservation. + /// + [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] + public string? PreferredCode { get; set; } + + /// + /// Property keys associated with the access grant. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// Resident key associated with the access grant. + /// + [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResidentKey { get; set; } + + /// + /// Room keys associated with the access grant. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// Space keys associated with the access grant. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Starting date and time for the access grant. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Tenant key associated with the access grant. + /// + [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] + public string? TenantKey { get; set; } + + /// + /// Unit keys associated with the access grant. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + /// + /// User identity key associated with the access grant. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + /// + /// User key associated with the access grant. + /// + [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataBookings_model")] + public class CreatePortalRequestCustomerDataBookings + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataBookings() { } + + public CreatePortalRequestCustomerDataBookings( + string? bookingKey = default, + List? buildingKeys = default, + List? commonAreaKeys = default, + string? endsAt = default, + List? facilityKeys = default, + string? guestKey = default, + List? listingKeys = default, + string? name = default, + string? preferredCode = default, + List? propertyKeys = default, + string? residentKey = default, + List? roomKeys = default, + List? spaceKeys = default, + string? startsAt = default, + string? tenantKey = default, + List? unitKeys = default, + string? userIdentityKey = default, + string? userKey = default + ) + { + BookingKey = bookingKey; + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + EndsAt = endsAt; + FacilityKeys = facilityKeys; + GuestKey = guestKey; + ListingKeys = listingKeys; + Name = name; + PreferredCode = preferredCode; + PropertyKeys = propertyKeys; + ResidentKey = residentKey; + RoomKeys = roomKeys; + SpaceKeys = spaceKeys; + StartsAt = startsAt; + TenantKey = tenantKey; + UnitKeys = unitKeys; + UserIdentityKey = userIdentityKey; + UserKey = userKey; + } + + /// + /// Your unique identifier for the booking. + /// + [DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] + public string? BookingKey { get; set; } + + /// + /// Building keys associated with the access grant. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// Common area keys associated with the access grant. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// Ending date and time for the access grant. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Facility keys associated with the access grant. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// Guest key associated with the access grant. + /// + [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] + public string? GuestKey { get; set; } + + /// + /// Listing keys associated with the access grant. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// Your name for this access grant resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Preferred PIN code to use when creating access for this reservation. + /// + [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] + public string? PreferredCode { get; set; } + + /// + /// Property keys associated with the access grant. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// Resident key associated with the access grant. + /// + [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResidentKey { get; set; } + + /// + /// Room keys associated with the access grant. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// Space keys associated with the access grant. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Starting date and time for the access grant. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Tenant key associated with the access grant. + /// + [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] + public string? TenantKey { get; set; } + + /// + /// Unit keys associated with the access grant. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + /// + /// User identity key associated with the access grant. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + /// + /// User key associated with the access grant. + /// + [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataBuildings_model")] + public class CreatePortalRequestCustomerDataBuildings + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataBuildings() { } + + public CreatePortalRequestCustomerDataBuildings( + string? buildingKey = default, + string? name = default + ) + { + BuildingKey = buildingKey; + Name = name; + } + + /// + /// Your unique identifier for the building. + /// + [DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] + public string? BuildingKey { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataCommonAreas_model")] + public class CreatePortalRequestCustomerDataCommonAreas + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataCommonAreas() { } + + public CreatePortalRequestCustomerDataCommonAreas( + string? commonAreaKey = default, + string? name = default, + string? parentSiteKey = default + ) + { + CommonAreaKey = commonAreaKey; + Name = name; + ParentSiteKey = parentSiteKey; + } + + /// + /// Your unique identifier for the common area. + /// + [DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] + public string? CommonAreaKey { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] + public string? ParentSiteKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataFacilities_model")] + public class CreatePortalRequestCustomerDataFacilities + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataFacilities() { } + + public CreatePortalRequestCustomerDataFacilities( + string? facilityKey = default, + string? name = default + ) + { + FacilityKey = facilityKey; + Name = name; + } + + /// + /// Your unique identifier for the facility. + /// + [DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] + public string? FacilityKey { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataGuests_model")] + public class CreatePortalRequestCustomerDataGuests + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataGuests() { } + + public CreatePortalRequestCustomerDataGuests( + string? emailAddress = default, + string? guestKey = default, + string? name = default, + string? phoneNumber = default + ) + { + EmailAddress = emailAddress; + GuestKey = guestKey; + Name = name; + PhoneNumber = phoneNumber; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your unique identifier for the guest. + /// + [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] + public string? GuestKey { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataListings_model")] + public class CreatePortalRequestCustomerDataListings + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataListings() { } + + public CreatePortalRequestCustomerDataListings( + string? listingKey = default, + string? name = default + ) + { + ListingKey = listingKey; + Name = name; + } + + /// + /// Your unique identifier for the listing. + /// + [DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] + public string? ListingKey { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataProperties_model")] + public class CreatePortalRequestCustomerDataProperties + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataProperties() { } + + public CreatePortalRequestCustomerDataProperties( + string? name = default, + string? propertyKey = default + ) + { + Name = name; + PropertyKey = propertyKey; + } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the property. + /// + [DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] + public string? PropertyKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataPropertyListings_model")] + public class CreatePortalRequestCustomerDataPropertyListings + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataPropertyListings() { } + + public CreatePortalRequestCustomerDataPropertyListings( + object? customMetadata = default, + string? name = default, + string? propertyListingKey = default + ) + { + CustomMetadata = customMetadata; + Name = name; + PropertyListingKey = propertyListingKey; + } + + /// + /// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadata { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the property listing. + /// + [DataMember( + Name = "property_listing_key", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PropertyListingKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataReservations_model")] + public class CreatePortalRequestCustomerDataReservations + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataReservations() { } + + public CreatePortalRequestCustomerDataReservations( + List? buildingKeys = default, + List? commonAreaKeys = default, + object? customMetadata = default, + string? endsAt = default, + List? facilityKeys = default, + string? guestKey = default, + List? listingKeys = default, + string? name = default, + string? preferredCode = default, + List? propertyKeys = default, + string? reservationKey = default, + string? residentKey = default, + List? roomKeys = default, + List? spaceKeys = default, + string? startsAt = default, + string? tenantKey = default, + List? unitKeys = default, + string? userIdentityKey = default, + string? userKey = default + ) + { + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + CustomMetadata = customMetadata; + EndsAt = endsAt; + FacilityKeys = facilityKeys; + GuestKey = guestKey; + ListingKeys = listingKeys; + Name = name; + PreferredCode = preferredCode; + PropertyKeys = propertyKeys; + ReservationKey = reservationKey; + ResidentKey = residentKey; + RoomKeys = roomKeys; + SpaceKeys = spaceKeys; + StartsAt = startsAt; + TenantKey = tenantKey; + UnitKeys = unitKeys; + UserIdentityKey = userIdentityKey; + UserKey = userKey; + } + + /// + /// Building keys associated with the access grant. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// Common area keys associated with the access grant. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadata { get; set; } + + /// + /// Ending date and time for the access grant. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Facility keys associated with the access grant. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// Guest key associated with the access grant. + /// + [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] + public string? GuestKey { get; set; } + + /// + /// Listing keys associated with the access grant. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// Your name for this access grant resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Preferred PIN code to use when creating access for this reservation. + /// + [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] + public string? PreferredCode { get; set; } + + /// + /// Property keys associated with the access grant. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// Your unique identifier for the reservation. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + /// + /// Resident key associated with the access grant. + /// + [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResidentKey { get; set; } + + /// + /// Room keys associated with the access grant. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// Space keys associated with the access grant. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Starting date and time for the access grant. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Tenant key associated with the access grant. + /// + [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] + public string? TenantKey { get; set; } + + /// + /// Unit keys associated with the access grant. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + /// + /// User identity key associated with the access grant. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + /// + /// User key associated with the access grant. + /// + [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataResidents_model")] + public class CreatePortalRequestCustomerDataResidents + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataResidents() { } + + public CreatePortalRequestCustomerDataResidents( + string? emailAddress = default, + string? name = default, + string? phoneNumber = default, + string? residentKey = default + ) + { + EmailAddress = emailAddress; + Name = name; + PhoneNumber = phoneNumber; + ResidentKey = residentKey; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Your unique identifier for the resident. + /// + [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResidentKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataRooms_model")] + public class CreatePortalRequestCustomerDataRooms + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataRooms() { } + + public CreatePortalRequestCustomerDataRooms( + string? name = default, + string? parentSiteKey = default, + string? roomKey = default + ) + { + Name = name; + ParentSiteKey = parentSiteKey; + RoomKey = roomKey; + } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] + public string? ParentSiteKey { get; set; } + + /// + /// Your unique identifier for the room. + /// + [DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] + public string? RoomKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataSites_model")] + public class CreatePortalRequestCustomerDataSites + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataSites() { } + + public CreatePortalRequestCustomerDataSites( + string? name = default, + string? siteKey = default + ) + { + Name = name; + SiteKey = siteKey; + } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] + public string? SiteKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataSpaces_model")] + public class CreatePortalRequestCustomerDataSpaces + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataSpaces() { } + + public CreatePortalRequestCustomerDataSpaces( + CreatePortalRequestCustomerDataSpacesCustomerData? customerData = default, + int? durationMinutes = default, + CreatePortalRequestCustomerDataSpacesGeolocation? geolocation = default, + string? name = default, + string? parentSiteKey = default, + string? spaceKey = default + ) + { + CustomerData = customerData; + DurationMinutes = durationMinutes; + Geolocation = geolocation; + Name = name; + ParentSiteKey = parentSiteKey; + SpaceKey = spaceKey; + } + + /// + /// Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). + /// + [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestCustomerDataSpacesCustomerData? CustomerData { get; set; } + + /// + /// Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. + /// + [DataMember(Name = "duration_minutes", IsRequired = false, EmitDefaultValue = false)] + public int? DurationMinutes { get; set; } + + /// + /// Geographic coordinates (latitude and longitude) of the space. + /// + [DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestCustomerDataSpacesGeolocation? Geolocation { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] + public string? ParentSiteKey { get; set; } + + /// + /// Your unique identifier for the space. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataSpacesCustomerData_model")] + public class CreatePortalRequestCustomerDataSpacesCustomerData + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataSpacesCustomerData() { } + + public CreatePortalRequestCustomerDataSpacesCustomerData( + string? address = default, + string? defaultCheckinTime = default, + string? defaultCheckoutTime = default, + string? timeZone = default + ) + { + Address = address; + DefaultCheckinTime = defaultCheckinTime; + DefaultCheckoutTime = defaultCheckoutTime; + TimeZone = timeZone; + } + + /// + /// Postal address for the space. + /// + [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] + public string? Address { get; set; } + + /// + /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember( + Name = "default_checkin_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCheckinTime { get; set; } + + /// + /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember( + Name = "default_checkout_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCheckoutTime { get; set; } + + /// + /// IANA time zone for the space, e.g. America/Los_Angeles. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataSpacesGeolocation_model")] + public class CreatePortalRequestCustomerDataSpacesGeolocation + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataSpacesGeolocation() { } + + public CreatePortalRequestCustomerDataSpacesGeolocation( + float? latitude = default, + float? longitude = default + ) + { + Latitude = latitude; + Longitude = longitude; + } + + /// + /// Latitude of the space, in decimal degrees. + /// + [DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] + public float? Latitude { get; set; } + + /// + /// Longitude of the space, in decimal degrees. + /// + [DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] + public float? Longitude { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataStaffMembers_model")] + public class CreatePortalRequestCustomerDataStaffMembers + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataStaffMembers() { } + + public CreatePortalRequestCustomerDataStaffMembers( + List? buildingKeys = default, + List? commonAreaKeys = default, + string? emailAddress = default, + List? facilityKeys = default, + List? listingKeys = default, + string? name = default, + string? phoneNumber = default, + List? propertyKeys = default, + List? propertyListingKeys = default, + List? roomKeys = default, + List? siteKeys = default, + List? spaceKeys = default, + string? staffMemberKey = default, + List? unitKeys = default + ) + { + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + EmailAddress = emailAddress; + FacilityKeys = facilityKeys; + ListingKeys = listingKeys; + Name = name; + PhoneNumber = phoneNumber; + PropertyKeys = propertyKeys; + PropertyListingKeys = propertyListingKeys; + RoomKeys = roomKeys; + SiteKeys = siteKeys; + SpaceKeys = spaceKeys; + StaffMemberKey = staffMemberKey; + UnitKeys = unitKeys; + } + + /// + /// List of unique identifiers for the buildings the staff member is associated with. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// List of unique identifiers for the common areas the staff member is associated with. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// List of unique identifiers for the facilities the staff member is associated with. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// List of unique identifiers for the listings the staff member is associated with. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// List of unique identifiers for the properties the staff member is associated with. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// List of unique identifiers for the property listings the staff member is associated with. + /// + [DataMember( + Name = "property_listing_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List? PropertyListingKeys { get; set; } + + /// + /// List of unique identifiers for the rooms the staff member is associated with. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// List of unique identifiers for the sites the staff member is associated with. + /// + [DataMember(Name = "site_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SiteKeys { get; set; } + + /// + /// List of unique identifiers for the spaces the staff member is associated with. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Your unique identifier for the staff. + /// + [DataMember(Name = "staff_member_key", IsRequired = false, EmitDefaultValue = false)] + public string? StaffMemberKey { get; set; } + + /// + /// List of unique identifiers for the units the staff member is associated with. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataTenants_model")] + public class CreatePortalRequestCustomerDataTenants + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataTenants() { } + + public CreatePortalRequestCustomerDataTenants( + string? emailAddress = default, + string? name = default, + string? phoneNumber = default, + string? tenantKey = default + ) + { + EmailAddress = emailAddress; + Name = name; + PhoneNumber = phoneNumber; + TenantKey = tenantKey; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Your unique identifier for the tenant. + /// + [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] + public string? TenantKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataUnits_model")] + public class CreatePortalRequestCustomerDataUnits + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataUnits() { } + + public CreatePortalRequestCustomerDataUnits( + string? name = default, + string? parentSiteKey = default, + string? unitKey = default + ) + { + Name = name; + ParentSiteKey = parentSiteKey; + UnitKey = unitKey; + } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] + public string? ParentSiteKey { get; set; } + + /// + /// Your unique identifier for the unit. + /// + [DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] + public string? UnitKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataUserIdentities_model")] + public class CreatePortalRequestCustomerDataUserIdentities + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataUserIdentities() { } + + public CreatePortalRequestCustomerDataUserIdentities( + string? emailAddress = default, + string? name = default, + string? phoneNumber = default, + string? userIdentityKey = default + ) + { + EmailAddress = emailAddress; + Name = name; + PhoneNumber = phoneNumber; + UserIdentityKey = userIdentityKey; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Your unique identifier for the user identity. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerDataUsers_model")] + public class CreatePortalRequestCustomerDataUsers + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerDataUsers() { } + + public CreatePortalRequestCustomerDataUsers( + string? emailAddress = default, + string? name = default, + string? phoneNumber = default, + string? userKey = default + ) + { + EmailAddress = emailAddress; + Name = name; + PhoneNumber = phoneNumber; + UserKey = userKey; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Your unique identifier for the user. + /// + [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestCustomerResourcesFilters_model")] + public class CreatePortalRequestCustomerResourcesFilters + { + [JsonConstructorAttribute] + protected CreatePortalRequestCustomerResourcesFilters() { } + + public CreatePortalRequestCustomerResourcesFilters( + string? field = default, + CreatePortalRequestCustomerResourcesFilters.OperationEnum? operation = default, + string? value = default + ) + { + Field = field; + Operation = operation; + Value = value; + } + + /// + /// The comparison operation. Currently only '=' is supported. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum OperationEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "=")] + empty = 1, + } + + /// + /// The custom_metadata field name to filter on. + /// + [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] + public string? Field { get; set; } + + /// + /// The comparison operation. Currently only '=' is supported. + /// + [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestCustomerResourcesFilters.OperationEnum? Operation { get; set; } + + /// + /// The value to compare against. + /// + [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] + public string? Value { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestDeepLink_model")] + public class CreatePortalRequestDeepLink + { + [JsonConstructorAttribute] + protected CreatePortalRequestDeepLink() { } + + public CreatePortalRequestDeepLink( + string? resourceId = default, + string? resourceKey = default, + CreatePortalRequestDeepLink.ResourceTypeEnum? resourceType = default + ) + { + ResourceId = resourceId; + ResourceKey = resourceKey; + ResourceType = resourceType; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ResourceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "reservation")] + Reservation = 1, + + [EnumMember(Value = "space")] + Space = 2, + + [EnumMember(Value = "device")] + Device = 3, + + [EnumMember(Value = "acs_entrance")] + AcsEntrance = 4, + } + + [DataMember(Name = "resource_id", IsRequired = false, EmitDefaultValue = false)] + public string? ResourceId { get; set; } + + [DataMember(Name = "resource_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResourceKey { get; set; } + + [DataMember(Name = "resource_type", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestDeepLink.ResourceTypeEnum? ResourceType { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestFeatures_model")] + public class CreatePortalRequestFeatures + { + [JsonConstructorAttribute] + protected CreatePortalRequestFeatures() { } + + public CreatePortalRequestFeatures( + CreatePortalRequestFeaturesConfigure? configure = default, + CreatePortalRequestFeaturesConnect? connect = default, + CreatePortalRequestFeaturesManage? manage = default, + CreatePortalRequestFeaturesManageDevices? manageDevices = default, + CreatePortalRequestFeaturesOrganize? organize = default + ) + { + Configure = configure; + Connect = connect; + Manage = manage; + ManageDevices = manageDevices; + Organize = organize; + } + + /// + /// Configuration for the configure feature. + /// + [DataMember(Name = "configure", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestFeaturesConfigure? Configure { get; set; } + + /// + /// Configuration for the connect accounts feature. + /// + [DataMember(Name = "connect", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestFeaturesConnect? Connect { get; set; } + + /// + /// Configuration for the manage feature. + /// + [DataMember(Name = "manage", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestFeaturesManage? Manage { get; set; } + + /// + /// Configuration for the manage devices feature. + /// --- + /// deprecated: Use `manage` instead. + /// --- + /// + [DataMember(Name = "manage_devices", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestFeaturesManageDevices? ManageDevices { get; set; } + + /// + /// Configuration for the organize feature. + /// + [DataMember(Name = "organize", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestFeaturesOrganize? Organize { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestFeaturesConfigure_model")] + public class CreatePortalRequestFeaturesConfigure + { + [JsonConstructorAttribute] + protected CreatePortalRequestFeaturesConfigure() { } + + public CreatePortalRequestFeaturesConfigure( + bool? allowAccessAutomationRuleCustomization = default, + bool? allowClimateAutomationRuleCustomization = default, + bool? allowInstantKeyCustomization = default, + bool? exclude = default + ) + { + AllowAccessAutomationRuleCustomization = allowAccessAutomationRuleCustomization; + AllowClimateAutomationRuleCustomization = allowClimateAutomationRuleCustomization; + AllowInstantKeyCustomization = allowInstantKeyCustomization; + Exclude = exclude; + } + + /// + /// Indicates whether the customer can customize the access automation rules for their properties. + /// + [DataMember( + Name = "allow_access_automation_rule_customization", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AllowAccessAutomationRuleCustomization { get; set; } + + /// + /// Indicates whether the customer can customize the climate automation rules for their properties. + /// + [DataMember( + Name = "allow_climate_automation_rule_customization", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AllowClimateAutomationRuleCustomization { get; set; } + + /// + /// Indicates whether the customer can customize the Instant Key profile for their properties. + /// + [DataMember( + Name = "allow_instant_key_customization", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AllowInstantKeyCustomization { get; set; } + + /// + /// Whether to exclude this feature from the portal. + /// + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public bool? Exclude { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestFeaturesConnect_model")] + public class CreatePortalRequestFeaturesConnect + { + [JsonConstructorAttribute] + protected CreatePortalRequestFeaturesConnect() { } + + public CreatePortalRequestFeaturesConnect( + List? acceptedProviders = default, + bool? exclude = default, + List? excludedProviders = default + ) + { + AcceptedProviders = acceptedProviders; + Exclude = exclude; + ExcludedProviders = excludedProviders; + } + + /// + /// List of provider keys to allow for the connect feature. These providers will be shown when the customer tries to connect an account. + /// + [DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] + public List? AcceptedProviders { get; set; } + + /// + /// Whether to exclude this feature from the portal. + /// + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public bool? Exclude { get; set; } + + /// + /// List of provider keys to exclude from the connect feature. These providers will not be shown when the customer tries to connect an account. + /// + [DataMember(Name = "excluded_providers", IsRequired = false, EmitDefaultValue = false)] + public List? ExcludedProviders { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestFeaturesManage_model")] + public class CreatePortalRequestFeaturesManage + { + [JsonConstructorAttribute] + protected CreatePortalRequestFeaturesManage() { } + + public CreatePortalRequestFeaturesManage( + CreatePortalRequestFeaturesManageDeviceManagementConfirmation? deviceManagementConfirmation = + default, + CreatePortalRequestFeaturesManageEvents? events = default, + bool? exclude = default, + bool? excludeReservationManagement = default, + bool? excludeReservationTechnicalDetails = default, + bool? excludeStaffManagement = default + ) + { + DeviceManagementConfirmation = deviceManagementConfirmation; + Events = events; + Exclude = exclude; + ExcludeReservationManagement = excludeReservationManagement; + ExcludeReservationTechnicalDetails = excludeReservationTechnicalDetails; + ExcludeStaffManagement = excludeStaffManagement; + } + + /// + /// Custom copy for the confirmation modal shown before unmanaged devices are added to a space and begin being managed (and billed). Only takes effect when the MANAGE_DEVICES_CONFIRMATION_MODAL feature flag is enabled for the workspace. Any omitted string falls back to a localized default. + /// + [DataMember( + Name = "device_management_confirmation", + IsRequired = false, + EmitDefaultValue = false + )] + public CreatePortalRequestFeaturesManageDeviceManagementConfirmation? DeviceManagementConfirmation { get; set; } + + /// + /// Configuration for event type filtering in the manage feature. + /// + [DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestFeaturesManageEvents? Events { get; set; } + + /// + /// Whether to exclude this feature from the portal. + /// + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public bool? Exclude { get; set; } + + /// + /// Indicates whether the customer can manage reservations for their properties. + /// + [DataMember( + Name = "exclude_reservation_management", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? ExcludeReservationManagement { get; set; } + + /// + /// Indicates whether to exclude technical details from reservation views. + /// + [DataMember( + Name = "exclude_reservation_technical_details", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? ExcludeReservationTechnicalDetails { get; set; } + + /// + /// Indicates whether the customer can manage staff for their properties. + /// + [DataMember( + Name = "exclude_staff_management", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? ExcludeStaffManagement { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestFeaturesManageDeviceManagementConfirmation_model")] + public class CreatePortalRequestFeaturesManageDeviceManagementConfirmation + { + [JsonConstructorAttribute] + protected CreatePortalRequestFeaturesManageDeviceManagementConfirmation() { } + + public CreatePortalRequestFeaturesManageDeviceManagementConfirmation( + string? body = default, + string? cancelButtonLabel = default, + string? confirmButtonLabel = default, + string? title = default + ) + { + Body = body; + CancelButtonLabel = cancelButtonLabel; + ConfirmButtonLabel = confirmButtonLabel; + Title = title; + } + + /// + /// Custom body text for the confirmation modal. May include the {count} token, which is replaced with the number of devices that will begin being managed. + /// + [DataMember(Name = "body", IsRequired = false, EmitDefaultValue = false)] + public string? Body { get; set; } + + /// + /// Custom label for the cancel button. + /// + [DataMember(Name = "cancel_button_label", IsRequired = false, EmitDefaultValue = false)] + public string? CancelButtonLabel { get; set; } + + /// + /// Custom label for the confirm button. + /// + [DataMember( + Name = "confirm_button_label", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConfirmButtonLabel { get; set; } + + /// + /// Custom title for the confirmation modal. + /// + [DataMember(Name = "title", IsRequired = false, EmitDefaultValue = false)] + public string? Title { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestFeaturesManageEvents_model")] + public class CreatePortalRequestFeaturesManageEvents + { + [JsonConstructorAttribute] + protected CreatePortalRequestFeaturesManageEvents() { } + + public CreatePortalRequestFeaturesManageEvents( + List? allowedEvents = default, + List? defaultEvents = default + ) + { + AllowedEvents = allowedEvents; + DefaultEvents = defaultEvents; + } + + /// + /// List of event types to show in the events filter. When set, only these event types will be available. Leave empty to show all events. + /// + [DataMember(Name = "allowed_events", IsRequired = false, EmitDefaultValue = false)] + public List? AllowedEvents { get; set; } + + /// + /// List of event types that are pre-selected in the events filter when the user first loads the events tab. + /// + [DataMember(Name = "default_events", IsRequired = false, EmitDefaultValue = false)] + public List? DefaultEvents { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestFeaturesManageDevices_model")] + public class CreatePortalRequestFeaturesManageDevices + { + [JsonConstructorAttribute] + protected CreatePortalRequestFeaturesManageDevices() { } + + public CreatePortalRequestFeaturesManageDevices(bool? exclude = default) + { + Exclude = exclude; + } + + /// + /// Whether to exclude this feature from the portal. + /// + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public bool? Exclude { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestFeaturesOrganize_model")] + public class CreatePortalRequestFeaturesOrganize + { + [JsonConstructorAttribute] + protected CreatePortalRequestFeaturesOrganize() { } + + public CreatePortalRequestFeaturesOrganize(bool? exclude = default) + { + Exclude = exclude; + } + + /// + /// Whether to exclude this feature from the portal. + /// + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public bool? Exclude { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestLandingPage_model")] + public class CreatePortalRequestLandingPage + { + [JsonConstructorAttribute] + protected CreatePortalRequestLandingPage() { } + + public CreatePortalRequestLandingPage( + CreatePortalRequestLandingPageManage? manage = default + ) + { + Manage = manage; + } + + [DataMember(Name = "manage", IsRequired = false, EmitDefaultValue = false)] + public CreatePortalRequestLandingPageManage? Manage { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalRequestLandingPageManage_model")] + public class CreatePortalRequestLandingPageManage + { + [JsonConstructorAttribute] + protected CreatePortalRequestLandingPageManage() { } + + public CreatePortalRequestLandingPageManage( + string? accessGrantKey = default, + string? bookingKey = default, + string? buildingKey = default, + string? commonAreaKey = default, + string? facilityKey = default, + string? listingKey = default, + string? propertyKey = default, + string? propertyListingKey = default, + string? reservationKey = default, + string? roomKey = default, + string? siteKey = default, + string? spaceKey = default, + string? unitKey = default + ) + { + AccessGrantKey = accessGrantKey; + BookingKey = bookingKey; + BuildingKey = buildingKey; + CommonAreaKey = commonAreaKey; + FacilityKey = facilityKey; + ListingKey = listingKey; + PropertyKey = propertyKey; + PropertyListingKey = propertyListingKey; + ReservationKey = reservationKey; + RoomKey = roomKey; + SiteKey = siteKey; + SpaceKey = spaceKey; + UnitKey = unitKey; + } + + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + [DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] + public string? BookingKey { get; set; } + + [DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] + public string? BuildingKey { get; set; } + + [DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] + public string? CommonAreaKey { get; set; } + + [DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] + public string? FacilityKey { get; set; } + + [DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] + public string? ListingKey { get; set; } + + [DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] + public string? PropertyKey { get; set; } + + [DataMember( + Name = "property_listing_key", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PropertyListingKey { get; set; } + + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + [DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] + public string? RoomKey { get; set; } + + [DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] + public string? SiteKey { get; set; } + + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + [DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] + public string? UnitKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createPortalResponse_response")] + public class CreatePortalResponse + { + [JsonConstructorAttribute] + protected CreatePortalResponse() { } + + public CreatePortalResponse(CustomerPortal customerPortal = default) + { + CustomerPortal = customerPortal; + } + + /// + /// OK + /// + [DataMember(Name = "customer_portal", IsRequired = false, EmitDefaultValue = false)] + public CustomerPortal CustomerPortal { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new customer portal magic link with configurable features. + /// + public CustomerPortal CreatePortal(CreatePortalRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/customers/create_portal", requestOptions) + .EnsureData("/customers/create_portal") + .CustomerPortal; + } + + /// + /// Creates a new customer portal magic link with configurable features. + /// + public CustomerPortal CreatePortal( + CreatePortalRequestCustomerData? customerData = default, + List? customerResourcesFilters = default, + string? customizationProfileId = default, + CreatePortalRequestDeepLink? deepLink = default, + bool? excludeLocalePicker = default, + CreatePortalRequestFeatures? features = default, + bool? isEmbedded = default, + CreatePortalRequestLandingPage? landingPage = default, + CreatePortalRequest.LocaleEnum? locale = default, + CreatePortalRequest.NavigationModeEnum? navigationMode = default, + bool? readOnly = default + ) + { + return CreatePortal( + new CreatePortalRequest( + customerData: customerData, + customerResourcesFilters: customerResourcesFilters, + customizationProfileId: customizationProfileId, + deepLink: deepLink, + excludeLocalePicker: excludeLocalePicker, + features: features, + isEmbedded: isEmbedded, + landingPage: landingPage, + locale: locale, + navigationMode: navigationMode, + readOnly: readOnly + ) + ); + } + + /// + /// Creates a new customer portal magic link with configurable features. + /// + public async Task CreatePortalAsync(CreatePortalRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/customers/create_portal", + requestOptions + ) + ) + .EnsureData("/customers/create_portal") + .CustomerPortal; + } + + /// + /// Creates a new customer portal magic link with configurable features. + /// + public async Task CreatePortalAsync( + CreatePortalRequestCustomerData? customerData = default, + List? customerResourcesFilters = default, + string? customizationProfileId = default, + CreatePortalRequestDeepLink? deepLink = default, + bool? excludeLocalePicker = default, + CreatePortalRequestFeatures? features = default, + bool? isEmbedded = default, + CreatePortalRequestLandingPage? landingPage = default, + CreatePortalRequest.LocaleEnum? locale = default, + CreatePortalRequest.NavigationModeEnum? navigationMode = default, + bool? readOnly = default + ) + { + return ( + await CreatePortalAsync( + new CreatePortalRequest( + customerData: customerData, + customerResourcesFilters: customerResourcesFilters, + customizationProfileId: customizationProfileId, + deepLink: deepLink, + excludeLocalePicker: excludeLocalePicker, + features: features, + isEmbedded: isEmbedded, + landingPage: landingPage, + locale: locale, + navigationMode: navigationMode, + readOnly: readOnly + ) + ) + ); + } + + /// + /// Request parameters for Delete Customer Data. + /// + [DataContract(Name = "deleteDataRequest_request")] + public class DeleteDataRequest + { + [JsonConstructorAttribute] + protected DeleteDataRequest() { } + + public DeleteDataRequest( + List? accessGrantKeys = default, + List? bookingKeys = default, + List? buildingKeys = default, + List? commonAreaKeys = default, + List? customerKeys = default, + List? facilityKeys = default, + List? guestKeys = default, + List? listingKeys = default, + List? propertyKeys = default, + List? propertyListingKeys = default, + List? reservationKeys = default, + List? residentKeys = default, + List? roomKeys = default, + List? spaceKeys = default, + List? staffMemberKeys = default, + List? tenantKeys = default, + List? unitKeys = default, + List? userIdentityKeys = default, + List? userKeys = default + ) + { + AccessGrantKeys = accessGrantKeys; + BookingKeys = bookingKeys; + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + CustomerKeys = customerKeys; + FacilityKeys = facilityKeys; + GuestKeys = guestKeys; + ListingKeys = listingKeys; + PropertyKeys = propertyKeys; + PropertyListingKeys = propertyListingKeys; + ReservationKeys = reservationKeys; + ResidentKeys = residentKeys; + RoomKeys = roomKeys; + SpaceKeys = spaceKeys; + StaffMemberKeys = staffMemberKeys; + TenantKeys = tenantKeys; + UnitKeys = unitKeys; + UserIdentityKeys = userIdentityKeys; + UserKeys = userKeys; + } + + /// + /// List of access grant keys to delete. + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// List of booking keys to delete. + /// + [DataMember(Name = "booking_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BookingKeys { get; set; } + + /// + /// List of building keys to delete. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// List of common area keys to delete. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// List of customer keys to delete all data for. + /// + [DataMember(Name = "customer_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CustomerKeys { get; set; } + + /// + /// List of facility keys to delete. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// List of guest keys to delete. + /// + [DataMember(Name = "guest_keys", IsRequired = false, EmitDefaultValue = false)] + public List? GuestKeys { get; set; } + + /// + /// List of listing keys to delete. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// List of property keys to delete. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// List of property listing keys to delete. + /// + [DataMember( + Name = "property_listing_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List? PropertyListingKeys { get; set; } + + /// + /// List of reservation keys to delete. + /// + [DataMember(Name = "reservation_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ReservationKeys { get; set; } + + /// + /// List of resident keys to delete. + /// + [DataMember(Name = "resident_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ResidentKeys { get; set; } + + /// + /// List of room keys to delete. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// List of space keys to delete. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// List of staff member keys to delete. + /// + [DataMember(Name = "staff_member_keys", IsRequired = false, EmitDefaultValue = false)] + public List? StaffMemberKeys { get; set; } + + /// + /// List of tenant keys to delete. + /// + [DataMember(Name = "tenant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? TenantKeys { get; set; } + + /// + /// List of unit keys to delete. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + /// + /// List of user identity keys to delete. + /// + [DataMember(Name = "user_identity_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UserIdentityKeys { get; set; } + + /// + /// List of user keys to delete. + /// + [DataMember(Name = "user_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UserKeys { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes customer data including resources like spaces, properties, rooms, users, etc. + /// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). + /// + public void DeleteData(DeleteDataRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/customers/delete_data", requestOptions); + } + + /// + /// Deletes customer data including resources like spaces, properties, rooms, users, etc. + /// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). + /// + public void DeleteData( + List? accessGrantKeys = default, + List? bookingKeys = default, + List? buildingKeys = default, + List? commonAreaKeys = default, + List? customerKeys = default, + List? facilityKeys = default, + List? guestKeys = default, + List? listingKeys = default, + List? propertyKeys = default, + List? propertyListingKeys = default, + List? reservationKeys = default, + List? residentKeys = default, + List? roomKeys = default, + List? spaceKeys = default, + List? staffMemberKeys = default, + List? tenantKeys = default, + List? unitKeys = default, + List? userIdentityKeys = default, + List? userKeys = default + ) + { + DeleteData( + new DeleteDataRequest( + accessGrantKeys: accessGrantKeys, + bookingKeys: bookingKeys, + buildingKeys: buildingKeys, + commonAreaKeys: commonAreaKeys, + customerKeys: customerKeys, + facilityKeys: facilityKeys, + guestKeys: guestKeys, + listingKeys: listingKeys, + propertyKeys: propertyKeys, + propertyListingKeys: propertyListingKeys, + reservationKeys: reservationKeys, + residentKeys: residentKeys, + roomKeys: roomKeys, + spaceKeys: spaceKeys, + staffMemberKeys: staffMemberKeys, + tenantKeys: tenantKeys, + unitKeys: unitKeys, + userIdentityKeys: userIdentityKeys, + userKeys: userKeys + ) + ); + } + + /// + /// Deletes customer data including resources like spaces, properties, rooms, users, etc. + /// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). + /// + public async Task DeleteDataAsync(DeleteDataRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/customers/delete_data", requestOptions); + } + + /// + /// Deletes customer data including resources like spaces, properties, rooms, users, etc. + /// This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). + /// + public async Task DeleteDataAsync( + List? accessGrantKeys = default, + List? bookingKeys = default, + List? buildingKeys = default, + List? commonAreaKeys = default, + List? customerKeys = default, + List? facilityKeys = default, + List? guestKeys = default, + List? listingKeys = default, + List? propertyKeys = default, + List? propertyListingKeys = default, + List? reservationKeys = default, + List? residentKeys = default, + List? roomKeys = default, + List? spaceKeys = default, + List? staffMemberKeys = default, + List? tenantKeys = default, + List? unitKeys = default, + List? userIdentityKeys = default, + List? userKeys = default + ) + { + await DeleteDataAsync( + new DeleteDataRequest( + accessGrantKeys: accessGrantKeys, + bookingKeys: bookingKeys, + buildingKeys: buildingKeys, + commonAreaKeys: commonAreaKeys, + customerKeys: customerKeys, + facilityKeys: facilityKeys, + guestKeys: guestKeys, + listingKeys: listingKeys, + propertyKeys: propertyKeys, + propertyListingKeys: propertyListingKeys, + reservationKeys: reservationKeys, + residentKeys: residentKeys, + roomKeys: roomKeys, + spaceKeys: spaceKeys, + staffMemberKeys: staffMemberKeys, + tenantKeys: tenantKeys, + unitKeys: unitKeys, + userIdentityKeys: userIdentityKeys, + userKeys: userKeys + ) + ); + } + + /// + /// Request parameters for Push Customer Data. + /// + [DataContract(Name = "pushDataRequest_request")] + public class PushDataRequest + { + [JsonConstructorAttribute] + protected PushDataRequest() { } + + public PushDataRequest( + List? accessGrants = default, + List? bookings = default, + List? buildings = default, + List? commonAreas = default, + string customerKey = default, + List? facilities = default, + List? guests = default, + List? listings = default, + List? properties = default, + List? propertyListings = default, + List? reservations = default, + List? residents = default, + List? rooms = default, + List? sites = default, + List? spaces = default, + List? staffMembers = default, + List? tenants = default, + List? units = default, + List? userIdentities = default, + List? users = default + ) + { + AccessGrants = accessGrants; + Bookings = bookings; + Buildings = buildings; + CommonAreas = commonAreas; + CustomerKey = customerKey; + Facilities = facilities; + Guests = guests; + Listings = listings; + Properties = properties; + PropertyListings = propertyListings; + Reservations = reservations; + Residents = residents; + Rooms = rooms; + Sites = sites; + Spaces = spaces; + StaffMembers = staffMembers; + Tenants = tenants; + Units = units; + UserIdentities = userIdentities; + Users = users; + } + + /// + /// List of access grants. + /// + [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrants { get; set; } + + /// + /// List of bookings. + /// + [DataMember(Name = "bookings", IsRequired = false, EmitDefaultValue = false)] + public List? Bookings { get; set; } + + /// + /// List of buildings. + /// + [DataMember(Name = "buildings", IsRequired = false, EmitDefaultValue = false)] + public List? Buildings { get; set; } + + /// + /// List of shared common areas. + /// + [DataMember(Name = "common_areas", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreas { get; set; } + + /// + /// Your unique identifier for the customer. + /// + [DataMember(Name = "customer_key", IsRequired = true, EmitDefaultValue = false)] + public string CustomerKey { get; set; } + + /// + /// List of gym or fitness facilities. + /// + [DataMember(Name = "facilities", IsRequired = false, EmitDefaultValue = false)] + public List? Facilities { get; set; } + + /// + /// List of guests. + /// + [DataMember(Name = "guests", IsRequired = false, EmitDefaultValue = false)] + public List? Guests { get; set; } + + /// + /// List of property listings. + /// + [DataMember(Name = "listings", IsRequired = false, EmitDefaultValue = false)] + public List? Listings { get; set; } + + /// + /// List of short-term rental properties. + /// + [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] + public List? Properties { get; set; } + + /// + /// List of property listings. + /// + [DataMember(Name = "property_listings", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyListings { get; set; } + + /// + /// List of reservations. + /// + [DataMember(Name = "reservations", IsRequired = false, EmitDefaultValue = false)] + public List? Reservations { get; set; } + + /// + /// List of residents. + /// + [DataMember(Name = "residents", IsRequired = false, EmitDefaultValue = false)] + public List? Residents { get; set; } + + /// + /// List of hotel or hospitality rooms. + /// + [DataMember(Name = "rooms", IsRequired = false, EmitDefaultValue = false)] + public List? Rooms { get; set; } + + /// + /// List of general sites or areas. + /// + [DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] + public List? Sites { get; set; } + + /// + /// List of general spaces or areas. + /// + [DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] + public List? Spaces { get; set; } + + /// + /// List of staff members. + /// + [DataMember(Name = "staff_members", IsRequired = false, EmitDefaultValue = false)] + public List? StaffMembers { get; set; } + + /// + /// List of tenants. + /// + [DataMember(Name = "tenants", IsRequired = false, EmitDefaultValue = false)] + public List? Tenants { get; set; } + + /// + /// List of multi-family residential units. + /// + [DataMember(Name = "units", IsRequired = false, EmitDefaultValue = false)] + public List? Units { get; set; } + + /// + /// List of user identities. + /// + [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] + public List? UserIdentities { get; set; } + + /// + /// List of users. + /// + [DataMember(Name = "users", IsRequired = false, EmitDefaultValue = false)] + public List? Users { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestAccessGrants_model")] + public class PushDataRequestAccessGrants + { + [JsonConstructorAttribute] + protected PushDataRequestAccessGrants() { } + + public PushDataRequestAccessGrants( + string? accessGrantKey = default, + List? buildingKeys = default, + List? commonAreaKeys = default, + string? endsAt = default, + List? facilityKeys = default, + string? guestKey = default, + List? listingKeys = default, + string? name = default, + string? preferredCode = default, + List? propertyKeys = default, + string? residentKey = default, + List? roomKeys = default, + List? spaceKeys = default, + string? startsAt = default, + string? tenantKey = default, + List? unitKeys = default, + string? userIdentityKey = default, + string? userKey = default + ) + { + AccessGrantKey = accessGrantKey; + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + EndsAt = endsAt; + FacilityKeys = facilityKeys; + GuestKey = guestKey; + ListingKeys = listingKeys; + Name = name; + PreferredCode = preferredCode; + PropertyKeys = propertyKeys; + ResidentKey = residentKey; + RoomKeys = roomKeys; + SpaceKeys = spaceKeys; + StartsAt = startsAt; + TenantKey = tenantKey; + UnitKeys = unitKeys; + UserIdentityKey = userIdentityKey; + UserKey = userKey; + } + + /// + /// Your unique identifier for the access grant. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// Building keys associated with the access grant. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// Common area keys associated with the access grant. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// Ending date and time for the access grant. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Facility keys associated with the access grant. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// Guest key associated with the access grant. + /// + [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] + public string? GuestKey { get; set; } + + /// + /// Listing keys associated with the access grant. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// Your name for this access grant resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Preferred PIN code to use when creating access for this reservation. + /// + [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] + public string? PreferredCode { get; set; } + + /// + /// Property keys associated with the access grant. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// Resident key associated with the access grant. + /// + [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResidentKey { get; set; } + + /// + /// Room keys associated with the access grant. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// Space keys associated with the access grant. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Starting date and time for the access grant. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Tenant key associated with the access grant. + /// + [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] + public string? TenantKey { get; set; } + + /// + /// Unit keys associated with the access grant. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + /// + /// User identity key associated with the access grant. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + /// + /// User key associated with the access grant. + /// + [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestBookings_model")] + public class PushDataRequestBookings + { + [JsonConstructorAttribute] + protected PushDataRequestBookings() { } + + public PushDataRequestBookings( + string? bookingKey = default, + List? buildingKeys = default, + List? commonAreaKeys = default, + string? endsAt = default, + List? facilityKeys = default, + string? guestKey = default, + List? listingKeys = default, + string? name = default, + string? preferredCode = default, + List? propertyKeys = default, + string? residentKey = default, + List? roomKeys = default, + List? spaceKeys = default, + string? startsAt = default, + string? tenantKey = default, + List? unitKeys = default, + string? userIdentityKey = default, + string? userKey = default + ) + { + BookingKey = bookingKey; + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + EndsAt = endsAt; + FacilityKeys = facilityKeys; + GuestKey = guestKey; + ListingKeys = listingKeys; + Name = name; + PreferredCode = preferredCode; + PropertyKeys = propertyKeys; + ResidentKey = residentKey; + RoomKeys = roomKeys; + SpaceKeys = spaceKeys; + StartsAt = startsAt; + TenantKey = tenantKey; + UnitKeys = unitKeys; + UserIdentityKey = userIdentityKey; + UserKey = userKey; + } + + /// + /// Your unique identifier for the booking. + /// + [DataMember(Name = "booking_key", IsRequired = false, EmitDefaultValue = false)] + public string? BookingKey { get; set; } + + /// + /// Building keys associated with the access grant. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// Common area keys associated with the access grant. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// Ending date and time for the access grant. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Facility keys associated with the access grant. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// Guest key associated with the access grant. + /// + [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] + public string? GuestKey { get; set; } + + /// + /// Listing keys associated with the access grant. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// Your name for this access grant resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Preferred PIN code to use when creating access for this reservation. + /// + [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] + public string? PreferredCode { get; set; } + + /// + /// Property keys associated with the access grant. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// Resident key associated with the access grant. + /// + [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResidentKey { get; set; } + + /// + /// Room keys associated with the access grant. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// Space keys associated with the access grant. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Starting date and time for the access grant. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Tenant key associated with the access grant. + /// + [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] + public string? TenantKey { get; set; } + + /// + /// Unit keys associated with the access grant. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + /// + /// User identity key associated with the access grant. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + /// + /// User key associated with the access grant. + /// + [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestBuildings_model")] + public class PushDataRequestBuildings + { + [JsonConstructorAttribute] + protected PushDataRequestBuildings() { } + + public PushDataRequestBuildings(string? buildingKey = default, string? name = default) + { + BuildingKey = buildingKey; + Name = name; + } + + /// + /// Your unique identifier for the building. + /// + [DataMember(Name = "building_key", IsRequired = false, EmitDefaultValue = false)] + public string? BuildingKey { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestCommonAreas_model")] + public class PushDataRequestCommonAreas + { + [JsonConstructorAttribute] + protected PushDataRequestCommonAreas() { } + + public PushDataRequestCommonAreas( + string? commonAreaKey = default, + string? name = default, + string? parentSiteKey = default + ) + { + CommonAreaKey = commonAreaKey; + Name = name; + ParentSiteKey = parentSiteKey; + } + + /// + /// Your unique identifier for the common area. + /// + [DataMember(Name = "common_area_key", IsRequired = false, EmitDefaultValue = false)] + public string? CommonAreaKey { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] + public string? ParentSiteKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestFacilities_model")] + public class PushDataRequestFacilities + { + [JsonConstructorAttribute] + protected PushDataRequestFacilities() { } + + public PushDataRequestFacilities(string? facilityKey = default, string? name = default) + { + FacilityKey = facilityKey; + Name = name; + } + + /// + /// Your unique identifier for the facility. + /// + [DataMember(Name = "facility_key", IsRequired = false, EmitDefaultValue = false)] + public string? FacilityKey { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestGuests_model")] + public class PushDataRequestGuests + { + [JsonConstructorAttribute] + protected PushDataRequestGuests() { } + + public PushDataRequestGuests( + string? emailAddress = default, + string? guestKey = default, + string? name = default, + string? phoneNumber = default + ) + { + EmailAddress = emailAddress; + GuestKey = guestKey; + Name = name; + PhoneNumber = phoneNumber; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your unique identifier for the guest. + /// + [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] + public string? GuestKey { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestListings_model")] + public class PushDataRequestListings + { + [JsonConstructorAttribute] + protected PushDataRequestListings() { } + + public PushDataRequestListings(string? listingKey = default, string? name = default) + { + ListingKey = listingKey; + Name = name; + } + + /// + /// Your unique identifier for the listing. + /// + [DataMember(Name = "listing_key", IsRequired = false, EmitDefaultValue = false)] + public string? ListingKey { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestProperties_model")] + public class PushDataRequestProperties + { + [JsonConstructorAttribute] + protected PushDataRequestProperties() { } + + public PushDataRequestProperties(string? name = default, string? propertyKey = default) + { + Name = name; + PropertyKey = propertyKey; + } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the property. + /// + [DataMember(Name = "property_key", IsRequired = false, EmitDefaultValue = false)] + public string? PropertyKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestPropertyListings_model")] + public class PushDataRequestPropertyListings + { + [JsonConstructorAttribute] + protected PushDataRequestPropertyListings() { } + + public PushDataRequestPropertyListings( + object? customMetadata = default, + string? name = default, + string? propertyListingKey = default + ) + { + CustomMetadata = customMetadata; + Name = name; + PropertyListingKey = propertyListingKey; + } + + /// + /// Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadata { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the property listing. + /// + [DataMember( + Name = "property_listing_key", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PropertyListingKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestReservations_model")] + public class PushDataRequestReservations + { + [JsonConstructorAttribute] + protected PushDataRequestReservations() { } + + public PushDataRequestReservations( + List? buildingKeys = default, + List? commonAreaKeys = default, + object? customMetadata = default, + string? endsAt = default, + List? facilityKeys = default, + string? guestKey = default, + List? listingKeys = default, + string? name = default, + string? preferredCode = default, + List? propertyKeys = default, + string? reservationKey = default, + string? residentKey = default, + List? roomKeys = default, + List? spaceKeys = default, + string? startsAt = default, + string? tenantKey = default, + List? unitKeys = default, + string? userIdentityKey = default, + string? userKey = default + ) + { + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + CustomMetadata = customMetadata; + EndsAt = endsAt; + FacilityKeys = facilityKeys; + GuestKey = guestKey; + ListingKeys = listingKeys; + Name = name; + PreferredCode = preferredCode; + PropertyKeys = propertyKeys; + ReservationKey = reservationKey; + ResidentKey = residentKey; + RoomKeys = roomKeys; + SpaceKeys = spaceKeys; + StartsAt = startsAt; + TenantKey = tenantKey; + UnitKeys = unitKeys; + UserIdentityKey = userIdentityKey; + UserKey = userKey; + } + + /// + /// Building keys associated with the access grant. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// Common area keys associated with the access grant. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadata { get; set; } + + /// + /// Ending date and time for the access grant. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Facility keys associated with the access grant. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// Guest key associated with the access grant. + /// + [DataMember(Name = "guest_key", IsRequired = false, EmitDefaultValue = false)] + public string? GuestKey { get; set; } + + /// + /// Listing keys associated with the access grant. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// Your name for this access grant resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Preferred PIN code to use when creating access for this reservation. + /// + [DataMember(Name = "preferred_code", IsRequired = false, EmitDefaultValue = false)] + public string? PreferredCode { get; set; } + + /// + /// Property keys associated with the access grant. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// Your unique identifier for the reservation. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + /// + /// Resident key associated with the access grant. + /// + [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResidentKey { get; set; } + + /// + /// Room keys associated with the access grant. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// Space keys associated with the access grant. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Starting date and time for the access grant. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Tenant key associated with the access grant. + /// + [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] + public string? TenantKey { get; set; } + + /// + /// Unit keys associated with the access grant. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + /// + /// User identity key associated with the access grant. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + /// + /// User key associated with the access grant. + /// + [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestResidents_model")] + public class PushDataRequestResidents + { + [JsonConstructorAttribute] + protected PushDataRequestResidents() { } + + public PushDataRequestResidents( + string? emailAddress = default, + string? name = default, + string? phoneNumber = default, + string? residentKey = default + ) + { + EmailAddress = emailAddress; + Name = name; + PhoneNumber = phoneNumber; + ResidentKey = residentKey; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Your unique identifier for the resident. + /// + [DataMember(Name = "resident_key", IsRequired = false, EmitDefaultValue = false)] + public string? ResidentKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestRooms_model")] + public class PushDataRequestRooms + { + [JsonConstructorAttribute] + protected PushDataRequestRooms() { } + + public PushDataRequestRooms( + string? name = default, + string? parentSiteKey = default, + string? roomKey = default + ) + { + Name = name; + ParentSiteKey = parentSiteKey; + RoomKey = roomKey; + } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] + public string? ParentSiteKey { get; set; } + + /// + /// Your unique identifier for the room. + /// + [DataMember(Name = "room_key", IsRequired = false, EmitDefaultValue = false)] + public string? RoomKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestSites_model")] + public class PushDataRequestSites + { + [JsonConstructorAttribute] + protected PushDataRequestSites() { } + + public PushDataRequestSites(string? name = default, string? siteKey = default) + { + Name = name; + SiteKey = siteKey; + } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "site_key", IsRequired = false, EmitDefaultValue = false)] + public string? SiteKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestSpaces_model")] + public class PushDataRequestSpaces + { + [JsonConstructorAttribute] + protected PushDataRequestSpaces() { } + + public PushDataRequestSpaces( + PushDataRequestSpacesCustomerData? customerData = default, + int? durationMinutes = default, + PushDataRequestSpacesGeolocation? geolocation = default, + string? name = default, + string? parentSiteKey = default, + string? spaceKey = default + ) + { + CustomerData = customerData; + DurationMinutes = durationMinutes; + Geolocation = geolocation; + Name = name; + ParentSiteKey = parentSiteKey; + SpaceKey = spaceKey; + } + + /// + /// Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). + /// + [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] + public PushDataRequestSpacesCustomerData? CustomerData { get; set; } + + /// + /// Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. + /// + [DataMember(Name = "duration_minutes", IsRequired = false, EmitDefaultValue = false)] + public int? DurationMinutes { get; set; } + + /// + /// Geographic coordinates (latitude and longitude) of the space. + /// + [DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] + public PushDataRequestSpacesGeolocation? Geolocation { get; set; } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] + public string? ParentSiteKey { get; set; } + + /// + /// Your unique identifier for the space. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestSpacesCustomerData_model")] + public class PushDataRequestSpacesCustomerData + { + [JsonConstructorAttribute] + protected PushDataRequestSpacesCustomerData() { } + + public PushDataRequestSpacesCustomerData( + string? address = default, + string? defaultCheckinTime = default, + string? defaultCheckoutTime = default, + string? timeZone = default + ) + { + Address = address; + DefaultCheckinTime = defaultCheckinTime; + DefaultCheckoutTime = defaultCheckoutTime; + TimeZone = timeZone; + } + + /// + /// Postal address for the space. + /// + [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] + public string? Address { get; set; } + + /// + /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember( + Name = "default_checkin_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCheckinTime { get; set; } + + /// + /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember( + Name = "default_checkout_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCheckoutTime { get; set; } + + /// + /// IANA time zone for the space, e.g. America/Los_Angeles. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestSpacesGeolocation_model")] + public class PushDataRequestSpacesGeolocation + { + [JsonConstructorAttribute] + protected PushDataRequestSpacesGeolocation() { } + + public PushDataRequestSpacesGeolocation( + float? latitude = default, + float? longitude = default + ) + { + Latitude = latitude; + Longitude = longitude; + } + + /// + /// Latitude of the space, in decimal degrees. + /// + [DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] + public float? Latitude { get; set; } + + /// + /// Longitude of the space, in decimal degrees. + /// + [DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] + public float? Longitude { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestStaffMembers_model")] + public class PushDataRequestStaffMembers + { + [JsonConstructorAttribute] + protected PushDataRequestStaffMembers() { } + + public PushDataRequestStaffMembers( + List? buildingKeys = default, + List? commonAreaKeys = default, + string? emailAddress = default, + List? facilityKeys = default, + List? listingKeys = default, + string? name = default, + string? phoneNumber = default, + List? propertyKeys = default, + List? propertyListingKeys = default, + List? roomKeys = default, + List? siteKeys = default, + List? spaceKeys = default, + string? staffMemberKey = default, + List? unitKeys = default + ) + { + BuildingKeys = buildingKeys; + CommonAreaKeys = commonAreaKeys; + EmailAddress = emailAddress; + FacilityKeys = facilityKeys; + ListingKeys = listingKeys; + Name = name; + PhoneNumber = phoneNumber; + PropertyKeys = propertyKeys; + PropertyListingKeys = propertyListingKeys; + RoomKeys = roomKeys; + SiteKeys = siteKeys; + SpaceKeys = spaceKeys; + StaffMemberKey = staffMemberKey; + UnitKeys = unitKeys; + } + + /// + /// List of unique identifiers for the buildings the staff member is associated with. + /// + [DataMember(Name = "building_keys", IsRequired = false, EmitDefaultValue = false)] + public List? BuildingKeys { get; set; } + + /// + /// List of unique identifiers for the common areas the staff member is associated with. + /// + [DataMember(Name = "common_area_keys", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAreaKeys { get; set; } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// List of unique identifiers for the facilities the staff member is associated with. + /// + [DataMember(Name = "facility_keys", IsRequired = false, EmitDefaultValue = false)] + public List? FacilityKeys { get; set; } + + /// + /// List of unique identifiers for the listings the staff member is associated with. + /// + [DataMember(Name = "listing_keys", IsRequired = false, EmitDefaultValue = false)] + public List? ListingKeys { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// List of unique identifiers for the properties the staff member is associated with. + /// + [DataMember(Name = "property_keys", IsRequired = false, EmitDefaultValue = false)] + public List? PropertyKeys { get; set; } + + /// + /// List of unique identifiers for the property listings the staff member is associated with. + /// + [DataMember( + Name = "property_listing_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List? PropertyListingKeys { get; set; } + + /// + /// List of unique identifiers for the rooms the staff member is associated with. + /// + [DataMember(Name = "room_keys", IsRequired = false, EmitDefaultValue = false)] + public List? RoomKeys { get; set; } + + /// + /// List of unique identifiers for the sites the staff member is associated with. + /// + [DataMember(Name = "site_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SiteKeys { get; set; } + + /// + /// List of unique identifiers for the spaces the staff member is associated with. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + /// + /// Your unique identifier for the staff. + /// + [DataMember(Name = "staff_member_key", IsRequired = false, EmitDefaultValue = false)] + public string? StaffMemberKey { get; set; } + + /// + /// List of unique identifiers for the units the staff member is associated with. + /// + [DataMember(Name = "unit_keys", IsRequired = false, EmitDefaultValue = false)] + public List? UnitKeys { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestTenants_model")] + public class PushDataRequestTenants + { + [JsonConstructorAttribute] + protected PushDataRequestTenants() { } + + public PushDataRequestTenants( + string? emailAddress = default, + string? name = default, + string? phoneNumber = default, + string? tenantKey = default + ) + { + EmailAddress = emailAddress; + Name = name; + PhoneNumber = phoneNumber; + TenantKey = tenantKey; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Your unique identifier for the tenant. + /// + [DataMember(Name = "tenant_key", IsRequired = false, EmitDefaultValue = false)] + public string? TenantKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestUnits_model")] + public class PushDataRequestUnits + { + [JsonConstructorAttribute] + protected PushDataRequestUnits() { } + + public PushDataRequestUnits( + string? name = default, + string? parentSiteKey = default, + string? unitKey = default + ) + { + Name = name; + ParentSiteKey = parentSiteKey; + UnitKey = unitKey; + } + + /// + /// Your display name for this location resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Your unique identifier for the site. + /// + [DataMember(Name = "parent_site_key", IsRequired = false, EmitDefaultValue = false)] + public string? ParentSiteKey { get; set; } + + /// + /// Your unique identifier for the unit. + /// + [DataMember(Name = "unit_key", IsRequired = false, EmitDefaultValue = false)] + public string? UnitKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestUserIdentities_model")] + public class PushDataRequestUserIdentities + { + [JsonConstructorAttribute] + protected PushDataRequestUserIdentities() { } + + public PushDataRequestUserIdentities( + string? emailAddress = default, + string? name = default, + string? phoneNumber = default, + string? userIdentityKey = default + ) + { + EmailAddress = emailAddress; + Name = name; + PhoneNumber = phoneNumber; + UserIdentityKey = userIdentityKey; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Your unique identifier for the user identity. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "pushDataRequestUsers_model")] + public class PushDataRequestUsers + { + [JsonConstructorAttribute] + protected PushDataRequestUsers() { } + + public PushDataRequestUsers( + string? emailAddress = default, + string? name = default, + string? phoneNumber = default, + string? userKey = default + ) + { + EmailAddress = emailAddress; + Name = name; + PhoneNumber = phoneNumber; + UserKey = userKey; + } + + /// + /// Email address associated with the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Your display name for this user identity resource. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Phone number associated with the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Your unique identifier for the user. + /// + [DataMember(Name = "user_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Pushes customer data including resources like spaces, properties, rooms, users, etc. + /// + public void PushData(PushDataRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/customers/push_data", requestOptions); + } + + /// + /// Pushes customer data including resources like spaces, properties, rooms, users, etc. + /// + public void PushData( + List? accessGrants = default, + List? bookings = default, + List? buildings = default, + List? commonAreas = default, + string customerKey = default, + List? facilities = default, + List? guests = default, + List? listings = default, + List? properties = default, + List? propertyListings = default, + List? reservations = default, + List? residents = default, + List? rooms = default, + List? sites = default, + List? spaces = default, + List? staffMembers = default, + List? tenants = default, + List? units = default, + List? userIdentities = default, + List? users = default + ) + { + PushData( + new PushDataRequest( + accessGrants: accessGrants, + bookings: bookings, + buildings: buildings, + commonAreas: commonAreas, + customerKey: customerKey, + facilities: facilities, + guests: guests, + listings: listings, + properties: properties, + propertyListings: propertyListings, + reservations: reservations, + residents: residents, + rooms: rooms, + sites: sites, + spaces: spaces, + staffMembers: staffMembers, + tenants: tenants, + units: units, + userIdentities: userIdentities, + users: users + ) + ); + } + + /// + /// Pushes customer data including resources like spaces, properties, rooms, users, etc. + /// + public async Task PushDataAsync(PushDataRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/customers/push_data", requestOptions); + } + + /// + /// Pushes customer data including resources like spaces, properties, rooms, users, etc. + /// + public async Task PushDataAsync( + List? accessGrants = default, + List? bookings = default, + List? buildings = default, + List? commonAreas = default, + string customerKey = default, + List? facilities = default, + List? guests = default, + List? listings = default, + List? properties = default, + List? propertyListings = default, + List? reservations = default, + List? residents = default, + List? rooms = default, + List? sites = default, + List? spaces = default, + List? staffMembers = default, + List? tenants = default, + List? units = default, + List? userIdentities = default, + List? users = default + ) + { + await PushDataAsync( + new PushDataRequest( + accessGrants: accessGrants, + bookings: bookings, + buildings: buildings, + commonAreas: commonAreas, + customerKey: customerKey, + facilities: facilities, + guests: guests, + listings: listings, + properties: properties, + propertyListings: propertyListings, + reservations: reservations, + residents: residents, + rooms: rooms, + sites: sites, + spaces: spaces, + staffMembers: staffMembers, + tenants: tenants, + units: units, + userIdentities: userIdentities, + users: users + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Customers Customers => new(this); -} + public partial class SeamClient + { + public Api.Customers Customers => new(this); + } -public partial interface ISeamClient -{ -public Api.Customers Customers { get; } -} + public partial interface ISeamClient + { + public Api.Customers Customers { get; } + } } diff --git a/src/Seam/Api/DailyProgramsThermostats.cs b/src/Seam/Api/DailyProgramsThermostats.cs index aa7510ee..01a5d173 100644 --- a/src/Seam/Api/DailyProgramsThermostats.cs +++ b/src/Seam/Api/DailyProgramsThermostats.cs @@ -9,444 +9,526 @@ namespace Seam.Api { -public class DailyProgramsThermostats -{ -private ISeamClient _seam; - -public DailyProgramsThermostats(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Thermostat Daily Program. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(string deviceId = default, string name = default, List periods = default) -{ -DeviceId = deviceId; -Name = name; -Periods = periods; -} - -/// -/// ID of the thermostat device for which you want to create a daily program. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Name of the thermostat daily program. -/// -[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// Array of thermostat daily program periods. -/// -[DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)] -public List Periods { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestPeriods_model")] -public class CreateRequestPeriods -{ -[JsonConstructorAttribute] -protected CreateRequestPeriods() { } - -public CreateRequestPeriods(string? climatePresetKey = default, string? startsAtTime = default) -{ -ClimatePresetKey = climatePresetKey; -StartsAtTime = startsAtTime; -} - -/// -/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string? ClimatePresetKey { get; set; } - -/// -/// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAtTime { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(ThermostatDailyProgram thermostatDailyProgram = default) -{ -ThermostatDailyProgram = thermostatDailyProgram; -} - -/// -/// OK -/// -[DataMember(Name = "thermostat_daily_program", IsRequired = false, EmitDefaultValue = false)] -public ThermostatDailyProgram ThermostatDailyProgram { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. -/// -public ThermostatDailyProgram Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/daily_programs/create", requestOptions).EnsureData("/thermostats/daily_programs/create").ThermostatDailyProgram; -} - -/// -/// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. -/// -public ThermostatDailyProgram Create(string deviceId = default, string name = default, List periods = default) -{ -return Create(new CreateRequest(deviceId: deviceId, name: name, periods: periods)); -} - -/// -/// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/daily_programs/create", requestOptions)).EnsureData("/thermostats/daily_programs/create").ThermostatDailyProgram; -} - -/// -/// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. -/// -public async Task CreateAsync(string deviceId = default, string name = default, List periods = default) -{ -return (await CreateAsync(new CreateRequest(deviceId: deviceId, name: name, periods: periods))); -} - -/// -/// Request parameters for Delete a Thermostat Daily Program. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string thermostatDailyProgramId = default) -{ -ThermostatDailyProgramId = thermostatDailyProgramId; -} - -/// -/// ID of the thermostat daily program that you want to delete. -/// -[DataMember(Name = "thermostat_daily_program_id", IsRequired = true, EmitDefaultValue = false)] -public string ThermostatDailyProgramId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a thermostat daily program. -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/thermostats/daily_programs/delete", requestOptions); -} - -/// -/// Deletes a thermostat daily program. -/// -public void Delete(string thermostatDailyProgramId = default) -{ -Delete(new DeleteRequest(thermostatDailyProgramId: thermostatDailyProgramId)); -} - -/// -/// Deletes a thermostat daily program. -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/thermostats/daily_programs/delete", requestOptions); -} - -/// -/// Deletes a thermostat daily program. -/// -public async Task DeleteAsync(string thermostatDailyProgramId = default) -{ -await DeleteAsync(new DeleteRequest(thermostatDailyProgramId: thermostatDailyProgramId)); -} - -/// -/// Request parameters for Update a Thermostat Daily Program. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string name = default, List periods = default, string thermostatDailyProgramId = default) -{ -Name = name; -Periods = periods; -ThermostatDailyProgramId = thermostatDailyProgramId; -} - -/// -/// Name of the thermostat daily program that you want to update. -/// -[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program. -/// -[DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)] -public List Periods { get; set; } - -/// -/// ID of the thermostat daily program that you want to update. -/// -[DataMember(Name = "thermostat_daily_program_id", IsRequired = true, EmitDefaultValue = false)] -public string ThermostatDailyProgramId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateRequestPeriods_model")] -public class UpdateRequestPeriods -{ -[JsonConstructorAttribute] -protected UpdateRequestPeriods() { } - -public UpdateRequestPeriods(string? climatePresetKey = default, string? startsAtTime = default) -{ -ClimatePresetKey = climatePresetKey; -StartsAtTime = startsAtTime; -} - -/// -/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string? ClimatePresetKey { get; set; } - -/// -/// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAtTime { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateResponse_response")] -public class UpdateResponse -{ -[JsonConstructorAttribute] -protected UpdateResponse() { } - -public UpdateResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. -/// -public ActionAttempt Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Patch("/thermostats/daily_programs/update", requestOptions).EnsureData("/thermostats/daily_programs/update").ActionAttempt; -} - -/// -/// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. -/// -public ActionAttempt Update(string name = default, List periods = default, string thermostatDailyProgramId = default) -{ -return Update(new UpdateRequest(name: name, periods: periods, thermostatDailyProgramId: thermostatDailyProgramId)); -} - -/// -/// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PatchAsync("/thermostats/daily_programs/update", requestOptions)).EnsureData("/thermostats/daily_programs/update").ActionAttempt; -} - -/// -/// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. -/// -public async Task UpdateAsync(string name = default, List periods = default, string thermostatDailyProgramId = default) -{ -return (await UpdateAsync(new UpdateRequest(name: name, periods: periods, thermostatDailyProgramId: thermostatDailyProgramId))); -} -} + public class DailyProgramsThermostats + { + private ISeamClient _seam; + + public DailyProgramsThermostats(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Thermostat Daily Program. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + string deviceId = default, + string name = default, + List periods = default + ) + { + DeviceId = deviceId; + Name = name; + Periods = periods; + } + + /// + /// ID of the thermostat device for which you want to create a daily program. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Name of the thermostat daily program. + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Array of thermostat daily program periods. + /// + [DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)] + public List Periods { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestPeriods_model")] + public class CreateRequestPeriods + { + [JsonConstructorAttribute] + protected CreateRequestPeriods() { } + + public CreateRequestPeriods( + string? climatePresetKey = default, + string? startsAtTime = default + ) + { + ClimatePresetKey = climatePresetKey; + StartsAtTime = startsAtTime; + } + + /// + /// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string? ClimatePresetKey { get; set; } + + /// + /// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAtTime { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(ThermostatDailyProgram thermostatDailyProgram = default) + { + ThermostatDailyProgram = thermostatDailyProgram; + } + + /// + /// OK + /// + [DataMember( + Name = "thermostat_daily_program", + IsRequired = false, + EmitDefaultValue = false + )] + public ThermostatDailyProgram ThermostatDailyProgram { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + /// + public ThermostatDailyProgram Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/thermostats/daily_programs/create", requestOptions) + .EnsureData("/thermostats/daily_programs/create") + .ThermostatDailyProgram; + } + + /// + /// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + /// + public ThermostatDailyProgram Create( + string deviceId = default, + string name = default, + List periods = default + ) + { + return Create(new CreateRequest(deviceId: deviceId, name: name, periods: periods)); + } + + /// + /// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/thermostats/daily_programs/create", + requestOptions + ) + ) + .EnsureData("/thermostats/daily_programs/create") + .ThermostatDailyProgram; + } + + /// + /// Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + /// + public async Task CreateAsync( + string deviceId = default, + string name = default, + List periods = default + ) + { + return ( + await CreateAsync( + new CreateRequest(deviceId: deviceId, name: name, periods: periods) + ) + ); + } + + /// + /// Request parameters for Delete a Thermostat Daily Program. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string thermostatDailyProgramId = default) + { + ThermostatDailyProgramId = thermostatDailyProgramId; + } + + /// + /// ID of the thermostat daily program that you want to delete. + /// + [DataMember( + Name = "thermostat_daily_program_id", + IsRequired = true, + EmitDefaultValue = false + )] + public string ThermostatDailyProgramId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a thermostat daily program. + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/thermostats/daily_programs/delete", requestOptions); + } + + /// + /// Deletes a thermostat daily program. + /// + public void Delete(string thermostatDailyProgramId = default) + { + Delete(new DeleteRequest(thermostatDailyProgramId: thermostatDailyProgramId)); + } + + /// + /// Deletes a thermostat daily program. + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/thermostats/daily_programs/delete", requestOptions); + } + + /// + /// Deletes a thermostat daily program. + /// + public async Task DeleteAsync(string thermostatDailyProgramId = default) + { + await DeleteAsync( + new DeleteRequest(thermostatDailyProgramId: thermostatDailyProgramId) + ); + } + + /// + /// Request parameters for Update a Thermostat Daily Program. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string name = default, + List periods = default, + string thermostatDailyProgramId = default + ) + { + Name = name; + Periods = periods; + ThermostatDailyProgramId = thermostatDailyProgramId; + } + + /// + /// Name of the thermostat daily program that you want to update. + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program. + /// + [DataMember(Name = "periods", IsRequired = true, EmitDefaultValue = false)] + public List Periods { get; set; } + + /// + /// ID of the thermostat daily program that you want to update. + /// + [DataMember( + Name = "thermostat_daily_program_id", + IsRequired = true, + EmitDefaultValue = false + )] + public string ThermostatDailyProgramId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateRequestPeriods_model")] + public class UpdateRequestPeriods + { + [JsonConstructorAttribute] + protected UpdateRequestPeriods() { } + + public UpdateRequestPeriods( + string? climatePresetKey = default, + string? startsAtTime = default + ) + { + ClimatePresetKey = climatePresetKey; + StartsAtTime = startsAtTime; + } + + /// + /// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string? ClimatePresetKey { get; set; } + + /// + /// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAtTime { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateResponse_response")] + public class UpdateResponse + { + [JsonConstructorAttribute] + protected UpdateResponse() { } + + public UpdateResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + /// + public ActionAttempt Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Patch("/thermostats/daily_programs/update", requestOptions) + .EnsureData("/thermostats/daily_programs/update") + .ActionAttempt; + } + + /// + /// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + /// + public ActionAttempt Update( + string name = default, + List periods = default, + string thermostatDailyProgramId = default + ) + { + return Update( + new UpdateRequest( + name: name, + periods: periods, + thermostatDailyProgramId: thermostatDailyProgramId + ) + ); + } + + /// + /// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PatchAsync( + "/thermostats/daily_programs/update", + requestOptions + ) + ) + .EnsureData("/thermostats/daily_programs/update") + .ActionAttempt; + } + + /// + /// Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + /// + public async Task UpdateAsync( + string name = default, + List periods = default, + string thermostatDailyProgramId = default + ) + { + return ( + await UpdateAsync( + new UpdateRequest( + name: name, + periods: periods, + thermostatDailyProgramId: thermostatDailyProgramId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.DailyProgramsThermostats DailyProgramsThermostats => new(this); -} + public partial class SeamClient + { + public Api.DailyProgramsThermostats DailyProgramsThermostats => new(this); + } -public partial interface ISeamClient -{ -public Api.DailyProgramsThermostats DailyProgramsThermostats { get; } -} + public partial interface ISeamClient + { + public Api.DailyProgramsThermostats DailyProgramsThermostats { get; } + } } diff --git a/src/Seam/Api/Devices.cs b/src/Seam/Api/Devices.cs index 2fc41245..8e273d4b 100644 --- a/src/Seam/Api/Devices.cs +++ b/src/Seam/Api/Devices.cs @@ -9,5299 +9,5497 @@ namespace Seam.Api { -public class Devices -{ -private ISeamClient _seam; - -public Devices(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get a Device. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? deviceId = default, string? name = default) -{ -DeviceId = deviceId; -Name = name; -} - -/// -/// ID of the device that you want to get. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Name of the device that you want to get. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(Device device = default) -{ -Device = device; -} - -/// -/// OK -/// -[DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] -public Device Device { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -/// You must specify either `device_id` or `name`. -/// -public Device Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/devices/get", requestOptions).EnsureData("/devices/get").Device; -} - -/// -/// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -/// You must specify either `device_id` or `name`. -/// -public Device Get(string? deviceId = default, string? name = default) -{ -return Get(new GetRequest(deviceId: deviceId, name: name)); -} - -/// -/// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -/// You must specify either `device_id` or `name`. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/devices/get", requestOptions)).EnsureData("/devices/get").Device; -} - -/// -/// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -/// You must specify either `device_id` or `name`. -/// -public async Task GetAsync(string? deviceId = default, string? name = default) -{ -return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); -} - -/// -/// Request parameters for List Devices. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? unstableLocationId = default, string? userIdentifierKey = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountId = connectedAccountId; -ConnectedAccountIds = connectedAccountIds; -CreatedBefore = createdBefore; -CustomMetadataHas = customMetadataHas; -CustomerKey = customerKey; -DeviceIds = deviceIds; -DeviceType = deviceType; -DeviceTypes = deviceTypes; -Limit = limit; -Manufacturer = manufacturer; -PageCursor = pageCursor; -Search = search; -SpaceId = spaceId; -UnstableLocationId = unstableLocationId; -UserIdentifierKey = userIdentifierKey; -} - -/// -/// Device type for which you want to list devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "akuvox_lock")] -AkuvoxLock = 1, - -[EnumMember(Value = "august_lock")] -AugustLock = 2, - -[EnumMember(Value = "brivo_access_point")] -BrivoAccessPoint = 3, - -[EnumMember(Value = "butterflymx_panel")] -ButterflymxPanel = 4, - -[EnumMember(Value = "avigilon_alta_entry")] -AvigilonAltaEntry = 5, - -[EnumMember(Value = "doorking_lock")] -DoorkingLock = 6, - -[EnumMember(Value = "genie_door")] -GenieDoor = 7, - -[EnumMember(Value = "igloo_lock")] -IglooLock = 8, - -[EnumMember(Value = "linear_lock")] -LinearLock = 9, - -[EnumMember(Value = "lockly_lock")] -LocklyLock = 10, - -[EnumMember(Value = "kwikset_lock")] -KwiksetLock = 11, - -[EnumMember(Value = "nuki_lock")] -NukiLock = 12, - -[EnumMember(Value = "salto_lock")] -SaltoLock = 13, - -[EnumMember(Value = "schlage_lock")] -SchlageLock = 14, - -[EnumMember(Value = "smartthings_lock")] -SmartthingsLock = 15, - -[EnumMember(Value = "wyze_lock")] -WyzeLock = 16, - -[EnumMember(Value = "yale_lock")] -YaleLock = 17, - -[EnumMember(Value = "two_n_intercom")] -TwoNIntercom = 18, - -[EnumMember(Value = "controlbyweb_device")] -ControlbywebDevice = 19, - -[EnumMember(Value = "ttlock_lock")] -TtlockLock = 20, - -[EnumMember(Value = "igloohome_lock")] -IgloohomeLock = 21, - -[EnumMember(Value = "four_suites_door")] -FourSuitesDoor = 22, - -[EnumMember(Value = "dormakaba_oracode_door")] -DormakabaOracodeDoor = 23, - -[EnumMember(Value = "tedee_lock")] -TedeeLock = 24, - -[EnumMember(Value = "akiles_lock")] -AkilesLock = 25, - -[EnumMember(Value = "ultraloq_lock")] -UltraloqLock = 26, - -[EnumMember(Value = "yacan_lock")] -YacanLock = 27, - -[EnumMember(Value = "keyincode_lock")] -KeyincodeLock = 28, - -[EnumMember(Value = "omnitec_lock")] -OmnitecLock = 29, - -[EnumMember(Value = "kisi_lock")] -KisiLock = 30, - -[EnumMember(Value = "aqara_lock")] -AqaraLock = 31, - -[EnumMember(Value = "keynest_key")] -KeynestKey = 32, - -[EnumMember(Value = "noiseaware_activity_zone")] -NoiseawareActivityZone = 33, - -[EnumMember(Value = "minut_sensor")] -MinutSensor = 34, - -[EnumMember(Value = "ecobee_thermostat")] -EcobeeThermostat = 35, - -[EnumMember(Value = "nest_thermostat")] -NestThermostat = 36, - -[EnumMember(Value = "honeywell_resideo_thermostat")] -HoneywellResideoThermostat = 37, - -[EnumMember(Value = "tado_thermostat")] -TadoThermostat = 38, - -[EnumMember(Value = "sensi_thermostat")] -SensiThermostat = 39, - -[EnumMember(Value = "smartthings_thermostat")] -SmartthingsThermostat = 40, - -[EnumMember(Value = "ios_phone")] -IosPhone = 41, - -[EnumMember(Value = "android_phone")] -AndroidPhone = 42, - -[EnumMember(Value = "ring_camera")] -RingCamera = 43, - -[EnumMember(Value = "tapo_camera")] -TapoCamera = 44, - -[EnumMember(Value = "arlo_camera")] -ArloCamera = 45, - -[EnumMember(Value = "reolink_camera")] -ReolinkCamera = 46, -} - -/// -/// Array of device types for which you want to list devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "akuvox_lock")] -AkuvoxLock = 1, - -[EnumMember(Value = "august_lock")] -AugustLock = 2, - -[EnumMember(Value = "brivo_access_point")] -BrivoAccessPoint = 3, - -[EnumMember(Value = "butterflymx_panel")] -ButterflymxPanel = 4, - -[EnumMember(Value = "avigilon_alta_entry")] -AvigilonAltaEntry = 5, - -[EnumMember(Value = "doorking_lock")] -DoorkingLock = 6, - -[EnumMember(Value = "genie_door")] -GenieDoor = 7, - -[EnumMember(Value = "igloo_lock")] -IglooLock = 8, - -[EnumMember(Value = "linear_lock")] -LinearLock = 9, - -[EnumMember(Value = "lockly_lock")] -LocklyLock = 10, - -[EnumMember(Value = "kwikset_lock")] -KwiksetLock = 11, - -[EnumMember(Value = "nuki_lock")] -NukiLock = 12, - -[EnumMember(Value = "salto_lock")] -SaltoLock = 13, - -[EnumMember(Value = "schlage_lock")] -SchlageLock = 14, - -[EnumMember(Value = "smartthings_lock")] -SmartthingsLock = 15, - -[EnumMember(Value = "wyze_lock")] -WyzeLock = 16, - -[EnumMember(Value = "yale_lock")] -YaleLock = 17, - -[EnumMember(Value = "two_n_intercom")] -TwoNIntercom = 18, - -[EnumMember(Value = "controlbyweb_device")] -ControlbywebDevice = 19, - -[EnumMember(Value = "ttlock_lock")] -TtlockLock = 20, - -[EnumMember(Value = "igloohome_lock")] -IgloohomeLock = 21, - -[EnumMember(Value = "four_suites_door")] -FourSuitesDoor = 22, - -[EnumMember(Value = "dormakaba_oracode_door")] -DormakabaOracodeDoor = 23, - -[EnumMember(Value = "tedee_lock")] -TedeeLock = 24, - -[EnumMember(Value = "akiles_lock")] -AkilesLock = 25, - -[EnumMember(Value = "ultraloq_lock")] -UltraloqLock = 26, - -[EnumMember(Value = "yacan_lock")] -YacanLock = 27, - -[EnumMember(Value = "keyincode_lock")] -KeyincodeLock = 28, - -[EnumMember(Value = "omnitec_lock")] -OmnitecLock = 29, - -[EnumMember(Value = "kisi_lock")] -KisiLock = 30, - -[EnumMember(Value = "aqara_lock")] -AqaraLock = 31, - -[EnumMember(Value = "keynest_key")] -KeynestKey = 32, - -[EnumMember(Value = "noiseaware_activity_zone")] -NoiseawareActivityZone = 33, - -[EnumMember(Value = "minut_sensor")] -MinutSensor = 34, - -[EnumMember(Value = "ecobee_thermostat")] -EcobeeThermostat = 35, - -[EnumMember(Value = "nest_thermostat")] -NestThermostat = 36, - -[EnumMember(Value = "honeywell_resideo_thermostat")] -HoneywellResideoThermostat = 37, - -[EnumMember(Value = "tado_thermostat")] -TadoThermostat = 38, - -[EnumMember(Value = "sensi_thermostat")] -SensiThermostat = 39, - -[EnumMember(Value = "smartthings_thermostat")] -SmartthingsThermostat = 40, - -[EnumMember(Value = "ios_phone")] -IosPhone = 41, - -[EnumMember(Value = "android_phone")] -AndroidPhone = 42, + public class Devices + { + private ISeamClient _seam; + + public Devices(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get a Device. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string? deviceId = default, string? name = default) + { + DeviceId = deviceId; + Name = name; + } + + /// + /// ID of the device that you want to get. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Name of the device that you want to get. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Device device = default) + { + Device = device; + } + + /// + /// OK + /// + [DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] + public Device Device { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + /// You must specify either `device_id` or `name`. + /// + public Device Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/devices/get", requestOptions) + .EnsureData("/devices/get") + .Device; + } + + /// + /// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + /// You must specify either `device_id` or `name`. + /// + public Device Get(string? deviceId = default, string? name = default) + { + return Get(new GetRequest(deviceId: deviceId, name: name)); + } + + /// + /// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + /// You must specify either `device_id` or `name`. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/devices/get", requestOptions)) + .EnsureData("/devices/get") + .Device; + } + + /// + /// Returns a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + /// You must specify either `device_id` or `name`. + /// + public async Task GetAsync(string? deviceId = default, string? name = default) + { + return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); + } + + /// + /// Request parameters for List Devices. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? connectWebviewId = default, + string? connectedAccountId = default, + List? connectedAccountIds = default, + string? createdBefore = default, + object? customMetadataHas = default, + string? customerKey = default, + List? deviceIds = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + float? limit = default, + ListRequest.ManufacturerEnum? manufacturer = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default, + string? unstableLocationId = default, + string? userIdentifierKey = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountId = connectedAccountId; + ConnectedAccountIds = connectedAccountIds; + CreatedBefore = createdBefore; + CustomMetadataHas = customMetadataHas; + CustomerKey = customerKey; + DeviceIds = deviceIds; + DeviceType = deviceType; + DeviceTypes = deviceTypes; + Limit = limit; + Manufacturer = manufacturer; + PageCursor = pageCursor; + Search = search; + SpaceId = spaceId; + UnstableLocationId = unstableLocationId; + UserIdentifierKey = userIdentifierKey; + } + + /// + /// Device type for which you want to list devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "akuvox_lock")] + AkuvoxLock = 1, + + [EnumMember(Value = "august_lock")] + AugustLock = 2, + + [EnumMember(Value = "brivo_access_point")] + BrivoAccessPoint = 3, + + [EnumMember(Value = "butterflymx_panel")] + ButterflymxPanel = 4, + + [EnumMember(Value = "avigilon_alta_entry")] + AvigilonAltaEntry = 5, + + [EnumMember(Value = "doorking_lock")] + DoorkingLock = 6, + + [EnumMember(Value = "genie_door")] + GenieDoor = 7, + + [EnumMember(Value = "igloo_lock")] + IglooLock = 8, + + [EnumMember(Value = "linear_lock")] + LinearLock = 9, + + [EnumMember(Value = "lockly_lock")] + LocklyLock = 10, + + [EnumMember(Value = "kwikset_lock")] + KwiksetLock = 11, + + [EnumMember(Value = "nuki_lock")] + NukiLock = 12, + + [EnumMember(Value = "salto_lock")] + SaltoLock = 13, -[EnumMember(Value = "ring_camera")] -RingCamera = 43, + [EnumMember(Value = "schlage_lock")] + SchlageLock = 14, -[EnumMember(Value = "tapo_camera")] -TapoCamera = 44, + [EnumMember(Value = "smartthings_lock")] + SmartthingsLock = 15, -[EnumMember(Value = "arlo_camera")] -ArloCamera = 45, + [EnumMember(Value = "wyze_lock")] + WyzeLock = 16, -[EnumMember(Value = "reolink_camera")] -ReolinkCamera = 46, -} + [EnumMember(Value = "yale_lock")] + YaleLock = 17, -/// -/// Manufacturer for which you want to list devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ManufacturerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "two_n_intercom")] + TwoNIntercom = 18, -[EnumMember(Value = "akuvox")] -Akuvox = 1, + [EnumMember(Value = "controlbyweb_device")] + ControlbywebDevice = 19, -[EnumMember(Value = "august")] -August = 2, + [EnumMember(Value = "ttlock_lock")] + TtlockLock = 20, -[EnumMember(Value = "avigilon_alta")] -AvigilonAlta = 3, + [EnumMember(Value = "igloohome_lock")] + IgloohomeLock = 21, -[EnumMember(Value = "brivo")] -Brivo = 4, + [EnumMember(Value = "four_suites_door")] + FourSuitesDoor = 22, -[EnumMember(Value = "butterflymx")] -Butterflymx = 5, + [EnumMember(Value = "dormakaba_oracode_door")] + DormakabaOracodeDoor = 23, -[EnumMember(Value = "doorking")] -Doorking = 6, + [EnumMember(Value = "tedee_lock")] + TedeeLock = 24, -[EnumMember(Value = "four_suites")] -FourSuites = 7, + [EnumMember(Value = "akiles_lock")] + AkilesLock = 25, -[EnumMember(Value = "genie")] -Genie = 8, + [EnumMember(Value = "ultraloq_lock")] + UltraloqLock = 26, -[EnumMember(Value = "igloo")] -Igloo = 9, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, -[EnumMember(Value = "keywe")] -Keywe = 10, + [EnumMember(Value = "keyincode_lock")] + KeyincodeLock = 28, -[EnumMember(Value = "kwikset")] -Kwikset = 11, + [EnumMember(Value = "omnitec_lock")] + OmnitecLock = 29, -[EnumMember(Value = "linear")] -Linear = 12, + [EnumMember(Value = "kisi_lock")] + KisiLock = 30, -[EnumMember(Value = "nuki")] -Nuki = 13, + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, -[EnumMember(Value = "philia")] -Philia = 14, + [EnumMember(Value = "keynest_key")] + KeynestKey = 32, -[EnumMember(Value = "salto")] -Salto = 15, + [EnumMember(Value = "noiseaware_activity_zone")] + NoiseawareActivityZone = 33, -[EnumMember(Value = "samsung")] -Samsung = 16, + [EnumMember(Value = "minut_sensor")] + MinutSensor = 34, -[EnumMember(Value = "schlage")] -Schlage = 17, + [EnumMember(Value = "ecobee_thermostat")] + EcobeeThermostat = 35, -[EnumMember(Value = "seam")] -Seam = 18, + [EnumMember(Value = "nest_thermostat")] + NestThermostat = 36, -[EnumMember(Value = "unknown")] -Unknown = 19, + [EnumMember(Value = "honeywell_resideo_thermostat")] + HoneywellResideoThermostat = 37, -[EnumMember(Value = "wyze")] -Wyze = 20, + [EnumMember(Value = "tado_thermostat")] + TadoThermostat = 38, -[EnumMember(Value = "yale")] -Yale = 21, + [EnumMember(Value = "sensi_thermostat")] + SensiThermostat = 39, -[EnumMember(Value = "two_n")] -TwoN = 22, + [EnumMember(Value = "smartthings_thermostat")] + SmartthingsThermostat = 40, -[EnumMember(Value = "ttlock")] -Ttlock = 23, + [EnumMember(Value = "ios_phone")] + IosPhone = 41, -[EnumMember(Value = "igloohome")] -Igloohome = 24, + [EnumMember(Value = "android_phone")] + AndroidPhone = 42, -[EnumMember(Value = "controlbyweb")] -Controlbyweb = 25, + [EnumMember(Value = "ring_camera")] + RingCamera = 43, -[EnumMember(Value = "tedee")] -Tedee = 26, + [EnumMember(Value = "tapo_camera")] + TapoCamera = 44, -[EnumMember(Value = "keyincode")] -Keyincode = 27, + [EnumMember(Value = "arlo_camera")] + ArloCamera = 45, -[EnumMember(Value = "akiles")] -Akiles = 28, + [EnumMember(Value = "reolink_camera")] + ReolinkCamera = 46, + } -[EnumMember(Value = "aqara")] -Aqara = 29, + /// + /// Array of device types for which you want to list devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "ecobee")] -Ecobee = 30, + [EnumMember(Value = "akuvox_lock")] + AkuvoxLock = 1, -[EnumMember(Value = "eufy")] -Eufy = 31, + [EnumMember(Value = "august_lock")] + AugustLock = 2, -[EnumMember(Value = "dormakaba_oracode")] -DormakabaOracode = 32, + [EnumMember(Value = "brivo_access_point")] + BrivoAccessPoint = 3, -[EnumMember(Value = "dormakaba_oracode_iho")] -DormakabaOracodeIho = 33, + [EnumMember(Value = "butterflymx_panel")] + ButterflymxPanel = 4, -[EnumMember(Value = "honeywell_resideo")] -HoneywellResideo = 34, + [EnumMember(Value = "avigilon_alta_entry")] + AvigilonAltaEntry = 5, -[EnumMember(Value = "keynest")] -Keynest = 35, + [EnumMember(Value = "doorking_lock")] + DoorkingLock = 6, -[EnumMember(Value = "korelock")] -Korelock = 36, + [EnumMember(Value = "genie_door")] + GenieDoor = 7, -[EnumMember(Value = "lockly")] -Lockly = 37, + [EnumMember(Value = "igloo_lock")] + IglooLock = 8, -[EnumMember(Value = "minut")] -Minut = 38, + [EnumMember(Value = "linear_lock")] + LinearLock = 9, -[EnumMember(Value = "nest")] -Nest = 39, + [EnumMember(Value = "lockly_lock")] + LocklyLock = 10, -[EnumMember(Value = "noiseaware")] -Noiseaware = 40, + [EnumMember(Value = "kwikset_lock")] + KwiksetLock = 11, -[EnumMember(Value = "sensi")] -Sensi = 41, + [EnumMember(Value = "nuki_lock")] + NukiLock = 12, -[EnumMember(Value = "smartthings")] -Smartthings = 42, + [EnumMember(Value = "salto_lock")] + SaltoLock = 13, -[EnumMember(Value = "tado")] -Tado = 43, + [EnumMember(Value = "schlage_lock")] + SchlageLock = 14, -[EnumMember(Value = "ultraloq")] -Ultraloq = 44, + [EnumMember(Value = "smartthings_lock")] + SmartthingsLock = 15, -[EnumMember(Value = "ring")] -Ring = 45, + [EnumMember(Value = "wyze_lock")] + WyzeLock = 16, -[EnumMember(Value = "tapo")] -Tapo = 46, + [EnumMember(Value = "yale_lock")] + YaleLock = 17, -[EnumMember(Value = "arlo")] -Arlo = 47, + [EnumMember(Value = "two_n_intercom")] + TwoNIntercom = 18, -[EnumMember(Value = "reolink")] -Reolink = 48, + [EnumMember(Value = "controlbyweb_device")] + ControlbywebDevice = 19, -[EnumMember(Value = "ical")] -Ical = 49, + [EnumMember(Value = "ttlock_lock")] + TtlockLock = 20, -[EnumMember(Value = "lodgify")] -Lodgify = 50, + [EnumMember(Value = "igloohome_lock")] + IgloohomeLock = 21, -[EnumMember(Value = "hostaway")] -Hostaway = 51, + [EnumMember(Value = "four_suites_door")] + FourSuitesDoor = 22, -[EnumMember(Value = "guesty")] -Guesty = 52, + [EnumMember(Value = "dormakaba_oracode_door")] + DormakabaOracodeDoor = 23, -[EnumMember(Value = "acuity_scheduling")] -AcuityScheduling = 53, + [EnumMember(Value = "tedee_lock")] + TedeeLock = 24, -[EnumMember(Value = "omnitec")] -Omnitec = 54, + [EnumMember(Value = "akiles_lock")] + AkilesLock = 25, -[EnumMember(Value = "kisi")] -Kisi = 55, + [EnumMember(Value = "ultraloq_lock")] + UltraloqLock = 26, -[EnumMember(Value = "slack")] -Slack = 56, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, -[EnumMember(Value = "yacan")] -Yacan = 57, -} + [EnumMember(Value = "keyincode_lock")] + KeyincodeLock = 28, -/// -/// ID of the Connect Webview for which you want to list devices. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectWebviewId { get; set; } - -/// -/// ID of the connected account for which you want to list devices. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Array of IDs of the connected accounts for which you want to list devices. -/// -[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectedAccountIds { get; set; } - -/// -/// Timestamp by which to limit returned devices. Returns devices created before this timestamp. -/// -[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedBefore { get; set; } - -/// -/// Set of key:value [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. -/// -[DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadataHas { get; set; } - -/// -/// Customer key for which you want to list devices. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Array of device IDs for which you want to list devices. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceIds { get; set; } - -/// -/// Device type for which you want to list devices. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - -/// -/// Array of device types for which you want to list devices. -/// -[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceTypes { get; set; } - -/// -/// Numerical limit on the number of devices to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Manufacturer for which you want to list devices. -/// -[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// ID of the space for which you want to list devices. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -[Obsolete("Use `space_id`.")] -[DataMember(Name = "unstable_location_id", IsRequired = false, EmitDefaultValue = false)] -public string? UnstableLocationId { get; set; } - -/// -/// Your own internal user ID for the user for which you want to list devices. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "omnitec_lock")] + OmnitecLock = 29, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "kisi_lock")] + KisiLock = 30, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } + [EnumMember(Value = "keynest_key")] + KeynestKey = 32, -public ListResponse(List devices = default) -{ -Devices = devices; -} + [EnumMember(Value = "noiseaware_activity_zone")] + NoiseawareActivityZone = 33, -/// -/// OK -/// -[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] -public List Devices { get; set; } + [EnumMember(Value = "minut_sensor")] + MinutSensor = 34, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "ecobee_thermostat")] + EcobeeThermostat = 35, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "nest_thermostat")] + NestThermostat = 36, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "honeywell_resideo_thermostat")] + HoneywellResideoThermostat = 37, -/// -/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/devices/list", requestOptions).EnsureData("/devices/list").Devices; -} + [EnumMember(Value = "tado_thermostat")] + TadoThermostat = 38, -/// -/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). -/// -public List List(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? unstableLocationId = default, string? userIdentifierKey = default) -{ -return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, customMetadataHas: customMetadataHas, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, search: search, spaceId: spaceId, unstableLocationId: unstableLocationId, userIdentifierKey: userIdentifierKey)); -} + [EnumMember(Value = "sensi_thermostat")] + SensiThermostat = 39, -/// -/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/devices/list", requestOptions)).EnsureData("/devices/list").Devices; -} + [EnumMember(Value = "smartthings_thermostat")] + SmartthingsThermostat = 40, -/// -/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). -/// -public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, object? customMetadataHas = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default, string? spaceId = default, string? unstableLocationId = default, string? userIdentifierKey = default) -{ -return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, customMetadataHas: customMetadataHas, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, search: search, spaceId: spaceId, unstableLocationId: unstableLocationId, userIdentifierKey: userIdentifierKey))); -} + [EnumMember(Value = "ios_phone")] + IosPhone = 41, -/// -/// Request parameters for List Device Providers. -/// -[DataContract(Name = "listDeviceProvidersRequest_request")] -public class ListDeviceProvidersRequest -{ -[JsonConstructorAttribute] -protected ListDeviceProvidersRequest() { } + [EnumMember(Value = "android_phone")] + AndroidPhone = 42, -public ListDeviceProvidersRequest(ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default) -{ -ProviderCategory = providerCategory; -} + [EnumMember(Value = "ring_camera")] + RingCamera = 43, -/// -/// Category for which you want to list providers. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ProviderCategoryEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "tapo_camera")] + TapoCamera = 44, -[EnumMember(Value = "stable")] -Stable = 1, + [EnumMember(Value = "arlo_camera")] + ArloCamera = 45, -[EnumMember(Value = "consumer_smartlocks")] -ConsumerSmartlocks = 2, + [EnumMember(Value = "reolink_camera")] + ReolinkCamera = 46, + } -[EnumMember(Value = "beta")] -Beta = 3, + /// + /// Manufacturer for which you want to list devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ManufacturerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "thermostats")] -Thermostats = 4, + [EnumMember(Value = "akuvox")] + Akuvox = 1, -[EnumMember(Value = "noise_sensors")] -NoiseSensors = 5, + [EnumMember(Value = "august")] + August = 2, -[EnumMember(Value = "access_control_systems")] -AccessControlSystems = 6, + [EnumMember(Value = "avigilon_alta")] + AvigilonAlta = 3, -[EnumMember(Value = "cameras")] -Cameras = 7, + [EnumMember(Value = "brivo")] + Brivo = 4, -[EnumMember(Value = "connectors")] -Connectors = 8, -} + [EnumMember(Value = "butterflymx")] + Butterflymx = 5, -/// -/// Category for which you want to list providers. -/// -[DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] -public ListDeviceProvidersRequest.ProviderCategoryEnum? ProviderCategory { get; set; } + [EnumMember(Value = "doorking")] + Doorking = 6, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "four_suites")] + FourSuites = 7, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "genie")] + Genie = 8, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "igloo")] + Igloo = 9, -[DataContract(Name = "listDeviceProvidersResponse_response")] -public class ListDeviceProvidersResponse -{ -[JsonConstructorAttribute] -protected ListDeviceProvidersResponse() { } + [EnumMember(Value = "keywe")] + Keywe = 10, -public ListDeviceProvidersResponse(List deviceProviders = default) -{ -DeviceProviders = deviceProviders; -} + [EnumMember(Value = "kwikset")] + Kwikset = 11, -/// -/// OK -/// -[DataMember(Name = "device_providers", IsRequired = false, EmitDefaultValue = false)] -public List DeviceProviders { get; set; } + [EnumMember(Value = "linear")] + Linear = 12, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "nuki")] + Nuki = 13, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "philia")] + Philia = 14, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "salto")] + Salto = 15, -/// -/// Returns a list of all device providers. -/// -/// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. -/// -/// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). -/// -public List ListDeviceProviders(ListDeviceProvidersRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/devices/list_device_providers", requestOptions).EnsureData("/devices/list_device_providers").DeviceProviders; -} + [EnumMember(Value = "samsung")] + Samsung = 16, -/// -/// Returns a list of all device providers. -/// -/// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. -/// -/// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). -/// -public List ListDeviceProviders(ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default) -{ -return ListDeviceProviders(new ListDeviceProvidersRequest(providerCategory: providerCategory)); -} + [EnumMember(Value = "schlage")] + Schlage = 17, -/// -/// Returns a list of all device providers. -/// -/// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. -/// -/// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). -/// -public async Task> ListDeviceProvidersAsync(ListDeviceProvidersRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/devices/list_device_providers", requestOptions)).EnsureData("/devices/list_device_providers").DeviceProviders; -} + [EnumMember(Value = "seam")] + Seam = 18, -/// -/// Returns a list of all device providers. -/// -/// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. -/// -/// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). -/// -public async Task> ListDeviceProvidersAsync(ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default) -{ -return (await ListDeviceProvidersAsync(new ListDeviceProvidersRequest(providerCategory: providerCategory))); -} + [EnumMember(Value = "unknown")] + Unknown = 19, -/// -/// Request parameters for Report Provider Metadata. -/// -[DataContract(Name = "reportProviderMetadataRequest_request")] -public class ReportProviderMetadataRequest -{ -[JsonConstructorAttribute] -protected ReportProviderMetadataRequest() { } + [EnumMember(Value = "wyze")] + Wyze = 20, -public ReportProviderMetadataRequest(List devices = default) -{ -Devices = devices; -} + [EnumMember(Value = "yale")] + Yale = 21, -/// -/// Array of devices with provider metadata to update -/// -[DataMember(Name = "devices", IsRequired = true, EmitDefaultValue = false)] -public List Devices { get; set; } + [EnumMember(Value = "two_n")] + TwoN = 22, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "ttlock")] + Ttlock = 23, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "igloohome")] + Igloohome = 24, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "controlbyweb")] + Controlbyweb = 25, -[DataContract(Name = "reportProviderMetadataRequestDevices_model")] -public class ReportProviderMetadataRequestDevices -{ -[JsonConstructorAttribute] -protected ReportProviderMetadataRequestDevices() { } + [EnumMember(Value = "tedee")] + Tedee = 26, -public ReportProviderMetadataRequestDevices(string? deviceId = default, ReportProviderMetadataRequestDevicesOmnitecMetadata? omnitecMetadata = default, ReportProviderMetadataRequestDevicesSchlageMetadata? schlageMetadata = default, ReportProviderMetadataRequestDevicesUltraloqMetadata? ultraloqMetadata = default) -{ -DeviceId = deviceId; -OmnitecMetadata = omnitecMetadata; -SchlageMetadata = schlageMetadata; -UltraloqMetadata = ultraloqMetadata; -} + [EnumMember(Value = "keyincode")] + Keyincode = 27, -/// -/// ID of the device to update -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Omnitec-specific metadata to update -/// -[DataMember(Name = "omnitec_metadata", IsRequired = false, EmitDefaultValue = false)] -public ReportProviderMetadataRequestDevicesOmnitecMetadata? OmnitecMetadata { get; set; } - -/// -/// Schlage-specific metadata to update -/// -[DataMember(Name = "schlage_metadata", IsRequired = false, EmitDefaultValue = false)] -public ReportProviderMetadataRequestDevicesSchlageMetadata? SchlageMetadata { get; set; } - -/// -/// Ultraloq-specific metadata to update -/// -[DataMember(Name = "ultraloq_metadata", IsRequired = false, EmitDefaultValue = false)] -public ReportProviderMetadataRequestDevicesUltraloqMetadata? UltraloqMetadata { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "akiles")] + Akiles = 28, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "aqara")] + Aqara = 29, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "ecobee")] + Ecobee = 30, -[DataContract(Name = "reportProviderMetadataRequestDevicesOmnitecMetadata_model")] -public class ReportProviderMetadataRequestDevicesOmnitecMetadata -{ -[JsonConstructorAttribute] -protected ReportProviderMetadataRequestDevicesOmnitecMetadata() { } + [EnumMember(Value = "eufy")] + Eufy = 31, -public ReportProviderMetadataRequestDevicesOmnitecMetadata(ReportProviderMetadataRequestDevicesOmnitecMetadata.TimeZoneEnum? timeZone = default) -{ -TimeZone = timeZone; -} + [EnumMember(Value = "dormakaba_oracode")] + DormakabaOracode = 32, -/// -/// IANA timezone for the Omnitec device -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TimeZoneEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "dormakaba_oracode_iho")] + DormakabaOracodeIho = 33, -[EnumMember(Value = "Africa/Abidjan")] -AfricaAbidjan = 1, + [EnumMember(Value = "honeywell_resideo")] + HoneywellResideo = 34, -[EnumMember(Value = "Africa/Accra")] -AfricaAccra = 2, + [EnumMember(Value = "keynest")] + Keynest = 35, -[EnumMember(Value = "Africa/Addis_Ababa")] -AfricaAddisAbaba = 3, + [EnumMember(Value = "korelock")] + Korelock = 36, -[EnumMember(Value = "Africa/Algiers")] -AfricaAlgiers = 4, + [EnumMember(Value = "lockly")] + Lockly = 37, -[EnumMember(Value = "Africa/Asmera")] -AfricaAsmera = 5, + [EnumMember(Value = "minut")] + Minut = 38, -[EnumMember(Value = "Africa/Bamako")] -AfricaBamako = 6, + [EnumMember(Value = "nest")] + Nest = 39, -[EnumMember(Value = "Africa/Bangui")] -AfricaBangui = 7, + [EnumMember(Value = "noiseaware")] + Noiseaware = 40, -[EnumMember(Value = "Africa/Banjul")] -AfricaBanjul = 8, + [EnumMember(Value = "sensi")] + Sensi = 41, -[EnumMember(Value = "Africa/Bissau")] -AfricaBissau = 9, + [EnumMember(Value = "smartthings")] + Smartthings = 42, -[EnumMember(Value = "Africa/Blantyre")] -AfricaBlantyre = 10, + [EnumMember(Value = "tado")] + Tado = 43, -[EnumMember(Value = "Africa/Brazzaville")] -AfricaBrazzaville = 11, + [EnumMember(Value = "ultraloq")] + Ultraloq = 44, -[EnumMember(Value = "Africa/Bujumbura")] -AfricaBujumbura = 12, + [EnumMember(Value = "ring")] + Ring = 45, -[EnumMember(Value = "Africa/Cairo")] -AfricaCairo = 13, + [EnumMember(Value = "tapo")] + Tapo = 46, -[EnumMember(Value = "Africa/Casablanca")] -AfricaCasablanca = 14, + [EnumMember(Value = "arlo")] + Arlo = 47, -[EnumMember(Value = "Africa/Ceuta")] -AfricaCeuta = 15, + [EnumMember(Value = "reolink")] + Reolink = 48, -[EnumMember(Value = "Africa/Conakry")] -AfricaConakry = 16, + [EnumMember(Value = "ical")] + Ical = 49, -[EnumMember(Value = "Africa/Dakar")] -AfricaDakar = 17, + [EnumMember(Value = "lodgify")] + Lodgify = 50, -[EnumMember(Value = "Africa/Dar_es_Salaam")] -AfricaDarEsSalaam = 18, + [EnumMember(Value = "hostaway")] + Hostaway = 51, -[EnumMember(Value = "Africa/Djibouti")] -AfricaDjibouti = 19, + [EnumMember(Value = "guesty")] + Guesty = 52, -[EnumMember(Value = "Africa/Douala")] -AfricaDouala = 20, + [EnumMember(Value = "acuity_scheduling")] + AcuityScheduling = 53, -[EnumMember(Value = "Africa/El_Aaiun")] -AfricaElAaiun = 21, + [EnumMember(Value = "omnitec")] + Omnitec = 54, -[EnumMember(Value = "Africa/Freetown")] -AfricaFreetown = 22, + [EnumMember(Value = "kisi")] + Kisi = 55, -[EnumMember(Value = "Africa/Gaborone")] -AfricaGaborone = 23, + [EnumMember(Value = "slack")] + Slack = 56, + + [EnumMember(Value = "yacan")] + Yacan = 57, + } + + /// + /// ID of the Connect Webview for which you want to list devices. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectWebviewId { get; set; } + + /// + /// ID of the connected account for which you want to list devices. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Array of IDs of the connected accounts for which you want to list devices. + /// + [DataMember( + Name = "connected_account_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? ConnectedAccountIds { get; set; } + + /// + /// Timestamp by which to limit returned devices. Returns devices created before this timestamp. + /// + [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedBefore { get; set; } + + /// + /// Set of key:value [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. + /// + [DataMember(Name = "custom_metadata_has", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadataHas { get; set; } + + /// + /// Customer key for which you want to list devices. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Array of device IDs for which you want to list devices. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceIds { get; set; } + + /// + /// Device type for which you want to list devices. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + + /// + /// Array of device types for which you want to list devices. + /// + [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceTypes { get; set; } + + /// + /// Numerical limit on the number of devices to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Manufacturer for which you want to list devices. + /// + [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// ID of the space for which you want to list devices. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + [Obsolete("Use `space_id`.")] + [DataMember( + Name = "unstable_location_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UnstableLocationId { get; set; } + + /// + /// Your own internal user ID for the user for which you want to list devices. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List devices = default) + { + Devices = devices; + } + + /// + /// OK + /// + [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] + public List Devices { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/devices/list", requestOptions) + .EnsureData("/devices/list") + .Devices; + } + + /// + /// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). + /// + public List List( + string? connectWebviewId = default, + string? connectedAccountId = default, + List? connectedAccountIds = default, + string? createdBefore = default, + object? customMetadataHas = default, + string? customerKey = default, + List? deviceIds = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + float? limit = default, + ListRequest.ManufacturerEnum? manufacturer = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default, + string? unstableLocationId = default, + string? userIdentifierKey = default + ) + { + return List( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + connectedAccountIds: connectedAccountIds, + createdBefore: createdBefore, + customMetadataHas: customMetadataHas, + customerKey: customerKey, + deviceIds: deviceIds, + deviceType: deviceType, + deviceTypes: deviceTypes, + limit: limit, + manufacturer: manufacturer, + pageCursor: pageCursor, + search: search, + spaceId: spaceId, + unstableLocationId: unstableLocationId, + userIdentifierKey: userIdentifierKey + ) + ); + } + + /// + /// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/devices/list", requestOptions)) + .EnsureData("/devices/list") + .Devices; + } + + /// + /// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices). + /// + public async Task> ListAsync( + string? connectWebviewId = default, + string? connectedAccountId = default, + List? connectedAccountIds = default, + string? createdBefore = default, + object? customMetadataHas = default, + string? customerKey = default, + List? deviceIds = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + float? limit = default, + ListRequest.ManufacturerEnum? manufacturer = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default, + string? unstableLocationId = default, + string? userIdentifierKey = default + ) + { + return ( + await ListAsync( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + connectedAccountIds: connectedAccountIds, + createdBefore: createdBefore, + customMetadataHas: customMetadataHas, + customerKey: customerKey, + deviceIds: deviceIds, + deviceType: deviceType, + deviceTypes: deviceTypes, + limit: limit, + manufacturer: manufacturer, + pageCursor: pageCursor, + search: search, + spaceId: spaceId, + unstableLocationId: unstableLocationId, + userIdentifierKey: userIdentifierKey + ) + ) + ); + } + + /// + /// Request parameters for List Device Providers. + /// + [DataContract(Name = "listDeviceProvidersRequest_request")] + public class ListDeviceProvidersRequest + { + [JsonConstructorAttribute] + protected ListDeviceProvidersRequest() { } + + public ListDeviceProvidersRequest( + ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default + ) + { + ProviderCategory = providerCategory; + } + + /// + /// Category for which you want to list providers. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ProviderCategoryEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "stable")] + Stable = 1, + + [EnumMember(Value = "consumer_smartlocks")] + ConsumerSmartlocks = 2, + + [EnumMember(Value = "beta")] + Beta = 3, + + [EnumMember(Value = "thermostats")] + Thermostats = 4, + + [EnumMember(Value = "noise_sensors")] + NoiseSensors = 5, + + [EnumMember(Value = "access_control_systems")] + AccessControlSystems = 6, + + [EnumMember(Value = "cameras")] + Cameras = 7, + + [EnumMember(Value = "connectors")] + Connectors = 8, + } + + /// + /// Category for which you want to list providers. + /// + [DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] + public ListDeviceProvidersRequest.ProviderCategoryEnum? ProviderCategory { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listDeviceProvidersResponse_response")] + public class ListDeviceProvidersResponse + { + [JsonConstructorAttribute] + protected ListDeviceProvidersResponse() { } + + public ListDeviceProvidersResponse(List deviceProviders = default) + { + DeviceProviders = deviceProviders; + } + + /// + /// OK + /// + [DataMember(Name = "device_providers", IsRequired = false, EmitDefaultValue = false)] + public List DeviceProviders { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all device providers. + /// + /// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. + /// + /// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + /// + public List ListDeviceProviders(ListDeviceProvidersRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/devices/list_device_providers", requestOptions) + .EnsureData("/devices/list_device_providers") + .DeviceProviders; + } + + /// + /// Returns a list of all device providers. + /// + /// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. + /// + /// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + /// + public List ListDeviceProviders( + ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default + ) + { + return ListDeviceProviders( + new ListDeviceProvidersRequest(providerCategory: providerCategory) + ); + } + + /// + /// Returns a list of all device providers. + /// + /// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. + /// + /// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + /// + public async Task> ListDeviceProvidersAsync( + ListDeviceProvidersRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/devices/list_device_providers", + requestOptions + ) + ) + .EnsureData("/devices/list_device_providers") + .DeviceProviders; + } + + /// + /// Returns a list of all device providers. + /// + /// The information that this endpoint returns for each provider includes a set of [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. + /// + /// When you create a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + /// + public async Task> ListDeviceProvidersAsync( + ListDeviceProvidersRequest.ProviderCategoryEnum? providerCategory = default + ) + { + return ( + await ListDeviceProvidersAsync( + new ListDeviceProvidersRequest(providerCategory: providerCategory) + ) + ); + } + + /// + /// Request parameters for Report Provider Metadata. + /// + [DataContract(Name = "reportProviderMetadataRequest_request")] + public class ReportProviderMetadataRequest + { + [JsonConstructorAttribute] + protected ReportProviderMetadataRequest() { } + + public ReportProviderMetadataRequest( + List devices = default + ) + { + Devices = devices; + } + + /// + /// Array of devices with provider metadata to update + /// + [DataMember(Name = "devices", IsRequired = true, EmitDefaultValue = false)] + public List Devices { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "reportProviderMetadataRequestDevices_model")] + public class ReportProviderMetadataRequestDevices + { + [JsonConstructorAttribute] + protected ReportProviderMetadataRequestDevices() { } + + public ReportProviderMetadataRequestDevices( + string? deviceId = default, + ReportProviderMetadataRequestDevicesOmnitecMetadata? omnitecMetadata = default, + ReportProviderMetadataRequestDevicesSchlageMetadata? schlageMetadata = default, + ReportProviderMetadataRequestDevicesUltraloqMetadata? ultraloqMetadata = default + ) + { + DeviceId = deviceId; + OmnitecMetadata = omnitecMetadata; + SchlageMetadata = schlageMetadata; + UltraloqMetadata = ultraloqMetadata; + } + + /// + /// ID of the device to update + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Omnitec-specific metadata to update + /// + [DataMember(Name = "omnitec_metadata", IsRequired = false, EmitDefaultValue = false)] + public ReportProviderMetadataRequestDevicesOmnitecMetadata? OmnitecMetadata { get; set; } + + /// + /// Schlage-specific metadata to update + /// + [DataMember(Name = "schlage_metadata", IsRequired = false, EmitDefaultValue = false)] + public ReportProviderMetadataRequestDevicesSchlageMetadata? SchlageMetadata { get; set; } + + /// + /// Ultraloq-specific metadata to update + /// + [DataMember(Name = "ultraloq_metadata", IsRequired = false, EmitDefaultValue = false)] + public ReportProviderMetadataRequestDevicesUltraloqMetadata? UltraloqMetadata { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "reportProviderMetadataRequestDevicesOmnitecMetadata_model")] + public class ReportProviderMetadataRequestDevicesOmnitecMetadata + { + [JsonConstructorAttribute] + protected ReportProviderMetadataRequestDevicesOmnitecMetadata() { } + + public ReportProviderMetadataRequestDevicesOmnitecMetadata( + ReportProviderMetadataRequestDevicesOmnitecMetadata.TimeZoneEnum? timeZone = default + ) + { + TimeZone = timeZone; + } + + /// + /// IANA timezone for the Omnitec device + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TimeZoneEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "Africa/Abidjan")] + AfricaAbidjan = 1, + + [EnumMember(Value = "Africa/Accra")] + AfricaAccra = 2, + + [EnumMember(Value = "Africa/Addis_Ababa")] + AfricaAddisAbaba = 3, -[EnumMember(Value = "Africa/Harare")] -AfricaHarare = 24, + [EnumMember(Value = "Africa/Algiers")] + AfricaAlgiers = 4, -[EnumMember(Value = "Africa/Johannesburg")] -AfricaJohannesburg = 25, + [EnumMember(Value = "Africa/Asmera")] + AfricaAsmera = 5, -[EnumMember(Value = "Africa/Juba")] -AfricaJuba = 26, + [EnumMember(Value = "Africa/Bamako")] + AfricaBamako = 6, -[EnumMember(Value = "Africa/Kampala")] -AfricaKampala = 27, + [EnumMember(Value = "Africa/Bangui")] + AfricaBangui = 7, -[EnumMember(Value = "Africa/Khartoum")] -AfricaKhartoum = 28, + [EnumMember(Value = "Africa/Banjul")] + AfricaBanjul = 8, -[EnumMember(Value = "Africa/Kigali")] -AfricaKigali = 29, + [EnumMember(Value = "Africa/Bissau")] + AfricaBissau = 9, -[EnumMember(Value = "Africa/Kinshasa")] -AfricaKinshasa = 30, + [EnumMember(Value = "Africa/Blantyre")] + AfricaBlantyre = 10, -[EnumMember(Value = "Africa/Lagos")] -AfricaLagos = 31, + [EnumMember(Value = "Africa/Brazzaville")] + AfricaBrazzaville = 11, -[EnumMember(Value = "Africa/Libreville")] -AfricaLibreville = 32, + [EnumMember(Value = "Africa/Bujumbura")] + AfricaBujumbura = 12, -[EnumMember(Value = "Africa/Lome")] -AfricaLome = 33, + [EnumMember(Value = "Africa/Cairo")] + AfricaCairo = 13, -[EnumMember(Value = "Africa/Luanda")] -AfricaLuanda = 34, + [EnumMember(Value = "Africa/Casablanca")] + AfricaCasablanca = 14, -[EnumMember(Value = "Africa/Lubumbashi")] -AfricaLubumbashi = 35, + [EnumMember(Value = "Africa/Ceuta")] + AfricaCeuta = 15, -[EnumMember(Value = "Africa/Lusaka")] -AfricaLusaka = 36, + [EnumMember(Value = "Africa/Conakry")] + AfricaConakry = 16, -[EnumMember(Value = "Africa/Malabo")] -AfricaMalabo = 37, + [EnumMember(Value = "Africa/Dakar")] + AfricaDakar = 17, -[EnumMember(Value = "Africa/Maputo")] -AfricaMaputo = 38, + [EnumMember(Value = "Africa/Dar_es_Salaam")] + AfricaDarEsSalaam = 18, -[EnumMember(Value = "Africa/Maseru")] -AfricaMaseru = 39, + [EnumMember(Value = "Africa/Djibouti")] + AfricaDjibouti = 19, -[EnumMember(Value = "Africa/Mbabane")] -AfricaMbabane = 40, + [EnumMember(Value = "Africa/Douala")] + AfricaDouala = 20, -[EnumMember(Value = "Africa/Mogadishu")] -AfricaMogadishu = 41, + [EnumMember(Value = "Africa/El_Aaiun")] + AfricaElAaiun = 21, -[EnumMember(Value = "Africa/Monrovia")] -AfricaMonrovia = 42, + [EnumMember(Value = "Africa/Freetown")] + AfricaFreetown = 22, -[EnumMember(Value = "Africa/Nairobi")] -AfricaNairobi = 43, + [EnumMember(Value = "Africa/Gaborone")] + AfricaGaborone = 23, -[EnumMember(Value = "Africa/Ndjamena")] -AfricaNdjamena = 44, + [EnumMember(Value = "Africa/Harare")] + AfricaHarare = 24, -[EnumMember(Value = "Africa/Niamey")] -AfricaNiamey = 45, + [EnumMember(Value = "Africa/Johannesburg")] + AfricaJohannesburg = 25, -[EnumMember(Value = "Africa/Nouakchott")] -AfricaNouakchott = 46, + [EnumMember(Value = "Africa/Juba")] + AfricaJuba = 26, -[EnumMember(Value = "Africa/Ouagadougou")] -AfricaOuagadougou = 47, + [EnumMember(Value = "Africa/Kampala")] + AfricaKampala = 27, -[EnumMember(Value = "Africa/Porto-Novo")] -AfricaPortoNovo = 48, + [EnumMember(Value = "Africa/Khartoum")] + AfricaKhartoum = 28, -[EnumMember(Value = "Africa/Sao_Tome")] -AfricaSaoTome = 49, + [EnumMember(Value = "Africa/Kigali")] + AfricaKigali = 29, -[EnumMember(Value = "Africa/Tripoli")] -AfricaTripoli = 50, + [EnumMember(Value = "Africa/Kinshasa")] + AfricaKinshasa = 30, -[EnumMember(Value = "Africa/Tunis")] -AfricaTunis = 51, + [EnumMember(Value = "Africa/Lagos")] + AfricaLagos = 31, -[EnumMember(Value = "Africa/Windhoek")] -AfricaWindhoek = 52, + [EnumMember(Value = "Africa/Libreville")] + AfricaLibreville = 32, -[EnumMember(Value = "America/Adak")] -AmericaAdak = 53, + [EnumMember(Value = "Africa/Lome")] + AfricaLome = 33, -[EnumMember(Value = "America/Anchorage")] -AmericaAnchorage = 54, + [EnumMember(Value = "Africa/Luanda")] + AfricaLuanda = 34, -[EnumMember(Value = "America/Anguilla")] -AmericaAnguilla = 55, + [EnumMember(Value = "Africa/Lubumbashi")] + AfricaLubumbashi = 35, -[EnumMember(Value = "America/Antigua")] -AmericaAntigua = 56, + [EnumMember(Value = "Africa/Lusaka")] + AfricaLusaka = 36, -[EnumMember(Value = "America/Araguaina")] -AmericaAraguaina = 57, + [EnumMember(Value = "Africa/Malabo")] + AfricaMalabo = 37, -[EnumMember(Value = "America/Argentina/La_Rioja")] -AmericaArgentinaLaRioja = 58, + [EnumMember(Value = "Africa/Maputo")] + AfricaMaputo = 38, -[EnumMember(Value = "America/Argentina/Rio_Gallegos")] -AmericaArgentinaRioGallegos = 59, + [EnumMember(Value = "Africa/Maseru")] + AfricaMaseru = 39, -[EnumMember(Value = "America/Argentina/Salta")] -AmericaArgentinaSalta = 60, + [EnumMember(Value = "Africa/Mbabane")] + AfricaMbabane = 40, -[EnumMember(Value = "America/Argentina/San_Juan")] -AmericaArgentinaSanJuan = 61, + [EnumMember(Value = "Africa/Mogadishu")] + AfricaMogadishu = 41, -[EnumMember(Value = "America/Argentina/San_Luis")] -AmericaArgentinaSanLuis = 62, + [EnumMember(Value = "Africa/Monrovia")] + AfricaMonrovia = 42, -[EnumMember(Value = "America/Argentina/Tucuman")] -AmericaArgentinaTucuman = 63, + [EnumMember(Value = "Africa/Nairobi")] + AfricaNairobi = 43, -[EnumMember(Value = "America/Argentina/Ushuaia")] -AmericaArgentinaUshuaia = 64, + [EnumMember(Value = "Africa/Ndjamena")] + AfricaNdjamena = 44, -[EnumMember(Value = "America/Aruba")] -AmericaAruba = 65, + [EnumMember(Value = "Africa/Niamey")] + AfricaNiamey = 45, -[EnumMember(Value = "America/Asuncion")] -AmericaAsuncion = 66, + [EnumMember(Value = "Africa/Nouakchott")] + AfricaNouakchott = 46, -[EnumMember(Value = "America/Bahia")] -AmericaBahia = 67, + [EnumMember(Value = "Africa/Ouagadougou")] + AfricaOuagadougou = 47, -[EnumMember(Value = "America/Bahia_Banderas")] -AmericaBahiaBanderas = 68, + [EnumMember(Value = "Africa/Porto-Novo")] + AfricaPortoNovo = 48, -[EnumMember(Value = "America/Barbados")] -AmericaBarbados = 69, + [EnumMember(Value = "Africa/Sao_Tome")] + AfricaSaoTome = 49, -[EnumMember(Value = "America/Belem")] -AmericaBelem = 70, + [EnumMember(Value = "Africa/Tripoli")] + AfricaTripoli = 50, -[EnumMember(Value = "America/Belize")] -AmericaBelize = 71, + [EnumMember(Value = "Africa/Tunis")] + AfricaTunis = 51, -[EnumMember(Value = "America/Blanc-Sablon")] -AmericaBlancSablon = 72, + [EnumMember(Value = "Africa/Windhoek")] + AfricaWindhoek = 52, -[EnumMember(Value = "America/Boa_Vista")] -AmericaBoaVista = 73, + [EnumMember(Value = "America/Adak")] + AmericaAdak = 53, -[EnumMember(Value = "America/Bogota")] -AmericaBogota = 74, + [EnumMember(Value = "America/Anchorage")] + AmericaAnchorage = 54, -[EnumMember(Value = "America/Boise")] -AmericaBoise = 75, + [EnumMember(Value = "America/Anguilla")] + AmericaAnguilla = 55, -[EnumMember(Value = "America/Buenos_Aires")] -AmericaBuenosAires = 76, + [EnumMember(Value = "America/Antigua")] + AmericaAntigua = 56, -[EnumMember(Value = "America/Cambridge_Bay")] -AmericaCambridgeBay = 77, + [EnumMember(Value = "America/Araguaina")] + AmericaAraguaina = 57, -[EnumMember(Value = "America/Campo_Grande")] -AmericaCampoGrande = 78, + [EnumMember(Value = "America/Argentina/La_Rioja")] + AmericaArgentinaLaRioja = 58, -[EnumMember(Value = "America/Cancun")] -AmericaCancun = 79, + [EnumMember(Value = "America/Argentina/Rio_Gallegos")] + AmericaArgentinaRioGallegos = 59, -[EnumMember(Value = "America/Caracas")] -AmericaCaracas = 80, + [EnumMember(Value = "America/Argentina/Salta")] + AmericaArgentinaSalta = 60, -[EnumMember(Value = "America/Catamarca")] -AmericaCatamarca = 81, + [EnumMember(Value = "America/Argentina/San_Juan")] + AmericaArgentinaSanJuan = 61, -[EnumMember(Value = "America/Cayenne")] -AmericaCayenne = 82, + [EnumMember(Value = "America/Argentina/San_Luis")] + AmericaArgentinaSanLuis = 62, -[EnumMember(Value = "America/Cayman")] -AmericaCayman = 83, + [EnumMember(Value = "America/Argentina/Tucuman")] + AmericaArgentinaTucuman = 63, -[EnumMember(Value = "America/Chicago")] -AmericaChicago = 84, + [EnumMember(Value = "America/Argentina/Ushuaia")] + AmericaArgentinaUshuaia = 64, -[EnumMember(Value = "America/Chihuahua")] -AmericaChihuahua = 85, + [EnumMember(Value = "America/Aruba")] + AmericaAruba = 65, -[EnumMember(Value = "America/Ciudad_Juarez")] -AmericaCiudadJuarez = 86, + [EnumMember(Value = "America/Asuncion")] + AmericaAsuncion = 66, -[EnumMember(Value = "America/Coral_Harbour")] -AmericaCoralHarbour = 87, + [EnumMember(Value = "America/Bahia")] + AmericaBahia = 67, -[EnumMember(Value = "America/Cordoba")] -AmericaCordoba = 88, + [EnumMember(Value = "America/Bahia_Banderas")] + AmericaBahiaBanderas = 68, -[EnumMember(Value = "America/Costa_Rica")] -AmericaCostaRica = 89, + [EnumMember(Value = "America/Barbados")] + AmericaBarbados = 69, -[EnumMember(Value = "America/Creston")] -AmericaCreston = 90, + [EnumMember(Value = "America/Belem")] + AmericaBelem = 70, -[EnumMember(Value = "America/Cuiaba")] -AmericaCuiaba = 91, + [EnumMember(Value = "America/Belize")] + AmericaBelize = 71, -[EnumMember(Value = "America/Curacao")] -AmericaCuracao = 92, + [EnumMember(Value = "America/Blanc-Sablon")] + AmericaBlancSablon = 72, -[EnumMember(Value = "America/Danmarkshavn")] -AmericaDanmarkshavn = 93, + [EnumMember(Value = "America/Boa_Vista")] + AmericaBoaVista = 73, -[EnumMember(Value = "America/Dawson")] -AmericaDawson = 94, + [EnumMember(Value = "America/Bogota")] + AmericaBogota = 74, -[EnumMember(Value = "America/Dawson_Creek")] -AmericaDawsonCreek = 95, + [EnumMember(Value = "America/Boise")] + AmericaBoise = 75, -[EnumMember(Value = "America/Denver")] -AmericaDenver = 96, + [EnumMember(Value = "America/Buenos_Aires")] + AmericaBuenosAires = 76, -[EnumMember(Value = "America/Detroit")] -AmericaDetroit = 97, + [EnumMember(Value = "America/Cambridge_Bay")] + AmericaCambridgeBay = 77, -[EnumMember(Value = "America/Dominica")] -AmericaDominica = 98, + [EnumMember(Value = "America/Campo_Grande")] + AmericaCampoGrande = 78, -[EnumMember(Value = "America/Edmonton")] -AmericaEdmonton = 99, + [EnumMember(Value = "America/Cancun")] + AmericaCancun = 79, -[EnumMember(Value = "America/Eirunepe")] -AmericaEirunepe = 100, + [EnumMember(Value = "America/Caracas")] + AmericaCaracas = 80, -[EnumMember(Value = "America/El_Salvador")] -AmericaElSalvador = 101, + [EnumMember(Value = "America/Catamarca")] + AmericaCatamarca = 81, -[EnumMember(Value = "America/Fort_Nelson")] -AmericaFortNelson = 102, + [EnumMember(Value = "America/Cayenne")] + AmericaCayenne = 82, -[EnumMember(Value = "America/Fortaleza")] -AmericaFortaleza = 103, + [EnumMember(Value = "America/Cayman")] + AmericaCayman = 83, -[EnumMember(Value = "America/Glace_Bay")] -AmericaGlaceBay = 104, + [EnumMember(Value = "America/Chicago")] + AmericaChicago = 84, -[EnumMember(Value = "America/Godthab")] -AmericaGodthab = 105, + [EnumMember(Value = "America/Chihuahua")] + AmericaChihuahua = 85, -[EnumMember(Value = "America/Goose_Bay")] -AmericaGooseBay = 106, + [EnumMember(Value = "America/Ciudad_Juarez")] + AmericaCiudadJuarez = 86, -[EnumMember(Value = "America/Grand_Turk")] -AmericaGrandTurk = 107, + [EnumMember(Value = "America/Coral_Harbour")] + AmericaCoralHarbour = 87, -[EnumMember(Value = "America/Grenada")] -AmericaGrenada = 108, + [EnumMember(Value = "America/Cordoba")] + AmericaCordoba = 88, -[EnumMember(Value = "America/Guadeloupe")] -AmericaGuadeloupe = 109, + [EnumMember(Value = "America/Costa_Rica")] + AmericaCostaRica = 89, -[EnumMember(Value = "America/Guatemala")] -AmericaGuatemala = 110, + [EnumMember(Value = "America/Creston")] + AmericaCreston = 90, -[EnumMember(Value = "America/Guayaquil")] -AmericaGuayaquil = 111, + [EnumMember(Value = "America/Cuiaba")] + AmericaCuiaba = 91, -[EnumMember(Value = "America/Guyana")] -AmericaGuyana = 112, + [EnumMember(Value = "America/Curacao")] + AmericaCuracao = 92, -[EnumMember(Value = "America/Halifax")] -AmericaHalifax = 113, + [EnumMember(Value = "America/Danmarkshavn")] + AmericaDanmarkshavn = 93, -[EnumMember(Value = "America/Havana")] -AmericaHavana = 114, + [EnumMember(Value = "America/Dawson")] + AmericaDawson = 94, -[EnumMember(Value = "America/Hermosillo")] -AmericaHermosillo = 115, + [EnumMember(Value = "America/Dawson_Creek")] + AmericaDawsonCreek = 95, -[EnumMember(Value = "America/Indiana/Knox")] -AmericaIndianaKnox = 116, + [EnumMember(Value = "America/Denver")] + AmericaDenver = 96, -[EnumMember(Value = "America/Indiana/Marengo")] -AmericaIndianaMarengo = 117, + [EnumMember(Value = "America/Detroit")] + AmericaDetroit = 97, -[EnumMember(Value = "America/Indiana/Petersburg")] -AmericaIndianaPetersburg = 118, + [EnumMember(Value = "America/Dominica")] + AmericaDominica = 98, -[EnumMember(Value = "America/Indiana/Tell_City")] -AmericaIndianaTellCity = 119, + [EnumMember(Value = "America/Edmonton")] + AmericaEdmonton = 99, -[EnumMember(Value = "America/Indiana/Vevay")] -AmericaIndianaVevay = 120, + [EnumMember(Value = "America/Eirunepe")] + AmericaEirunepe = 100, -[EnumMember(Value = "America/Indiana/Vincennes")] -AmericaIndianaVincennes = 121, + [EnumMember(Value = "America/El_Salvador")] + AmericaElSalvador = 101, -[EnumMember(Value = "America/Indiana/Winamac")] -AmericaIndianaWinamac = 122, + [EnumMember(Value = "America/Fort_Nelson")] + AmericaFortNelson = 102, -[EnumMember(Value = "America/Indianapolis")] -AmericaIndianapolis = 123, + [EnumMember(Value = "America/Fortaleza")] + AmericaFortaleza = 103, -[EnumMember(Value = "America/Inuvik")] -AmericaInuvik = 124, + [EnumMember(Value = "America/Glace_Bay")] + AmericaGlaceBay = 104, -[EnumMember(Value = "America/Iqaluit")] -AmericaIqaluit = 125, + [EnumMember(Value = "America/Godthab")] + AmericaGodthab = 105, -[EnumMember(Value = "America/Jamaica")] -AmericaJamaica = 126, + [EnumMember(Value = "America/Goose_Bay")] + AmericaGooseBay = 106, -[EnumMember(Value = "America/Jujuy")] -AmericaJujuy = 127, + [EnumMember(Value = "America/Grand_Turk")] + AmericaGrandTurk = 107, -[EnumMember(Value = "America/Juneau")] -AmericaJuneau = 128, + [EnumMember(Value = "America/Grenada")] + AmericaGrenada = 108, -[EnumMember(Value = "America/Kentucky/Monticello")] -AmericaKentuckyMonticello = 129, + [EnumMember(Value = "America/Guadeloupe")] + AmericaGuadeloupe = 109, -[EnumMember(Value = "America/Kralendijk")] -AmericaKralendijk = 130, + [EnumMember(Value = "America/Guatemala")] + AmericaGuatemala = 110, -[EnumMember(Value = "America/La_Paz")] -AmericaLaPaz = 131, + [EnumMember(Value = "America/Guayaquil")] + AmericaGuayaquil = 111, -[EnumMember(Value = "America/Lima")] -AmericaLima = 132, + [EnumMember(Value = "America/Guyana")] + AmericaGuyana = 112, -[EnumMember(Value = "America/Los_Angeles")] -AmericaLosAngeles = 133, + [EnumMember(Value = "America/Halifax")] + AmericaHalifax = 113, -[EnumMember(Value = "America/Louisville")] -AmericaLouisville = 134, + [EnumMember(Value = "America/Havana")] + AmericaHavana = 114, -[EnumMember(Value = "America/Lower_Princes")] -AmericaLowerPrinces = 135, + [EnumMember(Value = "America/Hermosillo")] + AmericaHermosillo = 115, -[EnumMember(Value = "America/Maceio")] -AmericaMaceio = 136, + [EnumMember(Value = "America/Indiana/Knox")] + AmericaIndianaKnox = 116, -[EnumMember(Value = "America/Managua")] -AmericaManagua = 137, + [EnumMember(Value = "America/Indiana/Marengo")] + AmericaIndianaMarengo = 117, -[EnumMember(Value = "America/Manaus")] -AmericaManaus = 138, + [EnumMember(Value = "America/Indiana/Petersburg")] + AmericaIndianaPetersburg = 118, -[EnumMember(Value = "America/Marigot")] -AmericaMarigot = 139, + [EnumMember(Value = "America/Indiana/Tell_City")] + AmericaIndianaTellCity = 119, -[EnumMember(Value = "America/Martinique")] -AmericaMartinique = 140, + [EnumMember(Value = "America/Indiana/Vevay")] + AmericaIndianaVevay = 120, -[EnumMember(Value = "America/Matamoros")] -AmericaMatamoros = 141, + [EnumMember(Value = "America/Indiana/Vincennes")] + AmericaIndianaVincennes = 121, -[EnumMember(Value = "America/Mazatlan")] -AmericaMazatlan = 142, + [EnumMember(Value = "America/Indiana/Winamac")] + AmericaIndianaWinamac = 122, -[EnumMember(Value = "America/Mendoza")] -AmericaMendoza = 143, + [EnumMember(Value = "America/Indianapolis")] + AmericaIndianapolis = 123, -[EnumMember(Value = "America/Menominee")] -AmericaMenominee = 144, + [EnumMember(Value = "America/Inuvik")] + AmericaInuvik = 124, -[EnumMember(Value = "America/Merida")] -AmericaMerida = 145, + [EnumMember(Value = "America/Iqaluit")] + AmericaIqaluit = 125, -[EnumMember(Value = "America/Metlakatla")] -AmericaMetlakatla = 146, + [EnumMember(Value = "America/Jamaica")] + AmericaJamaica = 126, -[EnumMember(Value = "America/Mexico_City")] -AmericaMexicoCity = 147, + [EnumMember(Value = "America/Jujuy")] + AmericaJujuy = 127, -[EnumMember(Value = "America/Miquelon")] -AmericaMiquelon = 148, + [EnumMember(Value = "America/Juneau")] + AmericaJuneau = 128, -[EnumMember(Value = "America/Moncton")] -AmericaMoncton = 149, + [EnumMember(Value = "America/Kentucky/Monticello")] + AmericaKentuckyMonticello = 129, -[EnumMember(Value = "America/Monterrey")] -AmericaMonterrey = 150, + [EnumMember(Value = "America/Kralendijk")] + AmericaKralendijk = 130, -[EnumMember(Value = "America/Montevideo")] -AmericaMontevideo = 151, + [EnumMember(Value = "America/La_Paz")] + AmericaLaPaz = 131, -[EnumMember(Value = "America/Montreal")] -AmericaMontreal = 152, + [EnumMember(Value = "America/Lima")] + AmericaLima = 132, -[EnumMember(Value = "America/Montserrat")] -AmericaMontserrat = 153, + [EnumMember(Value = "America/Los_Angeles")] + AmericaLosAngeles = 133, -[EnumMember(Value = "America/Nassau")] -AmericaNassau = 154, + [EnumMember(Value = "America/Louisville")] + AmericaLouisville = 134, -[EnumMember(Value = "America/New_York")] -AmericaNewYork = 155, + [EnumMember(Value = "America/Lower_Princes")] + AmericaLowerPrinces = 135, -[EnumMember(Value = "America/Nipigon")] -AmericaNipigon = 156, + [EnumMember(Value = "America/Maceio")] + AmericaMaceio = 136, -[EnumMember(Value = "America/Nome")] -AmericaNome = 157, + [EnumMember(Value = "America/Managua")] + AmericaManagua = 137, -[EnumMember(Value = "America/Noronha")] -AmericaNoronha = 158, + [EnumMember(Value = "America/Manaus")] + AmericaManaus = 138, -[EnumMember(Value = "America/North_Dakota/Beulah")] -AmericaNorthDakotaBeulah = 159, + [EnumMember(Value = "America/Marigot")] + AmericaMarigot = 139, -[EnumMember(Value = "America/North_Dakota/Center")] -AmericaNorthDakotaCenter = 160, + [EnumMember(Value = "America/Martinique")] + AmericaMartinique = 140, -[EnumMember(Value = "America/North_Dakota/New_Salem")] -AmericaNorthDakotaNewSalem = 161, + [EnumMember(Value = "America/Matamoros")] + AmericaMatamoros = 141, -[EnumMember(Value = "America/Ojinaga")] -AmericaOjinaga = 162, + [EnumMember(Value = "America/Mazatlan")] + AmericaMazatlan = 142, -[EnumMember(Value = "America/Panama")] -AmericaPanama = 163, + [EnumMember(Value = "America/Mendoza")] + AmericaMendoza = 143, -[EnumMember(Value = "America/Pangnirtung")] -AmericaPangnirtung = 164, + [EnumMember(Value = "America/Menominee")] + AmericaMenominee = 144, -[EnumMember(Value = "America/Paramaribo")] -AmericaParamaribo = 165, + [EnumMember(Value = "America/Merida")] + AmericaMerida = 145, -[EnumMember(Value = "America/Phoenix")] -AmericaPhoenix = 166, + [EnumMember(Value = "America/Metlakatla")] + AmericaMetlakatla = 146, -[EnumMember(Value = "America/Port-au-Prince")] -AmericaPortAuPrince = 167, + [EnumMember(Value = "America/Mexico_City")] + AmericaMexicoCity = 147, -[EnumMember(Value = "America/Port_of_Spain")] -AmericaPortOfSpain = 168, + [EnumMember(Value = "America/Miquelon")] + AmericaMiquelon = 148, -[EnumMember(Value = "America/Porto_Velho")] -AmericaPortoVelho = 169, + [EnumMember(Value = "America/Moncton")] + AmericaMoncton = 149, -[EnumMember(Value = "America/Puerto_Rico")] -AmericaPuertoRico = 170, + [EnumMember(Value = "America/Monterrey")] + AmericaMonterrey = 150, -[EnumMember(Value = "America/Punta_Arenas")] -AmericaPuntaArenas = 171, + [EnumMember(Value = "America/Montevideo")] + AmericaMontevideo = 151, -[EnumMember(Value = "America/Rainy_River")] -AmericaRainyRiver = 172, + [EnumMember(Value = "America/Montreal")] + AmericaMontreal = 152, -[EnumMember(Value = "America/Rankin_Inlet")] -AmericaRankinInlet = 173, + [EnumMember(Value = "America/Montserrat")] + AmericaMontserrat = 153, -[EnumMember(Value = "America/Recife")] -AmericaRecife = 174, + [EnumMember(Value = "America/Nassau")] + AmericaNassau = 154, -[EnumMember(Value = "America/Regina")] -AmericaRegina = 175, + [EnumMember(Value = "America/New_York")] + AmericaNewYork = 155, -[EnumMember(Value = "America/Resolute")] -AmericaResolute = 176, + [EnumMember(Value = "America/Nipigon")] + AmericaNipigon = 156, -[EnumMember(Value = "America/Rio_Branco")] -AmericaRioBranco = 177, + [EnumMember(Value = "America/Nome")] + AmericaNome = 157, -[EnumMember(Value = "America/Santa_Isabel")] -AmericaSantaIsabel = 178, + [EnumMember(Value = "America/Noronha")] + AmericaNoronha = 158, -[EnumMember(Value = "America/Santarem")] -AmericaSantarem = 179, + [EnumMember(Value = "America/North_Dakota/Beulah")] + AmericaNorthDakotaBeulah = 159, -[EnumMember(Value = "America/Santiago")] -AmericaSantiago = 180, + [EnumMember(Value = "America/North_Dakota/Center")] + AmericaNorthDakotaCenter = 160, -[EnumMember(Value = "America/Santo_Domingo")] -AmericaSantoDomingo = 181, + [EnumMember(Value = "America/North_Dakota/New_Salem")] + AmericaNorthDakotaNewSalem = 161, -[EnumMember(Value = "America/Sao_Paulo")] -AmericaSaoPaulo = 182, + [EnumMember(Value = "America/Ojinaga")] + AmericaOjinaga = 162, -[EnumMember(Value = "America/Scoresbysund")] -AmericaScoresbysund = 183, + [EnumMember(Value = "America/Panama")] + AmericaPanama = 163, -[EnumMember(Value = "America/Sitka")] -AmericaSitka = 184, + [EnumMember(Value = "America/Pangnirtung")] + AmericaPangnirtung = 164, -[EnumMember(Value = "America/St_Barthelemy")] -AmericaStBarthelemy = 185, + [EnumMember(Value = "America/Paramaribo")] + AmericaParamaribo = 165, -[EnumMember(Value = "America/St_Johns")] -AmericaStJohns = 186, + [EnumMember(Value = "America/Phoenix")] + AmericaPhoenix = 166, -[EnumMember(Value = "America/St_Kitts")] -AmericaStKitts = 187, + [EnumMember(Value = "America/Port-au-Prince")] + AmericaPortAuPrince = 167, -[EnumMember(Value = "America/St_Lucia")] -AmericaStLucia = 188, + [EnumMember(Value = "America/Port_of_Spain")] + AmericaPortOfSpain = 168, -[EnumMember(Value = "America/St_Thomas")] -AmericaStThomas = 189, + [EnumMember(Value = "America/Porto_Velho")] + AmericaPortoVelho = 169, -[EnumMember(Value = "America/St_Vincent")] -AmericaStVincent = 190, + [EnumMember(Value = "America/Puerto_Rico")] + AmericaPuertoRico = 170, -[EnumMember(Value = "America/Swift_Current")] -AmericaSwiftCurrent = 191, + [EnumMember(Value = "America/Punta_Arenas")] + AmericaPuntaArenas = 171, -[EnumMember(Value = "America/Tegucigalpa")] -AmericaTegucigalpa = 192, + [EnumMember(Value = "America/Rainy_River")] + AmericaRainyRiver = 172, -[EnumMember(Value = "America/Thule")] -AmericaThule = 193, + [EnumMember(Value = "America/Rankin_Inlet")] + AmericaRankinInlet = 173, -[EnumMember(Value = "America/Thunder_Bay")] -AmericaThunderBay = 194, + [EnumMember(Value = "America/Recife")] + AmericaRecife = 174, -[EnumMember(Value = "America/Tijuana")] -AmericaTijuana = 195, + [EnumMember(Value = "America/Regina")] + AmericaRegina = 175, -[EnumMember(Value = "America/Toronto")] -AmericaToronto = 196, + [EnumMember(Value = "America/Resolute")] + AmericaResolute = 176, -[EnumMember(Value = "America/Tortola")] -AmericaTortola = 197, + [EnumMember(Value = "America/Rio_Branco")] + AmericaRioBranco = 177, -[EnumMember(Value = "America/Vancouver")] -AmericaVancouver = 198, + [EnumMember(Value = "America/Santa_Isabel")] + AmericaSantaIsabel = 178, -[EnumMember(Value = "America/Whitehorse")] -AmericaWhitehorse = 199, + [EnumMember(Value = "America/Santarem")] + AmericaSantarem = 179, -[EnumMember(Value = "America/Winnipeg")] -AmericaWinnipeg = 200, + [EnumMember(Value = "America/Santiago")] + AmericaSantiago = 180, -[EnumMember(Value = "America/Yakutat")] -AmericaYakutat = 201, + [EnumMember(Value = "America/Santo_Domingo")] + AmericaSantoDomingo = 181, -[EnumMember(Value = "America/Yellowknife")] -AmericaYellowknife = 202, + [EnumMember(Value = "America/Sao_Paulo")] + AmericaSaoPaulo = 182, -[EnumMember(Value = "Antarctica/Casey")] -AntarcticaCasey = 203, + [EnumMember(Value = "America/Scoresbysund")] + AmericaScoresbysund = 183, -[EnumMember(Value = "Antarctica/Davis")] -AntarcticaDavis = 204, + [EnumMember(Value = "America/Sitka")] + AmericaSitka = 184, -[EnumMember(Value = "Antarctica/DumontDUrville")] -AntarcticaDumontDUrville = 205, + [EnumMember(Value = "America/St_Barthelemy")] + AmericaStBarthelemy = 185, -[EnumMember(Value = "Antarctica/Macquarie")] -AntarcticaMacquarie = 206, + [EnumMember(Value = "America/St_Johns")] + AmericaStJohns = 186, -[EnumMember(Value = "Antarctica/Mawson")] -AntarcticaMawson = 207, + [EnumMember(Value = "America/St_Kitts")] + AmericaStKitts = 187, -[EnumMember(Value = "Antarctica/McMurdo")] -AntarcticaMcMurdo = 208, + [EnumMember(Value = "America/St_Lucia")] + AmericaStLucia = 188, -[EnumMember(Value = "Antarctica/Palmer")] -AntarcticaPalmer = 209, + [EnumMember(Value = "America/St_Thomas")] + AmericaStThomas = 189, -[EnumMember(Value = "Antarctica/Rothera")] -AntarcticaRothera = 210, + [EnumMember(Value = "America/St_Vincent")] + AmericaStVincent = 190, -[EnumMember(Value = "Antarctica/Syowa")] -AntarcticaSyowa = 211, + [EnumMember(Value = "America/Swift_Current")] + AmericaSwiftCurrent = 191, -[EnumMember(Value = "Antarctica/Troll")] -AntarcticaTroll = 212, + [EnumMember(Value = "America/Tegucigalpa")] + AmericaTegucigalpa = 192, -[EnumMember(Value = "Antarctica/Vostok")] -AntarcticaVostok = 213, + [EnumMember(Value = "America/Thule")] + AmericaThule = 193, -[EnumMember(Value = "Arctic/Longyearbyen")] -ArcticLongyearbyen = 214, + [EnumMember(Value = "America/Thunder_Bay")] + AmericaThunderBay = 194, -[EnumMember(Value = "Asia/Aden")] -AsiaAden = 215, + [EnumMember(Value = "America/Tijuana")] + AmericaTijuana = 195, -[EnumMember(Value = "Asia/Almaty")] -AsiaAlmaty = 216, + [EnumMember(Value = "America/Toronto")] + AmericaToronto = 196, -[EnumMember(Value = "Asia/Amman")] -AsiaAmman = 217, + [EnumMember(Value = "America/Tortola")] + AmericaTortola = 197, -[EnumMember(Value = "Asia/Anadyr")] -AsiaAnadyr = 218, + [EnumMember(Value = "America/Vancouver")] + AmericaVancouver = 198, -[EnumMember(Value = "Asia/Aqtau")] -AsiaAqtau = 219, + [EnumMember(Value = "America/Whitehorse")] + AmericaWhitehorse = 199, -[EnumMember(Value = "Asia/Aqtobe")] -AsiaAqtobe = 220, + [EnumMember(Value = "America/Winnipeg")] + AmericaWinnipeg = 200, -[EnumMember(Value = "Asia/Ashgabat")] -AsiaAshgabat = 221, + [EnumMember(Value = "America/Yakutat")] + AmericaYakutat = 201, -[EnumMember(Value = "Asia/Atyrau")] -AsiaAtyrau = 222, + [EnumMember(Value = "America/Yellowknife")] + AmericaYellowknife = 202, -[EnumMember(Value = "Asia/Baghdad")] -AsiaBaghdad = 223, + [EnumMember(Value = "Antarctica/Casey")] + AntarcticaCasey = 203, -[EnumMember(Value = "Asia/Bahrain")] -AsiaBahrain = 224, + [EnumMember(Value = "Antarctica/Davis")] + AntarcticaDavis = 204, -[EnumMember(Value = "Asia/Baku")] -AsiaBaku = 225, + [EnumMember(Value = "Antarctica/DumontDUrville")] + AntarcticaDumontDUrville = 205, -[EnumMember(Value = "Asia/Bangkok")] -AsiaBangkok = 226, + [EnumMember(Value = "Antarctica/Macquarie")] + AntarcticaMacquarie = 206, -[EnumMember(Value = "Asia/Barnaul")] -AsiaBarnaul = 227, + [EnumMember(Value = "Antarctica/Mawson")] + AntarcticaMawson = 207, -[EnumMember(Value = "Asia/Beirut")] -AsiaBeirut = 228, + [EnumMember(Value = "Antarctica/McMurdo")] + AntarcticaMcMurdo = 208, -[EnumMember(Value = "Asia/Bishkek")] -AsiaBishkek = 229, + [EnumMember(Value = "Antarctica/Palmer")] + AntarcticaPalmer = 209, -[EnumMember(Value = "Asia/Brunei")] -AsiaBrunei = 230, + [EnumMember(Value = "Antarctica/Rothera")] + AntarcticaRothera = 210, -[EnumMember(Value = "Asia/Calcutta")] -AsiaCalcutta = 231, + [EnumMember(Value = "Antarctica/Syowa")] + AntarcticaSyowa = 211, -[EnumMember(Value = "Asia/Chita")] -AsiaChita = 232, + [EnumMember(Value = "Antarctica/Troll")] + AntarcticaTroll = 212, -[EnumMember(Value = "Asia/Choibalsan")] -AsiaChoibalsan = 233, + [EnumMember(Value = "Antarctica/Vostok")] + AntarcticaVostok = 213, -[EnumMember(Value = "Asia/Colombo")] -AsiaColombo = 234, + [EnumMember(Value = "Arctic/Longyearbyen")] + ArcticLongyearbyen = 214, -[EnumMember(Value = "Asia/Damascus")] -AsiaDamascus = 235, + [EnumMember(Value = "Asia/Aden")] + AsiaAden = 215, -[EnumMember(Value = "Asia/Dhaka")] -AsiaDhaka = 236, + [EnumMember(Value = "Asia/Almaty")] + AsiaAlmaty = 216, -[EnumMember(Value = "Asia/Dili")] -AsiaDili = 237, + [EnumMember(Value = "Asia/Amman")] + AsiaAmman = 217, -[EnumMember(Value = "Asia/Dubai")] -AsiaDubai = 238, + [EnumMember(Value = "Asia/Anadyr")] + AsiaAnadyr = 218, -[EnumMember(Value = "Asia/Dushanbe")] -AsiaDushanbe = 239, + [EnumMember(Value = "Asia/Aqtau")] + AsiaAqtau = 219, -[EnumMember(Value = "Asia/Famagusta")] -AsiaFamagusta = 240, + [EnumMember(Value = "Asia/Aqtobe")] + AsiaAqtobe = 220, -[EnumMember(Value = "Asia/Gaza")] -AsiaGaza = 241, + [EnumMember(Value = "Asia/Ashgabat")] + AsiaAshgabat = 221, -[EnumMember(Value = "Asia/Hebron")] -AsiaHebron = 242, + [EnumMember(Value = "Asia/Atyrau")] + AsiaAtyrau = 222, -[EnumMember(Value = "Asia/Hong_Kong")] -AsiaHongKong = 243, + [EnumMember(Value = "Asia/Baghdad")] + AsiaBaghdad = 223, -[EnumMember(Value = "Asia/Hovd")] -AsiaHovd = 244, + [EnumMember(Value = "Asia/Bahrain")] + AsiaBahrain = 224, -[EnumMember(Value = "Asia/Irkutsk")] -AsiaIrkutsk = 245, + [EnumMember(Value = "Asia/Baku")] + AsiaBaku = 225, -[EnumMember(Value = "Asia/Jakarta")] -AsiaJakarta = 246, + [EnumMember(Value = "Asia/Bangkok")] + AsiaBangkok = 226, -[EnumMember(Value = "Asia/Jayapura")] -AsiaJayapura = 247, + [EnumMember(Value = "Asia/Barnaul")] + AsiaBarnaul = 227, -[EnumMember(Value = "Asia/Jerusalem")] -AsiaJerusalem = 248, + [EnumMember(Value = "Asia/Beirut")] + AsiaBeirut = 228, -[EnumMember(Value = "Asia/Kabul")] -AsiaKabul = 249, + [EnumMember(Value = "Asia/Bishkek")] + AsiaBishkek = 229, -[EnumMember(Value = "Asia/Kamchatka")] -AsiaKamchatka = 250, + [EnumMember(Value = "Asia/Brunei")] + AsiaBrunei = 230, -[EnumMember(Value = "Asia/Karachi")] -AsiaKarachi = 251, + [EnumMember(Value = "Asia/Calcutta")] + AsiaCalcutta = 231, -[EnumMember(Value = "Asia/Katmandu")] -AsiaKatmandu = 252, + [EnumMember(Value = "Asia/Chita")] + AsiaChita = 232, -[EnumMember(Value = "Asia/Khandyga")] -AsiaKhandyga = 253, + [EnumMember(Value = "Asia/Choibalsan")] + AsiaChoibalsan = 233, -[EnumMember(Value = "Asia/Krasnoyarsk")] -AsiaKrasnoyarsk = 254, + [EnumMember(Value = "Asia/Colombo")] + AsiaColombo = 234, -[EnumMember(Value = "Asia/Kuala_Lumpur")] -AsiaKualaLumpur = 255, + [EnumMember(Value = "Asia/Damascus")] + AsiaDamascus = 235, -[EnumMember(Value = "Asia/Kuching")] -AsiaKuching = 256, + [EnumMember(Value = "Asia/Dhaka")] + AsiaDhaka = 236, -[EnumMember(Value = "Asia/Kuwait")] -AsiaKuwait = 257, + [EnumMember(Value = "Asia/Dili")] + AsiaDili = 237, -[EnumMember(Value = "Asia/Macau")] -AsiaMacau = 258, + [EnumMember(Value = "Asia/Dubai")] + AsiaDubai = 238, -[EnumMember(Value = "Asia/Magadan")] -AsiaMagadan = 259, + [EnumMember(Value = "Asia/Dushanbe")] + AsiaDushanbe = 239, -[EnumMember(Value = "Asia/Makassar")] -AsiaMakassar = 260, + [EnumMember(Value = "Asia/Famagusta")] + AsiaFamagusta = 240, -[EnumMember(Value = "Asia/Manila")] -AsiaManila = 261, + [EnumMember(Value = "Asia/Gaza")] + AsiaGaza = 241, -[EnumMember(Value = "Asia/Muscat")] -AsiaMuscat = 262, + [EnumMember(Value = "Asia/Hebron")] + AsiaHebron = 242, -[EnumMember(Value = "Asia/Nicosia")] -AsiaNicosia = 263, + [EnumMember(Value = "Asia/Hong_Kong")] + AsiaHongKong = 243, -[EnumMember(Value = "Asia/Novokuznetsk")] -AsiaNovokuznetsk = 264, + [EnumMember(Value = "Asia/Hovd")] + AsiaHovd = 244, -[EnumMember(Value = "Asia/Novosibirsk")] -AsiaNovosibirsk = 265, + [EnumMember(Value = "Asia/Irkutsk")] + AsiaIrkutsk = 245, -[EnumMember(Value = "Asia/Omsk")] -AsiaOmsk = 266, + [EnumMember(Value = "Asia/Jakarta")] + AsiaJakarta = 246, -[EnumMember(Value = "Asia/Oral")] -AsiaOral = 267, + [EnumMember(Value = "Asia/Jayapura")] + AsiaJayapura = 247, -[EnumMember(Value = "Asia/Phnom_Penh")] -AsiaPhnomPenh = 268, + [EnumMember(Value = "Asia/Jerusalem")] + AsiaJerusalem = 248, -[EnumMember(Value = "Asia/Pontianak")] -AsiaPontianak = 269, + [EnumMember(Value = "Asia/Kabul")] + AsiaKabul = 249, -[EnumMember(Value = "Asia/Pyongyang")] -AsiaPyongyang = 270, + [EnumMember(Value = "Asia/Kamchatka")] + AsiaKamchatka = 250, -[EnumMember(Value = "Asia/Qatar")] -AsiaQatar = 271, + [EnumMember(Value = "Asia/Karachi")] + AsiaKarachi = 251, -[EnumMember(Value = "Asia/Qostanay")] -AsiaQostanay = 272, + [EnumMember(Value = "Asia/Katmandu")] + AsiaKatmandu = 252, -[EnumMember(Value = "Asia/Qyzylorda")] -AsiaQyzylorda = 273, + [EnumMember(Value = "Asia/Khandyga")] + AsiaKhandyga = 253, -[EnumMember(Value = "Asia/Rangoon")] -AsiaRangoon = 274, + [EnumMember(Value = "Asia/Krasnoyarsk")] + AsiaKrasnoyarsk = 254, -[EnumMember(Value = "Asia/Riyadh")] -AsiaRiyadh = 275, + [EnumMember(Value = "Asia/Kuala_Lumpur")] + AsiaKualaLumpur = 255, -[EnumMember(Value = "Asia/Saigon")] -AsiaSaigon = 276, + [EnumMember(Value = "Asia/Kuching")] + AsiaKuching = 256, -[EnumMember(Value = "Asia/Sakhalin")] -AsiaSakhalin = 277, + [EnumMember(Value = "Asia/Kuwait")] + AsiaKuwait = 257, -[EnumMember(Value = "Asia/Samarkand")] -AsiaSamarkand = 278, + [EnumMember(Value = "Asia/Macau")] + AsiaMacau = 258, -[EnumMember(Value = "Asia/Seoul")] -AsiaSeoul = 279, + [EnumMember(Value = "Asia/Magadan")] + AsiaMagadan = 259, -[EnumMember(Value = "Asia/Shanghai")] -AsiaShanghai = 280, + [EnumMember(Value = "Asia/Makassar")] + AsiaMakassar = 260, -[EnumMember(Value = "Asia/Singapore")] -AsiaSingapore = 281, + [EnumMember(Value = "Asia/Manila")] + AsiaManila = 261, -[EnumMember(Value = "Asia/Srednekolymsk")] -AsiaSrednekolymsk = 282, + [EnumMember(Value = "Asia/Muscat")] + AsiaMuscat = 262, -[EnumMember(Value = "Asia/Taipei")] -AsiaTaipei = 283, + [EnumMember(Value = "Asia/Nicosia")] + AsiaNicosia = 263, -[EnumMember(Value = "Asia/Tashkent")] -AsiaTashkent = 284, + [EnumMember(Value = "Asia/Novokuznetsk")] + AsiaNovokuznetsk = 264, -[EnumMember(Value = "Asia/Tbilisi")] -AsiaTbilisi = 285, + [EnumMember(Value = "Asia/Novosibirsk")] + AsiaNovosibirsk = 265, -[EnumMember(Value = "Asia/Tehran")] -AsiaTehran = 286, + [EnumMember(Value = "Asia/Omsk")] + AsiaOmsk = 266, -[EnumMember(Value = "Asia/Thimphu")] -AsiaThimphu = 287, + [EnumMember(Value = "Asia/Oral")] + AsiaOral = 267, -[EnumMember(Value = "Asia/Tokyo")] -AsiaTokyo = 288, + [EnumMember(Value = "Asia/Phnom_Penh")] + AsiaPhnomPenh = 268, -[EnumMember(Value = "Asia/Tomsk")] -AsiaTomsk = 289, + [EnumMember(Value = "Asia/Pontianak")] + AsiaPontianak = 269, -[EnumMember(Value = "Asia/Ulaanbaatar")] -AsiaUlaanbaatar = 290, + [EnumMember(Value = "Asia/Pyongyang")] + AsiaPyongyang = 270, -[EnumMember(Value = "Asia/Urumqi")] -AsiaUrumqi = 291, + [EnumMember(Value = "Asia/Qatar")] + AsiaQatar = 271, -[EnumMember(Value = "Asia/Ust-Nera")] -AsiaUstNera = 292, + [EnumMember(Value = "Asia/Qostanay")] + AsiaQostanay = 272, -[EnumMember(Value = "Asia/Vientiane")] -AsiaVientiane = 293, + [EnumMember(Value = "Asia/Qyzylorda")] + AsiaQyzylorda = 273, -[EnumMember(Value = "Asia/Vladivostok")] -AsiaVladivostok = 294, + [EnumMember(Value = "Asia/Rangoon")] + AsiaRangoon = 274, -[EnumMember(Value = "Asia/Yakutsk")] -AsiaYakutsk = 295, + [EnumMember(Value = "Asia/Riyadh")] + AsiaRiyadh = 275, -[EnumMember(Value = "Asia/Yekaterinburg")] -AsiaYekaterinburg = 296, + [EnumMember(Value = "Asia/Saigon")] + AsiaSaigon = 276, -[EnumMember(Value = "Asia/Yerevan")] -AsiaYerevan = 297, + [EnumMember(Value = "Asia/Sakhalin")] + AsiaSakhalin = 277, -[EnumMember(Value = "Atlantic/Azores")] -AtlanticAzores = 298, + [EnumMember(Value = "Asia/Samarkand")] + AsiaSamarkand = 278, -[EnumMember(Value = "Atlantic/Bermuda")] -AtlanticBermuda = 299, + [EnumMember(Value = "Asia/Seoul")] + AsiaSeoul = 279, -[EnumMember(Value = "Atlantic/Canary")] -AtlanticCanary = 300, + [EnumMember(Value = "Asia/Shanghai")] + AsiaShanghai = 280, -[EnumMember(Value = "Atlantic/Cape_Verde")] -AtlanticCapeVerde = 301, + [EnumMember(Value = "Asia/Singapore")] + AsiaSingapore = 281, -[EnumMember(Value = "Atlantic/Faeroe")] -AtlanticFaeroe = 302, + [EnumMember(Value = "Asia/Srednekolymsk")] + AsiaSrednekolymsk = 282, -[EnumMember(Value = "Atlantic/Madeira")] -AtlanticMadeira = 303, + [EnumMember(Value = "Asia/Taipei")] + AsiaTaipei = 283, -[EnumMember(Value = "Atlantic/Reykjavik")] -AtlanticReykjavik = 304, + [EnumMember(Value = "Asia/Tashkent")] + AsiaTashkent = 284, -[EnumMember(Value = "Atlantic/South_Georgia")] -AtlanticSouthGeorgia = 305, + [EnumMember(Value = "Asia/Tbilisi")] + AsiaTbilisi = 285, -[EnumMember(Value = "Atlantic/St_Helena")] -AtlanticStHelena = 306, + [EnumMember(Value = "Asia/Tehran")] + AsiaTehran = 286, -[EnumMember(Value = "Atlantic/Stanley")] -AtlanticStanley = 307, + [EnumMember(Value = "Asia/Thimphu")] + AsiaThimphu = 287, -[EnumMember(Value = "Australia/Adelaide")] -AustraliaAdelaide = 308, + [EnumMember(Value = "Asia/Tokyo")] + AsiaTokyo = 288, -[EnumMember(Value = "Australia/Brisbane")] -AustraliaBrisbane = 309, + [EnumMember(Value = "Asia/Tomsk")] + AsiaTomsk = 289, -[EnumMember(Value = "Australia/Broken_Hill")] -AustraliaBrokenHill = 310, + [EnumMember(Value = "Asia/Ulaanbaatar")] + AsiaUlaanbaatar = 290, -[EnumMember(Value = "Australia/Currie")] -AustraliaCurrie = 311, + [EnumMember(Value = "Asia/Urumqi")] + AsiaUrumqi = 291, -[EnumMember(Value = "Australia/Darwin")] -AustraliaDarwin = 312, + [EnumMember(Value = "Asia/Ust-Nera")] + AsiaUstNera = 292, -[EnumMember(Value = "Australia/Eucla")] -AustraliaEucla = 313, + [EnumMember(Value = "Asia/Vientiane")] + AsiaVientiane = 293, -[EnumMember(Value = "Australia/Hobart")] -AustraliaHobart = 314, + [EnumMember(Value = "Asia/Vladivostok")] + AsiaVladivostok = 294, -[EnumMember(Value = "Australia/Lindeman")] -AustraliaLindeman = 315, + [EnumMember(Value = "Asia/Yakutsk")] + AsiaYakutsk = 295, -[EnumMember(Value = "Australia/Lord_Howe")] -AustraliaLordHowe = 316, + [EnumMember(Value = "Asia/Yekaterinburg")] + AsiaYekaterinburg = 296, -[EnumMember(Value = "Australia/Melbourne")] -AustraliaMelbourne = 317, + [EnumMember(Value = "Asia/Yerevan")] + AsiaYerevan = 297, -[EnumMember(Value = "Australia/Perth")] -AustraliaPerth = 318, + [EnumMember(Value = "Atlantic/Azores")] + AtlanticAzores = 298, -[EnumMember(Value = "Australia/Sydney")] -AustraliaSydney = 319, + [EnumMember(Value = "Atlantic/Bermuda")] + AtlanticBermuda = 299, -[EnumMember(Value = "Europe/Amsterdam")] -EuropeAmsterdam = 320, + [EnumMember(Value = "Atlantic/Canary")] + AtlanticCanary = 300, -[EnumMember(Value = "Europe/Andorra")] -EuropeAndorra = 321, + [EnumMember(Value = "Atlantic/Cape_Verde")] + AtlanticCapeVerde = 301, -[EnumMember(Value = "Europe/Astrakhan")] -EuropeAstrakhan = 322, + [EnumMember(Value = "Atlantic/Faeroe")] + AtlanticFaeroe = 302, -[EnumMember(Value = "Europe/Athens")] -EuropeAthens = 323, + [EnumMember(Value = "Atlantic/Madeira")] + AtlanticMadeira = 303, -[EnumMember(Value = "Europe/Belgrade")] -EuropeBelgrade = 324, + [EnumMember(Value = "Atlantic/Reykjavik")] + AtlanticReykjavik = 304, -[EnumMember(Value = "Europe/Berlin")] -EuropeBerlin = 325, + [EnumMember(Value = "Atlantic/South_Georgia")] + AtlanticSouthGeorgia = 305, -[EnumMember(Value = "Europe/Bratislava")] -EuropeBratislava = 326, + [EnumMember(Value = "Atlantic/St_Helena")] + AtlanticStHelena = 306, -[EnumMember(Value = "Europe/Brussels")] -EuropeBrussels = 327, + [EnumMember(Value = "Atlantic/Stanley")] + AtlanticStanley = 307, -[EnumMember(Value = "Europe/Bucharest")] -EuropeBucharest = 328, + [EnumMember(Value = "Australia/Adelaide")] + AustraliaAdelaide = 308, -[EnumMember(Value = "Europe/Budapest")] -EuropeBudapest = 329, + [EnumMember(Value = "Australia/Brisbane")] + AustraliaBrisbane = 309, -[EnumMember(Value = "Europe/Busingen")] -EuropeBusingen = 330, + [EnumMember(Value = "Australia/Broken_Hill")] + AustraliaBrokenHill = 310, -[EnumMember(Value = "Europe/Chisinau")] -EuropeChisinau = 331, + [EnumMember(Value = "Australia/Currie")] + AustraliaCurrie = 311, -[EnumMember(Value = "Europe/Copenhagen")] -EuropeCopenhagen = 332, + [EnumMember(Value = "Australia/Darwin")] + AustraliaDarwin = 312, -[EnumMember(Value = "Europe/Dublin")] -EuropeDublin = 333, + [EnumMember(Value = "Australia/Eucla")] + AustraliaEucla = 313, -[EnumMember(Value = "Europe/Gibraltar")] -EuropeGibraltar = 334, + [EnumMember(Value = "Australia/Hobart")] + AustraliaHobart = 314, -[EnumMember(Value = "Europe/Guernsey")] -EuropeGuernsey = 335, + [EnumMember(Value = "Australia/Lindeman")] + AustraliaLindeman = 315, -[EnumMember(Value = "Europe/Helsinki")] -EuropeHelsinki = 336, + [EnumMember(Value = "Australia/Lord_Howe")] + AustraliaLordHowe = 316, -[EnumMember(Value = "Europe/Isle_of_Man")] -EuropeIsleOfMan = 337, + [EnumMember(Value = "Australia/Melbourne")] + AustraliaMelbourne = 317, -[EnumMember(Value = "Europe/Istanbul")] -EuropeIstanbul = 338, + [EnumMember(Value = "Australia/Perth")] + AustraliaPerth = 318, -[EnumMember(Value = "Europe/Jersey")] -EuropeJersey = 339, + [EnumMember(Value = "Australia/Sydney")] + AustraliaSydney = 319, -[EnumMember(Value = "Europe/Kaliningrad")] -EuropeKaliningrad = 340, + [EnumMember(Value = "Europe/Amsterdam")] + EuropeAmsterdam = 320, -[EnumMember(Value = "Europe/Kiev")] -EuropeKiev = 341, + [EnumMember(Value = "Europe/Andorra")] + EuropeAndorra = 321, -[EnumMember(Value = "Europe/Kirov")] -EuropeKirov = 342, + [EnumMember(Value = "Europe/Astrakhan")] + EuropeAstrakhan = 322, -[EnumMember(Value = "Europe/Lisbon")] -EuropeLisbon = 343, + [EnumMember(Value = "Europe/Athens")] + EuropeAthens = 323, -[EnumMember(Value = "Europe/Ljubljana")] -EuropeLjubljana = 344, + [EnumMember(Value = "Europe/Belgrade")] + EuropeBelgrade = 324, -[EnumMember(Value = "Europe/London")] -EuropeLondon = 345, + [EnumMember(Value = "Europe/Berlin")] + EuropeBerlin = 325, -[EnumMember(Value = "Europe/Luxembourg")] -EuropeLuxembourg = 346, + [EnumMember(Value = "Europe/Bratislava")] + EuropeBratislava = 326, -[EnumMember(Value = "Europe/Madrid")] -EuropeMadrid = 347, + [EnumMember(Value = "Europe/Brussels")] + EuropeBrussels = 327, -[EnumMember(Value = "Europe/Malta")] -EuropeMalta = 348, + [EnumMember(Value = "Europe/Bucharest")] + EuropeBucharest = 328, -[EnumMember(Value = "Europe/Mariehamn")] -EuropeMariehamn = 349, + [EnumMember(Value = "Europe/Budapest")] + EuropeBudapest = 329, -[EnumMember(Value = "Europe/Minsk")] -EuropeMinsk = 350, + [EnumMember(Value = "Europe/Busingen")] + EuropeBusingen = 330, -[EnumMember(Value = "Europe/Monaco")] -EuropeMonaco = 351, + [EnumMember(Value = "Europe/Chisinau")] + EuropeChisinau = 331, -[EnumMember(Value = "Europe/Moscow")] -EuropeMoscow = 352, + [EnumMember(Value = "Europe/Copenhagen")] + EuropeCopenhagen = 332, -[EnumMember(Value = "Europe/Oslo")] -EuropeOslo = 353, + [EnumMember(Value = "Europe/Dublin")] + EuropeDublin = 333, -[EnumMember(Value = "Europe/Paris")] -EuropeParis = 354, + [EnumMember(Value = "Europe/Gibraltar")] + EuropeGibraltar = 334, -[EnumMember(Value = "Europe/Podgorica")] -EuropePodgorica = 355, + [EnumMember(Value = "Europe/Guernsey")] + EuropeGuernsey = 335, -[EnumMember(Value = "Europe/Prague")] -EuropePrague = 356, + [EnumMember(Value = "Europe/Helsinki")] + EuropeHelsinki = 336, -[EnumMember(Value = "Europe/Riga")] -EuropeRiga = 357, + [EnumMember(Value = "Europe/Isle_of_Man")] + EuropeIsleOfMan = 337, -[EnumMember(Value = "Europe/Rome")] -EuropeRome = 358, + [EnumMember(Value = "Europe/Istanbul")] + EuropeIstanbul = 338, -[EnumMember(Value = "Europe/Samara")] -EuropeSamara = 359, + [EnumMember(Value = "Europe/Jersey")] + EuropeJersey = 339, -[EnumMember(Value = "Europe/San_Marino")] -EuropeSanMarino = 360, + [EnumMember(Value = "Europe/Kaliningrad")] + EuropeKaliningrad = 340, -[EnumMember(Value = "Europe/Sarajevo")] -EuropeSarajevo = 361, + [EnumMember(Value = "Europe/Kiev")] + EuropeKiev = 341, -[EnumMember(Value = "Europe/Saratov")] -EuropeSaratov = 362, + [EnumMember(Value = "Europe/Kirov")] + EuropeKirov = 342, -[EnumMember(Value = "Europe/Simferopol")] -EuropeSimferopol = 363, + [EnumMember(Value = "Europe/Lisbon")] + EuropeLisbon = 343, -[EnumMember(Value = "Europe/Skopje")] -EuropeSkopje = 364, + [EnumMember(Value = "Europe/Ljubljana")] + EuropeLjubljana = 344, -[EnumMember(Value = "Europe/Sofia")] -EuropeSofia = 365, + [EnumMember(Value = "Europe/London")] + EuropeLondon = 345, -[EnumMember(Value = "Europe/Stockholm")] -EuropeStockholm = 366, + [EnumMember(Value = "Europe/Luxembourg")] + EuropeLuxembourg = 346, -[EnumMember(Value = "Europe/Tallinn")] -EuropeTallinn = 367, + [EnumMember(Value = "Europe/Madrid")] + EuropeMadrid = 347, -[EnumMember(Value = "Europe/Tirane")] -EuropeTirane = 368, + [EnumMember(Value = "Europe/Malta")] + EuropeMalta = 348, -[EnumMember(Value = "Europe/Ulyanovsk")] -EuropeUlyanovsk = 369, + [EnumMember(Value = "Europe/Mariehamn")] + EuropeMariehamn = 349, -[EnumMember(Value = "Europe/Uzhgorod")] -EuropeUzhgorod = 370, + [EnumMember(Value = "Europe/Minsk")] + EuropeMinsk = 350, -[EnumMember(Value = "Europe/Vaduz")] -EuropeVaduz = 371, + [EnumMember(Value = "Europe/Monaco")] + EuropeMonaco = 351, -[EnumMember(Value = "Europe/Vatican")] -EuropeVatican = 372, + [EnumMember(Value = "Europe/Moscow")] + EuropeMoscow = 352, -[EnumMember(Value = "Europe/Vienna")] -EuropeVienna = 373, + [EnumMember(Value = "Europe/Oslo")] + EuropeOslo = 353, -[EnumMember(Value = "Europe/Vilnius")] -EuropeVilnius = 374, + [EnumMember(Value = "Europe/Paris")] + EuropeParis = 354, -[EnumMember(Value = "Europe/Volgograd")] -EuropeVolgograd = 375, + [EnumMember(Value = "Europe/Podgorica")] + EuropePodgorica = 355, -[EnumMember(Value = "Europe/Warsaw")] -EuropeWarsaw = 376, + [EnumMember(Value = "Europe/Prague")] + EuropePrague = 356, -[EnumMember(Value = "Europe/Zagreb")] -EuropeZagreb = 377, + [EnumMember(Value = "Europe/Riga")] + EuropeRiga = 357, -[EnumMember(Value = "Europe/Zaporozhye")] -EuropeZaporozhye = 378, + [EnumMember(Value = "Europe/Rome")] + EuropeRome = 358, -[EnumMember(Value = "Europe/Zurich")] -EuropeZurich = 379, + [EnumMember(Value = "Europe/Samara")] + EuropeSamara = 359, -[EnumMember(Value = "Indian/Antananarivo")] -IndianAntananarivo = 380, + [EnumMember(Value = "Europe/San_Marino")] + EuropeSanMarino = 360, -[EnumMember(Value = "Indian/Chagos")] -IndianChagos = 381, + [EnumMember(Value = "Europe/Sarajevo")] + EuropeSarajevo = 361, -[EnumMember(Value = "Indian/Christmas")] -IndianChristmas = 382, + [EnumMember(Value = "Europe/Saratov")] + EuropeSaratov = 362, -[EnumMember(Value = "Indian/Cocos")] -IndianCocos = 383, + [EnumMember(Value = "Europe/Simferopol")] + EuropeSimferopol = 363, -[EnumMember(Value = "Indian/Comoro")] -IndianComoro = 384, + [EnumMember(Value = "Europe/Skopje")] + EuropeSkopje = 364, -[EnumMember(Value = "Indian/Kerguelen")] -IndianKerguelen = 385, + [EnumMember(Value = "Europe/Sofia")] + EuropeSofia = 365, -[EnumMember(Value = "Indian/Mahe")] -IndianMahe = 386, + [EnumMember(Value = "Europe/Stockholm")] + EuropeStockholm = 366, -[EnumMember(Value = "Indian/Maldives")] -IndianMaldives = 387, + [EnumMember(Value = "Europe/Tallinn")] + EuropeTallinn = 367, -[EnumMember(Value = "Indian/Mauritius")] -IndianMauritius = 388, + [EnumMember(Value = "Europe/Tirane")] + EuropeTirane = 368, -[EnumMember(Value = "Indian/Mayotte")] -IndianMayotte = 389, + [EnumMember(Value = "Europe/Ulyanovsk")] + EuropeUlyanovsk = 369, -[EnumMember(Value = "Indian/Reunion")] -IndianReunion = 390, + [EnumMember(Value = "Europe/Uzhgorod")] + EuropeUzhgorod = 370, -[EnumMember(Value = "Pacific/Apia")] -PacificApia = 391, + [EnumMember(Value = "Europe/Vaduz")] + EuropeVaduz = 371, -[EnumMember(Value = "Pacific/Auckland")] -PacificAuckland = 392, + [EnumMember(Value = "Europe/Vatican")] + EuropeVatican = 372, -[EnumMember(Value = "Pacific/Bougainville")] -PacificBougainville = 393, + [EnumMember(Value = "Europe/Vienna")] + EuropeVienna = 373, -[EnumMember(Value = "Pacific/Chatham")] -PacificChatham = 394, + [EnumMember(Value = "Europe/Vilnius")] + EuropeVilnius = 374, -[EnumMember(Value = "Pacific/Easter")] -PacificEaster = 395, + [EnumMember(Value = "Europe/Volgograd")] + EuropeVolgograd = 375, -[EnumMember(Value = "Pacific/Efate")] -PacificEfate = 396, + [EnumMember(Value = "Europe/Warsaw")] + EuropeWarsaw = 376, -[EnumMember(Value = "Pacific/Enderbury")] -PacificEnderbury = 397, + [EnumMember(Value = "Europe/Zagreb")] + EuropeZagreb = 377, -[EnumMember(Value = "Pacific/Fakaofo")] -PacificFakaofo = 398, + [EnumMember(Value = "Europe/Zaporozhye")] + EuropeZaporozhye = 378, -[EnumMember(Value = "Pacific/Fiji")] -PacificFiji = 399, + [EnumMember(Value = "Europe/Zurich")] + EuropeZurich = 379, -[EnumMember(Value = "Pacific/Funafuti")] -PacificFunafuti = 400, + [EnumMember(Value = "Indian/Antananarivo")] + IndianAntananarivo = 380, -[EnumMember(Value = "Pacific/Galapagos")] -PacificGalapagos = 401, + [EnumMember(Value = "Indian/Chagos")] + IndianChagos = 381, -[EnumMember(Value = "Pacific/Gambier")] -PacificGambier = 402, + [EnumMember(Value = "Indian/Christmas")] + IndianChristmas = 382, -[EnumMember(Value = "Pacific/Guadalcanal")] -PacificGuadalcanal = 403, + [EnumMember(Value = "Indian/Cocos")] + IndianCocos = 383, -[EnumMember(Value = "Pacific/Guam")] -PacificGuam = 404, + [EnumMember(Value = "Indian/Comoro")] + IndianComoro = 384, -[EnumMember(Value = "Pacific/Honolulu")] -PacificHonolulu = 405, + [EnumMember(Value = "Indian/Kerguelen")] + IndianKerguelen = 385, -[EnumMember(Value = "Pacific/Johnston")] -PacificJohnston = 406, + [EnumMember(Value = "Indian/Mahe")] + IndianMahe = 386, -[EnumMember(Value = "Pacific/Kiritimati")] -PacificKiritimati = 407, + [EnumMember(Value = "Indian/Maldives")] + IndianMaldives = 387, -[EnumMember(Value = "Pacific/Kosrae")] -PacificKosrae = 408, + [EnumMember(Value = "Indian/Mauritius")] + IndianMauritius = 388, -[EnumMember(Value = "Pacific/Kwajalein")] -PacificKwajalein = 409, + [EnumMember(Value = "Indian/Mayotte")] + IndianMayotte = 389, -[EnumMember(Value = "Pacific/Majuro")] -PacificMajuro = 410, + [EnumMember(Value = "Indian/Reunion")] + IndianReunion = 390, -[EnumMember(Value = "Pacific/Marquesas")] -PacificMarquesas = 411, + [EnumMember(Value = "Pacific/Apia")] + PacificApia = 391, -[EnumMember(Value = "Pacific/Midway")] -PacificMidway = 412, + [EnumMember(Value = "Pacific/Auckland")] + PacificAuckland = 392, -[EnumMember(Value = "Pacific/Nauru")] -PacificNauru = 413, + [EnumMember(Value = "Pacific/Bougainville")] + PacificBougainville = 393, -[EnumMember(Value = "Pacific/Niue")] -PacificNiue = 414, + [EnumMember(Value = "Pacific/Chatham")] + PacificChatham = 394, -[EnumMember(Value = "Pacific/Norfolk")] -PacificNorfolk = 415, + [EnumMember(Value = "Pacific/Easter")] + PacificEaster = 395, -[EnumMember(Value = "Pacific/Noumea")] -PacificNoumea = 416, + [EnumMember(Value = "Pacific/Efate")] + PacificEfate = 396, -[EnumMember(Value = "Pacific/Pago_Pago")] -PacificPagoPago = 417, + [EnumMember(Value = "Pacific/Enderbury")] + PacificEnderbury = 397, -[EnumMember(Value = "Pacific/Palau")] -PacificPalau = 418, + [EnumMember(Value = "Pacific/Fakaofo")] + PacificFakaofo = 398, -[EnumMember(Value = "Pacific/Pitcairn")] -PacificPitcairn = 419, + [EnumMember(Value = "Pacific/Fiji")] + PacificFiji = 399, -[EnumMember(Value = "Pacific/Ponape")] -PacificPonape = 420, + [EnumMember(Value = "Pacific/Funafuti")] + PacificFunafuti = 400, -[EnumMember(Value = "Pacific/Port_Moresby")] -PacificPortMoresby = 421, + [EnumMember(Value = "Pacific/Galapagos")] + PacificGalapagos = 401, -[EnumMember(Value = "Pacific/Rarotonga")] -PacificRarotonga = 422, + [EnumMember(Value = "Pacific/Gambier")] + PacificGambier = 402, -[EnumMember(Value = "Pacific/Saipan")] -PacificSaipan = 423, + [EnumMember(Value = "Pacific/Guadalcanal")] + PacificGuadalcanal = 403, -[EnumMember(Value = "Pacific/Tahiti")] -PacificTahiti = 424, + [EnumMember(Value = "Pacific/Guam")] + PacificGuam = 404, -[EnumMember(Value = "Pacific/Tarawa")] -PacificTarawa = 425, + [EnumMember(Value = "Pacific/Honolulu")] + PacificHonolulu = 405, -[EnumMember(Value = "Pacific/Tongatapu")] -PacificTongatapu = 426, + [EnumMember(Value = "Pacific/Johnston")] + PacificJohnston = 406, -[EnumMember(Value = "Pacific/Truk")] -PacificTruk = 427, + [EnumMember(Value = "Pacific/Kiritimati")] + PacificKiritimati = 407, -[EnumMember(Value = "Pacific/Wake")] -PacificWake = 428, + [EnumMember(Value = "Pacific/Kosrae")] + PacificKosrae = 408, -[EnumMember(Value = "Pacific/Wallis")] -PacificWallis = 429, -} + [EnumMember(Value = "Pacific/Kwajalein")] + PacificKwajalein = 409, -/// -/// IANA timezone for the Omnitec device -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public ReportProviderMetadataRequestDevicesOmnitecMetadata.TimeZoneEnum? TimeZone { get; set; } + [EnumMember(Value = "Pacific/Majuro")] + PacificMajuro = 410, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "Pacific/Marquesas")] + PacificMarquesas = 411, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "Pacific/Midway")] + PacificMidway = 412, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "Pacific/Nauru")] + PacificNauru = 413, -[DataContract(Name = "reportProviderMetadataRequestDevicesSchlageMetadata_model")] -public class ReportProviderMetadataRequestDevicesSchlageMetadata -{ -[JsonConstructorAttribute] -protected ReportProviderMetadataRequestDevicesSchlageMetadata() { } + [EnumMember(Value = "Pacific/Niue")] + PacificNiue = 414, -public ReportProviderMetadataRequestDevicesSchlageMetadata(ReportProviderMetadataRequestDevicesSchlageMetadata.TimeZoneEnum? timeZone = default) -{ -TimeZone = timeZone; -} + [EnumMember(Value = "Pacific/Norfolk")] + PacificNorfolk = 415, -/// -/// IANA timezone for the Schlage device -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TimeZoneEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "Pacific/Noumea")] + PacificNoumea = 416, -[EnumMember(Value = "Africa/Abidjan")] -AfricaAbidjan = 1, + [EnumMember(Value = "Pacific/Pago_Pago")] + PacificPagoPago = 417, -[EnumMember(Value = "Africa/Accra")] -AfricaAccra = 2, + [EnumMember(Value = "Pacific/Palau")] + PacificPalau = 418, -[EnumMember(Value = "Africa/Addis_Ababa")] -AfricaAddisAbaba = 3, + [EnumMember(Value = "Pacific/Pitcairn")] + PacificPitcairn = 419, -[EnumMember(Value = "Africa/Algiers")] -AfricaAlgiers = 4, + [EnumMember(Value = "Pacific/Ponape")] + PacificPonape = 420, -[EnumMember(Value = "Africa/Asmera")] -AfricaAsmera = 5, + [EnumMember(Value = "Pacific/Port_Moresby")] + PacificPortMoresby = 421, -[EnumMember(Value = "Africa/Bamako")] -AfricaBamako = 6, + [EnumMember(Value = "Pacific/Rarotonga")] + PacificRarotonga = 422, -[EnumMember(Value = "Africa/Bangui")] -AfricaBangui = 7, + [EnumMember(Value = "Pacific/Saipan")] + PacificSaipan = 423, -[EnumMember(Value = "Africa/Banjul")] -AfricaBanjul = 8, + [EnumMember(Value = "Pacific/Tahiti")] + PacificTahiti = 424, -[EnumMember(Value = "Africa/Bissau")] -AfricaBissau = 9, + [EnumMember(Value = "Pacific/Tarawa")] + PacificTarawa = 425, -[EnumMember(Value = "Africa/Blantyre")] -AfricaBlantyre = 10, + [EnumMember(Value = "Pacific/Tongatapu")] + PacificTongatapu = 426, -[EnumMember(Value = "Africa/Brazzaville")] -AfricaBrazzaville = 11, + [EnumMember(Value = "Pacific/Truk")] + PacificTruk = 427, -[EnumMember(Value = "Africa/Bujumbura")] -AfricaBujumbura = 12, + [EnumMember(Value = "Pacific/Wake")] + PacificWake = 428, -[EnumMember(Value = "Africa/Cairo")] -AfricaCairo = 13, + [EnumMember(Value = "Pacific/Wallis")] + PacificWallis = 429, + } -[EnumMember(Value = "Africa/Casablanca")] -AfricaCasablanca = 14, + /// + /// IANA timezone for the Omnitec device + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public ReportProviderMetadataRequestDevicesOmnitecMetadata.TimeZoneEnum? TimeZone { get; set; } -[EnumMember(Value = "Africa/Ceuta")] -AfricaCeuta = 15, + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -[EnumMember(Value = "Africa/Conakry")] -AfricaConakry = 16, + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } -[EnumMember(Value = "Africa/Dakar")] -AfricaDakar = 17, + return stringWriter.ToString(); + } + } -[EnumMember(Value = "Africa/Dar_es_Salaam")] -AfricaDarEsSalaam = 18, + [DataContract(Name = "reportProviderMetadataRequestDevicesSchlageMetadata_model")] + public class ReportProviderMetadataRequestDevicesSchlageMetadata + { + [JsonConstructorAttribute] + protected ReportProviderMetadataRequestDevicesSchlageMetadata() { } -[EnumMember(Value = "Africa/Djibouti")] -AfricaDjibouti = 19, + public ReportProviderMetadataRequestDevicesSchlageMetadata( + ReportProviderMetadataRequestDevicesSchlageMetadata.TimeZoneEnum? timeZone = default + ) + { + TimeZone = timeZone; + } -[EnumMember(Value = "Africa/Douala")] -AfricaDouala = 20, + /// + /// IANA timezone for the Schlage device + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TimeZoneEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "Africa/El_Aaiun")] -AfricaElAaiun = 21, + [EnumMember(Value = "Africa/Abidjan")] + AfricaAbidjan = 1, -[EnumMember(Value = "Africa/Freetown")] -AfricaFreetown = 22, + [EnumMember(Value = "Africa/Accra")] + AfricaAccra = 2, -[EnumMember(Value = "Africa/Gaborone")] -AfricaGaborone = 23, + [EnumMember(Value = "Africa/Addis_Ababa")] + AfricaAddisAbaba = 3, -[EnumMember(Value = "Africa/Harare")] -AfricaHarare = 24, + [EnumMember(Value = "Africa/Algiers")] + AfricaAlgiers = 4, -[EnumMember(Value = "Africa/Johannesburg")] -AfricaJohannesburg = 25, + [EnumMember(Value = "Africa/Asmera")] + AfricaAsmera = 5, -[EnumMember(Value = "Africa/Juba")] -AfricaJuba = 26, + [EnumMember(Value = "Africa/Bamako")] + AfricaBamako = 6, -[EnumMember(Value = "Africa/Kampala")] -AfricaKampala = 27, + [EnumMember(Value = "Africa/Bangui")] + AfricaBangui = 7, -[EnumMember(Value = "Africa/Khartoum")] -AfricaKhartoum = 28, + [EnumMember(Value = "Africa/Banjul")] + AfricaBanjul = 8, -[EnumMember(Value = "Africa/Kigali")] -AfricaKigali = 29, + [EnumMember(Value = "Africa/Bissau")] + AfricaBissau = 9, -[EnumMember(Value = "Africa/Kinshasa")] -AfricaKinshasa = 30, + [EnumMember(Value = "Africa/Blantyre")] + AfricaBlantyre = 10, -[EnumMember(Value = "Africa/Lagos")] -AfricaLagos = 31, + [EnumMember(Value = "Africa/Brazzaville")] + AfricaBrazzaville = 11, -[EnumMember(Value = "Africa/Libreville")] -AfricaLibreville = 32, + [EnumMember(Value = "Africa/Bujumbura")] + AfricaBujumbura = 12, -[EnumMember(Value = "Africa/Lome")] -AfricaLome = 33, + [EnumMember(Value = "Africa/Cairo")] + AfricaCairo = 13, -[EnumMember(Value = "Africa/Luanda")] -AfricaLuanda = 34, + [EnumMember(Value = "Africa/Casablanca")] + AfricaCasablanca = 14, -[EnumMember(Value = "Africa/Lubumbashi")] -AfricaLubumbashi = 35, + [EnumMember(Value = "Africa/Ceuta")] + AfricaCeuta = 15, -[EnumMember(Value = "Africa/Lusaka")] -AfricaLusaka = 36, + [EnumMember(Value = "Africa/Conakry")] + AfricaConakry = 16, -[EnumMember(Value = "Africa/Malabo")] -AfricaMalabo = 37, + [EnumMember(Value = "Africa/Dakar")] + AfricaDakar = 17, -[EnumMember(Value = "Africa/Maputo")] -AfricaMaputo = 38, + [EnumMember(Value = "Africa/Dar_es_Salaam")] + AfricaDarEsSalaam = 18, -[EnumMember(Value = "Africa/Maseru")] -AfricaMaseru = 39, + [EnumMember(Value = "Africa/Djibouti")] + AfricaDjibouti = 19, -[EnumMember(Value = "Africa/Mbabane")] -AfricaMbabane = 40, + [EnumMember(Value = "Africa/Douala")] + AfricaDouala = 20, -[EnumMember(Value = "Africa/Mogadishu")] -AfricaMogadishu = 41, + [EnumMember(Value = "Africa/El_Aaiun")] + AfricaElAaiun = 21, -[EnumMember(Value = "Africa/Monrovia")] -AfricaMonrovia = 42, + [EnumMember(Value = "Africa/Freetown")] + AfricaFreetown = 22, -[EnumMember(Value = "Africa/Nairobi")] -AfricaNairobi = 43, + [EnumMember(Value = "Africa/Gaborone")] + AfricaGaborone = 23, -[EnumMember(Value = "Africa/Ndjamena")] -AfricaNdjamena = 44, + [EnumMember(Value = "Africa/Harare")] + AfricaHarare = 24, -[EnumMember(Value = "Africa/Niamey")] -AfricaNiamey = 45, + [EnumMember(Value = "Africa/Johannesburg")] + AfricaJohannesburg = 25, -[EnumMember(Value = "Africa/Nouakchott")] -AfricaNouakchott = 46, + [EnumMember(Value = "Africa/Juba")] + AfricaJuba = 26, -[EnumMember(Value = "Africa/Ouagadougou")] -AfricaOuagadougou = 47, + [EnumMember(Value = "Africa/Kampala")] + AfricaKampala = 27, -[EnumMember(Value = "Africa/Porto-Novo")] -AfricaPortoNovo = 48, + [EnumMember(Value = "Africa/Khartoum")] + AfricaKhartoum = 28, -[EnumMember(Value = "Africa/Sao_Tome")] -AfricaSaoTome = 49, + [EnumMember(Value = "Africa/Kigali")] + AfricaKigali = 29, -[EnumMember(Value = "Africa/Tripoli")] -AfricaTripoli = 50, + [EnumMember(Value = "Africa/Kinshasa")] + AfricaKinshasa = 30, -[EnumMember(Value = "Africa/Tunis")] -AfricaTunis = 51, + [EnumMember(Value = "Africa/Lagos")] + AfricaLagos = 31, -[EnumMember(Value = "Africa/Windhoek")] -AfricaWindhoek = 52, + [EnumMember(Value = "Africa/Libreville")] + AfricaLibreville = 32, -[EnumMember(Value = "America/Adak")] -AmericaAdak = 53, + [EnumMember(Value = "Africa/Lome")] + AfricaLome = 33, -[EnumMember(Value = "America/Anchorage")] -AmericaAnchorage = 54, + [EnumMember(Value = "Africa/Luanda")] + AfricaLuanda = 34, -[EnumMember(Value = "America/Anguilla")] -AmericaAnguilla = 55, + [EnumMember(Value = "Africa/Lubumbashi")] + AfricaLubumbashi = 35, -[EnumMember(Value = "America/Antigua")] -AmericaAntigua = 56, + [EnumMember(Value = "Africa/Lusaka")] + AfricaLusaka = 36, -[EnumMember(Value = "America/Araguaina")] -AmericaAraguaina = 57, + [EnumMember(Value = "Africa/Malabo")] + AfricaMalabo = 37, -[EnumMember(Value = "America/Argentina/La_Rioja")] -AmericaArgentinaLaRioja = 58, + [EnumMember(Value = "Africa/Maputo")] + AfricaMaputo = 38, -[EnumMember(Value = "America/Argentina/Rio_Gallegos")] -AmericaArgentinaRioGallegos = 59, + [EnumMember(Value = "Africa/Maseru")] + AfricaMaseru = 39, -[EnumMember(Value = "America/Argentina/Salta")] -AmericaArgentinaSalta = 60, + [EnumMember(Value = "Africa/Mbabane")] + AfricaMbabane = 40, -[EnumMember(Value = "America/Argentina/San_Juan")] -AmericaArgentinaSanJuan = 61, + [EnumMember(Value = "Africa/Mogadishu")] + AfricaMogadishu = 41, -[EnumMember(Value = "America/Argentina/San_Luis")] -AmericaArgentinaSanLuis = 62, + [EnumMember(Value = "Africa/Monrovia")] + AfricaMonrovia = 42, -[EnumMember(Value = "America/Argentina/Tucuman")] -AmericaArgentinaTucuman = 63, + [EnumMember(Value = "Africa/Nairobi")] + AfricaNairobi = 43, -[EnumMember(Value = "America/Argentina/Ushuaia")] -AmericaArgentinaUshuaia = 64, + [EnumMember(Value = "Africa/Ndjamena")] + AfricaNdjamena = 44, -[EnumMember(Value = "America/Aruba")] -AmericaAruba = 65, + [EnumMember(Value = "Africa/Niamey")] + AfricaNiamey = 45, -[EnumMember(Value = "America/Asuncion")] -AmericaAsuncion = 66, + [EnumMember(Value = "Africa/Nouakchott")] + AfricaNouakchott = 46, -[EnumMember(Value = "America/Bahia")] -AmericaBahia = 67, + [EnumMember(Value = "Africa/Ouagadougou")] + AfricaOuagadougou = 47, -[EnumMember(Value = "America/Bahia_Banderas")] -AmericaBahiaBanderas = 68, + [EnumMember(Value = "Africa/Porto-Novo")] + AfricaPortoNovo = 48, -[EnumMember(Value = "America/Barbados")] -AmericaBarbados = 69, + [EnumMember(Value = "Africa/Sao_Tome")] + AfricaSaoTome = 49, -[EnumMember(Value = "America/Belem")] -AmericaBelem = 70, + [EnumMember(Value = "Africa/Tripoli")] + AfricaTripoli = 50, -[EnumMember(Value = "America/Belize")] -AmericaBelize = 71, + [EnumMember(Value = "Africa/Tunis")] + AfricaTunis = 51, -[EnumMember(Value = "America/Blanc-Sablon")] -AmericaBlancSablon = 72, + [EnumMember(Value = "Africa/Windhoek")] + AfricaWindhoek = 52, -[EnumMember(Value = "America/Boa_Vista")] -AmericaBoaVista = 73, + [EnumMember(Value = "America/Adak")] + AmericaAdak = 53, -[EnumMember(Value = "America/Bogota")] -AmericaBogota = 74, + [EnumMember(Value = "America/Anchorage")] + AmericaAnchorage = 54, -[EnumMember(Value = "America/Boise")] -AmericaBoise = 75, + [EnumMember(Value = "America/Anguilla")] + AmericaAnguilla = 55, -[EnumMember(Value = "America/Buenos_Aires")] -AmericaBuenosAires = 76, + [EnumMember(Value = "America/Antigua")] + AmericaAntigua = 56, -[EnumMember(Value = "America/Cambridge_Bay")] -AmericaCambridgeBay = 77, + [EnumMember(Value = "America/Araguaina")] + AmericaAraguaina = 57, -[EnumMember(Value = "America/Campo_Grande")] -AmericaCampoGrande = 78, + [EnumMember(Value = "America/Argentina/La_Rioja")] + AmericaArgentinaLaRioja = 58, -[EnumMember(Value = "America/Cancun")] -AmericaCancun = 79, + [EnumMember(Value = "America/Argentina/Rio_Gallegos")] + AmericaArgentinaRioGallegos = 59, -[EnumMember(Value = "America/Caracas")] -AmericaCaracas = 80, + [EnumMember(Value = "America/Argentina/Salta")] + AmericaArgentinaSalta = 60, -[EnumMember(Value = "America/Catamarca")] -AmericaCatamarca = 81, + [EnumMember(Value = "America/Argentina/San_Juan")] + AmericaArgentinaSanJuan = 61, -[EnumMember(Value = "America/Cayenne")] -AmericaCayenne = 82, + [EnumMember(Value = "America/Argentina/San_Luis")] + AmericaArgentinaSanLuis = 62, -[EnumMember(Value = "America/Cayman")] -AmericaCayman = 83, + [EnumMember(Value = "America/Argentina/Tucuman")] + AmericaArgentinaTucuman = 63, -[EnumMember(Value = "America/Chicago")] -AmericaChicago = 84, + [EnumMember(Value = "America/Argentina/Ushuaia")] + AmericaArgentinaUshuaia = 64, -[EnumMember(Value = "America/Chihuahua")] -AmericaChihuahua = 85, + [EnumMember(Value = "America/Aruba")] + AmericaAruba = 65, -[EnumMember(Value = "America/Ciudad_Juarez")] -AmericaCiudadJuarez = 86, + [EnumMember(Value = "America/Asuncion")] + AmericaAsuncion = 66, -[EnumMember(Value = "America/Coral_Harbour")] -AmericaCoralHarbour = 87, + [EnumMember(Value = "America/Bahia")] + AmericaBahia = 67, -[EnumMember(Value = "America/Cordoba")] -AmericaCordoba = 88, + [EnumMember(Value = "America/Bahia_Banderas")] + AmericaBahiaBanderas = 68, -[EnumMember(Value = "America/Costa_Rica")] -AmericaCostaRica = 89, + [EnumMember(Value = "America/Barbados")] + AmericaBarbados = 69, -[EnumMember(Value = "America/Creston")] -AmericaCreston = 90, + [EnumMember(Value = "America/Belem")] + AmericaBelem = 70, -[EnumMember(Value = "America/Cuiaba")] -AmericaCuiaba = 91, + [EnumMember(Value = "America/Belize")] + AmericaBelize = 71, -[EnumMember(Value = "America/Curacao")] -AmericaCuracao = 92, + [EnumMember(Value = "America/Blanc-Sablon")] + AmericaBlancSablon = 72, -[EnumMember(Value = "America/Danmarkshavn")] -AmericaDanmarkshavn = 93, + [EnumMember(Value = "America/Boa_Vista")] + AmericaBoaVista = 73, -[EnumMember(Value = "America/Dawson")] -AmericaDawson = 94, + [EnumMember(Value = "America/Bogota")] + AmericaBogota = 74, -[EnumMember(Value = "America/Dawson_Creek")] -AmericaDawsonCreek = 95, + [EnumMember(Value = "America/Boise")] + AmericaBoise = 75, -[EnumMember(Value = "America/Denver")] -AmericaDenver = 96, + [EnumMember(Value = "America/Buenos_Aires")] + AmericaBuenosAires = 76, -[EnumMember(Value = "America/Detroit")] -AmericaDetroit = 97, + [EnumMember(Value = "America/Cambridge_Bay")] + AmericaCambridgeBay = 77, -[EnumMember(Value = "America/Dominica")] -AmericaDominica = 98, + [EnumMember(Value = "America/Campo_Grande")] + AmericaCampoGrande = 78, -[EnumMember(Value = "America/Edmonton")] -AmericaEdmonton = 99, + [EnumMember(Value = "America/Cancun")] + AmericaCancun = 79, -[EnumMember(Value = "America/Eirunepe")] -AmericaEirunepe = 100, + [EnumMember(Value = "America/Caracas")] + AmericaCaracas = 80, -[EnumMember(Value = "America/El_Salvador")] -AmericaElSalvador = 101, + [EnumMember(Value = "America/Catamarca")] + AmericaCatamarca = 81, -[EnumMember(Value = "America/Fort_Nelson")] -AmericaFortNelson = 102, + [EnumMember(Value = "America/Cayenne")] + AmericaCayenne = 82, -[EnumMember(Value = "America/Fortaleza")] -AmericaFortaleza = 103, + [EnumMember(Value = "America/Cayman")] + AmericaCayman = 83, -[EnumMember(Value = "America/Glace_Bay")] -AmericaGlaceBay = 104, + [EnumMember(Value = "America/Chicago")] + AmericaChicago = 84, -[EnumMember(Value = "America/Godthab")] -AmericaGodthab = 105, + [EnumMember(Value = "America/Chihuahua")] + AmericaChihuahua = 85, -[EnumMember(Value = "America/Goose_Bay")] -AmericaGooseBay = 106, + [EnumMember(Value = "America/Ciudad_Juarez")] + AmericaCiudadJuarez = 86, -[EnumMember(Value = "America/Grand_Turk")] -AmericaGrandTurk = 107, + [EnumMember(Value = "America/Coral_Harbour")] + AmericaCoralHarbour = 87, -[EnumMember(Value = "America/Grenada")] -AmericaGrenada = 108, + [EnumMember(Value = "America/Cordoba")] + AmericaCordoba = 88, -[EnumMember(Value = "America/Guadeloupe")] -AmericaGuadeloupe = 109, + [EnumMember(Value = "America/Costa_Rica")] + AmericaCostaRica = 89, -[EnumMember(Value = "America/Guatemala")] -AmericaGuatemala = 110, + [EnumMember(Value = "America/Creston")] + AmericaCreston = 90, -[EnumMember(Value = "America/Guayaquil")] -AmericaGuayaquil = 111, + [EnumMember(Value = "America/Cuiaba")] + AmericaCuiaba = 91, -[EnumMember(Value = "America/Guyana")] -AmericaGuyana = 112, + [EnumMember(Value = "America/Curacao")] + AmericaCuracao = 92, -[EnumMember(Value = "America/Halifax")] -AmericaHalifax = 113, + [EnumMember(Value = "America/Danmarkshavn")] + AmericaDanmarkshavn = 93, -[EnumMember(Value = "America/Havana")] -AmericaHavana = 114, + [EnumMember(Value = "America/Dawson")] + AmericaDawson = 94, -[EnumMember(Value = "America/Hermosillo")] -AmericaHermosillo = 115, + [EnumMember(Value = "America/Dawson_Creek")] + AmericaDawsonCreek = 95, -[EnumMember(Value = "America/Indiana/Knox")] -AmericaIndianaKnox = 116, + [EnumMember(Value = "America/Denver")] + AmericaDenver = 96, -[EnumMember(Value = "America/Indiana/Marengo")] -AmericaIndianaMarengo = 117, + [EnumMember(Value = "America/Detroit")] + AmericaDetroit = 97, -[EnumMember(Value = "America/Indiana/Petersburg")] -AmericaIndianaPetersburg = 118, + [EnumMember(Value = "America/Dominica")] + AmericaDominica = 98, -[EnumMember(Value = "America/Indiana/Tell_City")] -AmericaIndianaTellCity = 119, + [EnumMember(Value = "America/Edmonton")] + AmericaEdmonton = 99, -[EnumMember(Value = "America/Indiana/Vevay")] -AmericaIndianaVevay = 120, + [EnumMember(Value = "America/Eirunepe")] + AmericaEirunepe = 100, -[EnumMember(Value = "America/Indiana/Vincennes")] -AmericaIndianaVincennes = 121, + [EnumMember(Value = "America/El_Salvador")] + AmericaElSalvador = 101, -[EnumMember(Value = "America/Indiana/Winamac")] -AmericaIndianaWinamac = 122, + [EnumMember(Value = "America/Fort_Nelson")] + AmericaFortNelson = 102, -[EnumMember(Value = "America/Indianapolis")] -AmericaIndianapolis = 123, + [EnumMember(Value = "America/Fortaleza")] + AmericaFortaleza = 103, -[EnumMember(Value = "America/Inuvik")] -AmericaInuvik = 124, + [EnumMember(Value = "America/Glace_Bay")] + AmericaGlaceBay = 104, -[EnumMember(Value = "America/Iqaluit")] -AmericaIqaluit = 125, + [EnumMember(Value = "America/Godthab")] + AmericaGodthab = 105, -[EnumMember(Value = "America/Jamaica")] -AmericaJamaica = 126, + [EnumMember(Value = "America/Goose_Bay")] + AmericaGooseBay = 106, -[EnumMember(Value = "America/Jujuy")] -AmericaJujuy = 127, + [EnumMember(Value = "America/Grand_Turk")] + AmericaGrandTurk = 107, -[EnumMember(Value = "America/Juneau")] -AmericaJuneau = 128, + [EnumMember(Value = "America/Grenada")] + AmericaGrenada = 108, -[EnumMember(Value = "America/Kentucky/Monticello")] -AmericaKentuckyMonticello = 129, + [EnumMember(Value = "America/Guadeloupe")] + AmericaGuadeloupe = 109, -[EnumMember(Value = "America/Kralendijk")] -AmericaKralendijk = 130, + [EnumMember(Value = "America/Guatemala")] + AmericaGuatemala = 110, -[EnumMember(Value = "America/La_Paz")] -AmericaLaPaz = 131, + [EnumMember(Value = "America/Guayaquil")] + AmericaGuayaquil = 111, -[EnumMember(Value = "America/Lima")] -AmericaLima = 132, + [EnumMember(Value = "America/Guyana")] + AmericaGuyana = 112, -[EnumMember(Value = "America/Los_Angeles")] -AmericaLosAngeles = 133, + [EnumMember(Value = "America/Halifax")] + AmericaHalifax = 113, -[EnumMember(Value = "America/Louisville")] -AmericaLouisville = 134, + [EnumMember(Value = "America/Havana")] + AmericaHavana = 114, -[EnumMember(Value = "America/Lower_Princes")] -AmericaLowerPrinces = 135, + [EnumMember(Value = "America/Hermosillo")] + AmericaHermosillo = 115, -[EnumMember(Value = "America/Maceio")] -AmericaMaceio = 136, + [EnumMember(Value = "America/Indiana/Knox")] + AmericaIndianaKnox = 116, -[EnumMember(Value = "America/Managua")] -AmericaManagua = 137, + [EnumMember(Value = "America/Indiana/Marengo")] + AmericaIndianaMarengo = 117, -[EnumMember(Value = "America/Manaus")] -AmericaManaus = 138, + [EnumMember(Value = "America/Indiana/Petersburg")] + AmericaIndianaPetersburg = 118, -[EnumMember(Value = "America/Marigot")] -AmericaMarigot = 139, + [EnumMember(Value = "America/Indiana/Tell_City")] + AmericaIndianaTellCity = 119, -[EnumMember(Value = "America/Martinique")] -AmericaMartinique = 140, + [EnumMember(Value = "America/Indiana/Vevay")] + AmericaIndianaVevay = 120, -[EnumMember(Value = "America/Matamoros")] -AmericaMatamoros = 141, + [EnumMember(Value = "America/Indiana/Vincennes")] + AmericaIndianaVincennes = 121, -[EnumMember(Value = "America/Mazatlan")] -AmericaMazatlan = 142, + [EnumMember(Value = "America/Indiana/Winamac")] + AmericaIndianaWinamac = 122, -[EnumMember(Value = "America/Mendoza")] -AmericaMendoza = 143, + [EnumMember(Value = "America/Indianapolis")] + AmericaIndianapolis = 123, -[EnumMember(Value = "America/Menominee")] -AmericaMenominee = 144, + [EnumMember(Value = "America/Inuvik")] + AmericaInuvik = 124, -[EnumMember(Value = "America/Merida")] -AmericaMerida = 145, + [EnumMember(Value = "America/Iqaluit")] + AmericaIqaluit = 125, -[EnumMember(Value = "America/Metlakatla")] -AmericaMetlakatla = 146, + [EnumMember(Value = "America/Jamaica")] + AmericaJamaica = 126, -[EnumMember(Value = "America/Mexico_City")] -AmericaMexicoCity = 147, + [EnumMember(Value = "America/Jujuy")] + AmericaJujuy = 127, -[EnumMember(Value = "America/Miquelon")] -AmericaMiquelon = 148, + [EnumMember(Value = "America/Juneau")] + AmericaJuneau = 128, -[EnumMember(Value = "America/Moncton")] -AmericaMoncton = 149, + [EnumMember(Value = "America/Kentucky/Monticello")] + AmericaKentuckyMonticello = 129, -[EnumMember(Value = "America/Monterrey")] -AmericaMonterrey = 150, + [EnumMember(Value = "America/Kralendijk")] + AmericaKralendijk = 130, -[EnumMember(Value = "America/Montevideo")] -AmericaMontevideo = 151, + [EnumMember(Value = "America/La_Paz")] + AmericaLaPaz = 131, -[EnumMember(Value = "America/Montreal")] -AmericaMontreal = 152, + [EnumMember(Value = "America/Lima")] + AmericaLima = 132, -[EnumMember(Value = "America/Montserrat")] -AmericaMontserrat = 153, + [EnumMember(Value = "America/Los_Angeles")] + AmericaLosAngeles = 133, -[EnumMember(Value = "America/Nassau")] -AmericaNassau = 154, + [EnumMember(Value = "America/Louisville")] + AmericaLouisville = 134, -[EnumMember(Value = "America/New_York")] -AmericaNewYork = 155, + [EnumMember(Value = "America/Lower_Princes")] + AmericaLowerPrinces = 135, -[EnumMember(Value = "America/Nipigon")] -AmericaNipigon = 156, + [EnumMember(Value = "America/Maceio")] + AmericaMaceio = 136, -[EnumMember(Value = "America/Nome")] -AmericaNome = 157, + [EnumMember(Value = "America/Managua")] + AmericaManagua = 137, -[EnumMember(Value = "America/Noronha")] -AmericaNoronha = 158, + [EnumMember(Value = "America/Manaus")] + AmericaManaus = 138, -[EnumMember(Value = "America/North_Dakota/Beulah")] -AmericaNorthDakotaBeulah = 159, + [EnumMember(Value = "America/Marigot")] + AmericaMarigot = 139, -[EnumMember(Value = "America/North_Dakota/Center")] -AmericaNorthDakotaCenter = 160, + [EnumMember(Value = "America/Martinique")] + AmericaMartinique = 140, -[EnumMember(Value = "America/North_Dakota/New_Salem")] -AmericaNorthDakotaNewSalem = 161, + [EnumMember(Value = "America/Matamoros")] + AmericaMatamoros = 141, -[EnumMember(Value = "America/Ojinaga")] -AmericaOjinaga = 162, + [EnumMember(Value = "America/Mazatlan")] + AmericaMazatlan = 142, -[EnumMember(Value = "America/Panama")] -AmericaPanama = 163, + [EnumMember(Value = "America/Mendoza")] + AmericaMendoza = 143, -[EnumMember(Value = "America/Pangnirtung")] -AmericaPangnirtung = 164, + [EnumMember(Value = "America/Menominee")] + AmericaMenominee = 144, -[EnumMember(Value = "America/Paramaribo")] -AmericaParamaribo = 165, + [EnumMember(Value = "America/Merida")] + AmericaMerida = 145, -[EnumMember(Value = "America/Phoenix")] -AmericaPhoenix = 166, + [EnumMember(Value = "America/Metlakatla")] + AmericaMetlakatla = 146, -[EnumMember(Value = "America/Port-au-Prince")] -AmericaPortAuPrince = 167, + [EnumMember(Value = "America/Mexico_City")] + AmericaMexicoCity = 147, -[EnumMember(Value = "America/Port_of_Spain")] -AmericaPortOfSpain = 168, + [EnumMember(Value = "America/Miquelon")] + AmericaMiquelon = 148, -[EnumMember(Value = "America/Porto_Velho")] -AmericaPortoVelho = 169, + [EnumMember(Value = "America/Moncton")] + AmericaMoncton = 149, -[EnumMember(Value = "America/Puerto_Rico")] -AmericaPuertoRico = 170, + [EnumMember(Value = "America/Monterrey")] + AmericaMonterrey = 150, -[EnumMember(Value = "America/Punta_Arenas")] -AmericaPuntaArenas = 171, + [EnumMember(Value = "America/Montevideo")] + AmericaMontevideo = 151, -[EnumMember(Value = "America/Rainy_River")] -AmericaRainyRiver = 172, + [EnumMember(Value = "America/Montreal")] + AmericaMontreal = 152, -[EnumMember(Value = "America/Rankin_Inlet")] -AmericaRankinInlet = 173, + [EnumMember(Value = "America/Montserrat")] + AmericaMontserrat = 153, -[EnumMember(Value = "America/Recife")] -AmericaRecife = 174, + [EnumMember(Value = "America/Nassau")] + AmericaNassau = 154, -[EnumMember(Value = "America/Regina")] -AmericaRegina = 175, + [EnumMember(Value = "America/New_York")] + AmericaNewYork = 155, -[EnumMember(Value = "America/Resolute")] -AmericaResolute = 176, + [EnumMember(Value = "America/Nipigon")] + AmericaNipigon = 156, -[EnumMember(Value = "America/Rio_Branco")] -AmericaRioBranco = 177, + [EnumMember(Value = "America/Nome")] + AmericaNome = 157, -[EnumMember(Value = "America/Santa_Isabel")] -AmericaSantaIsabel = 178, + [EnumMember(Value = "America/Noronha")] + AmericaNoronha = 158, -[EnumMember(Value = "America/Santarem")] -AmericaSantarem = 179, + [EnumMember(Value = "America/North_Dakota/Beulah")] + AmericaNorthDakotaBeulah = 159, -[EnumMember(Value = "America/Santiago")] -AmericaSantiago = 180, + [EnumMember(Value = "America/North_Dakota/Center")] + AmericaNorthDakotaCenter = 160, -[EnumMember(Value = "America/Santo_Domingo")] -AmericaSantoDomingo = 181, + [EnumMember(Value = "America/North_Dakota/New_Salem")] + AmericaNorthDakotaNewSalem = 161, -[EnumMember(Value = "America/Sao_Paulo")] -AmericaSaoPaulo = 182, + [EnumMember(Value = "America/Ojinaga")] + AmericaOjinaga = 162, -[EnumMember(Value = "America/Scoresbysund")] -AmericaScoresbysund = 183, + [EnumMember(Value = "America/Panama")] + AmericaPanama = 163, -[EnumMember(Value = "America/Sitka")] -AmericaSitka = 184, + [EnumMember(Value = "America/Pangnirtung")] + AmericaPangnirtung = 164, -[EnumMember(Value = "America/St_Barthelemy")] -AmericaStBarthelemy = 185, + [EnumMember(Value = "America/Paramaribo")] + AmericaParamaribo = 165, -[EnumMember(Value = "America/St_Johns")] -AmericaStJohns = 186, + [EnumMember(Value = "America/Phoenix")] + AmericaPhoenix = 166, -[EnumMember(Value = "America/St_Kitts")] -AmericaStKitts = 187, + [EnumMember(Value = "America/Port-au-Prince")] + AmericaPortAuPrince = 167, -[EnumMember(Value = "America/St_Lucia")] -AmericaStLucia = 188, + [EnumMember(Value = "America/Port_of_Spain")] + AmericaPortOfSpain = 168, -[EnumMember(Value = "America/St_Thomas")] -AmericaStThomas = 189, + [EnumMember(Value = "America/Porto_Velho")] + AmericaPortoVelho = 169, -[EnumMember(Value = "America/St_Vincent")] -AmericaStVincent = 190, + [EnumMember(Value = "America/Puerto_Rico")] + AmericaPuertoRico = 170, -[EnumMember(Value = "America/Swift_Current")] -AmericaSwiftCurrent = 191, + [EnumMember(Value = "America/Punta_Arenas")] + AmericaPuntaArenas = 171, -[EnumMember(Value = "America/Tegucigalpa")] -AmericaTegucigalpa = 192, + [EnumMember(Value = "America/Rainy_River")] + AmericaRainyRiver = 172, -[EnumMember(Value = "America/Thule")] -AmericaThule = 193, + [EnumMember(Value = "America/Rankin_Inlet")] + AmericaRankinInlet = 173, -[EnumMember(Value = "America/Thunder_Bay")] -AmericaThunderBay = 194, + [EnumMember(Value = "America/Recife")] + AmericaRecife = 174, -[EnumMember(Value = "America/Tijuana")] -AmericaTijuana = 195, + [EnumMember(Value = "America/Regina")] + AmericaRegina = 175, -[EnumMember(Value = "America/Toronto")] -AmericaToronto = 196, + [EnumMember(Value = "America/Resolute")] + AmericaResolute = 176, -[EnumMember(Value = "America/Tortola")] -AmericaTortola = 197, + [EnumMember(Value = "America/Rio_Branco")] + AmericaRioBranco = 177, -[EnumMember(Value = "America/Vancouver")] -AmericaVancouver = 198, + [EnumMember(Value = "America/Santa_Isabel")] + AmericaSantaIsabel = 178, -[EnumMember(Value = "America/Whitehorse")] -AmericaWhitehorse = 199, + [EnumMember(Value = "America/Santarem")] + AmericaSantarem = 179, -[EnumMember(Value = "America/Winnipeg")] -AmericaWinnipeg = 200, + [EnumMember(Value = "America/Santiago")] + AmericaSantiago = 180, -[EnumMember(Value = "America/Yakutat")] -AmericaYakutat = 201, + [EnumMember(Value = "America/Santo_Domingo")] + AmericaSantoDomingo = 181, -[EnumMember(Value = "America/Yellowknife")] -AmericaYellowknife = 202, + [EnumMember(Value = "America/Sao_Paulo")] + AmericaSaoPaulo = 182, -[EnumMember(Value = "Antarctica/Casey")] -AntarcticaCasey = 203, + [EnumMember(Value = "America/Scoresbysund")] + AmericaScoresbysund = 183, -[EnumMember(Value = "Antarctica/Davis")] -AntarcticaDavis = 204, + [EnumMember(Value = "America/Sitka")] + AmericaSitka = 184, -[EnumMember(Value = "Antarctica/DumontDUrville")] -AntarcticaDumontDUrville = 205, + [EnumMember(Value = "America/St_Barthelemy")] + AmericaStBarthelemy = 185, -[EnumMember(Value = "Antarctica/Macquarie")] -AntarcticaMacquarie = 206, + [EnumMember(Value = "America/St_Johns")] + AmericaStJohns = 186, -[EnumMember(Value = "Antarctica/Mawson")] -AntarcticaMawson = 207, + [EnumMember(Value = "America/St_Kitts")] + AmericaStKitts = 187, -[EnumMember(Value = "Antarctica/McMurdo")] -AntarcticaMcMurdo = 208, + [EnumMember(Value = "America/St_Lucia")] + AmericaStLucia = 188, -[EnumMember(Value = "Antarctica/Palmer")] -AntarcticaPalmer = 209, + [EnumMember(Value = "America/St_Thomas")] + AmericaStThomas = 189, -[EnumMember(Value = "Antarctica/Rothera")] -AntarcticaRothera = 210, + [EnumMember(Value = "America/St_Vincent")] + AmericaStVincent = 190, -[EnumMember(Value = "Antarctica/Syowa")] -AntarcticaSyowa = 211, + [EnumMember(Value = "America/Swift_Current")] + AmericaSwiftCurrent = 191, -[EnumMember(Value = "Antarctica/Troll")] -AntarcticaTroll = 212, + [EnumMember(Value = "America/Tegucigalpa")] + AmericaTegucigalpa = 192, -[EnumMember(Value = "Antarctica/Vostok")] -AntarcticaVostok = 213, + [EnumMember(Value = "America/Thule")] + AmericaThule = 193, -[EnumMember(Value = "Arctic/Longyearbyen")] -ArcticLongyearbyen = 214, + [EnumMember(Value = "America/Thunder_Bay")] + AmericaThunderBay = 194, -[EnumMember(Value = "Asia/Aden")] -AsiaAden = 215, + [EnumMember(Value = "America/Tijuana")] + AmericaTijuana = 195, -[EnumMember(Value = "Asia/Almaty")] -AsiaAlmaty = 216, + [EnumMember(Value = "America/Toronto")] + AmericaToronto = 196, -[EnumMember(Value = "Asia/Amman")] -AsiaAmman = 217, + [EnumMember(Value = "America/Tortola")] + AmericaTortola = 197, -[EnumMember(Value = "Asia/Anadyr")] -AsiaAnadyr = 218, + [EnumMember(Value = "America/Vancouver")] + AmericaVancouver = 198, -[EnumMember(Value = "Asia/Aqtau")] -AsiaAqtau = 219, + [EnumMember(Value = "America/Whitehorse")] + AmericaWhitehorse = 199, -[EnumMember(Value = "Asia/Aqtobe")] -AsiaAqtobe = 220, + [EnumMember(Value = "America/Winnipeg")] + AmericaWinnipeg = 200, -[EnumMember(Value = "Asia/Ashgabat")] -AsiaAshgabat = 221, + [EnumMember(Value = "America/Yakutat")] + AmericaYakutat = 201, -[EnumMember(Value = "Asia/Atyrau")] -AsiaAtyrau = 222, + [EnumMember(Value = "America/Yellowknife")] + AmericaYellowknife = 202, -[EnumMember(Value = "Asia/Baghdad")] -AsiaBaghdad = 223, + [EnumMember(Value = "Antarctica/Casey")] + AntarcticaCasey = 203, -[EnumMember(Value = "Asia/Bahrain")] -AsiaBahrain = 224, + [EnumMember(Value = "Antarctica/Davis")] + AntarcticaDavis = 204, -[EnumMember(Value = "Asia/Baku")] -AsiaBaku = 225, + [EnumMember(Value = "Antarctica/DumontDUrville")] + AntarcticaDumontDUrville = 205, -[EnumMember(Value = "Asia/Bangkok")] -AsiaBangkok = 226, + [EnumMember(Value = "Antarctica/Macquarie")] + AntarcticaMacquarie = 206, -[EnumMember(Value = "Asia/Barnaul")] -AsiaBarnaul = 227, + [EnumMember(Value = "Antarctica/Mawson")] + AntarcticaMawson = 207, -[EnumMember(Value = "Asia/Beirut")] -AsiaBeirut = 228, + [EnumMember(Value = "Antarctica/McMurdo")] + AntarcticaMcMurdo = 208, -[EnumMember(Value = "Asia/Bishkek")] -AsiaBishkek = 229, + [EnumMember(Value = "Antarctica/Palmer")] + AntarcticaPalmer = 209, -[EnumMember(Value = "Asia/Brunei")] -AsiaBrunei = 230, + [EnumMember(Value = "Antarctica/Rothera")] + AntarcticaRothera = 210, -[EnumMember(Value = "Asia/Calcutta")] -AsiaCalcutta = 231, + [EnumMember(Value = "Antarctica/Syowa")] + AntarcticaSyowa = 211, -[EnumMember(Value = "Asia/Chita")] -AsiaChita = 232, + [EnumMember(Value = "Antarctica/Troll")] + AntarcticaTroll = 212, -[EnumMember(Value = "Asia/Choibalsan")] -AsiaChoibalsan = 233, + [EnumMember(Value = "Antarctica/Vostok")] + AntarcticaVostok = 213, -[EnumMember(Value = "Asia/Colombo")] -AsiaColombo = 234, + [EnumMember(Value = "Arctic/Longyearbyen")] + ArcticLongyearbyen = 214, -[EnumMember(Value = "Asia/Damascus")] -AsiaDamascus = 235, + [EnumMember(Value = "Asia/Aden")] + AsiaAden = 215, -[EnumMember(Value = "Asia/Dhaka")] -AsiaDhaka = 236, + [EnumMember(Value = "Asia/Almaty")] + AsiaAlmaty = 216, -[EnumMember(Value = "Asia/Dili")] -AsiaDili = 237, + [EnumMember(Value = "Asia/Amman")] + AsiaAmman = 217, -[EnumMember(Value = "Asia/Dubai")] -AsiaDubai = 238, + [EnumMember(Value = "Asia/Anadyr")] + AsiaAnadyr = 218, -[EnumMember(Value = "Asia/Dushanbe")] -AsiaDushanbe = 239, + [EnumMember(Value = "Asia/Aqtau")] + AsiaAqtau = 219, -[EnumMember(Value = "Asia/Famagusta")] -AsiaFamagusta = 240, + [EnumMember(Value = "Asia/Aqtobe")] + AsiaAqtobe = 220, -[EnumMember(Value = "Asia/Gaza")] -AsiaGaza = 241, + [EnumMember(Value = "Asia/Ashgabat")] + AsiaAshgabat = 221, -[EnumMember(Value = "Asia/Hebron")] -AsiaHebron = 242, + [EnumMember(Value = "Asia/Atyrau")] + AsiaAtyrau = 222, -[EnumMember(Value = "Asia/Hong_Kong")] -AsiaHongKong = 243, + [EnumMember(Value = "Asia/Baghdad")] + AsiaBaghdad = 223, -[EnumMember(Value = "Asia/Hovd")] -AsiaHovd = 244, + [EnumMember(Value = "Asia/Bahrain")] + AsiaBahrain = 224, -[EnumMember(Value = "Asia/Irkutsk")] -AsiaIrkutsk = 245, + [EnumMember(Value = "Asia/Baku")] + AsiaBaku = 225, -[EnumMember(Value = "Asia/Jakarta")] -AsiaJakarta = 246, + [EnumMember(Value = "Asia/Bangkok")] + AsiaBangkok = 226, -[EnumMember(Value = "Asia/Jayapura")] -AsiaJayapura = 247, + [EnumMember(Value = "Asia/Barnaul")] + AsiaBarnaul = 227, -[EnumMember(Value = "Asia/Jerusalem")] -AsiaJerusalem = 248, + [EnumMember(Value = "Asia/Beirut")] + AsiaBeirut = 228, -[EnumMember(Value = "Asia/Kabul")] -AsiaKabul = 249, + [EnumMember(Value = "Asia/Bishkek")] + AsiaBishkek = 229, -[EnumMember(Value = "Asia/Kamchatka")] -AsiaKamchatka = 250, + [EnumMember(Value = "Asia/Brunei")] + AsiaBrunei = 230, -[EnumMember(Value = "Asia/Karachi")] -AsiaKarachi = 251, + [EnumMember(Value = "Asia/Calcutta")] + AsiaCalcutta = 231, -[EnumMember(Value = "Asia/Katmandu")] -AsiaKatmandu = 252, + [EnumMember(Value = "Asia/Chita")] + AsiaChita = 232, -[EnumMember(Value = "Asia/Khandyga")] -AsiaKhandyga = 253, + [EnumMember(Value = "Asia/Choibalsan")] + AsiaChoibalsan = 233, -[EnumMember(Value = "Asia/Krasnoyarsk")] -AsiaKrasnoyarsk = 254, + [EnumMember(Value = "Asia/Colombo")] + AsiaColombo = 234, -[EnumMember(Value = "Asia/Kuala_Lumpur")] -AsiaKualaLumpur = 255, + [EnumMember(Value = "Asia/Damascus")] + AsiaDamascus = 235, -[EnumMember(Value = "Asia/Kuching")] -AsiaKuching = 256, + [EnumMember(Value = "Asia/Dhaka")] + AsiaDhaka = 236, -[EnumMember(Value = "Asia/Kuwait")] -AsiaKuwait = 257, + [EnumMember(Value = "Asia/Dili")] + AsiaDili = 237, -[EnumMember(Value = "Asia/Macau")] -AsiaMacau = 258, + [EnumMember(Value = "Asia/Dubai")] + AsiaDubai = 238, -[EnumMember(Value = "Asia/Magadan")] -AsiaMagadan = 259, + [EnumMember(Value = "Asia/Dushanbe")] + AsiaDushanbe = 239, -[EnumMember(Value = "Asia/Makassar")] -AsiaMakassar = 260, + [EnumMember(Value = "Asia/Famagusta")] + AsiaFamagusta = 240, -[EnumMember(Value = "Asia/Manila")] -AsiaManila = 261, + [EnumMember(Value = "Asia/Gaza")] + AsiaGaza = 241, -[EnumMember(Value = "Asia/Muscat")] -AsiaMuscat = 262, + [EnumMember(Value = "Asia/Hebron")] + AsiaHebron = 242, -[EnumMember(Value = "Asia/Nicosia")] -AsiaNicosia = 263, + [EnumMember(Value = "Asia/Hong_Kong")] + AsiaHongKong = 243, -[EnumMember(Value = "Asia/Novokuznetsk")] -AsiaNovokuznetsk = 264, + [EnumMember(Value = "Asia/Hovd")] + AsiaHovd = 244, -[EnumMember(Value = "Asia/Novosibirsk")] -AsiaNovosibirsk = 265, + [EnumMember(Value = "Asia/Irkutsk")] + AsiaIrkutsk = 245, -[EnumMember(Value = "Asia/Omsk")] -AsiaOmsk = 266, + [EnumMember(Value = "Asia/Jakarta")] + AsiaJakarta = 246, -[EnumMember(Value = "Asia/Oral")] -AsiaOral = 267, + [EnumMember(Value = "Asia/Jayapura")] + AsiaJayapura = 247, -[EnumMember(Value = "Asia/Phnom_Penh")] -AsiaPhnomPenh = 268, + [EnumMember(Value = "Asia/Jerusalem")] + AsiaJerusalem = 248, -[EnumMember(Value = "Asia/Pontianak")] -AsiaPontianak = 269, + [EnumMember(Value = "Asia/Kabul")] + AsiaKabul = 249, -[EnumMember(Value = "Asia/Pyongyang")] -AsiaPyongyang = 270, + [EnumMember(Value = "Asia/Kamchatka")] + AsiaKamchatka = 250, -[EnumMember(Value = "Asia/Qatar")] -AsiaQatar = 271, + [EnumMember(Value = "Asia/Karachi")] + AsiaKarachi = 251, -[EnumMember(Value = "Asia/Qostanay")] -AsiaQostanay = 272, + [EnumMember(Value = "Asia/Katmandu")] + AsiaKatmandu = 252, -[EnumMember(Value = "Asia/Qyzylorda")] -AsiaQyzylorda = 273, + [EnumMember(Value = "Asia/Khandyga")] + AsiaKhandyga = 253, -[EnumMember(Value = "Asia/Rangoon")] -AsiaRangoon = 274, + [EnumMember(Value = "Asia/Krasnoyarsk")] + AsiaKrasnoyarsk = 254, -[EnumMember(Value = "Asia/Riyadh")] -AsiaRiyadh = 275, + [EnumMember(Value = "Asia/Kuala_Lumpur")] + AsiaKualaLumpur = 255, -[EnumMember(Value = "Asia/Saigon")] -AsiaSaigon = 276, + [EnumMember(Value = "Asia/Kuching")] + AsiaKuching = 256, -[EnumMember(Value = "Asia/Sakhalin")] -AsiaSakhalin = 277, + [EnumMember(Value = "Asia/Kuwait")] + AsiaKuwait = 257, -[EnumMember(Value = "Asia/Samarkand")] -AsiaSamarkand = 278, + [EnumMember(Value = "Asia/Macau")] + AsiaMacau = 258, -[EnumMember(Value = "Asia/Seoul")] -AsiaSeoul = 279, + [EnumMember(Value = "Asia/Magadan")] + AsiaMagadan = 259, -[EnumMember(Value = "Asia/Shanghai")] -AsiaShanghai = 280, + [EnumMember(Value = "Asia/Makassar")] + AsiaMakassar = 260, -[EnumMember(Value = "Asia/Singapore")] -AsiaSingapore = 281, + [EnumMember(Value = "Asia/Manila")] + AsiaManila = 261, -[EnumMember(Value = "Asia/Srednekolymsk")] -AsiaSrednekolymsk = 282, + [EnumMember(Value = "Asia/Muscat")] + AsiaMuscat = 262, -[EnumMember(Value = "Asia/Taipei")] -AsiaTaipei = 283, + [EnumMember(Value = "Asia/Nicosia")] + AsiaNicosia = 263, -[EnumMember(Value = "Asia/Tashkent")] -AsiaTashkent = 284, + [EnumMember(Value = "Asia/Novokuznetsk")] + AsiaNovokuznetsk = 264, -[EnumMember(Value = "Asia/Tbilisi")] -AsiaTbilisi = 285, + [EnumMember(Value = "Asia/Novosibirsk")] + AsiaNovosibirsk = 265, -[EnumMember(Value = "Asia/Tehran")] -AsiaTehran = 286, + [EnumMember(Value = "Asia/Omsk")] + AsiaOmsk = 266, -[EnumMember(Value = "Asia/Thimphu")] -AsiaThimphu = 287, + [EnumMember(Value = "Asia/Oral")] + AsiaOral = 267, -[EnumMember(Value = "Asia/Tokyo")] -AsiaTokyo = 288, + [EnumMember(Value = "Asia/Phnom_Penh")] + AsiaPhnomPenh = 268, -[EnumMember(Value = "Asia/Tomsk")] -AsiaTomsk = 289, + [EnumMember(Value = "Asia/Pontianak")] + AsiaPontianak = 269, -[EnumMember(Value = "Asia/Ulaanbaatar")] -AsiaUlaanbaatar = 290, + [EnumMember(Value = "Asia/Pyongyang")] + AsiaPyongyang = 270, -[EnumMember(Value = "Asia/Urumqi")] -AsiaUrumqi = 291, + [EnumMember(Value = "Asia/Qatar")] + AsiaQatar = 271, -[EnumMember(Value = "Asia/Ust-Nera")] -AsiaUstNera = 292, + [EnumMember(Value = "Asia/Qostanay")] + AsiaQostanay = 272, -[EnumMember(Value = "Asia/Vientiane")] -AsiaVientiane = 293, + [EnumMember(Value = "Asia/Qyzylorda")] + AsiaQyzylorda = 273, -[EnumMember(Value = "Asia/Vladivostok")] -AsiaVladivostok = 294, + [EnumMember(Value = "Asia/Rangoon")] + AsiaRangoon = 274, -[EnumMember(Value = "Asia/Yakutsk")] -AsiaYakutsk = 295, + [EnumMember(Value = "Asia/Riyadh")] + AsiaRiyadh = 275, -[EnumMember(Value = "Asia/Yekaterinburg")] -AsiaYekaterinburg = 296, + [EnumMember(Value = "Asia/Saigon")] + AsiaSaigon = 276, -[EnumMember(Value = "Asia/Yerevan")] -AsiaYerevan = 297, + [EnumMember(Value = "Asia/Sakhalin")] + AsiaSakhalin = 277, -[EnumMember(Value = "Atlantic/Azores")] -AtlanticAzores = 298, + [EnumMember(Value = "Asia/Samarkand")] + AsiaSamarkand = 278, -[EnumMember(Value = "Atlantic/Bermuda")] -AtlanticBermuda = 299, + [EnumMember(Value = "Asia/Seoul")] + AsiaSeoul = 279, -[EnumMember(Value = "Atlantic/Canary")] -AtlanticCanary = 300, + [EnumMember(Value = "Asia/Shanghai")] + AsiaShanghai = 280, -[EnumMember(Value = "Atlantic/Cape_Verde")] -AtlanticCapeVerde = 301, + [EnumMember(Value = "Asia/Singapore")] + AsiaSingapore = 281, -[EnumMember(Value = "Atlantic/Faeroe")] -AtlanticFaeroe = 302, + [EnumMember(Value = "Asia/Srednekolymsk")] + AsiaSrednekolymsk = 282, -[EnumMember(Value = "Atlantic/Madeira")] -AtlanticMadeira = 303, + [EnumMember(Value = "Asia/Taipei")] + AsiaTaipei = 283, -[EnumMember(Value = "Atlantic/Reykjavik")] -AtlanticReykjavik = 304, + [EnumMember(Value = "Asia/Tashkent")] + AsiaTashkent = 284, -[EnumMember(Value = "Atlantic/South_Georgia")] -AtlanticSouthGeorgia = 305, + [EnumMember(Value = "Asia/Tbilisi")] + AsiaTbilisi = 285, -[EnumMember(Value = "Atlantic/St_Helena")] -AtlanticStHelena = 306, + [EnumMember(Value = "Asia/Tehran")] + AsiaTehran = 286, -[EnumMember(Value = "Atlantic/Stanley")] -AtlanticStanley = 307, + [EnumMember(Value = "Asia/Thimphu")] + AsiaThimphu = 287, -[EnumMember(Value = "Australia/Adelaide")] -AustraliaAdelaide = 308, + [EnumMember(Value = "Asia/Tokyo")] + AsiaTokyo = 288, -[EnumMember(Value = "Australia/Brisbane")] -AustraliaBrisbane = 309, + [EnumMember(Value = "Asia/Tomsk")] + AsiaTomsk = 289, -[EnumMember(Value = "Australia/Broken_Hill")] -AustraliaBrokenHill = 310, + [EnumMember(Value = "Asia/Ulaanbaatar")] + AsiaUlaanbaatar = 290, -[EnumMember(Value = "Australia/Currie")] -AustraliaCurrie = 311, + [EnumMember(Value = "Asia/Urumqi")] + AsiaUrumqi = 291, -[EnumMember(Value = "Australia/Darwin")] -AustraliaDarwin = 312, + [EnumMember(Value = "Asia/Ust-Nera")] + AsiaUstNera = 292, -[EnumMember(Value = "Australia/Eucla")] -AustraliaEucla = 313, + [EnumMember(Value = "Asia/Vientiane")] + AsiaVientiane = 293, -[EnumMember(Value = "Australia/Hobart")] -AustraliaHobart = 314, + [EnumMember(Value = "Asia/Vladivostok")] + AsiaVladivostok = 294, -[EnumMember(Value = "Australia/Lindeman")] -AustraliaLindeman = 315, + [EnumMember(Value = "Asia/Yakutsk")] + AsiaYakutsk = 295, -[EnumMember(Value = "Australia/Lord_Howe")] -AustraliaLordHowe = 316, + [EnumMember(Value = "Asia/Yekaterinburg")] + AsiaYekaterinburg = 296, -[EnumMember(Value = "Australia/Melbourne")] -AustraliaMelbourne = 317, + [EnumMember(Value = "Asia/Yerevan")] + AsiaYerevan = 297, -[EnumMember(Value = "Australia/Perth")] -AustraliaPerth = 318, + [EnumMember(Value = "Atlantic/Azores")] + AtlanticAzores = 298, -[EnumMember(Value = "Australia/Sydney")] -AustraliaSydney = 319, + [EnumMember(Value = "Atlantic/Bermuda")] + AtlanticBermuda = 299, -[EnumMember(Value = "Europe/Amsterdam")] -EuropeAmsterdam = 320, + [EnumMember(Value = "Atlantic/Canary")] + AtlanticCanary = 300, -[EnumMember(Value = "Europe/Andorra")] -EuropeAndorra = 321, + [EnumMember(Value = "Atlantic/Cape_Verde")] + AtlanticCapeVerde = 301, -[EnumMember(Value = "Europe/Astrakhan")] -EuropeAstrakhan = 322, + [EnumMember(Value = "Atlantic/Faeroe")] + AtlanticFaeroe = 302, -[EnumMember(Value = "Europe/Athens")] -EuropeAthens = 323, + [EnumMember(Value = "Atlantic/Madeira")] + AtlanticMadeira = 303, -[EnumMember(Value = "Europe/Belgrade")] -EuropeBelgrade = 324, + [EnumMember(Value = "Atlantic/Reykjavik")] + AtlanticReykjavik = 304, -[EnumMember(Value = "Europe/Berlin")] -EuropeBerlin = 325, + [EnumMember(Value = "Atlantic/South_Georgia")] + AtlanticSouthGeorgia = 305, -[EnumMember(Value = "Europe/Bratislava")] -EuropeBratislava = 326, + [EnumMember(Value = "Atlantic/St_Helena")] + AtlanticStHelena = 306, -[EnumMember(Value = "Europe/Brussels")] -EuropeBrussels = 327, + [EnumMember(Value = "Atlantic/Stanley")] + AtlanticStanley = 307, -[EnumMember(Value = "Europe/Bucharest")] -EuropeBucharest = 328, + [EnumMember(Value = "Australia/Adelaide")] + AustraliaAdelaide = 308, -[EnumMember(Value = "Europe/Budapest")] -EuropeBudapest = 329, + [EnumMember(Value = "Australia/Brisbane")] + AustraliaBrisbane = 309, -[EnumMember(Value = "Europe/Busingen")] -EuropeBusingen = 330, + [EnumMember(Value = "Australia/Broken_Hill")] + AustraliaBrokenHill = 310, -[EnumMember(Value = "Europe/Chisinau")] -EuropeChisinau = 331, + [EnumMember(Value = "Australia/Currie")] + AustraliaCurrie = 311, -[EnumMember(Value = "Europe/Copenhagen")] -EuropeCopenhagen = 332, + [EnumMember(Value = "Australia/Darwin")] + AustraliaDarwin = 312, -[EnumMember(Value = "Europe/Dublin")] -EuropeDublin = 333, + [EnumMember(Value = "Australia/Eucla")] + AustraliaEucla = 313, -[EnumMember(Value = "Europe/Gibraltar")] -EuropeGibraltar = 334, + [EnumMember(Value = "Australia/Hobart")] + AustraliaHobart = 314, -[EnumMember(Value = "Europe/Guernsey")] -EuropeGuernsey = 335, + [EnumMember(Value = "Australia/Lindeman")] + AustraliaLindeman = 315, -[EnumMember(Value = "Europe/Helsinki")] -EuropeHelsinki = 336, + [EnumMember(Value = "Australia/Lord_Howe")] + AustraliaLordHowe = 316, -[EnumMember(Value = "Europe/Isle_of_Man")] -EuropeIsleOfMan = 337, + [EnumMember(Value = "Australia/Melbourne")] + AustraliaMelbourne = 317, -[EnumMember(Value = "Europe/Istanbul")] -EuropeIstanbul = 338, + [EnumMember(Value = "Australia/Perth")] + AustraliaPerth = 318, -[EnumMember(Value = "Europe/Jersey")] -EuropeJersey = 339, + [EnumMember(Value = "Australia/Sydney")] + AustraliaSydney = 319, -[EnumMember(Value = "Europe/Kaliningrad")] -EuropeKaliningrad = 340, + [EnumMember(Value = "Europe/Amsterdam")] + EuropeAmsterdam = 320, -[EnumMember(Value = "Europe/Kiev")] -EuropeKiev = 341, + [EnumMember(Value = "Europe/Andorra")] + EuropeAndorra = 321, -[EnumMember(Value = "Europe/Kirov")] -EuropeKirov = 342, + [EnumMember(Value = "Europe/Astrakhan")] + EuropeAstrakhan = 322, -[EnumMember(Value = "Europe/Lisbon")] -EuropeLisbon = 343, + [EnumMember(Value = "Europe/Athens")] + EuropeAthens = 323, -[EnumMember(Value = "Europe/Ljubljana")] -EuropeLjubljana = 344, + [EnumMember(Value = "Europe/Belgrade")] + EuropeBelgrade = 324, -[EnumMember(Value = "Europe/London")] -EuropeLondon = 345, + [EnumMember(Value = "Europe/Berlin")] + EuropeBerlin = 325, -[EnumMember(Value = "Europe/Luxembourg")] -EuropeLuxembourg = 346, + [EnumMember(Value = "Europe/Bratislava")] + EuropeBratislava = 326, -[EnumMember(Value = "Europe/Madrid")] -EuropeMadrid = 347, + [EnumMember(Value = "Europe/Brussels")] + EuropeBrussels = 327, -[EnumMember(Value = "Europe/Malta")] -EuropeMalta = 348, + [EnumMember(Value = "Europe/Bucharest")] + EuropeBucharest = 328, -[EnumMember(Value = "Europe/Mariehamn")] -EuropeMariehamn = 349, + [EnumMember(Value = "Europe/Budapest")] + EuropeBudapest = 329, -[EnumMember(Value = "Europe/Minsk")] -EuropeMinsk = 350, + [EnumMember(Value = "Europe/Busingen")] + EuropeBusingen = 330, -[EnumMember(Value = "Europe/Monaco")] -EuropeMonaco = 351, + [EnumMember(Value = "Europe/Chisinau")] + EuropeChisinau = 331, -[EnumMember(Value = "Europe/Moscow")] -EuropeMoscow = 352, + [EnumMember(Value = "Europe/Copenhagen")] + EuropeCopenhagen = 332, -[EnumMember(Value = "Europe/Oslo")] -EuropeOslo = 353, + [EnumMember(Value = "Europe/Dublin")] + EuropeDublin = 333, -[EnumMember(Value = "Europe/Paris")] -EuropeParis = 354, + [EnumMember(Value = "Europe/Gibraltar")] + EuropeGibraltar = 334, -[EnumMember(Value = "Europe/Podgorica")] -EuropePodgorica = 355, + [EnumMember(Value = "Europe/Guernsey")] + EuropeGuernsey = 335, -[EnumMember(Value = "Europe/Prague")] -EuropePrague = 356, + [EnumMember(Value = "Europe/Helsinki")] + EuropeHelsinki = 336, -[EnumMember(Value = "Europe/Riga")] -EuropeRiga = 357, + [EnumMember(Value = "Europe/Isle_of_Man")] + EuropeIsleOfMan = 337, -[EnumMember(Value = "Europe/Rome")] -EuropeRome = 358, + [EnumMember(Value = "Europe/Istanbul")] + EuropeIstanbul = 338, -[EnumMember(Value = "Europe/Samara")] -EuropeSamara = 359, + [EnumMember(Value = "Europe/Jersey")] + EuropeJersey = 339, -[EnumMember(Value = "Europe/San_Marino")] -EuropeSanMarino = 360, + [EnumMember(Value = "Europe/Kaliningrad")] + EuropeKaliningrad = 340, -[EnumMember(Value = "Europe/Sarajevo")] -EuropeSarajevo = 361, + [EnumMember(Value = "Europe/Kiev")] + EuropeKiev = 341, -[EnumMember(Value = "Europe/Saratov")] -EuropeSaratov = 362, + [EnumMember(Value = "Europe/Kirov")] + EuropeKirov = 342, -[EnumMember(Value = "Europe/Simferopol")] -EuropeSimferopol = 363, + [EnumMember(Value = "Europe/Lisbon")] + EuropeLisbon = 343, -[EnumMember(Value = "Europe/Skopje")] -EuropeSkopje = 364, + [EnumMember(Value = "Europe/Ljubljana")] + EuropeLjubljana = 344, -[EnumMember(Value = "Europe/Sofia")] -EuropeSofia = 365, + [EnumMember(Value = "Europe/London")] + EuropeLondon = 345, -[EnumMember(Value = "Europe/Stockholm")] -EuropeStockholm = 366, + [EnumMember(Value = "Europe/Luxembourg")] + EuropeLuxembourg = 346, -[EnumMember(Value = "Europe/Tallinn")] -EuropeTallinn = 367, + [EnumMember(Value = "Europe/Madrid")] + EuropeMadrid = 347, -[EnumMember(Value = "Europe/Tirane")] -EuropeTirane = 368, + [EnumMember(Value = "Europe/Malta")] + EuropeMalta = 348, -[EnumMember(Value = "Europe/Ulyanovsk")] -EuropeUlyanovsk = 369, + [EnumMember(Value = "Europe/Mariehamn")] + EuropeMariehamn = 349, -[EnumMember(Value = "Europe/Uzhgorod")] -EuropeUzhgorod = 370, + [EnumMember(Value = "Europe/Minsk")] + EuropeMinsk = 350, -[EnumMember(Value = "Europe/Vaduz")] -EuropeVaduz = 371, + [EnumMember(Value = "Europe/Monaco")] + EuropeMonaco = 351, -[EnumMember(Value = "Europe/Vatican")] -EuropeVatican = 372, + [EnumMember(Value = "Europe/Moscow")] + EuropeMoscow = 352, -[EnumMember(Value = "Europe/Vienna")] -EuropeVienna = 373, + [EnumMember(Value = "Europe/Oslo")] + EuropeOslo = 353, -[EnumMember(Value = "Europe/Vilnius")] -EuropeVilnius = 374, + [EnumMember(Value = "Europe/Paris")] + EuropeParis = 354, -[EnumMember(Value = "Europe/Volgograd")] -EuropeVolgograd = 375, + [EnumMember(Value = "Europe/Podgorica")] + EuropePodgorica = 355, -[EnumMember(Value = "Europe/Warsaw")] -EuropeWarsaw = 376, + [EnumMember(Value = "Europe/Prague")] + EuropePrague = 356, -[EnumMember(Value = "Europe/Zagreb")] -EuropeZagreb = 377, + [EnumMember(Value = "Europe/Riga")] + EuropeRiga = 357, -[EnumMember(Value = "Europe/Zaporozhye")] -EuropeZaporozhye = 378, + [EnumMember(Value = "Europe/Rome")] + EuropeRome = 358, -[EnumMember(Value = "Europe/Zurich")] -EuropeZurich = 379, + [EnumMember(Value = "Europe/Samara")] + EuropeSamara = 359, -[EnumMember(Value = "Indian/Antananarivo")] -IndianAntananarivo = 380, + [EnumMember(Value = "Europe/San_Marino")] + EuropeSanMarino = 360, -[EnumMember(Value = "Indian/Chagos")] -IndianChagos = 381, + [EnumMember(Value = "Europe/Sarajevo")] + EuropeSarajevo = 361, -[EnumMember(Value = "Indian/Christmas")] -IndianChristmas = 382, + [EnumMember(Value = "Europe/Saratov")] + EuropeSaratov = 362, -[EnumMember(Value = "Indian/Cocos")] -IndianCocos = 383, + [EnumMember(Value = "Europe/Simferopol")] + EuropeSimferopol = 363, -[EnumMember(Value = "Indian/Comoro")] -IndianComoro = 384, + [EnumMember(Value = "Europe/Skopje")] + EuropeSkopje = 364, -[EnumMember(Value = "Indian/Kerguelen")] -IndianKerguelen = 385, + [EnumMember(Value = "Europe/Sofia")] + EuropeSofia = 365, -[EnumMember(Value = "Indian/Mahe")] -IndianMahe = 386, + [EnumMember(Value = "Europe/Stockholm")] + EuropeStockholm = 366, -[EnumMember(Value = "Indian/Maldives")] -IndianMaldives = 387, + [EnumMember(Value = "Europe/Tallinn")] + EuropeTallinn = 367, -[EnumMember(Value = "Indian/Mauritius")] -IndianMauritius = 388, + [EnumMember(Value = "Europe/Tirane")] + EuropeTirane = 368, -[EnumMember(Value = "Indian/Mayotte")] -IndianMayotte = 389, + [EnumMember(Value = "Europe/Ulyanovsk")] + EuropeUlyanovsk = 369, -[EnumMember(Value = "Indian/Reunion")] -IndianReunion = 390, + [EnumMember(Value = "Europe/Uzhgorod")] + EuropeUzhgorod = 370, -[EnumMember(Value = "Pacific/Apia")] -PacificApia = 391, + [EnumMember(Value = "Europe/Vaduz")] + EuropeVaduz = 371, -[EnumMember(Value = "Pacific/Auckland")] -PacificAuckland = 392, + [EnumMember(Value = "Europe/Vatican")] + EuropeVatican = 372, -[EnumMember(Value = "Pacific/Bougainville")] -PacificBougainville = 393, + [EnumMember(Value = "Europe/Vienna")] + EuropeVienna = 373, -[EnumMember(Value = "Pacific/Chatham")] -PacificChatham = 394, + [EnumMember(Value = "Europe/Vilnius")] + EuropeVilnius = 374, -[EnumMember(Value = "Pacific/Easter")] -PacificEaster = 395, + [EnumMember(Value = "Europe/Volgograd")] + EuropeVolgograd = 375, -[EnumMember(Value = "Pacific/Efate")] -PacificEfate = 396, + [EnumMember(Value = "Europe/Warsaw")] + EuropeWarsaw = 376, -[EnumMember(Value = "Pacific/Enderbury")] -PacificEnderbury = 397, + [EnumMember(Value = "Europe/Zagreb")] + EuropeZagreb = 377, -[EnumMember(Value = "Pacific/Fakaofo")] -PacificFakaofo = 398, + [EnumMember(Value = "Europe/Zaporozhye")] + EuropeZaporozhye = 378, -[EnumMember(Value = "Pacific/Fiji")] -PacificFiji = 399, + [EnumMember(Value = "Europe/Zurich")] + EuropeZurich = 379, -[EnumMember(Value = "Pacific/Funafuti")] -PacificFunafuti = 400, + [EnumMember(Value = "Indian/Antananarivo")] + IndianAntananarivo = 380, -[EnumMember(Value = "Pacific/Galapagos")] -PacificGalapagos = 401, + [EnumMember(Value = "Indian/Chagos")] + IndianChagos = 381, -[EnumMember(Value = "Pacific/Gambier")] -PacificGambier = 402, + [EnumMember(Value = "Indian/Christmas")] + IndianChristmas = 382, -[EnumMember(Value = "Pacific/Guadalcanal")] -PacificGuadalcanal = 403, + [EnumMember(Value = "Indian/Cocos")] + IndianCocos = 383, -[EnumMember(Value = "Pacific/Guam")] -PacificGuam = 404, + [EnumMember(Value = "Indian/Comoro")] + IndianComoro = 384, -[EnumMember(Value = "Pacific/Honolulu")] -PacificHonolulu = 405, + [EnumMember(Value = "Indian/Kerguelen")] + IndianKerguelen = 385, -[EnumMember(Value = "Pacific/Johnston")] -PacificJohnston = 406, + [EnumMember(Value = "Indian/Mahe")] + IndianMahe = 386, -[EnumMember(Value = "Pacific/Kiritimati")] -PacificKiritimati = 407, + [EnumMember(Value = "Indian/Maldives")] + IndianMaldives = 387, -[EnumMember(Value = "Pacific/Kosrae")] -PacificKosrae = 408, + [EnumMember(Value = "Indian/Mauritius")] + IndianMauritius = 388, -[EnumMember(Value = "Pacific/Kwajalein")] -PacificKwajalein = 409, + [EnumMember(Value = "Indian/Mayotte")] + IndianMayotte = 389, -[EnumMember(Value = "Pacific/Majuro")] -PacificMajuro = 410, + [EnumMember(Value = "Indian/Reunion")] + IndianReunion = 390, -[EnumMember(Value = "Pacific/Marquesas")] -PacificMarquesas = 411, + [EnumMember(Value = "Pacific/Apia")] + PacificApia = 391, -[EnumMember(Value = "Pacific/Midway")] -PacificMidway = 412, + [EnumMember(Value = "Pacific/Auckland")] + PacificAuckland = 392, -[EnumMember(Value = "Pacific/Nauru")] -PacificNauru = 413, + [EnumMember(Value = "Pacific/Bougainville")] + PacificBougainville = 393, -[EnumMember(Value = "Pacific/Niue")] -PacificNiue = 414, + [EnumMember(Value = "Pacific/Chatham")] + PacificChatham = 394, -[EnumMember(Value = "Pacific/Norfolk")] -PacificNorfolk = 415, + [EnumMember(Value = "Pacific/Easter")] + PacificEaster = 395, -[EnumMember(Value = "Pacific/Noumea")] -PacificNoumea = 416, + [EnumMember(Value = "Pacific/Efate")] + PacificEfate = 396, -[EnumMember(Value = "Pacific/Pago_Pago")] -PacificPagoPago = 417, + [EnumMember(Value = "Pacific/Enderbury")] + PacificEnderbury = 397, -[EnumMember(Value = "Pacific/Palau")] -PacificPalau = 418, + [EnumMember(Value = "Pacific/Fakaofo")] + PacificFakaofo = 398, -[EnumMember(Value = "Pacific/Pitcairn")] -PacificPitcairn = 419, + [EnumMember(Value = "Pacific/Fiji")] + PacificFiji = 399, -[EnumMember(Value = "Pacific/Ponape")] -PacificPonape = 420, + [EnumMember(Value = "Pacific/Funafuti")] + PacificFunafuti = 400, -[EnumMember(Value = "Pacific/Port_Moresby")] -PacificPortMoresby = 421, + [EnumMember(Value = "Pacific/Galapagos")] + PacificGalapagos = 401, -[EnumMember(Value = "Pacific/Rarotonga")] -PacificRarotonga = 422, + [EnumMember(Value = "Pacific/Gambier")] + PacificGambier = 402, -[EnumMember(Value = "Pacific/Saipan")] -PacificSaipan = 423, + [EnumMember(Value = "Pacific/Guadalcanal")] + PacificGuadalcanal = 403, -[EnumMember(Value = "Pacific/Tahiti")] -PacificTahiti = 424, + [EnumMember(Value = "Pacific/Guam")] + PacificGuam = 404, -[EnumMember(Value = "Pacific/Tarawa")] -PacificTarawa = 425, + [EnumMember(Value = "Pacific/Honolulu")] + PacificHonolulu = 405, -[EnumMember(Value = "Pacific/Tongatapu")] -PacificTongatapu = 426, + [EnumMember(Value = "Pacific/Johnston")] + PacificJohnston = 406, -[EnumMember(Value = "Pacific/Truk")] -PacificTruk = 427, + [EnumMember(Value = "Pacific/Kiritimati")] + PacificKiritimati = 407, -[EnumMember(Value = "Pacific/Wake")] -PacificWake = 428, + [EnumMember(Value = "Pacific/Kosrae")] + PacificKosrae = 408, -[EnumMember(Value = "Pacific/Wallis")] -PacificWallis = 429, -} + [EnumMember(Value = "Pacific/Kwajalein")] + PacificKwajalein = 409, -/// -/// IANA timezone for the Schlage device -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public ReportProviderMetadataRequestDevicesSchlageMetadata.TimeZoneEnum? TimeZone { get; set; } + [EnumMember(Value = "Pacific/Majuro")] + PacificMajuro = 410, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "Pacific/Marquesas")] + PacificMarquesas = 411, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "Pacific/Midway")] + PacificMidway = 412, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "Pacific/Nauru")] + PacificNauru = 413, -[DataContract(Name = "reportProviderMetadataRequestDevicesUltraloqMetadata_model")] -public class ReportProviderMetadataRequestDevicesUltraloqMetadata -{ -[JsonConstructorAttribute] -protected ReportProviderMetadataRequestDevicesUltraloqMetadata() { } + [EnumMember(Value = "Pacific/Niue")] + PacificNiue = 414, -public ReportProviderMetadataRequestDevicesUltraloqMetadata(ReportProviderMetadataRequestDevicesUltraloqMetadata.TimeZoneEnum? timeZone = default) -{ -TimeZone = timeZone; -} + [EnumMember(Value = "Pacific/Norfolk")] + PacificNorfolk = 415, -/// -/// IANA timezone for the Ultraloq device -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TimeZoneEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "Pacific/Noumea")] + PacificNoumea = 416, -[EnumMember(Value = "Africa/Abidjan")] -AfricaAbidjan = 1, + [EnumMember(Value = "Pacific/Pago_Pago")] + PacificPagoPago = 417, -[EnumMember(Value = "Africa/Accra")] -AfricaAccra = 2, + [EnumMember(Value = "Pacific/Palau")] + PacificPalau = 418, -[EnumMember(Value = "Africa/Addis_Ababa")] -AfricaAddisAbaba = 3, + [EnumMember(Value = "Pacific/Pitcairn")] + PacificPitcairn = 419, -[EnumMember(Value = "Africa/Algiers")] -AfricaAlgiers = 4, + [EnumMember(Value = "Pacific/Ponape")] + PacificPonape = 420, -[EnumMember(Value = "Africa/Asmera")] -AfricaAsmera = 5, + [EnumMember(Value = "Pacific/Port_Moresby")] + PacificPortMoresby = 421, -[EnumMember(Value = "Africa/Bamako")] -AfricaBamako = 6, + [EnumMember(Value = "Pacific/Rarotonga")] + PacificRarotonga = 422, -[EnumMember(Value = "Africa/Bangui")] -AfricaBangui = 7, + [EnumMember(Value = "Pacific/Saipan")] + PacificSaipan = 423, -[EnumMember(Value = "Africa/Banjul")] -AfricaBanjul = 8, + [EnumMember(Value = "Pacific/Tahiti")] + PacificTahiti = 424, -[EnumMember(Value = "Africa/Bissau")] -AfricaBissau = 9, + [EnumMember(Value = "Pacific/Tarawa")] + PacificTarawa = 425, -[EnumMember(Value = "Africa/Blantyre")] -AfricaBlantyre = 10, + [EnumMember(Value = "Pacific/Tongatapu")] + PacificTongatapu = 426, -[EnumMember(Value = "Africa/Brazzaville")] -AfricaBrazzaville = 11, + [EnumMember(Value = "Pacific/Truk")] + PacificTruk = 427, -[EnumMember(Value = "Africa/Bujumbura")] -AfricaBujumbura = 12, + [EnumMember(Value = "Pacific/Wake")] + PacificWake = 428, -[EnumMember(Value = "Africa/Cairo")] -AfricaCairo = 13, + [EnumMember(Value = "Pacific/Wallis")] + PacificWallis = 429, + } -[EnumMember(Value = "Africa/Casablanca")] -AfricaCasablanca = 14, + /// + /// IANA timezone for the Schlage device + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public ReportProviderMetadataRequestDevicesSchlageMetadata.TimeZoneEnum? TimeZone { get; set; } -[EnumMember(Value = "Africa/Ceuta")] -AfricaCeuta = 15, + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -[EnumMember(Value = "Africa/Conakry")] -AfricaConakry = 16, + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } -[EnumMember(Value = "Africa/Dakar")] -AfricaDakar = 17, + return stringWriter.ToString(); + } + } -[EnumMember(Value = "Africa/Dar_es_Salaam")] -AfricaDarEsSalaam = 18, + [DataContract(Name = "reportProviderMetadataRequestDevicesUltraloqMetadata_model")] + public class ReportProviderMetadataRequestDevicesUltraloqMetadata + { + [JsonConstructorAttribute] + protected ReportProviderMetadataRequestDevicesUltraloqMetadata() { } -[EnumMember(Value = "Africa/Djibouti")] -AfricaDjibouti = 19, + public ReportProviderMetadataRequestDevicesUltraloqMetadata( + ReportProviderMetadataRequestDevicesUltraloqMetadata.TimeZoneEnum? timeZone = + default + ) + { + TimeZone = timeZone; + } -[EnumMember(Value = "Africa/Douala")] -AfricaDouala = 20, + /// + /// IANA timezone for the Ultraloq device + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TimeZoneEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "Africa/El_Aaiun")] -AfricaElAaiun = 21, + [EnumMember(Value = "Africa/Abidjan")] + AfricaAbidjan = 1, -[EnumMember(Value = "Africa/Freetown")] -AfricaFreetown = 22, + [EnumMember(Value = "Africa/Accra")] + AfricaAccra = 2, -[EnumMember(Value = "Africa/Gaborone")] -AfricaGaborone = 23, + [EnumMember(Value = "Africa/Addis_Ababa")] + AfricaAddisAbaba = 3, -[EnumMember(Value = "Africa/Harare")] -AfricaHarare = 24, + [EnumMember(Value = "Africa/Algiers")] + AfricaAlgiers = 4, -[EnumMember(Value = "Africa/Johannesburg")] -AfricaJohannesburg = 25, + [EnumMember(Value = "Africa/Asmera")] + AfricaAsmera = 5, -[EnumMember(Value = "Africa/Juba")] -AfricaJuba = 26, + [EnumMember(Value = "Africa/Bamako")] + AfricaBamako = 6, -[EnumMember(Value = "Africa/Kampala")] -AfricaKampala = 27, + [EnumMember(Value = "Africa/Bangui")] + AfricaBangui = 7, -[EnumMember(Value = "Africa/Khartoum")] -AfricaKhartoum = 28, + [EnumMember(Value = "Africa/Banjul")] + AfricaBanjul = 8, -[EnumMember(Value = "Africa/Kigali")] -AfricaKigali = 29, + [EnumMember(Value = "Africa/Bissau")] + AfricaBissau = 9, -[EnumMember(Value = "Africa/Kinshasa")] -AfricaKinshasa = 30, + [EnumMember(Value = "Africa/Blantyre")] + AfricaBlantyre = 10, -[EnumMember(Value = "Africa/Lagos")] -AfricaLagos = 31, + [EnumMember(Value = "Africa/Brazzaville")] + AfricaBrazzaville = 11, -[EnumMember(Value = "Africa/Libreville")] -AfricaLibreville = 32, + [EnumMember(Value = "Africa/Bujumbura")] + AfricaBujumbura = 12, -[EnumMember(Value = "Africa/Lome")] -AfricaLome = 33, + [EnumMember(Value = "Africa/Cairo")] + AfricaCairo = 13, -[EnumMember(Value = "Africa/Luanda")] -AfricaLuanda = 34, + [EnumMember(Value = "Africa/Casablanca")] + AfricaCasablanca = 14, -[EnumMember(Value = "Africa/Lubumbashi")] -AfricaLubumbashi = 35, + [EnumMember(Value = "Africa/Ceuta")] + AfricaCeuta = 15, -[EnumMember(Value = "Africa/Lusaka")] -AfricaLusaka = 36, + [EnumMember(Value = "Africa/Conakry")] + AfricaConakry = 16, -[EnumMember(Value = "Africa/Malabo")] -AfricaMalabo = 37, + [EnumMember(Value = "Africa/Dakar")] + AfricaDakar = 17, -[EnumMember(Value = "Africa/Maputo")] -AfricaMaputo = 38, + [EnumMember(Value = "Africa/Dar_es_Salaam")] + AfricaDarEsSalaam = 18, -[EnumMember(Value = "Africa/Maseru")] -AfricaMaseru = 39, + [EnumMember(Value = "Africa/Djibouti")] + AfricaDjibouti = 19, -[EnumMember(Value = "Africa/Mbabane")] -AfricaMbabane = 40, + [EnumMember(Value = "Africa/Douala")] + AfricaDouala = 20, -[EnumMember(Value = "Africa/Mogadishu")] -AfricaMogadishu = 41, + [EnumMember(Value = "Africa/El_Aaiun")] + AfricaElAaiun = 21, -[EnumMember(Value = "Africa/Monrovia")] -AfricaMonrovia = 42, + [EnumMember(Value = "Africa/Freetown")] + AfricaFreetown = 22, -[EnumMember(Value = "Africa/Nairobi")] -AfricaNairobi = 43, + [EnumMember(Value = "Africa/Gaborone")] + AfricaGaborone = 23, -[EnumMember(Value = "Africa/Ndjamena")] -AfricaNdjamena = 44, + [EnumMember(Value = "Africa/Harare")] + AfricaHarare = 24, -[EnumMember(Value = "Africa/Niamey")] -AfricaNiamey = 45, + [EnumMember(Value = "Africa/Johannesburg")] + AfricaJohannesburg = 25, -[EnumMember(Value = "Africa/Nouakchott")] -AfricaNouakchott = 46, + [EnumMember(Value = "Africa/Juba")] + AfricaJuba = 26, -[EnumMember(Value = "Africa/Ouagadougou")] -AfricaOuagadougou = 47, + [EnumMember(Value = "Africa/Kampala")] + AfricaKampala = 27, -[EnumMember(Value = "Africa/Porto-Novo")] -AfricaPortoNovo = 48, + [EnumMember(Value = "Africa/Khartoum")] + AfricaKhartoum = 28, -[EnumMember(Value = "Africa/Sao_Tome")] -AfricaSaoTome = 49, + [EnumMember(Value = "Africa/Kigali")] + AfricaKigali = 29, -[EnumMember(Value = "Africa/Tripoli")] -AfricaTripoli = 50, + [EnumMember(Value = "Africa/Kinshasa")] + AfricaKinshasa = 30, -[EnumMember(Value = "Africa/Tunis")] -AfricaTunis = 51, + [EnumMember(Value = "Africa/Lagos")] + AfricaLagos = 31, -[EnumMember(Value = "Africa/Windhoek")] -AfricaWindhoek = 52, + [EnumMember(Value = "Africa/Libreville")] + AfricaLibreville = 32, -[EnumMember(Value = "America/Adak")] -AmericaAdak = 53, + [EnumMember(Value = "Africa/Lome")] + AfricaLome = 33, -[EnumMember(Value = "America/Anchorage")] -AmericaAnchorage = 54, + [EnumMember(Value = "Africa/Luanda")] + AfricaLuanda = 34, -[EnumMember(Value = "America/Anguilla")] -AmericaAnguilla = 55, + [EnumMember(Value = "Africa/Lubumbashi")] + AfricaLubumbashi = 35, -[EnumMember(Value = "America/Antigua")] -AmericaAntigua = 56, + [EnumMember(Value = "Africa/Lusaka")] + AfricaLusaka = 36, -[EnumMember(Value = "America/Araguaina")] -AmericaAraguaina = 57, + [EnumMember(Value = "Africa/Malabo")] + AfricaMalabo = 37, -[EnumMember(Value = "America/Argentina/La_Rioja")] -AmericaArgentinaLaRioja = 58, + [EnumMember(Value = "Africa/Maputo")] + AfricaMaputo = 38, -[EnumMember(Value = "America/Argentina/Rio_Gallegos")] -AmericaArgentinaRioGallegos = 59, + [EnumMember(Value = "Africa/Maseru")] + AfricaMaseru = 39, -[EnumMember(Value = "America/Argentina/Salta")] -AmericaArgentinaSalta = 60, + [EnumMember(Value = "Africa/Mbabane")] + AfricaMbabane = 40, -[EnumMember(Value = "America/Argentina/San_Juan")] -AmericaArgentinaSanJuan = 61, + [EnumMember(Value = "Africa/Mogadishu")] + AfricaMogadishu = 41, -[EnumMember(Value = "America/Argentina/San_Luis")] -AmericaArgentinaSanLuis = 62, + [EnumMember(Value = "Africa/Monrovia")] + AfricaMonrovia = 42, -[EnumMember(Value = "America/Argentina/Tucuman")] -AmericaArgentinaTucuman = 63, + [EnumMember(Value = "Africa/Nairobi")] + AfricaNairobi = 43, -[EnumMember(Value = "America/Argentina/Ushuaia")] -AmericaArgentinaUshuaia = 64, + [EnumMember(Value = "Africa/Ndjamena")] + AfricaNdjamena = 44, -[EnumMember(Value = "America/Aruba")] -AmericaAruba = 65, + [EnumMember(Value = "Africa/Niamey")] + AfricaNiamey = 45, -[EnumMember(Value = "America/Asuncion")] -AmericaAsuncion = 66, + [EnumMember(Value = "Africa/Nouakchott")] + AfricaNouakchott = 46, -[EnumMember(Value = "America/Bahia")] -AmericaBahia = 67, + [EnumMember(Value = "Africa/Ouagadougou")] + AfricaOuagadougou = 47, -[EnumMember(Value = "America/Bahia_Banderas")] -AmericaBahiaBanderas = 68, + [EnumMember(Value = "Africa/Porto-Novo")] + AfricaPortoNovo = 48, -[EnumMember(Value = "America/Barbados")] -AmericaBarbados = 69, + [EnumMember(Value = "Africa/Sao_Tome")] + AfricaSaoTome = 49, -[EnumMember(Value = "America/Belem")] -AmericaBelem = 70, + [EnumMember(Value = "Africa/Tripoli")] + AfricaTripoli = 50, -[EnumMember(Value = "America/Belize")] -AmericaBelize = 71, + [EnumMember(Value = "Africa/Tunis")] + AfricaTunis = 51, -[EnumMember(Value = "America/Blanc-Sablon")] -AmericaBlancSablon = 72, + [EnumMember(Value = "Africa/Windhoek")] + AfricaWindhoek = 52, -[EnumMember(Value = "America/Boa_Vista")] -AmericaBoaVista = 73, + [EnumMember(Value = "America/Adak")] + AmericaAdak = 53, -[EnumMember(Value = "America/Bogota")] -AmericaBogota = 74, + [EnumMember(Value = "America/Anchorage")] + AmericaAnchorage = 54, -[EnumMember(Value = "America/Boise")] -AmericaBoise = 75, + [EnumMember(Value = "America/Anguilla")] + AmericaAnguilla = 55, -[EnumMember(Value = "America/Buenos_Aires")] -AmericaBuenosAires = 76, + [EnumMember(Value = "America/Antigua")] + AmericaAntigua = 56, -[EnumMember(Value = "America/Cambridge_Bay")] -AmericaCambridgeBay = 77, + [EnumMember(Value = "America/Araguaina")] + AmericaAraguaina = 57, -[EnumMember(Value = "America/Campo_Grande")] -AmericaCampoGrande = 78, + [EnumMember(Value = "America/Argentina/La_Rioja")] + AmericaArgentinaLaRioja = 58, -[EnumMember(Value = "America/Cancun")] -AmericaCancun = 79, + [EnumMember(Value = "America/Argentina/Rio_Gallegos")] + AmericaArgentinaRioGallegos = 59, -[EnumMember(Value = "America/Caracas")] -AmericaCaracas = 80, + [EnumMember(Value = "America/Argentina/Salta")] + AmericaArgentinaSalta = 60, -[EnumMember(Value = "America/Catamarca")] -AmericaCatamarca = 81, + [EnumMember(Value = "America/Argentina/San_Juan")] + AmericaArgentinaSanJuan = 61, -[EnumMember(Value = "America/Cayenne")] -AmericaCayenne = 82, + [EnumMember(Value = "America/Argentina/San_Luis")] + AmericaArgentinaSanLuis = 62, -[EnumMember(Value = "America/Cayman")] -AmericaCayman = 83, + [EnumMember(Value = "America/Argentina/Tucuman")] + AmericaArgentinaTucuman = 63, -[EnumMember(Value = "America/Chicago")] -AmericaChicago = 84, + [EnumMember(Value = "America/Argentina/Ushuaia")] + AmericaArgentinaUshuaia = 64, -[EnumMember(Value = "America/Chihuahua")] -AmericaChihuahua = 85, + [EnumMember(Value = "America/Aruba")] + AmericaAruba = 65, -[EnumMember(Value = "America/Ciudad_Juarez")] -AmericaCiudadJuarez = 86, + [EnumMember(Value = "America/Asuncion")] + AmericaAsuncion = 66, -[EnumMember(Value = "America/Coral_Harbour")] -AmericaCoralHarbour = 87, + [EnumMember(Value = "America/Bahia")] + AmericaBahia = 67, -[EnumMember(Value = "America/Cordoba")] -AmericaCordoba = 88, + [EnumMember(Value = "America/Bahia_Banderas")] + AmericaBahiaBanderas = 68, -[EnumMember(Value = "America/Costa_Rica")] -AmericaCostaRica = 89, + [EnumMember(Value = "America/Barbados")] + AmericaBarbados = 69, -[EnumMember(Value = "America/Creston")] -AmericaCreston = 90, + [EnumMember(Value = "America/Belem")] + AmericaBelem = 70, -[EnumMember(Value = "America/Cuiaba")] -AmericaCuiaba = 91, + [EnumMember(Value = "America/Belize")] + AmericaBelize = 71, -[EnumMember(Value = "America/Curacao")] -AmericaCuracao = 92, + [EnumMember(Value = "America/Blanc-Sablon")] + AmericaBlancSablon = 72, -[EnumMember(Value = "America/Danmarkshavn")] -AmericaDanmarkshavn = 93, + [EnumMember(Value = "America/Boa_Vista")] + AmericaBoaVista = 73, -[EnumMember(Value = "America/Dawson")] -AmericaDawson = 94, + [EnumMember(Value = "America/Bogota")] + AmericaBogota = 74, -[EnumMember(Value = "America/Dawson_Creek")] -AmericaDawsonCreek = 95, + [EnumMember(Value = "America/Boise")] + AmericaBoise = 75, -[EnumMember(Value = "America/Denver")] -AmericaDenver = 96, + [EnumMember(Value = "America/Buenos_Aires")] + AmericaBuenosAires = 76, -[EnumMember(Value = "America/Detroit")] -AmericaDetroit = 97, + [EnumMember(Value = "America/Cambridge_Bay")] + AmericaCambridgeBay = 77, -[EnumMember(Value = "America/Dominica")] -AmericaDominica = 98, + [EnumMember(Value = "America/Campo_Grande")] + AmericaCampoGrande = 78, -[EnumMember(Value = "America/Edmonton")] -AmericaEdmonton = 99, + [EnumMember(Value = "America/Cancun")] + AmericaCancun = 79, -[EnumMember(Value = "America/Eirunepe")] -AmericaEirunepe = 100, + [EnumMember(Value = "America/Caracas")] + AmericaCaracas = 80, -[EnumMember(Value = "America/El_Salvador")] -AmericaElSalvador = 101, + [EnumMember(Value = "America/Catamarca")] + AmericaCatamarca = 81, -[EnumMember(Value = "America/Fort_Nelson")] -AmericaFortNelson = 102, + [EnumMember(Value = "America/Cayenne")] + AmericaCayenne = 82, -[EnumMember(Value = "America/Fortaleza")] -AmericaFortaleza = 103, + [EnumMember(Value = "America/Cayman")] + AmericaCayman = 83, -[EnumMember(Value = "America/Glace_Bay")] -AmericaGlaceBay = 104, + [EnumMember(Value = "America/Chicago")] + AmericaChicago = 84, -[EnumMember(Value = "America/Godthab")] -AmericaGodthab = 105, + [EnumMember(Value = "America/Chihuahua")] + AmericaChihuahua = 85, -[EnumMember(Value = "America/Goose_Bay")] -AmericaGooseBay = 106, + [EnumMember(Value = "America/Ciudad_Juarez")] + AmericaCiudadJuarez = 86, -[EnumMember(Value = "America/Grand_Turk")] -AmericaGrandTurk = 107, + [EnumMember(Value = "America/Coral_Harbour")] + AmericaCoralHarbour = 87, -[EnumMember(Value = "America/Grenada")] -AmericaGrenada = 108, + [EnumMember(Value = "America/Cordoba")] + AmericaCordoba = 88, -[EnumMember(Value = "America/Guadeloupe")] -AmericaGuadeloupe = 109, + [EnumMember(Value = "America/Costa_Rica")] + AmericaCostaRica = 89, -[EnumMember(Value = "America/Guatemala")] -AmericaGuatemala = 110, + [EnumMember(Value = "America/Creston")] + AmericaCreston = 90, -[EnumMember(Value = "America/Guayaquil")] -AmericaGuayaquil = 111, + [EnumMember(Value = "America/Cuiaba")] + AmericaCuiaba = 91, -[EnumMember(Value = "America/Guyana")] -AmericaGuyana = 112, + [EnumMember(Value = "America/Curacao")] + AmericaCuracao = 92, -[EnumMember(Value = "America/Halifax")] -AmericaHalifax = 113, + [EnumMember(Value = "America/Danmarkshavn")] + AmericaDanmarkshavn = 93, -[EnumMember(Value = "America/Havana")] -AmericaHavana = 114, + [EnumMember(Value = "America/Dawson")] + AmericaDawson = 94, -[EnumMember(Value = "America/Hermosillo")] -AmericaHermosillo = 115, + [EnumMember(Value = "America/Dawson_Creek")] + AmericaDawsonCreek = 95, -[EnumMember(Value = "America/Indiana/Knox")] -AmericaIndianaKnox = 116, + [EnumMember(Value = "America/Denver")] + AmericaDenver = 96, -[EnumMember(Value = "America/Indiana/Marengo")] -AmericaIndianaMarengo = 117, + [EnumMember(Value = "America/Detroit")] + AmericaDetroit = 97, -[EnumMember(Value = "America/Indiana/Petersburg")] -AmericaIndianaPetersburg = 118, + [EnumMember(Value = "America/Dominica")] + AmericaDominica = 98, -[EnumMember(Value = "America/Indiana/Tell_City")] -AmericaIndianaTellCity = 119, + [EnumMember(Value = "America/Edmonton")] + AmericaEdmonton = 99, -[EnumMember(Value = "America/Indiana/Vevay")] -AmericaIndianaVevay = 120, + [EnumMember(Value = "America/Eirunepe")] + AmericaEirunepe = 100, -[EnumMember(Value = "America/Indiana/Vincennes")] -AmericaIndianaVincennes = 121, + [EnumMember(Value = "America/El_Salvador")] + AmericaElSalvador = 101, -[EnumMember(Value = "America/Indiana/Winamac")] -AmericaIndianaWinamac = 122, + [EnumMember(Value = "America/Fort_Nelson")] + AmericaFortNelson = 102, -[EnumMember(Value = "America/Indianapolis")] -AmericaIndianapolis = 123, + [EnumMember(Value = "America/Fortaleza")] + AmericaFortaleza = 103, -[EnumMember(Value = "America/Inuvik")] -AmericaInuvik = 124, + [EnumMember(Value = "America/Glace_Bay")] + AmericaGlaceBay = 104, -[EnumMember(Value = "America/Iqaluit")] -AmericaIqaluit = 125, + [EnumMember(Value = "America/Godthab")] + AmericaGodthab = 105, -[EnumMember(Value = "America/Jamaica")] -AmericaJamaica = 126, + [EnumMember(Value = "America/Goose_Bay")] + AmericaGooseBay = 106, -[EnumMember(Value = "America/Jujuy")] -AmericaJujuy = 127, + [EnumMember(Value = "America/Grand_Turk")] + AmericaGrandTurk = 107, -[EnumMember(Value = "America/Juneau")] -AmericaJuneau = 128, + [EnumMember(Value = "America/Grenada")] + AmericaGrenada = 108, -[EnumMember(Value = "America/Kentucky/Monticello")] -AmericaKentuckyMonticello = 129, + [EnumMember(Value = "America/Guadeloupe")] + AmericaGuadeloupe = 109, -[EnumMember(Value = "America/Kralendijk")] -AmericaKralendijk = 130, + [EnumMember(Value = "America/Guatemala")] + AmericaGuatemala = 110, -[EnumMember(Value = "America/La_Paz")] -AmericaLaPaz = 131, + [EnumMember(Value = "America/Guayaquil")] + AmericaGuayaquil = 111, -[EnumMember(Value = "America/Lima")] -AmericaLima = 132, + [EnumMember(Value = "America/Guyana")] + AmericaGuyana = 112, -[EnumMember(Value = "America/Los_Angeles")] -AmericaLosAngeles = 133, + [EnumMember(Value = "America/Halifax")] + AmericaHalifax = 113, -[EnumMember(Value = "America/Louisville")] -AmericaLouisville = 134, + [EnumMember(Value = "America/Havana")] + AmericaHavana = 114, -[EnumMember(Value = "America/Lower_Princes")] -AmericaLowerPrinces = 135, + [EnumMember(Value = "America/Hermosillo")] + AmericaHermosillo = 115, -[EnumMember(Value = "America/Maceio")] -AmericaMaceio = 136, + [EnumMember(Value = "America/Indiana/Knox")] + AmericaIndianaKnox = 116, -[EnumMember(Value = "America/Managua")] -AmericaManagua = 137, + [EnumMember(Value = "America/Indiana/Marengo")] + AmericaIndianaMarengo = 117, -[EnumMember(Value = "America/Manaus")] -AmericaManaus = 138, + [EnumMember(Value = "America/Indiana/Petersburg")] + AmericaIndianaPetersburg = 118, -[EnumMember(Value = "America/Marigot")] -AmericaMarigot = 139, + [EnumMember(Value = "America/Indiana/Tell_City")] + AmericaIndianaTellCity = 119, -[EnumMember(Value = "America/Martinique")] -AmericaMartinique = 140, + [EnumMember(Value = "America/Indiana/Vevay")] + AmericaIndianaVevay = 120, -[EnumMember(Value = "America/Matamoros")] -AmericaMatamoros = 141, + [EnumMember(Value = "America/Indiana/Vincennes")] + AmericaIndianaVincennes = 121, -[EnumMember(Value = "America/Mazatlan")] -AmericaMazatlan = 142, + [EnumMember(Value = "America/Indiana/Winamac")] + AmericaIndianaWinamac = 122, -[EnumMember(Value = "America/Mendoza")] -AmericaMendoza = 143, + [EnumMember(Value = "America/Indianapolis")] + AmericaIndianapolis = 123, -[EnumMember(Value = "America/Menominee")] -AmericaMenominee = 144, + [EnumMember(Value = "America/Inuvik")] + AmericaInuvik = 124, -[EnumMember(Value = "America/Merida")] -AmericaMerida = 145, + [EnumMember(Value = "America/Iqaluit")] + AmericaIqaluit = 125, -[EnumMember(Value = "America/Metlakatla")] -AmericaMetlakatla = 146, + [EnumMember(Value = "America/Jamaica")] + AmericaJamaica = 126, -[EnumMember(Value = "America/Mexico_City")] -AmericaMexicoCity = 147, + [EnumMember(Value = "America/Jujuy")] + AmericaJujuy = 127, -[EnumMember(Value = "America/Miquelon")] -AmericaMiquelon = 148, + [EnumMember(Value = "America/Juneau")] + AmericaJuneau = 128, -[EnumMember(Value = "America/Moncton")] -AmericaMoncton = 149, + [EnumMember(Value = "America/Kentucky/Monticello")] + AmericaKentuckyMonticello = 129, -[EnumMember(Value = "America/Monterrey")] -AmericaMonterrey = 150, + [EnumMember(Value = "America/Kralendijk")] + AmericaKralendijk = 130, -[EnumMember(Value = "America/Montevideo")] -AmericaMontevideo = 151, + [EnumMember(Value = "America/La_Paz")] + AmericaLaPaz = 131, -[EnumMember(Value = "America/Montreal")] -AmericaMontreal = 152, + [EnumMember(Value = "America/Lima")] + AmericaLima = 132, -[EnumMember(Value = "America/Montserrat")] -AmericaMontserrat = 153, + [EnumMember(Value = "America/Los_Angeles")] + AmericaLosAngeles = 133, -[EnumMember(Value = "America/Nassau")] -AmericaNassau = 154, + [EnumMember(Value = "America/Louisville")] + AmericaLouisville = 134, -[EnumMember(Value = "America/New_York")] -AmericaNewYork = 155, + [EnumMember(Value = "America/Lower_Princes")] + AmericaLowerPrinces = 135, -[EnumMember(Value = "America/Nipigon")] -AmericaNipigon = 156, + [EnumMember(Value = "America/Maceio")] + AmericaMaceio = 136, -[EnumMember(Value = "America/Nome")] -AmericaNome = 157, + [EnumMember(Value = "America/Managua")] + AmericaManagua = 137, -[EnumMember(Value = "America/Noronha")] -AmericaNoronha = 158, + [EnumMember(Value = "America/Manaus")] + AmericaManaus = 138, -[EnumMember(Value = "America/North_Dakota/Beulah")] -AmericaNorthDakotaBeulah = 159, + [EnumMember(Value = "America/Marigot")] + AmericaMarigot = 139, -[EnumMember(Value = "America/North_Dakota/Center")] -AmericaNorthDakotaCenter = 160, + [EnumMember(Value = "America/Martinique")] + AmericaMartinique = 140, -[EnumMember(Value = "America/North_Dakota/New_Salem")] -AmericaNorthDakotaNewSalem = 161, + [EnumMember(Value = "America/Matamoros")] + AmericaMatamoros = 141, -[EnumMember(Value = "America/Ojinaga")] -AmericaOjinaga = 162, + [EnumMember(Value = "America/Mazatlan")] + AmericaMazatlan = 142, -[EnumMember(Value = "America/Panama")] -AmericaPanama = 163, + [EnumMember(Value = "America/Mendoza")] + AmericaMendoza = 143, -[EnumMember(Value = "America/Pangnirtung")] -AmericaPangnirtung = 164, + [EnumMember(Value = "America/Menominee")] + AmericaMenominee = 144, -[EnumMember(Value = "America/Paramaribo")] -AmericaParamaribo = 165, + [EnumMember(Value = "America/Merida")] + AmericaMerida = 145, -[EnumMember(Value = "America/Phoenix")] -AmericaPhoenix = 166, + [EnumMember(Value = "America/Metlakatla")] + AmericaMetlakatla = 146, -[EnumMember(Value = "America/Port-au-Prince")] -AmericaPortAuPrince = 167, + [EnumMember(Value = "America/Mexico_City")] + AmericaMexicoCity = 147, -[EnumMember(Value = "America/Port_of_Spain")] -AmericaPortOfSpain = 168, + [EnumMember(Value = "America/Miquelon")] + AmericaMiquelon = 148, -[EnumMember(Value = "America/Porto_Velho")] -AmericaPortoVelho = 169, + [EnumMember(Value = "America/Moncton")] + AmericaMoncton = 149, -[EnumMember(Value = "America/Puerto_Rico")] -AmericaPuertoRico = 170, + [EnumMember(Value = "America/Monterrey")] + AmericaMonterrey = 150, -[EnumMember(Value = "America/Punta_Arenas")] -AmericaPuntaArenas = 171, + [EnumMember(Value = "America/Montevideo")] + AmericaMontevideo = 151, -[EnumMember(Value = "America/Rainy_River")] -AmericaRainyRiver = 172, + [EnumMember(Value = "America/Montreal")] + AmericaMontreal = 152, -[EnumMember(Value = "America/Rankin_Inlet")] -AmericaRankinInlet = 173, + [EnumMember(Value = "America/Montserrat")] + AmericaMontserrat = 153, -[EnumMember(Value = "America/Recife")] -AmericaRecife = 174, + [EnumMember(Value = "America/Nassau")] + AmericaNassau = 154, -[EnumMember(Value = "America/Regina")] -AmericaRegina = 175, + [EnumMember(Value = "America/New_York")] + AmericaNewYork = 155, -[EnumMember(Value = "America/Resolute")] -AmericaResolute = 176, + [EnumMember(Value = "America/Nipigon")] + AmericaNipigon = 156, -[EnumMember(Value = "America/Rio_Branco")] -AmericaRioBranco = 177, + [EnumMember(Value = "America/Nome")] + AmericaNome = 157, -[EnumMember(Value = "America/Santa_Isabel")] -AmericaSantaIsabel = 178, + [EnumMember(Value = "America/Noronha")] + AmericaNoronha = 158, -[EnumMember(Value = "America/Santarem")] -AmericaSantarem = 179, + [EnumMember(Value = "America/North_Dakota/Beulah")] + AmericaNorthDakotaBeulah = 159, -[EnumMember(Value = "America/Santiago")] -AmericaSantiago = 180, + [EnumMember(Value = "America/North_Dakota/Center")] + AmericaNorthDakotaCenter = 160, -[EnumMember(Value = "America/Santo_Domingo")] -AmericaSantoDomingo = 181, + [EnumMember(Value = "America/North_Dakota/New_Salem")] + AmericaNorthDakotaNewSalem = 161, -[EnumMember(Value = "America/Sao_Paulo")] -AmericaSaoPaulo = 182, + [EnumMember(Value = "America/Ojinaga")] + AmericaOjinaga = 162, -[EnumMember(Value = "America/Scoresbysund")] -AmericaScoresbysund = 183, + [EnumMember(Value = "America/Panama")] + AmericaPanama = 163, -[EnumMember(Value = "America/Sitka")] -AmericaSitka = 184, + [EnumMember(Value = "America/Pangnirtung")] + AmericaPangnirtung = 164, -[EnumMember(Value = "America/St_Barthelemy")] -AmericaStBarthelemy = 185, + [EnumMember(Value = "America/Paramaribo")] + AmericaParamaribo = 165, -[EnumMember(Value = "America/St_Johns")] -AmericaStJohns = 186, + [EnumMember(Value = "America/Phoenix")] + AmericaPhoenix = 166, -[EnumMember(Value = "America/St_Kitts")] -AmericaStKitts = 187, + [EnumMember(Value = "America/Port-au-Prince")] + AmericaPortAuPrince = 167, -[EnumMember(Value = "America/St_Lucia")] -AmericaStLucia = 188, + [EnumMember(Value = "America/Port_of_Spain")] + AmericaPortOfSpain = 168, -[EnumMember(Value = "America/St_Thomas")] -AmericaStThomas = 189, + [EnumMember(Value = "America/Porto_Velho")] + AmericaPortoVelho = 169, -[EnumMember(Value = "America/St_Vincent")] -AmericaStVincent = 190, + [EnumMember(Value = "America/Puerto_Rico")] + AmericaPuertoRico = 170, -[EnumMember(Value = "America/Swift_Current")] -AmericaSwiftCurrent = 191, + [EnumMember(Value = "America/Punta_Arenas")] + AmericaPuntaArenas = 171, -[EnumMember(Value = "America/Tegucigalpa")] -AmericaTegucigalpa = 192, + [EnumMember(Value = "America/Rainy_River")] + AmericaRainyRiver = 172, -[EnumMember(Value = "America/Thule")] -AmericaThule = 193, + [EnumMember(Value = "America/Rankin_Inlet")] + AmericaRankinInlet = 173, -[EnumMember(Value = "America/Thunder_Bay")] -AmericaThunderBay = 194, + [EnumMember(Value = "America/Recife")] + AmericaRecife = 174, -[EnumMember(Value = "America/Tijuana")] -AmericaTijuana = 195, + [EnumMember(Value = "America/Regina")] + AmericaRegina = 175, -[EnumMember(Value = "America/Toronto")] -AmericaToronto = 196, + [EnumMember(Value = "America/Resolute")] + AmericaResolute = 176, -[EnumMember(Value = "America/Tortola")] -AmericaTortola = 197, + [EnumMember(Value = "America/Rio_Branco")] + AmericaRioBranco = 177, -[EnumMember(Value = "America/Vancouver")] -AmericaVancouver = 198, + [EnumMember(Value = "America/Santa_Isabel")] + AmericaSantaIsabel = 178, -[EnumMember(Value = "America/Whitehorse")] -AmericaWhitehorse = 199, + [EnumMember(Value = "America/Santarem")] + AmericaSantarem = 179, -[EnumMember(Value = "America/Winnipeg")] -AmericaWinnipeg = 200, + [EnumMember(Value = "America/Santiago")] + AmericaSantiago = 180, -[EnumMember(Value = "America/Yakutat")] -AmericaYakutat = 201, + [EnumMember(Value = "America/Santo_Domingo")] + AmericaSantoDomingo = 181, -[EnumMember(Value = "America/Yellowknife")] -AmericaYellowknife = 202, + [EnumMember(Value = "America/Sao_Paulo")] + AmericaSaoPaulo = 182, -[EnumMember(Value = "Antarctica/Casey")] -AntarcticaCasey = 203, + [EnumMember(Value = "America/Scoresbysund")] + AmericaScoresbysund = 183, -[EnumMember(Value = "Antarctica/Davis")] -AntarcticaDavis = 204, + [EnumMember(Value = "America/Sitka")] + AmericaSitka = 184, -[EnumMember(Value = "Antarctica/DumontDUrville")] -AntarcticaDumontDUrville = 205, + [EnumMember(Value = "America/St_Barthelemy")] + AmericaStBarthelemy = 185, -[EnumMember(Value = "Antarctica/Macquarie")] -AntarcticaMacquarie = 206, + [EnumMember(Value = "America/St_Johns")] + AmericaStJohns = 186, -[EnumMember(Value = "Antarctica/Mawson")] -AntarcticaMawson = 207, + [EnumMember(Value = "America/St_Kitts")] + AmericaStKitts = 187, -[EnumMember(Value = "Antarctica/McMurdo")] -AntarcticaMcMurdo = 208, + [EnumMember(Value = "America/St_Lucia")] + AmericaStLucia = 188, -[EnumMember(Value = "Antarctica/Palmer")] -AntarcticaPalmer = 209, + [EnumMember(Value = "America/St_Thomas")] + AmericaStThomas = 189, -[EnumMember(Value = "Antarctica/Rothera")] -AntarcticaRothera = 210, + [EnumMember(Value = "America/St_Vincent")] + AmericaStVincent = 190, -[EnumMember(Value = "Antarctica/Syowa")] -AntarcticaSyowa = 211, + [EnumMember(Value = "America/Swift_Current")] + AmericaSwiftCurrent = 191, -[EnumMember(Value = "Antarctica/Troll")] -AntarcticaTroll = 212, + [EnumMember(Value = "America/Tegucigalpa")] + AmericaTegucigalpa = 192, -[EnumMember(Value = "Antarctica/Vostok")] -AntarcticaVostok = 213, + [EnumMember(Value = "America/Thule")] + AmericaThule = 193, -[EnumMember(Value = "Arctic/Longyearbyen")] -ArcticLongyearbyen = 214, + [EnumMember(Value = "America/Thunder_Bay")] + AmericaThunderBay = 194, -[EnumMember(Value = "Asia/Aden")] -AsiaAden = 215, + [EnumMember(Value = "America/Tijuana")] + AmericaTijuana = 195, -[EnumMember(Value = "Asia/Almaty")] -AsiaAlmaty = 216, + [EnumMember(Value = "America/Toronto")] + AmericaToronto = 196, -[EnumMember(Value = "Asia/Amman")] -AsiaAmman = 217, + [EnumMember(Value = "America/Tortola")] + AmericaTortola = 197, -[EnumMember(Value = "Asia/Anadyr")] -AsiaAnadyr = 218, + [EnumMember(Value = "America/Vancouver")] + AmericaVancouver = 198, -[EnumMember(Value = "Asia/Aqtau")] -AsiaAqtau = 219, + [EnumMember(Value = "America/Whitehorse")] + AmericaWhitehorse = 199, -[EnumMember(Value = "Asia/Aqtobe")] -AsiaAqtobe = 220, + [EnumMember(Value = "America/Winnipeg")] + AmericaWinnipeg = 200, -[EnumMember(Value = "Asia/Ashgabat")] -AsiaAshgabat = 221, + [EnumMember(Value = "America/Yakutat")] + AmericaYakutat = 201, -[EnumMember(Value = "Asia/Atyrau")] -AsiaAtyrau = 222, + [EnumMember(Value = "America/Yellowknife")] + AmericaYellowknife = 202, -[EnumMember(Value = "Asia/Baghdad")] -AsiaBaghdad = 223, + [EnumMember(Value = "Antarctica/Casey")] + AntarcticaCasey = 203, -[EnumMember(Value = "Asia/Bahrain")] -AsiaBahrain = 224, + [EnumMember(Value = "Antarctica/Davis")] + AntarcticaDavis = 204, -[EnumMember(Value = "Asia/Baku")] -AsiaBaku = 225, + [EnumMember(Value = "Antarctica/DumontDUrville")] + AntarcticaDumontDUrville = 205, -[EnumMember(Value = "Asia/Bangkok")] -AsiaBangkok = 226, + [EnumMember(Value = "Antarctica/Macquarie")] + AntarcticaMacquarie = 206, -[EnumMember(Value = "Asia/Barnaul")] -AsiaBarnaul = 227, + [EnumMember(Value = "Antarctica/Mawson")] + AntarcticaMawson = 207, -[EnumMember(Value = "Asia/Beirut")] -AsiaBeirut = 228, + [EnumMember(Value = "Antarctica/McMurdo")] + AntarcticaMcMurdo = 208, -[EnumMember(Value = "Asia/Bishkek")] -AsiaBishkek = 229, + [EnumMember(Value = "Antarctica/Palmer")] + AntarcticaPalmer = 209, -[EnumMember(Value = "Asia/Brunei")] -AsiaBrunei = 230, + [EnumMember(Value = "Antarctica/Rothera")] + AntarcticaRothera = 210, -[EnumMember(Value = "Asia/Calcutta")] -AsiaCalcutta = 231, + [EnumMember(Value = "Antarctica/Syowa")] + AntarcticaSyowa = 211, -[EnumMember(Value = "Asia/Chita")] -AsiaChita = 232, + [EnumMember(Value = "Antarctica/Troll")] + AntarcticaTroll = 212, -[EnumMember(Value = "Asia/Choibalsan")] -AsiaChoibalsan = 233, + [EnumMember(Value = "Antarctica/Vostok")] + AntarcticaVostok = 213, -[EnumMember(Value = "Asia/Colombo")] -AsiaColombo = 234, + [EnumMember(Value = "Arctic/Longyearbyen")] + ArcticLongyearbyen = 214, -[EnumMember(Value = "Asia/Damascus")] -AsiaDamascus = 235, + [EnumMember(Value = "Asia/Aden")] + AsiaAden = 215, -[EnumMember(Value = "Asia/Dhaka")] -AsiaDhaka = 236, + [EnumMember(Value = "Asia/Almaty")] + AsiaAlmaty = 216, -[EnumMember(Value = "Asia/Dili")] -AsiaDili = 237, + [EnumMember(Value = "Asia/Amman")] + AsiaAmman = 217, -[EnumMember(Value = "Asia/Dubai")] -AsiaDubai = 238, + [EnumMember(Value = "Asia/Anadyr")] + AsiaAnadyr = 218, -[EnumMember(Value = "Asia/Dushanbe")] -AsiaDushanbe = 239, + [EnumMember(Value = "Asia/Aqtau")] + AsiaAqtau = 219, -[EnumMember(Value = "Asia/Famagusta")] -AsiaFamagusta = 240, + [EnumMember(Value = "Asia/Aqtobe")] + AsiaAqtobe = 220, -[EnumMember(Value = "Asia/Gaza")] -AsiaGaza = 241, + [EnumMember(Value = "Asia/Ashgabat")] + AsiaAshgabat = 221, -[EnumMember(Value = "Asia/Hebron")] -AsiaHebron = 242, + [EnumMember(Value = "Asia/Atyrau")] + AsiaAtyrau = 222, -[EnumMember(Value = "Asia/Hong_Kong")] -AsiaHongKong = 243, + [EnumMember(Value = "Asia/Baghdad")] + AsiaBaghdad = 223, -[EnumMember(Value = "Asia/Hovd")] -AsiaHovd = 244, + [EnumMember(Value = "Asia/Bahrain")] + AsiaBahrain = 224, -[EnumMember(Value = "Asia/Irkutsk")] -AsiaIrkutsk = 245, + [EnumMember(Value = "Asia/Baku")] + AsiaBaku = 225, -[EnumMember(Value = "Asia/Jakarta")] -AsiaJakarta = 246, + [EnumMember(Value = "Asia/Bangkok")] + AsiaBangkok = 226, -[EnumMember(Value = "Asia/Jayapura")] -AsiaJayapura = 247, + [EnumMember(Value = "Asia/Barnaul")] + AsiaBarnaul = 227, -[EnumMember(Value = "Asia/Jerusalem")] -AsiaJerusalem = 248, + [EnumMember(Value = "Asia/Beirut")] + AsiaBeirut = 228, -[EnumMember(Value = "Asia/Kabul")] -AsiaKabul = 249, + [EnumMember(Value = "Asia/Bishkek")] + AsiaBishkek = 229, -[EnumMember(Value = "Asia/Kamchatka")] -AsiaKamchatka = 250, + [EnumMember(Value = "Asia/Brunei")] + AsiaBrunei = 230, -[EnumMember(Value = "Asia/Karachi")] -AsiaKarachi = 251, + [EnumMember(Value = "Asia/Calcutta")] + AsiaCalcutta = 231, -[EnumMember(Value = "Asia/Katmandu")] -AsiaKatmandu = 252, + [EnumMember(Value = "Asia/Chita")] + AsiaChita = 232, -[EnumMember(Value = "Asia/Khandyga")] -AsiaKhandyga = 253, + [EnumMember(Value = "Asia/Choibalsan")] + AsiaChoibalsan = 233, -[EnumMember(Value = "Asia/Krasnoyarsk")] -AsiaKrasnoyarsk = 254, + [EnumMember(Value = "Asia/Colombo")] + AsiaColombo = 234, -[EnumMember(Value = "Asia/Kuala_Lumpur")] -AsiaKualaLumpur = 255, + [EnumMember(Value = "Asia/Damascus")] + AsiaDamascus = 235, -[EnumMember(Value = "Asia/Kuching")] -AsiaKuching = 256, + [EnumMember(Value = "Asia/Dhaka")] + AsiaDhaka = 236, -[EnumMember(Value = "Asia/Kuwait")] -AsiaKuwait = 257, + [EnumMember(Value = "Asia/Dili")] + AsiaDili = 237, -[EnumMember(Value = "Asia/Macau")] -AsiaMacau = 258, + [EnumMember(Value = "Asia/Dubai")] + AsiaDubai = 238, -[EnumMember(Value = "Asia/Magadan")] -AsiaMagadan = 259, + [EnumMember(Value = "Asia/Dushanbe")] + AsiaDushanbe = 239, -[EnumMember(Value = "Asia/Makassar")] -AsiaMakassar = 260, + [EnumMember(Value = "Asia/Famagusta")] + AsiaFamagusta = 240, -[EnumMember(Value = "Asia/Manila")] -AsiaManila = 261, + [EnumMember(Value = "Asia/Gaza")] + AsiaGaza = 241, -[EnumMember(Value = "Asia/Muscat")] -AsiaMuscat = 262, + [EnumMember(Value = "Asia/Hebron")] + AsiaHebron = 242, -[EnumMember(Value = "Asia/Nicosia")] -AsiaNicosia = 263, + [EnumMember(Value = "Asia/Hong_Kong")] + AsiaHongKong = 243, -[EnumMember(Value = "Asia/Novokuznetsk")] -AsiaNovokuznetsk = 264, + [EnumMember(Value = "Asia/Hovd")] + AsiaHovd = 244, -[EnumMember(Value = "Asia/Novosibirsk")] -AsiaNovosibirsk = 265, + [EnumMember(Value = "Asia/Irkutsk")] + AsiaIrkutsk = 245, -[EnumMember(Value = "Asia/Omsk")] -AsiaOmsk = 266, + [EnumMember(Value = "Asia/Jakarta")] + AsiaJakarta = 246, -[EnumMember(Value = "Asia/Oral")] -AsiaOral = 267, + [EnumMember(Value = "Asia/Jayapura")] + AsiaJayapura = 247, -[EnumMember(Value = "Asia/Phnom_Penh")] -AsiaPhnomPenh = 268, + [EnumMember(Value = "Asia/Jerusalem")] + AsiaJerusalem = 248, -[EnumMember(Value = "Asia/Pontianak")] -AsiaPontianak = 269, + [EnumMember(Value = "Asia/Kabul")] + AsiaKabul = 249, -[EnumMember(Value = "Asia/Pyongyang")] -AsiaPyongyang = 270, + [EnumMember(Value = "Asia/Kamchatka")] + AsiaKamchatka = 250, -[EnumMember(Value = "Asia/Qatar")] -AsiaQatar = 271, + [EnumMember(Value = "Asia/Karachi")] + AsiaKarachi = 251, -[EnumMember(Value = "Asia/Qostanay")] -AsiaQostanay = 272, + [EnumMember(Value = "Asia/Katmandu")] + AsiaKatmandu = 252, -[EnumMember(Value = "Asia/Qyzylorda")] -AsiaQyzylorda = 273, + [EnumMember(Value = "Asia/Khandyga")] + AsiaKhandyga = 253, -[EnumMember(Value = "Asia/Rangoon")] -AsiaRangoon = 274, + [EnumMember(Value = "Asia/Krasnoyarsk")] + AsiaKrasnoyarsk = 254, -[EnumMember(Value = "Asia/Riyadh")] -AsiaRiyadh = 275, + [EnumMember(Value = "Asia/Kuala_Lumpur")] + AsiaKualaLumpur = 255, -[EnumMember(Value = "Asia/Saigon")] -AsiaSaigon = 276, + [EnumMember(Value = "Asia/Kuching")] + AsiaKuching = 256, -[EnumMember(Value = "Asia/Sakhalin")] -AsiaSakhalin = 277, + [EnumMember(Value = "Asia/Kuwait")] + AsiaKuwait = 257, -[EnumMember(Value = "Asia/Samarkand")] -AsiaSamarkand = 278, + [EnumMember(Value = "Asia/Macau")] + AsiaMacau = 258, -[EnumMember(Value = "Asia/Seoul")] -AsiaSeoul = 279, + [EnumMember(Value = "Asia/Magadan")] + AsiaMagadan = 259, -[EnumMember(Value = "Asia/Shanghai")] -AsiaShanghai = 280, + [EnumMember(Value = "Asia/Makassar")] + AsiaMakassar = 260, -[EnumMember(Value = "Asia/Singapore")] -AsiaSingapore = 281, + [EnumMember(Value = "Asia/Manila")] + AsiaManila = 261, -[EnumMember(Value = "Asia/Srednekolymsk")] -AsiaSrednekolymsk = 282, + [EnumMember(Value = "Asia/Muscat")] + AsiaMuscat = 262, -[EnumMember(Value = "Asia/Taipei")] -AsiaTaipei = 283, + [EnumMember(Value = "Asia/Nicosia")] + AsiaNicosia = 263, -[EnumMember(Value = "Asia/Tashkent")] -AsiaTashkent = 284, + [EnumMember(Value = "Asia/Novokuznetsk")] + AsiaNovokuznetsk = 264, -[EnumMember(Value = "Asia/Tbilisi")] -AsiaTbilisi = 285, + [EnumMember(Value = "Asia/Novosibirsk")] + AsiaNovosibirsk = 265, -[EnumMember(Value = "Asia/Tehran")] -AsiaTehran = 286, + [EnumMember(Value = "Asia/Omsk")] + AsiaOmsk = 266, -[EnumMember(Value = "Asia/Thimphu")] -AsiaThimphu = 287, + [EnumMember(Value = "Asia/Oral")] + AsiaOral = 267, -[EnumMember(Value = "Asia/Tokyo")] -AsiaTokyo = 288, + [EnumMember(Value = "Asia/Phnom_Penh")] + AsiaPhnomPenh = 268, -[EnumMember(Value = "Asia/Tomsk")] -AsiaTomsk = 289, + [EnumMember(Value = "Asia/Pontianak")] + AsiaPontianak = 269, -[EnumMember(Value = "Asia/Ulaanbaatar")] -AsiaUlaanbaatar = 290, + [EnumMember(Value = "Asia/Pyongyang")] + AsiaPyongyang = 270, -[EnumMember(Value = "Asia/Urumqi")] -AsiaUrumqi = 291, + [EnumMember(Value = "Asia/Qatar")] + AsiaQatar = 271, -[EnumMember(Value = "Asia/Ust-Nera")] -AsiaUstNera = 292, + [EnumMember(Value = "Asia/Qostanay")] + AsiaQostanay = 272, -[EnumMember(Value = "Asia/Vientiane")] -AsiaVientiane = 293, + [EnumMember(Value = "Asia/Qyzylorda")] + AsiaQyzylorda = 273, -[EnumMember(Value = "Asia/Vladivostok")] -AsiaVladivostok = 294, + [EnumMember(Value = "Asia/Rangoon")] + AsiaRangoon = 274, -[EnumMember(Value = "Asia/Yakutsk")] -AsiaYakutsk = 295, + [EnumMember(Value = "Asia/Riyadh")] + AsiaRiyadh = 275, -[EnumMember(Value = "Asia/Yekaterinburg")] -AsiaYekaterinburg = 296, + [EnumMember(Value = "Asia/Saigon")] + AsiaSaigon = 276, -[EnumMember(Value = "Asia/Yerevan")] -AsiaYerevan = 297, + [EnumMember(Value = "Asia/Sakhalin")] + AsiaSakhalin = 277, -[EnumMember(Value = "Atlantic/Azores")] -AtlanticAzores = 298, + [EnumMember(Value = "Asia/Samarkand")] + AsiaSamarkand = 278, -[EnumMember(Value = "Atlantic/Bermuda")] -AtlanticBermuda = 299, + [EnumMember(Value = "Asia/Seoul")] + AsiaSeoul = 279, -[EnumMember(Value = "Atlantic/Canary")] -AtlanticCanary = 300, + [EnumMember(Value = "Asia/Shanghai")] + AsiaShanghai = 280, -[EnumMember(Value = "Atlantic/Cape_Verde")] -AtlanticCapeVerde = 301, + [EnumMember(Value = "Asia/Singapore")] + AsiaSingapore = 281, -[EnumMember(Value = "Atlantic/Faeroe")] -AtlanticFaeroe = 302, + [EnumMember(Value = "Asia/Srednekolymsk")] + AsiaSrednekolymsk = 282, -[EnumMember(Value = "Atlantic/Madeira")] -AtlanticMadeira = 303, + [EnumMember(Value = "Asia/Taipei")] + AsiaTaipei = 283, -[EnumMember(Value = "Atlantic/Reykjavik")] -AtlanticReykjavik = 304, + [EnumMember(Value = "Asia/Tashkent")] + AsiaTashkent = 284, -[EnumMember(Value = "Atlantic/South_Georgia")] -AtlanticSouthGeorgia = 305, + [EnumMember(Value = "Asia/Tbilisi")] + AsiaTbilisi = 285, -[EnumMember(Value = "Atlantic/St_Helena")] -AtlanticStHelena = 306, + [EnumMember(Value = "Asia/Tehran")] + AsiaTehran = 286, -[EnumMember(Value = "Atlantic/Stanley")] -AtlanticStanley = 307, + [EnumMember(Value = "Asia/Thimphu")] + AsiaThimphu = 287, -[EnumMember(Value = "Australia/Adelaide")] -AustraliaAdelaide = 308, + [EnumMember(Value = "Asia/Tokyo")] + AsiaTokyo = 288, -[EnumMember(Value = "Australia/Brisbane")] -AustraliaBrisbane = 309, + [EnumMember(Value = "Asia/Tomsk")] + AsiaTomsk = 289, -[EnumMember(Value = "Australia/Broken_Hill")] -AustraliaBrokenHill = 310, + [EnumMember(Value = "Asia/Ulaanbaatar")] + AsiaUlaanbaatar = 290, -[EnumMember(Value = "Australia/Currie")] -AustraliaCurrie = 311, + [EnumMember(Value = "Asia/Urumqi")] + AsiaUrumqi = 291, -[EnumMember(Value = "Australia/Darwin")] -AustraliaDarwin = 312, + [EnumMember(Value = "Asia/Ust-Nera")] + AsiaUstNera = 292, -[EnumMember(Value = "Australia/Eucla")] -AustraliaEucla = 313, + [EnumMember(Value = "Asia/Vientiane")] + AsiaVientiane = 293, -[EnumMember(Value = "Australia/Hobart")] -AustraliaHobart = 314, + [EnumMember(Value = "Asia/Vladivostok")] + AsiaVladivostok = 294, -[EnumMember(Value = "Australia/Lindeman")] -AustraliaLindeman = 315, + [EnumMember(Value = "Asia/Yakutsk")] + AsiaYakutsk = 295, -[EnumMember(Value = "Australia/Lord_Howe")] -AustraliaLordHowe = 316, + [EnumMember(Value = "Asia/Yekaterinburg")] + AsiaYekaterinburg = 296, -[EnumMember(Value = "Australia/Melbourne")] -AustraliaMelbourne = 317, + [EnumMember(Value = "Asia/Yerevan")] + AsiaYerevan = 297, -[EnumMember(Value = "Australia/Perth")] -AustraliaPerth = 318, + [EnumMember(Value = "Atlantic/Azores")] + AtlanticAzores = 298, -[EnumMember(Value = "Australia/Sydney")] -AustraliaSydney = 319, + [EnumMember(Value = "Atlantic/Bermuda")] + AtlanticBermuda = 299, -[EnumMember(Value = "Europe/Amsterdam")] -EuropeAmsterdam = 320, + [EnumMember(Value = "Atlantic/Canary")] + AtlanticCanary = 300, -[EnumMember(Value = "Europe/Andorra")] -EuropeAndorra = 321, + [EnumMember(Value = "Atlantic/Cape_Verde")] + AtlanticCapeVerde = 301, -[EnumMember(Value = "Europe/Astrakhan")] -EuropeAstrakhan = 322, + [EnumMember(Value = "Atlantic/Faeroe")] + AtlanticFaeroe = 302, -[EnumMember(Value = "Europe/Athens")] -EuropeAthens = 323, + [EnumMember(Value = "Atlantic/Madeira")] + AtlanticMadeira = 303, -[EnumMember(Value = "Europe/Belgrade")] -EuropeBelgrade = 324, + [EnumMember(Value = "Atlantic/Reykjavik")] + AtlanticReykjavik = 304, -[EnumMember(Value = "Europe/Berlin")] -EuropeBerlin = 325, + [EnumMember(Value = "Atlantic/South_Georgia")] + AtlanticSouthGeorgia = 305, -[EnumMember(Value = "Europe/Bratislava")] -EuropeBratislava = 326, + [EnumMember(Value = "Atlantic/St_Helena")] + AtlanticStHelena = 306, -[EnumMember(Value = "Europe/Brussels")] -EuropeBrussels = 327, + [EnumMember(Value = "Atlantic/Stanley")] + AtlanticStanley = 307, -[EnumMember(Value = "Europe/Bucharest")] -EuropeBucharest = 328, + [EnumMember(Value = "Australia/Adelaide")] + AustraliaAdelaide = 308, -[EnumMember(Value = "Europe/Budapest")] -EuropeBudapest = 329, + [EnumMember(Value = "Australia/Brisbane")] + AustraliaBrisbane = 309, -[EnumMember(Value = "Europe/Busingen")] -EuropeBusingen = 330, + [EnumMember(Value = "Australia/Broken_Hill")] + AustraliaBrokenHill = 310, -[EnumMember(Value = "Europe/Chisinau")] -EuropeChisinau = 331, + [EnumMember(Value = "Australia/Currie")] + AustraliaCurrie = 311, -[EnumMember(Value = "Europe/Copenhagen")] -EuropeCopenhagen = 332, + [EnumMember(Value = "Australia/Darwin")] + AustraliaDarwin = 312, -[EnumMember(Value = "Europe/Dublin")] -EuropeDublin = 333, + [EnumMember(Value = "Australia/Eucla")] + AustraliaEucla = 313, -[EnumMember(Value = "Europe/Gibraltar")] -EuropeGibraltar = 334, + [EnumMember(Value = "Australia/Hobart")] + AustraliaHobart = 314, -[EnumMember(Value = "Europe/Guernsey")] -EuropeGuernsey = 335, + [EnumMember(Value = "Australia/Lindeman")] + AustraliaLindeman = 315, -[EnumMember(Value = "Europe/Helsinki")] -EuropeHelsinki = 336, + [EnumMember(Value = "Australia/Lord_Howe")] + AustraliaLordHowe = 316, -[EnumMember(Value = "Europe/Isle_of_Man")] -EuropeIsleOfMan = 337, + [EnumMember(Value = "Australia/Melbourne")] + AustraliaMelbourne = 317, -[EnumMember(Value = "Europe/Istanbul")] -EuropeIstanbul = 338, + [EnumMember(Value = "Australia/Perth")] + AustraliaPerth = 318, -[EnumMember(Value = "Europe/Jersey")] -EuropeJersey = 339, + [EnumMember(Value = "Australia/Sydney")] + AustraliaSydney = 319, -[EnumMember(Value = "Europe/Kaliningrad")] -EuropeKaliningrad = 340, + [EnumMember(Value = "Europe/Amsterdam")] + EuropeAmsterdam = 320, -[EnumMember(Value = "Europe/Kiev")] -EuropeKiev = 341, + [EnumMember(Value = "Europe/Andorra")] + EuropeAndorra = 321, -[EnumMember(Value = "Europe/Kirov")] -EuropeKirov = 342, + [EnumMember(Value = "Europe/Astrakhan")] + EuropeAstrakhan = 322, -[EnumMember(Value = "Europe/Lisbon")] -EuropeLisbon = 343, + [EnumMember(Value = "Europe/Athens")] + EuropeAthens = 323, -[EnumMember(Value = "Europe/Ljubljana")] -EuropeLjubljana = 344, + [EnumMember(Value = "Europe/Belgrade")] + EuropeBelgrade = 324, -[EnumMember(Value = "Europe/London")] -EuropeLondon = 345, + [EnumMember(Value = "Europe/Berlin")] + EuropeBerlin = 325, -[EnumMember(Value = "Europe/Luxembourg")] -EuropeLuxembourg = 346, + [EnumMember(Value = "Europe/Bratislava")] + EuropeBratislava = 326, -[EnumMember(Value = "Europe/Madrid")] -EuropeMadrid = 347, + [EnumMember(Value = "Europe/Brussels")] + EuropeBrussels = 327, -[EnumMember(Value = "Europe/Malta")] -EuropeMalta = 348, + [EnumMember(Value = "Europe/Bucharest")] + EuropeBucharest = 328, -[EnumMember(Value = "Europe/Mariehamn")] -EuropeMariehamn = 349, + [EnumMember(Value = "Europe/Budapest")] + EuropeBudapest = 329, -[EnumMember(Value = "Europe/Minsk")] -EuropeMinsk = 350, + [EnumMember(Value = "Europe/Busingen")] + EuropeBusingen = 330, -[EnumMember(Value = "Europe/Monaco")] -EuropeMonaco = 351, + [EnumMember(Value = "Europe/Chisinau")] + EuropeChisinau = 331, -[EnumMember(Value = "Europe/Moscow")] -EuropeMoscow = 352, + [EnumMember(Value = "Europe/Copenhagen")] + EuropeCopenhagen = 332, -[EnumMember(Value = "Europe/Oslo")] -EuropeOslo = 353, + [EnumMember(Value = "Europe/Dublin")] + EuropeDublin = 333, -[EnumMember(Value = "Europe/Paris")] -EuropeParis = 354, + [EnumMember(Value = "Europe/Gibraltar")] + EuropeGibraltar = 334, -[EnumMember(Value = "Europe/Podgorica")] -EuropePodgorica = 355, + [EnumMember(Value = "Europe/Guernsey")] + EuropeGuernsey = 335, -[EnumMember(Value = "Europe/Prague")] -EuropePrague = 356, + [EnumMember(Value = "Europe/Helsinki")] + EuropeHelsinki = 336, -[EnumMember(Value = "Europe/Riga")] -EuropeRiga = 357, + [EnumMember(Value = "Europe/Isle_of_Man")] + EuropeIsleOfMan = 337, -[EnumMember(Value = "Europe/Rome")] -EuropeRome = 358, + [EnumMember(Value = "Europe/Istanbul")] + EuropeIstanbul = 338, -[EnumMember(Value = "Europe/Samara")] -EuropeSamara = 359, + [EnumMember(Value = "Europe/Jersey")] + EuropeJersey = 339, -[EnumMember(Value = "Europe/San_Marino")] -EuropeSanMarino = 360, + [EnumMember(Value = "Europe/Kaliningrad")] + EuropeKaliningrad = 340, -[EnumMember(Value = "Europe/Sarajevo")] -EuropeSarajevo = 361, + [EnumMember(Value = "Europe/Kiev")] + EuropeKiev = 341, -[EnumMember(Value = "Europe/Saratov")] -EuropeSaratov = 362, + [EnumMember(Value = "Europe/Kirov")] + EuropeKirov = 342, -[EnumMember(Value = "Europe/Simferopol")] -EuropeSimferopol = 363, + [EnumMember(Value = "Europe/Lisbon")] + EuropeLisbon = 343, -[EnumMember(Value = "Europe/Skopje")] -EuropeSkopje = 364, + [EnumMember(Value = "Europe/Ljubljana")] + EuropeLjubljana = 344, -[EnumMember(Value = "Europe/Sofia")] -EuropeSofia = 365, + [EnumMember(Value = "Europe/London")] + EuropeLondon = 345, -[EnumMember(Value = "Europe/Stockholm")] -EuropeStockholm = 366, + [EnumMember(Value = "Europe/Luxembourg")] + EuropeLuxembourg = 346, -[EnumMember(Value = "Europe/Tallinn")] -EuropeTallinn = 367, + [EnumMember(Value = "Europe/Madrid")] + EuropeMadrid = 347, -[EnumMember(Value = "Europe/Tirane")] -EuropeTirane = 368, + [EnumMember(Value = "Europe/Malta")] + EuropeMalta = 348, -[EnumMember(Value = "Europe/Ulyanovsk")] -EuropeUlyanovsk = 369, + [EnumMember(Value = "Europe/Mariehamn")] + EuropeMariehamn = 349, -[EnumMember(Value = "Europe/Uzhgorod")] -EuropeUzhgorod = 370, + [EnumMember(Value = "Europe/Minsk")] + EuropeMinsk = 350, -[EnumMember(Value = "Europe/Vaduz")] -EuropeVaduz = 371, + [EnumMember(Value = "Europe/Monaco")] + EuropeMonaco = 351, -[EnumMember(Value = "Europe/Vatican")] -EuropeVatican = 372, + [EnumMember(Value = "Europe/Moscow")] + EuropeMoscow = 352, -[EnumMember(Value = "Europe/Vienna")] -EuropeVienna = 373, + [EnumMember(Value = "Europe/Oslo")] + EuropeOslo = 353, -[EnumMember(Value = "Europe/Vilnius")] -EuropeVilnius = 374, + [EnumMember(Value = "Europe/Paris")] + EuropeParis = 354, -[EnumMember(Value = "Europe/Volgograd")] -EuropeVolgograd = 375, + [EnumMember(Value = "Europe/Podgorica")] + EuropePodgorica = 355, -[EnumMember(Value = "Europe/Warsaw")] -EuropeWarsaw = 376, + [EnumMember(Value = "Europe/Prague")] + EuropePrague = 356, -[EnumMember(Value = "Europe/Zagreb")] -EuropeZagreb = 377, + [EnumMember(Value = "Europe/Riga")] + EuropeRiga = 357, -[EnumMember(Value = "Europe/Zaporozhye")] -EuropeZaporozhye = 378, + [EnumMember(Value = "Europe/Rome")] + EuropeRome = 358, -[EnumMember(Value = "Europe/Zurich")] -EuropeZurich = 379, + [EnumMember(Value = "Europe/Samara")] + EuropeSamara = 359, -[EnumMember(Value = "Indian/Antananarivo")] -IndianAntananarivo = 380, + [EnumMember(Value = "Europe/San_Marino")] + EuropeSanMarino = 360, -[EnumMember(Value = "Indian/Chagos")] -IndianChagos = 381, + [EnumMember(Value = "Europe/Sarajevo")] + EuropeSarajevo = 361, -[EnumMember(Value = "Indian/Christmas")] -IndianChristmas = 382, + [EnumMember(Value = "Europe/Saratov")] + EuropeSaratov = 362, -[EnumMember(Value = "Indian/Cocos")] -IndianCocos = 383, + [EnumMember(Value = "Europe/Simferopol")] + EuropeSimferopol = 363, -[EnumMember(Value = "Indian/Comoro")] -IndianComoro = 384, + [EnumMember(Value = "Europe/Skopje")] + EuropeSkopje = 364, -[EnumMember(Value = "Indian/Kerguelen")] -IndianKerguelen = 385, + [EnumMember(Value = "Europe/Sofia")] + EuropeSofia = 365, -[EnumMember(Value = "Indian/Mahe")] -IndianMahe = 386, + [EnumMember(Value = "Europe/Stockholm")] + EuropeStockholm = 366, -[EnumMember(Value = "Indian/Maldives")] -IndianMaldives = 387, + [EnumMember(Value = "Europe/Tallinn")] + EuropeTallinn = 367, -[EnumMember(Value = "Indian/Mauritius")] -IndianMauritius = 388, + [EnumMember(Value = "Europe/Tirane")] + EuropeTirane = 368, -[EnumMember(Value = "Indian/Mayotte")] -IndianMayotte = 389, + [EnumMember(Value = "Europe/Ulyanovsk")] + EuropeUlyanovsk = 369, -[EnumMember(Value = "Indian/Reunion")] -IndianReunion = 390, + [EnumMember(Value = "Europe/Uzhgorod")] + EuropeUzhgorod = 370, -[EnumMember(Value = "Pacific/Apia")] -PacificApia = 391, + [EnumMember(Value = "Europe/Vaduz")] + EuropeVaduz = 371, -[EnumMember(Value = "Pacific/Auckland")] -PacificAuckland = 392, + [EnumMember(Value = "Europe/Vatican")] + EuropeVatican = 372, -[EnumMember(Value = "Pacific/Bougainville")] -PacificBougainville = 393, + [EnumMember(Value = "Europe/Vienna")] + EuropeVienna = 373, -[EnumMember(Value = "Pacific/Chatham")] -PacificChatham = 394, + [EnumMember(Value = "Europe/Vilnius")] + EuropeVilnius = 374, -[EnumMember(Value = "Pacific/Easter")] -PacificEaster = 395, + [EnumMember(Value = "Europe/Volgograd")] + EuropeVolgograd = 375, -[EnumMember(Value = "Pacific/Efate")] -PacificEfate = 396, + [EnumMember(Value = "Europe/Warsaw")] + EuropeWarsaw = 376, -[EnumMember(Value = "Pacific/Enderbury")] -PacificEnderbury = 397, + [EnumMember(Value = "Europe/Zagreb")] + EuropeZagreb = 377, -[EnumMember(Value = "Pacific/Fakaofo")] -PacificFakaofo = 398, + [EnumMember(Value = "Europe/Zaporozhye")] + EuropeZaporozhye = 378, -[EnumMember(Value = "Pacific/Fiji")] -PacificFiji = 399, + [EnumMember(Value = "Europe/Zurich")] + EuropeZurich = 379, -[EnumMember(Value = "Pacific/Funafuti")] -PacificFunafuti = 400, + [EnumMember(Value = "Indian/Antananarivo")] + IndianAntananarivo = 380, -[EnumMember(Value = "Pacific/Galapagos")] -PacificGalapagos = 401, + [EnumMember(Value = "Indian/Chagos")] + IndianChagos = 381, -[EnumMember(Value = "Pacific/Gambier")] -PacificGambier = 402, + [EnumMember(Value = "Indian/Christmas")] + IndianChristmas = 382, -[EnumMember(Value = "Pacific/Guadalcanal")] -PacificGuadalcanal = 403, + [EnumMember(Value = "Indian/Cocos")] + IndianCocos = 383, -[EnumMember(Value = "Pacific/Guam")] -PacificGuam = 404, + [EnumMember(Value = "Indian/Comoro")] + IndianComoro = 384, -[EnumMember(Value = "Pacific/Honolulu")] -PacificHonolulu = 405, + [EnumMember(Value = "Indian/Kerguelen")] + IndianKerguelen = 385, -[EnumMember(Value = "Pacific/Johnston")] -PacificJohnston = 406, + [EnumMember(Value = "Indian/Mahe")] + IndianMahe = 386, -[EnumMember(Value = "Pacific/Kiritimati")] -PacificKiritimati = 407, + [EnumMember(Value = "Indian/Maldives")] + IndianMaldives = 387, -[EnumMember(Value = "Pacific/Kosrae")] -PacificKosrae = 408, + [EnumMember(Value = "Indian/Mauritius")] + IndianMauritius = 388, -[EnumMember(Value = "Pacific/Kwajalein")] -PacificKwajalein = 409, + [EnumMember(Value = "Indian/Mayotte")] + IndianMayotte = 389, -[EnumMember(Value = "Pacific/Majuro")] -PacificMajuro = 410, + [EnumMember(Value = "Indian/Reunion")] + IndianReunion = 390, -[EnumMember(Value = "Pacific/Marquesas")] -PacificMarquesas = 411, + [EnumMember(Value = "Pacific/Apia")] + PacificApia = 391, -[EnumMember(Value = "Pacific/Midway")] -PacificMidway = 412, + [EnumMember(Value = "Pacific/Auckland")] + PacificAuckland = 392, -[EnumMember(Value = "Pacific/Nauru")] -PacificNauru = 413, + [EnumMember(Value = "Pacific/Bougainville")] + PacificBougainville = 393, -[EnumMember(Value = "Pacific/Niue")] -PacificNiue = 414, + [EnumMember(Value = "Pacific/Chatham")] + PacificChatham = 394, -[EnumMember(Value = "Pacific/Norfolk")] -PacificNorfolk = 415, + [EnumMember(Value = "Pacific/Easter")] + PacificEaster = 395, -[EnumMember(Value = "Pacific/Noumea")] -PacificNoumea = 416, + [EnumMember(Value = "Pacific/Efate")] + PacificEfate = 396, -[EnumMember(Value = "Pacific/Pago_Pago")] -PacificPagoPago = 417, + [EnumMember(Value = "Pacific/Enderbury")] + PacificEnderbury = 397, -[EnumMember(Value = "Pacific/Palau")] -PacificPalau = 418, + [EnumMember(Value = "Pacific/Fakaofo")] + PacificFakaofo = 398, -[EnumMember(Value = "Pacific/Pitcairn")] -PacificPitcairn = 419, + [EnumMember(Value = "Pacific/Fiji")] + PacificFiji = 399, -[EnumMember(Value = "Pacific/Ponape")] -PacificPonape = 420, + [EnumMember(Value = "Pacific/Funafuti")] + PacificFunafuti = 400, -[EnumMember(Value = "Pacific/Port_Moresby")] -PacificPortMoresby = 421, + [EnumMember(Value = "Pacific/Galapagos")] + PacificGalapagos = 401, -[EnumMember(Value = "Pacific/Rarotonga")] -PacificRarotonga = 422, + [EnumMember(Value = "Pacific/Gambier")] + PacificGambier = 402, -[EnumMember(Value = "Pacific/Saipan")] -PacificSaipan = 423, + [EnumMember(Value = "Pacific/Guadalcanal")] + PacificGuadalcanal = 403, -[EnumMember(Value = "Pacific/Tahiti")] -PacificTahiti = 424, + [EnumMember(Value = "Pacific/Guam")] + PacificGuam = 404, -[EnumMember(Value = "Pacific/Tarawa")] -PacificTarawa = 425, + [EnumMember(Value = "Pacific/Honolulu")] + PacificHonolulu = 405, -[EnumMember(Value = "Pacific/Tongatapu")] -PacificTongatapu = 426, + [EnumMember(Value = "Pacific/Johnston")] + PacificJohnston = 406, -[EnumMember(Value = "Pacific/Truk")] -PacificTruk = 427, + [EnumMember(Value = "Pacific/Kiritimati")] + PacificKiritimati = 407, -[EnumMember(Value = "Pacific/Wake")] -PacificWake = 428, + [EnumMember(Value = "Pacific/Kosrae")] + PacificKosrae = 408, -[EnumMember(Value = "Pacific/Wallis")] -PacificWallis = 429, -} + [EnumMember(Value = "Pacific/Kwajalein")] + PacificKwajalein = 409, -/// -/// IANA timezone for the Ultraloq device -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public ReportProviderMetadataRequestDevicesUltraloqMetadata.TimeZoneEnum? TimeZone { get; set; } + [EnumMember(Value = "Pacific/Majuro")] + PacificMajuro = 410, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "Pacific/Marquesas")] + PacificMarquesas = 411, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "Pacific/Midway")] + PacificMidway = 412, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "Pacific/Nauru")] + PacificNauru = 413, -/// -/// Updates provider-specific metadata for devices. -/// -public void ReportProviderMetadata(ReportProviderMetadataRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/devices/report_provider_metadata", requestOptions); -} + [EnumMember(Value = "Pacific/Niue")] + PacificNiue = 414, -/// -/// Updates provider-specific metadata for devices. -/// -public void ReportProviderMetadata(List devices = default) -{ -ReportProviderMetadata(new ReportProviderMetadataRequest(devices: devices)); -} + [EnumMember(Value = "Pacific/Norfolk")] + PacificNorfolk = 415, -/// -/// Updates provider-specific metadata for devices. -/// -public async Task ReportProviderMetadataAsync(ReportProviderMetadataRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/devices/report_provider_metadata", requestOptions); -} + [EnumMember(Value = "Pacific/Noumea")] + PacificNoumea = 416, -/// -/// Updates provider-specific metadata for devices. -/// -public async Task ReportProviderMetadataAsync(List devices = default) -{ -await ReportProviderMetadataAsync(new ReportProviderMetadataRequest(devices: devices)); -} + [EnumMember(Value = "Pacific/Pago_Pago")] + PacificPagoPago = 417, -/// -/// Request parameters for Update a Device. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } + [EnumMember(Value = "Pacific/Palau")] + PacificPalau = 418, -public UpdateRequest(bool? backupAccessCodePoolEnabled = default, object? customMetadata = default, string deviceId = default, bool? isManaged = default, string? name = default, UpdateRequestProperties? properties = default) -{ -BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; -CustomMetadata = customMetadata; -DeviceId = deviceId; -IsManaged = isManaged; -Name = name; -Properties = properties; -} + [EnumMember(Value = "Pacific/Pitcairn")] + PacificPitcairn = 419, -/// -/// Indicates whether the device's [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) is enabled. Set to `false` to disable the pool: Seam stops refilling it and removes any backup codes that have not yet been pulled into active use. -/// -[DataMember(Name = "backup_access_code_pool_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? BackupAccessCodePoolEnabled { get; set; } - -/// -/// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://www.seam.co/docs/core-concepts/devices/filtering-devices-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadata { get; set; } - -/// -/// ID of the device that you want to update. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Indicates whether the device is managed. To unmanage a device, set `is_managed` to `false`. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsManaged { get; set; } - -/// -/// Name for the device. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] -public UpdateRequestProperties? Properties { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "Pacific/Ponape")] + PacificPonape = 420, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateRequestProperties_model")] -public class UpdateRequestProperties -{ -[JsonConstructorAttribute] -protected UpdateRequestProperties() { } - -public UpdateRequestProperties(string? name = default) -{ -Name = name; -} - -/// -/// Name for the device. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } + [EnumMember(Value = "Pacific/Port_Moresby")] + PacificPortMoresby = 421, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "Pacific/Rarotonga")] + PacificRarotonga = 422, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -/// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/devices/update", requestOptions); -} - -/// -/// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -/// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -public void Update(bool? backupAccessCodePoolEnabled = default, object? customMetadata = default, string deviceId = default, bool? isManaged = default, string? name = default, UpdateRequestProperties? properties = default) -{ -Update(new UpdateRequest(backupAccessCodePoolEnabled: backupAccessCodePoolEnabled, customMetadata: customMetadata, deviceId: deviceId, isManaged: isManaged, name: name, properties: properties)); -} - -/// -/// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -/// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/devices/update", requestOptions); -} - -/// -/// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -/// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -public async Task UpdateAsync(bool? backupAccessCodePoolEnabled = default, object? customMetadata = default, string deviceId = default, bool? isManaged = default, string? name = default, UpdateRequestProperties? properties = default) -{ -await UpdateAsync(new UpdateRequest(backupAccessCodePoolEnabled: backupAccessCodePoolEnabled, customMetadata: customMetadata, deviceId: deviceId, isManaged: isManaged, name: name, properties: properties)); -} -} + [EnumMember(Value = "Pacific/Saipan")] + PacificSaipan = 423, + + [EnumMember(Value = "Pacific/Tahiti")] + PacificTahiti = 424, + + [EnumMember(Value = "Pacific/Tarawa")] + PacificTarawa = 425, + + [EnumMember(Value = "Pacific/Tongatapu")] + PacificTongatapu = 426, + + [EnumMember(Value = "Pacific/Truk")] + PacificTruk = 427, + + [EnumMember(Value = "Pacific/Wake")] + PacificWake = 428, + + [EnumMember(Value = "Pacific/Wallis")] + PacificWallis = 429, + } + + /// + /// IANA timezone for the Ultraloq device + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public ReportProviderMetadataRequestDevicesUltraloqMetadata.TimeZoneEnum? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates provider-specific metadata for devices. + /// + public void ReportProviderMetadata(ReportProviderMetadataRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/devices/report_provider_metadata", requestOptions); + } + + /// + /// Updates provider-specific metadata for devices. + /// + public void ReportProviderMetadata( + List devices = default + ) + { + ReportProviderMetadata(new ReportProviderMetadataRequest(devices: devices)); + } + + /// + /// Updates provider-specific metadata for devices. + /// + public async Task ReportProviderMetadataAsync(ReportProviderMetadataRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/devices/report_provider_metadata", requestOptions); + } + + /// + /// Updates provider-specific metadata for devices. + /// + public async Task ReportProviderMetadataAsync( + List devices = default + ) + { + await ReportProviderMetadataAsync(new ReportProviderMetadataRequest(devices: devices)); + } + + /// + /// Request parameters for Update a Device. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + bool? backupAccessCodePoolEnabled = default, + object? customMetadata = default, + string deviceId = default, + bool? isManaged = default, + string? name = default, + UpdateRequestProperties? properties = default + ) + { + BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; + CustomMetadata = customMetadata; + DeviceId = deviceId; + IsManaged = isManaged; + Name = name; + Properties = properties; + } + + /// + /// Indicates whether the device's [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) is enabled. Set to `false` to disable the pool: Seam stops refilling it and removes any backup codes that have not yet been pulled into active use. + /// + [DataMember( + Name = "backup_access_code_pool_enabled", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? BackupAccessCodePoolEnabled { get; set; } + + /// + /// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://www.seam.co/docs/core-concepts/devices/filtering-devices-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadata { get; set; } + + /// + /// ID of the device that you want to update. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Indicates whether the device is managed. To unmanage a device, set `is_managed` to `false`. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsManaged { get; set; } + + /// + /// Name for the device. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] + public UpdateRequestProperties? Properties { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateRequestProperties_model")] + public class UpdateRequestProperties + { + [JsonConstructorAttribute] + protected UpdateRequestProperties() { } + + public UpdateRequestProperties(string? name = default) + { + Name = name; + } + + /// + /// Name for the device. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + /// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/devices/update", requestOptions); + } + + /// + /// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + /// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + public void Update( + bool? backupAccessCodePoolEnabled = default, + object? customMetadata = default, + string deviceId = default, + bool? isManaged = default, + string? name = default, + UpdateRequestProperties? properties = default + ) + { + Update( + new UpdateRequest( + backupAccessCodePoolEnabled: backupAccessCodePoolEnabled, + customMetadata: customMetadata, + deviceId: deviceId, + isManaged: isManaged, + name: name, + properties: properties + ) + ); + } + + /// + /// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + /// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/devices/update", requestOptions); + } + + /// + /// Updates a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + /// You can add or change [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + public async Task UpdateAsync( + bool? backupAccessCodePoolEnabled = default, + object? customMetadata = default, + string deviceId = default, + bool? isManaged = default, + string? name = default, + UpdateRequestProperties? properties = default + ) + { + await UpdateAsync( + new UpdateRequest( + backupAccessCodePoolEnabled: backupAccessCodePoolEnabled, + customMetadata: customMetadata, + deviceId: deviceId, + isManaged: isManaged, + name: name, + properties: properties + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Devices Devices => new(this); -} - -public partial interface ISeamClient -{ -public Api.Devices Devices { get; } -} + public partial class SeamClient + { + public Api.Devices Devices => new(this); + } + + public partial interface ISeamClient + { + public Api.Devices Devices { get; } + } } diff --git a/src/Seam/Api/EncodersAcs.cs b/src/Seam/Api/EncodersAcs.cs index cfe74fe0..aa1d8873 100644 --- a/src/Seam/Api/EncodersAcs.cs +++ b/src/Seam/Api/EncodersAcs.cs @@ -9,735 +9,894 @@ namespace Seam.Api { -public class EncodersAcs -{ -private ISeamClient _seam; - -public EncodersAcs(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Encode a Credential. -/// -[DataContract(Name = "encodeCredentialRequest_request")] -public class EncodeCredentialRequest -{ -[JsonConstructorAttribute] -protected EncodeCredentialRequest() { } - -public EncodeCredentialRequest(string? accessMethodId = default, string? acsCredentialId = default, string acsEncoderId = default) -{ -AccessMethodId = accessMethodId; -AcsCredentialId = acsCredentialId; -AcsEncoderId = acsEncoderId; -} - -/// -/// ID of the `access_method` to encode onto a card. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessMethodId { get; set; } - -/// -/// ID of the `acs_credential` to encode onto a card. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialId { get; set; } - -/// -/// ID of the `acs_encoder` to use to encode the `acs_credential`. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "encodeCredentialResponse_response")] -public class EncodeCredentialResponse -{ -[JsonConstructorAttribute] -protected EncodeCredentialResponse() { } - -public EncodeCredentialResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` -/// -public ActionAttempt EncodeCredential(EncodeCredentialRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/acs/encoders/encode_credential", requestOptions).EnsureData("/acs/encoders/encode_credential").ActionAttempt; -} - -/// -/// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` -/// -public ActionAttempt EncodeCredential(string? accessMethodId = default, string? acsCredentialId = default, string acsEncoderId = default) -{ -return EncodeCredential(new EncodeCredentialRequest(accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId)); -} - -/// -/// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` -/// -public async Task EncodeCredentialAsync(EncodeCredentialRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/acs/encoders/encode_credential", requestOptions)).EnsureData("/acs/encoders/encode_credential").ActionAttempt; -} - -/// -/// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` -/// -public async Task EncodeCredentialAsync(string? accessMethodId = default, string? acsCredentialId = default, string acsEncoderId = default) -{ -return (await EncodeCredentialAsync(new EncodeCredentialRequest(accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId))); -} - -/// -/// Request parameters for Get an Encoder. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string acsEncoderId = default) -{ -AcsEncoderId = acsEncoderId; -} - -/// -/// ID of the encoder that you want to get. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AcsEncoder acsEncoder = default) -{ -AcsEncoder = acsEncoder; -} - -/// -/// OK -/// -[DataMember(Name = "acs_encoder", IsRequired = false, EmitDefaultValue = false)] -public AcsEncoder AcsEncoder { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public AcsEncoder Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/encoders/get", requestOptions).EnsureData("/acs/encoders/get").AcsEncoder; -} - -/// -/// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public AcsEncoder Get(string acsEncoderId = default) -{ -return Get(new GetRequest(acsEncoderId: acsEncoderId)); -} - -/// -/// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/encoders/get", requestOptions)).EnsureData("/acs/encoders/get").AcsEncoder; -} - -/// -/// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public async Task GetAsync(string acsEncoderId = default) -{ -return (await GetAsync(new GetRequest(acsEncoderId: acsEncoderId))); -} - -/// -/// Request parameters for List Encoders. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, float? limit = default, string? pageCursor = default) -{ -AcsEncoderIds = acsEncoderIds; -AcsSystemId = acsSystemId; -AcsSystemIds = acsSystemIds; -Limit = limit; -PageCursor = pageCursor; -} - -/// -/// IDs of the encoders that you want to retrieve. -/// -[DataMember(Name = "acs_encoder_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsEncoderIds { get; set; } - -/// -/// ID of the access system for which you want to retrieve all encoders. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// IDs of the access systems for which you want to retrieve all encoders. -/// -[DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsSystemIds { get; set; } - -/// -/// Number of encoders to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List acsEncoders = default) -{ -AcsEncoders = acsEncoders; -} - -/// -/// OK -/// -[DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] -public List AcsEncoders { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/encoders/list", requestOptions).EnsureData("/acs/encoders/list").AcsEncoders; -} - -/// -/// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public List List(List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, float? limit = default, string? pageCursor = default) -{ -return List(new ListRequest(acsEncoderIds: acsEncoderIds, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, limit: limit, pageCursor: pageCursor)); -} - -/// -/// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/encoders/list", requestOptions)).EnsureData("/acs/encoders/list").AcsEncoders; -} - -/// -/// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public async Task> ListAsync(List? acsEncoderIds = default, string? acsSystemId = default, List? acsSystemIds = default, float? limit = default, string? pageCursor = default) -{ -return (await ListAsync(new ListRequest(acsEncoderIds: acsEncoderIds, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, limit: limit, pageCursor: pageCursor))); -} - -/// -/// Request parameters for Scan a Credential. -/// -[DataContract(Name = "scanCredentialRequest_request")] -public class ScanCredentialRequest -{ -[JsonConstructorAttribute] -protected ScanCredentialRequest() { } - -public ScanCredentialRequest(string acsEncoderId = default, ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default) -{ -AcsEncoderId = acsEncoderId; -SaltoKsMetadata = saltoKsMetadata; -} - -/// -/// ID of the encoder to use for the scan. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -/// -/// Salto KS-specific metadata for the scan action. -/// -[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] -public ScanCredentialRequestSaltoKsMetadata? SaltoKsMetadata { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "scanCredentialRequestSaltoKsMetadata_model")] -public class ScanCredentialRequestSaltoKsMetadata -{ -[JsonConstructorAttribute] -protected ScanCredentialRequestSaltoKsMetadata() { } - -public ScanCredentialRequestSaltoKsMetadata(bool? detectNewTags = default) -{ -DetectNewTags = detectNewTags; -} - -/// -/// When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. -/// -[DataMember(Name = "detect_new_tags", IsRequired = false, EmitDefaultValue = false)] -public bool? DetectNewTags { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "scanCredentialResponse_response")] -public class ScanCredentialResponse -{ -[JsonConstructorAttribute] -protected ScanCredentialResponse() { } - -public ScanCredentialResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public ActionAttempt ScanCredential(ScanCredentialRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/acs/encoders/scan_credential", requestOptions).EnsureData("/acs/encoders/scan_credential").ActionAttempt; -} - -/// -/// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public ActionAttempt ScanCredential(string acsEncoderId = default, ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default) -{ -return ScanCredential(new ScanCredentialRequest(acsEncoderId: acsEncoderId, saltoKsMetadata: saltoKsMetadata)); -} - -/// -/// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public async Task ScanCredentialAsync(ScanCredentialRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/acs/encoders/scan_credential", requestOptions)).EnsureData("/acs/encoders/scan_credential").ActionAttempt; -} - -/// -/// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -public async Task ScanCredentialAsync(string acsEncoderId = default, ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default) -{ -return (await ScanCredentialAsync(new ScanCredentialRequest(acsEncoderId: acsEncoderId, saltoKsMetadata: saltoKsMetadata))); -} - -/// -/// Request parameters for Scan to Assign a Credential. -/// -[DataContract(Name = "scanToAssignCredentialRequest_request")] -public class ScanToAssignCredentialRequest -{ -[JsonConstructorAttribute] -protected ScanToAssignCredentialRequest() { } - -public ScanToAssignCredentialRequest(string acsEncoderId = default, string? acsUserId = default, ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, string? userIdentityId = default) -{ -AcsEncoderId = acsEncoderId; -AcsUserId = acsUserId; -SaltoKsMetadata = saltoKsMetadata; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the `acs_encoder` to use to scan the credential. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -/// -/// ID of the `acs_user` to assign the scanned credential to. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// Salto KS-specific metadata for the scan action. -/// -[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] -public ScanToAssignCredentialRequestSaltoKsMetadata? SaltoKsMetadata { get; set; } - -/// -/// ID of the `user_identity` to assign the scanned credential to. If the ACS system contains an ACS user linked to this user identity, it is used. Otherwise, one is created. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "scanToAssignCredentialRequestSaltoKsMetadata_model")] -public class ScanToAssignCredentialRequestSaltoKsMetadata -{ -[JsonConstructorAttribute] -protected ScanToAssignCredentialRequestSaltoKsMetadata() { } - -public ScanToAssignCredentialRequestSaltoKsMetadata(bool? detectNewTags = default) -{ -DetectNewTags = detectNewTags; -} - -/// -/// When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. -/// -[DataMember(Name = "detect_new_tags", IsRequired = false, EmitDefaultValue = false)] -public bool? DetectNewTags { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "scanToAssignCredentialResponse_response")] -public class ScanToAssignCredentialResponse -{ -[JsonConstructorAttribute] -protected ScanToAssignCredentialResponse() { } - -public ScanToAssignCredentialResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. -/// -public ActionAttempt ScanToAssignCredential(ScanToAssignCredentialRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/acs/encoders/scan_to_assign_credential", requestOptions).EnsureData("/acs/encoders/scan_to_assign_credential").ActionAttempt; -} - -/// -/// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. -/// -public ActionAttempt ScanToAssignCredential(string acsEncoderId = default, string? acsUserId = default, ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, string? userIdentityId = default) -{ -return ScanToAssignCredential(new ScanToAssignCredentialRequest(acsEncoderId: acsEncoderId, acsUserId: acsUserId, saltoKsMetadata: saltoKsMetadata, userIdentityId: userIdentityId)); -} - -/// -/// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. -/// -public async Task ScanToAssignCredentialAsync(ScanToAssignCredentialRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/acs/encoders/scan_to_assign_credential", requestOptions)).EnsureData("/acs/encoders/scan_to_assign_credential").ActionAttempt; -} - -/// -/// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. -/// -public async Task ScanToAssignCredentialAsync(string acsEncoderId = default, string? acsUserId = default, ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, string? userIdentityId = default) -{ -return (await ScanToAssignCredentialAsync(new ScanToAssignCredentialRequest(acsEncoderId: acsEncoderId, acsUserId: acsUserId, saltoKsMetadata: saltoKsMetadata, userIdentityId: userIdentityId))); -} -} + public class EncodersAcs + { + private ISeamClient _seam; + + public EncodersAcs(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Encode a Credential. + /// + [DataContract(Name = "encodeCredentialRequest_request")] + public class EncodeCredentialRequest + { + [JsonConstructorAttribute] + protected EncodeCredentialRequest() { } + + public EncodeCredentialRequest( + string? accessMethodId = default, + string? acsCredentialId = default, + string acsEncoderId = default + ) + { + AccessMethodId = accessMethodId; + AcsCredentialId = acsCredentialId; + AcsEncoderId = acsEncoderId; + } + + /// + /// ID of the `access_method` to encode onto a card. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessMethodId { get; set; } + + /// + /// ID of the `acs_credential` to encode onto a card. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialId { get; set; } + + /// + /// ID of the `acs_encoder` to use to encode the `acs_credential`. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "encodeCredentialResponse_response")] + public class EncodeCredentialResponse + { + [JsonConstructorAttribute] + protected EncodeCredentialResponse() { } + + public EncodeCredentialResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` + /// + public ActionAttempt EncodeCredential(EncodeCredentialRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/acs/encoders/encode_credential", requestOptions) + .EnsureData("/acs/encoders/encode_credential") + .ActionAttempt; + } + + /// + /// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` + /// + public ActionAttempt EncodeCredential( + string? accessMethodId = default, + string? acsCredentialId = default, + string acsEncoderId = default + ) + { + return EncodeCredential( + new EncodeCredentialRequest( + accessMethodId: accessMethodId, + acsCredentialId: acsCredentialId, + acsEncoderId: acsEncoderId + ) + ); + } + + /// + /// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` + /// + public async Task EncodeCredentialAsync(EncodeCredentialRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/acs/encoders/encode_credential", + requestOptions + ) + ) + .EnsureData("/acs/encoders/encode_credential") + .ActionAttempt; + } + + /// + /// Encodes an existing [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` + /// + public async Task EncodeCredentialAsync( + string? accessMethodId = default, + string? acsCredentialId = default, + string acsEncoderId = default + ) + { + return ( + await EncodeCredentialAsync( + new EncodeCredentialRequest( + accessMethodId: accessMethodId, + acsCredentialId: acsCredentialId, + acsEncoderId: acsEncoderId + ) + ) + ); + } + + /// + /// Request parameters for Get an Encoder. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string acsEncoderId = default) + { + AcsEncoderId = acsEncoderId; + } + + /// + /// ID of the encoder that you want to get. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AcsEncoder acsEncoder = default) + { + AcsEncoder = acsEncoder; + } + + /// + /// OK + /// + [DataMember(Name = "acs_encoder", IsRequired = false, EmitDefaultValue = false)] + public AcsEncoder AcsEncoder { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public AcsEncoder Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/encoders/get", requestOptions) + .EnsureData("/acs/encoders/get") + .AcsEncoder; + } + + /// + /// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public AcsEncoder Get(string acsEncoderId = default) + { + return Get(new GetRequest(acsEncoderId: acsEncoderId)); + } + + /// + /// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/encoders/get", requestOptions)) + .EnsureData("/acs/encoders/get") + .AcsEncoder; + } + + /// + /// Returns a specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public async Task GetAsync(string acsEncoderId = default) + { + return (await GetAsync(new GetRequest(acsEncoderId: acsEncoderId))); + } + + /// + /// Request parameters for List Encoders. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + List? acsEncoderIds = default, + string? acsSystemId = default, + List? acsSystemIds = default, + float? limit = default, + string? pageCursor = default + ) + { + AcsEncoderIds = acsEncoderIds; + AcsSystemId = acsSystemId; + AcsSystemIds = acsSystemIds; + Limit = limit; + PageCursor = pageCursor; + } + + /// + /// IDs of the encoders that you want to retrieve. + /// + [DataMember(Name = "acs_encoder_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEncoderIds { get; set; } + + /// + /// ID of the access system for which you want to retrieve all encoders. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// IDs of the access systems for which you want to retrieve all encoders. + /// + [DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsSystemIds { get; set; } + + /// + /// Number of encoders to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List acsEncoders = default) + { + AcsEncoders = acsEncoders; + } + + /// + /// OK + /// + [DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] + public List AcsEncoders { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/encoders/list", requestOptions) + .EnsureData("/acs/encoders/list") + .AcsEncoders; + } + + /// + /// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public List List( + List? acsEncoderIds = default, + string? acsSystemId = default, + List? acsSystemIds = default, + float? limit = default, + string? pageCursor = default + ) + { + return List( + new ListRequest( + acsEncoderIds: acsEncoderIds, + acsSystemId: acsSystemId, + acsSystemIds: acsSystemIds, + limit: limit, + pageCursor: pageCursor + ) + ); + } + + /// + /// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/encoders/list", requestOptions)) + .EnsureData("/acs/encoders/list") + .AcsEncoders; + } + + /// + /// Returns a list of all [encoders](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public async Task> ListAsync( + List? acsEncoderIds = default, + string? acsSystemId = default, + List? acsSystemIds = default, + float? limit = default, + string? pageCursor = default + ) + { + return ( + await ListAsync( + new ListRequest( + acsEncoderIds: acsEncoderIds, + acsSystemId: acsSystemId, + acsSystemIds: acsSystemIds, + limit: limit, + pageCursor: pageCursor + ) + ) + ); + } + + /// + /// Request parameters for Scan a Credential. + /// + [DataContract(Name = "scanCredentialRequest_request")] + public class ScanCredentialRequest + { + [JsonConstructorAttribute] + protected ScanCredentialRequest() { } + + public ScanCredentialRequest( + string acsEncoderId = default, + ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default + ) + { + AcsEncoderId = acsEncoderId; + SaltoKsMetadata = saltoKsMetadata; + } + + /// + /// ID of the encoder to use for the scan. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + /// + /// Salto KS-specific metadata for the scan action. + /// + [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] + public ScanCredentialRequestSaltoKsMetadata? SaltoKsMetadata { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "scanCredentialRequestSaltoKsMetadata_model")] + public class ScanCredentialRequestSaltoKsMetadata + { + [JsonConstructorAttribute] + protected ScanCredentialRequestSaltoKsMetadata() { } + + public ScanCredentialRequestSaltoKsMetadata(bool? detectNewTags = default) + { + DetectNewTags = detectNewTags; + } + + /// + /// When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. + /// + [DataMember(Name = "detect_new_tags", IsRequired = false, EmitDefaultValue = false)] + public bool? DetectNewTags { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "scanCredentialResponse_response")] + public class ScanCredentialResponse + { + [JsonConstructorAttribute] + protected ScanCredentialResponse() { } + + public ScanCredentialResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public ActionAttempt ScanCredential(ScanCredentialRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/acs/encoders/scan_credential", requestOptions) + .EnsureData("/acs/encoders/scan_credential") + .ActionAttempt; + } + + /// + /// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public ActionAttempt ScanCredential( + string acsEncoderId = default, + ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default + ) + { + return ScanCredential( + new ScanCredentialRequest( + acsEncoderId: acsEncoderId, + saltoKsMetadata: saltoKsMetadata + ) + ); + } + + /// + /// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public async Task ScanCredentialAsync(ScanCredentialRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/acs/encoders/scan_credential", + requestOptions + ) + ) + .EnsureData("/acs/encoders/scan_credential") + .ActionAttempt; + } + + /// + /// Scans an encoded [acs_credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + public async Task ScanCredentialAsync( + string acsEncoderId = default, + ScanCredentialRequestSaltoKsMetadata? saltoKsMetadata = default + ) + { + return ( + await ScanCredentialAsync( + new ScanCredentialRequest( + acsEncoderId: acsEncoderId, + saltoKsMetadata: saltoKsMetadata + ) + ) + ); + } + + /// + /// Request parameters for Scan to Assign a Credential. + /// + [DataContract(Name = "scanToAssignCredentialRequest_request")] + public class ScanToAssignCredentialRequest + { + [JsonConstructorAttribute] + protected ScanToAssignCredentialRequest() { } + + public ScanToAssignCredentialRequest( + string acsEncoderId = default, + string? acsUserId = default, + ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, + string? userIdentityId = default + ) + { + AcsEncoderId = acsEncoderId; + AcsUserId = acsUserId; + SaltoKsMetadata = saltoKsMetadata; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the `acs_encoder` to use to scan the credential. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + /// + /// ID of the `acs_user` to assign the scanned credential to. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// Salto KS-specific metadata for the scan action. + /// + [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] + public ScanToAssignCredentialRequestSaltoKsMetadata? SaltoKsMetadata { get; set; } + + /// + /// ID of the `user_identity` to assign the scanned credential to. If the ACS system contains an ACS user linked to this user identity, it is used. Otherwise, one is created. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "scanToAssignCredentialRequestSaltoKsMetadata_model")] + public class ScanToAssignCredentialRequestSaltoKsMetadata + { + [JsonConstructorAttribute] + protected ScanToAssignCredentialRequestSaltoKsMetadata() { } + + public ScanToAssignCredentialRequestSaltoKsMetadata(bool? detectNewTags = default) + { + DetectNewTags = detectNewTags; + } + + /// + /// When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. + /// + [DataMember(Name = "detect_new_tags", IsRequired = false, EmitDefaultValue = false)] + public bool? DetectNewTags { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "scanToAssignCredentialResponse_response")] + public class ScanToAssignCredentialResponse + { + [JsonConstructorAttribute] + protected ScanToAssignCredentialResponse() { } + + public ScanToAssignCredentialResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. + /// + public ActionAttempt ScanToAssignCredential(ScanToAssignCredentialRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/acs/encoders/scan_to_assign_credential", + requestOptions + ) + .EnsureData("/acs/encoders/scan_to_assign_credential") + .ActionAttempt; + } + + /// + /// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. + /// + public ActionAttempt ScanToAssignCredential( + string acsEncoderId = default, + string? acsUserId = default, + ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, + string? userIdentityId = default + ) + { + return ScanToAssignCredential( + new ScanToAssignCredentialRequest( + acsEncoderId: acsEncoderId, + acsUserId: acsUserId, + saltoKsMetadata: saltoKsMetadata, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. + /// + public async Task ScanToAssignCredentialAsync( + ScanToAssignCredentialRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/acs/encoders/scan_to_assign_credential", + requestOptions + ) + ) + .EnsureData("/acs/encoders/scan_to_assign_credential") + .ActionAttempt; + } + + /// + /// Scans a physical card placed on the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. + /// + public async Task ScanToAssignCredentialAsync( + string acsEncoderId = default, + string? acsUserId = default, + ScanToAssignCredentialRequestSaltoKsMetadata? saltoKsMetadata = default, + string? userIdentityId = default + ) + { + return ( + await ScanToAssignCredentialAsync( + new ScanToAssignCredentialRequest( + acsEncoderId: acsEncoderId, + acsUserId: acsUserId, + saltoKsMetadata: saltoKsMetadata, + userIdentityId: userIdentityId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.EncodersAcs EncodersAcs => new(this); -} + public partial class SeamClient + { + public Api.EncodersAcs EncodersAcs => new(this); + } -public partial interface ISeamClient -{ -public Api.EncodersAcs EncodersAcs { get; } -} + public partial interface ISeamClient + { + public Api.EncodersAcs EncodersAcs { get; } + } } diff --git a/src/Seam/Api/EntrancesAcs.cs b/src/Seam/Api/EntrancesAcs.cs index 9bf9f409..cbcbb151 100644 --- a/src/Seam/Api/EntrancesAcs.cs +++ b/src/Seam/Api/EntrancesAcs.cs @@ -9,663 +9,825 @@ namespace Seam.Api { -public class EntrancesAcs -{ -private ISeamClient _seam; - -public EntrancesAcs(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get an Entrance. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string acsEntranceId = default) -{ -AcsEntranceId = acsEntranceId; -} - -/// -/// ID of the entrance that you want to get. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AcsEntrance acsEntrance = default) -{ -AcsEntrance = acsEntrance; -} - -/// -/// OK -/// -[DataMember(Name = "acs_entrance", IsRequired = false, EmitDefaultValue = false)] -public AcsEntrance AcsEntrance { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public AcsEntrance Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/entrances/get", requestOptions).EnsureData("/acs/entrances/get").AcsEntrance; -} - -/// -/// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public AcsEntrance Get(string acsEntranceId = default) -{ -return Get(new GetRequest(acsEntranceId: acsEntranceId)); -} - -/// -/// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/entrances/get", requestOptions)).EnsureData("/acs/entrances/get").AcsEntrance; -} - -/// -/// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public async Task GetAsync(string acsEntranceId = default) -{ -return (await GetAsync(new GetRequest(acsEntranceId: acsEntranceId))); -} - -/// -/// Request parameters for Grant an ACS User Access to an Entrance. -/// -[DataContract(Name = "grantAccessRequest_request")] -public class GrantAccessRequest -{ -[JsonConstructorAttribute] -protected GrantAccessRequest() { } - -public GrantAccessRequest(string acsEntranceId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsEntranceId = acsEntranceId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the entrance to which you want to grant an access system user access. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -/// -/// ID of the access system user to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public void GrantAccess(GrantAccessRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/entrances/grant_access", requestOptions); -} - -/// -/// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public void GrantAccess(string acsEntranceId = default, string? acsUserId = default, string? userIdentityId = default) -{ -GrantAccess(new GrantAccessRequest(acsEntranceId: acsEntranceId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public async Task GrantAccessAsync(GrantAccessRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/entrances/grant_access", requestOptions); -} - -/// -/// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public async Task GrantAccessAsync(string acsEntranceId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await GrantAccessAsync(new GrantAccessRequest(acsEntranceId: acsEntranceId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for List Entrances. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, string? connectedAccountId = default, string? customerKey = default, int? limit = default, string? locationId = default, string? pageCursor = default, string? search = default, string? spaceId = default) -{ -AccessMethodId = accessMethodId; -AcsCredentialId = acsCredentialId; -AcsEntranceIds = acsEntranceIds; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CustomerKey = customerKey; -Limit = limit; -LocationId = locationId; -PageCursor = pageCursor; -Search = search; -SpaceId = spaceId; -} - -/// -/// ID of the access method for which you want to retrieve all entrances to which it grants access. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessMethodId { get; set; } - -/// -/// ID of the credential for which you want to retrieve all entrances. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialId { get; set; } - -/// -/// IDs of the entrances for which you want to retrieve all entrances. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsEntranceIds { get; set; } - -/// -/// ID of the access system for which you want to retrieve all entrances. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the connected account for which you want to retrieve all entrances. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Customer key for which you want to list entrances. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public int? Limit { get; set; } - -[Obsolete("Use `space_id`.")] -[DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] -public string? LocationId { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned entrances to include all records that satisfy a partial match using `display_name`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// ID of the space for which you want to list entrances. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List acsEntrances = default) -{ -AcsEntrances = acsEntrances; -} - -/// -/// OK -/// -[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public List AcsEntrances { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/entrances/list", requestOptions).EnsureData("/acs/entrances/list").AcsEntrances; -} - -/// -/// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public List List(string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, string? connectedAccountId = default, string? customerKey = default, int? limit = default, string? locationId = default, string? pageCursor = default, string? search = default, string? spaceId = default) -{ -return List(new ListRequest(accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEntranceIds: acsEntranceIds, acsSystemId: acsSystemId, connectedAccountId: connectedAccountId, customerKey: customerKey, limit: limit, locationId: locationId, pageCursor: pageCursor, search: search, spaceId: spaceId)); -} - -/// -/// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/entrances/list", requestOptions)).EnsureData("/acs/entrances/list").AcsEntrances; -} - -/// -/// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public async Task> ListAsync(string? accessMethodId = default, string? acsCredentialId = default, List? acsEntranceIds = default, string? acsSystemId = default, string? connectedAccountId = default, string? customerKey = default, int? limit = default, string? locationId = default, string? pageCursor = default, string? search = default, string? spaceId = default) -{ -return (await ListAsync(new ListRequest(accessMethodId: accessMethodId, acsCredentialId: acsCredentialId, acsEntranceIds: acsEntranceIds, acsSystemId: acsSystemId, connectedAccountId: connectedAccountId, customerKey: customerKey, limit: limit, locationId: locationId, pageCursor: pageCursor, search: search, spaceId: spaceId))); -} - -/// -/// Request parameters for List Credentials with Access to an Entrance. -/// -[DataContract(Name = "listCredentialsWithAccessRequest_request")] -public class ListCredentialsWithAccessRequest -{ -[JsonConstructorAttribute] -protected ListCredentialsWithAccessRequest() { } - -public ListCredentialsWithAccessRequest(string acsEntranceId = default, List? includeIf = default) -{ -AcsEntranceId = acsEntranceId; -IncludeIf = includeIf; -} - -/// -/// Conditions that credentials must meet to be included in the returned list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum IncludeIfEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "visionline_metadata.is_valid")] -VisionlineMetadataIsValid = 1, -} - -/// -/// ID of the entrance for which you want to list all credentials that grant access. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -/// -/// Conditions that credentials must meet to be included in the returned list. -/// -[DataMember(Name = "include_if", IsRequired = false, EmitDefaultValue = false)] -public List? IncludeIf { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listCredentialsWithAccessResponse_response")] -public class ListCredentialsWithAccessResponse -{ -[JsonConstructorAttribute] -protected ListCredentialsWithAccessResponse() { } - -public ListCredentialsWithAccessResponse(List acsCredentials = default) -{ -AcsCredentials = acsCredentials; -} - -/// -/// OK -/// -[DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] -public List AcsCredentials { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public List ListCredentialsWithAccess(ListCredentialsWithAccessRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/entrances/list_credentials_with_access", requestOptions).EnsureData("/acs/entrances/list_credentials_with_access").AcsCredentials; -} - -/// -/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public List ListCredentialsWithAccess(string acsEntranceId = default, List? includeIf = default) -{ -return ListCredentialsWithAccess(new ListCredentialsWithAccessRequest(acsEntranceId: acsEntranceId, includeIf: includeIf)); -} - -/// -/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public async Task> ListCredentialsWithAccessAsync(ListCredentialsWithAccessRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/entrances/list_credentials_with_access", requestOptions)).EnsureData("/acs/entrances/list_credentials_with_access").AcsCredentials; -} - -/// -/// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -public async Task> ListCredentialsWithAccessAsync(string acsEntranceId = default, List? includeIf = default) -{ -return (await ListCredentialsWithAccessAsync(new ListCredentialsWithAccessRequest(acsEntranceId: acsEntranceId, includeIf: includeIf))); -} - -/// -/// Request parameters for Unlock an Entrance. -/// -[DataContract(Name = "unlockRequest_request")] -public class UnlockRequest -{ -[JsonConstructorAttribute] -protected UnlockRequest() { } - -public UnlockRequest(string acsCredentialId = default, string acsEntranceId = default) -{ -AcsCredentialId = acsCredentialId; -AcsEntranceId = acsEntranceId; -} - -/// -/// ID of the cloud_key credential to use for the unlock operation. -/// -[DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the entrance to unlock. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "unlockResponse_response")] -public class UnlockResponse -{ -[JsonConstructorAttribute] -protected UnlockResponse() { } - -public UnlockResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. -/// -public ActionAttempt Unlock(UnlockRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/acs/entrances/unlock", requestOptions).EnsureData("/acs/entrances/unlock").ActionAttempt; -} - -/// -/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. -/// -public ActionAttempt Unlock(string acsCredentialId = default, string acsEntranceId = default) -{ -return Unlock(new UnlockRequest(acsCredentialId: acsCredentialId, acsEntranceId: acsEntranceId)); -} - -/// -/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. -/// -public async Task UnlockAsync(UnlockRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/acs/entrances/unlock", requestOptions)).EnsureData("/acs/entrances/unlock").ActionAttempt; -} - -/// -/// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. -/// -public async Task UnlockAsync(string acsCredentialId = default, string acsEntranceId = default) -{ -return (await UnlockAsync(new UnlockRequest(acsCredentialId: acsCredentialId, acsEntranceId: acsEntranceId))); -} -} + public class EntrancesAcs + { + private ISeamClient _seam; + + public EntrancesAcs(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get an Entrance. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string acsEntranceId = default) + { + AcsEntranceId = acsEntranceId; + } + + /// + /// ID of the entrance that you want to get. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AcsEntrance acsEntrance = default) + { + AcsEntrance = acsEntrance; + } + + /// + /// OK + /// + [DataMember(Name = "acs_entrance", IsRequired = false, EmitDefaultValue = false)] + public AcsEntrance AcsEntrance { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public AcsEntrance Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/entrances/get", requestOptions) + .EnsureData("/acs/entrances/get") + .AcsEntrance; + } + + /// + /// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public AcsEntrance Get(string acsEntranceId = default) + { + return Get(new GetRequest(acsEntranceId: acsEntranceId)); + } + + /// + /// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/entrances/get", requestOptions)) + .EnsureData("/acs/entrances/get") + .AcsEntrance; + } + + /// + /// Returns a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public async Task GetAsync(string acsEntranceId = default) + { + return (await GetAsync(new GetRequest(acsEntranceId: acsEntranceId))); + } + + /// + /// Request parameters for Grant an ACS User Access to an Entrance. + /// + [DataContract(Name = "grantAccessRequest_request")] + public class GrantAccessRequest + { + [JsonConstructorAttribute] + protected GrantAccessRequest() { } + + public GrantAccessRequest( + string acsEntranceId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsEntranceId = acsEntranceId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the entrance to which you want to grant an access system user access. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + /// + /// ID of the access system user to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public void GrantAccess(GrantAccessRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/acs/entrances/grant_access", requestOptions); + } + + /// + /// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public void GrantAccess( + string acsEntranceId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + GrantAccess( + new GrantAccessRequest( + acsEntranceId: acsEntranceId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public async Task GrantAccessAsync(GrantAccessRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/acs/entrances/grant_access", requestOptions); + } + + /// + /// Grants a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public async Task GrantAccessAsync( + string acsEntranceId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await GrantAccessAsync( + new GrantAccessRequest( + acsEntranceId: acsEntranceId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for List Entrances. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? accessMethodId = default, + string? acsCredentialId = default, + List? acsEntranceIds = default, + string? acsSystemId = default, + string? connectedAccountId = default, + string? customerKey = default, + int? limit = default, + string? locationId = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default + ) + { + AccessMethodId = accessMethodId; + AcsCredentialId = acsCredentialId; + AcsEntranceIds = acsEntranceIds; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CustomerKey = customerKey; + Limit = limit; + LocationId = locationId; + PageCursor = pageCursor; + Search = search; + SpaceId = spaceId; + } + + /// + /// ID of the access method for which you want to retrieve all entrances to which it grants access. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessMethodId { get; set; } + + /// + /// ID of the credential for which you want to retrieve all entrances. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialId { get; set; } + + /// + /// IDs of the entrances for which you want to retrieve all entrances. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEntranceIds { get; set; } + + /// + /// ID of the access system for which you want to retrieve all entrances. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the connected account for which you want to retrieve all entrances. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Customer key for which you want to list entrances. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public int? Limit { get; set; } + + [Obsolete("Use `space_id`.")] + [DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] + public string? LocationId { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned entrances to include all records that satisfy a partial match using `display_name`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// ID of the space for which you want to list entrances. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List acsEntrances = default) + { + AcsEntrances = acsEntrances; + } + + /// + /// OK + /// + [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] + public List AcsEntrances { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/entrances/list", requestOptions) + .EnsureData("/acs/entrances/list") + .AcsEntrances; + } + + /// + /// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public List List( + string? accessMethodId = default, + string? acsCredentialId = default, + List? acsEntranceIds = default, + string? acsSystemId = default, + string? connectedAccountId = default, + string? customerKey = default, + int? limit = default, + string? locationId = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default + ) + { + return List( + new ListRequest( + accessMethodId: accessMethodId, + acsCredentialId: acsCredentialId, + acsEntranceIds: acsEntranceIds, + acsSystemId: acsSystemId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + limit: limit, + locationId: locationId, + pageCursor: pageCursor, + search: search, + spaceId: spaceId + ) + ); + } + + /// + /// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/entrances/list", requestOptions)) + .EnsureData("/acs/entrances/list") + .AcsEntrances; + } + + /// + /// Returns a list of all [access system entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public async Task> ListAsync( + string? accessMethodId = default, + string? acsCredentialId = default, + List? acsEntranceIds = default, + string? acsSystemId = default, + string? connectedAccountId = default, + string? customerKey = default, + int? limit = default, + string? locationId = default, + string? pageCursor = default, + string? search = default, + string? spaceId = default + ) + { + return ( + await ListAsync( + new ListRequest( + accessMethodId: accessMethodId, + acsCredentialId: acsCredentialId, + acsEntranceIds: acsEntranceIds, + acsSystemId: acsSystemId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + limit: limit, + locationId: locationId, + pageCursor: pageCursor, + search: search, + spaceId: spaceId + ) + ) + ); + } + + /// + /// Request parameters for List Credentials with Access to an Entrance. + /// + [DataContract(Name = "listCredentialsWithAccessRequest_request")] + public class ListCredentialsWithAccessRequest + { + [JsonConstructorAttribute] + protected ListCredentialsWithAccessRequest() { } + + public ListCredentialsWithAccessRequest( + string acsEntranceId = default, + List? includeIf = default + ) + { + AcsEntranceId = acsEntranceId; + IncludeIf = includeIf; + } + + /// + /// Conditions that credentials must meet to be included in the returned list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum IncludeIfEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "visionline_metadata.is_valid")] + VisionlineMetadataIsValid = 1, + } + + /// + /// ID of the entrance for which you want to list all credentials that grant access. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + /// + /// Conditions that credentials must meet to be included in the returned list. + /// + [DataMember(Name = "include_if", IsRequired = false, EmitDefaultValue = false)] + public List? IncludeIf { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listCredentialsWithAccessResponse_response")] + public class ListCredentialsWithAccessResponse + { + [JsonConstructorAttribute] + protected ListCredentialsWithAccessResponse() { } + + public ListCredentialsWithAccessResponse(List acsCredentials = default) + { + AcsCredentials = acsCredentials; + } + + /// + /// OK + /// + [DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] + public List AcsCredentials { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public List ListCredentialsWithAccess( + ListCredentialsWithAccessRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get( + "/acs/entrances/list_credentials_with_access", + requestOptions + ) + .EnsureData("/acs/entrances/list_credentials_with_access") + .AcsCredentials; + } + + /// + /// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public List ListCredentialsWithAccess( + string acsEntranceId = default, + List? includeIf = default + ) + { + return ListCredentialsWithAccess( + new ListCredentialsWithAccessRequest( + acsEntranceId: acsEntranceId, + includeIf: includeIf + ) + ); + } + + /// + /// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public async Task> ListCredentialsWithAccessAsync( + ListCredentialsWithAccessRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/acs/entrances/list_credentials_with_access", + requestOptions + ) + ) + .EnsureData("/acs/entrances/list_credentials_with_access") + .AcsCredentials; + } + + /// + /// Returns a list of all [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + public async Task> ListCredentialsWithAccessAsync( + string acsEntranceId = default, + List? includeIf = default + ) + { + return ( + await ListCredentialsWithAccessAsync( + new ListCredentialsWithAccessRequest( + acsEntranceId: acsEntranceId, + includeIf: includeIf + ) + ) + ); + } + + /// + /// Request parameters for Unlock an Entrance. + /// + [DataContract(Name = "unlockRequest_request")] + public class UnlockRequest + { + [JsonConstructorAttribute] + protected UnlockRequest() { } + + public UnlockRequest(string acsCredentialId = default, string acsEntranceId = default) + { + AcsCredentialId = acsCredentialId; + AcsEntranceId = acsEntranceId; + } + + /// + /// ID of the cloud_key credential to use for the unlock operation. + /// + [DataMember(Name = "acs_credential_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the entrance to unlock. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "unlockResponse_response")] + public class UnlockResponse + { + [JsonConstructorAttribute] + protected UnlockResponse() { } + + public UnlockResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. + /// + public ActionAttempt Unlock(UnlockRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/acs/entrances/unlock", requestOptions) + .EnsureData("/acs/entrances/unlock") + .ActionAttempt; + } + + /// + /// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. + /// + public ActionAttempt Unlock( + string acsCredentialId = default, + string acsEntranceId = default + ) + { + return Unlock( + new UnlockRequest(acsCredentialId: acsCredentialId, acsEntranceId: acsEntranceId) + ); + } + + /// + /// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. + /// + public async Task UnlockAsync(UnlockRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/acs/entrances/unlock", requestOptions)) + .EnsureData("/acs/entrances/unlock") + .ActionAttempt; + } + + /// + /// Remotely unlocks a specified [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. + /// + public async Task UnlockAsync( + string acsCredentialId = default, + string acsEntranceId = default + ) + { + return ( + await UnlockAsync( + new UnlockRequest( + acsCredentialId: acsCredentialId, + acsEntranceId: acsEntranceId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.EntrancesAcs EntrancesAcs => new(this); -} + public partial class SeamClient + { + public Api.EntrancesAcs EntrancesAcs => new(this); + } -public partial interface ISeamClient -{ -public Api.EntrancesAcs EntrancesAcs { get; } -} + public partial interface ISeamClient + { + public Api.EntrancesAcs EntrancesAcs { get; } + } } diff --git a/src/Seam/Api/Events.cs b/src/Seam/Api/Events.cs index 96be59e7..7ee4360e 100644 --- a/src/Seam/Api/Events.cs +++ b/src/Seam/Api/Events.cs @@ -9,1159 +9,1340 @@ namespace Seam.Api { -public class Events -{ -private ISeamClient _seam; - -public Events(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get an Event. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? deviceId = default, string? eventId = default, string? eventType = default) -{ -DeviceId = deviceId; -EventId = eventId; -EventType = eventType; -} - -/// -/// Unique identifier for the device that triggered the event that you want to get. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Unique identifier for the event that you want to get. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public string? EventId { get; set; } - -/// -/// Type of the event that you want to get. -/// -[DataMember(Name = "event_type", IsRequired = false, EmitDefaultValue = false)] -public string? EventType { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(Event event_ = default) -{ -Event = event_; -} - -/// -/// OK -/// -[DataMember(Name = "event", IsRequired = false, EmitDefaultValue = false)] -public Event Event { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + public class Events + { + private ISeamClient _seam; + + public Events(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get an Event. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest( + string? deviceId = default, + string? eventId = default, + string? eventType = default + ) + { + DeviceId = deviceId; + EventId = eventId; + EventType = eventType; + } + + /// + /// Unique identifier for the device that triggered the event that you want to get. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Unique identifier for the event that you want to get. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public string? EventId { get; set; } + + /// + /// Type of the event that you want to get. + /// + [DataMember(Name = "event_type", IsRequired = false, EmitDefaultValue = false)] + public string? EventType { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Event event_ = default) + { + Event = event_; + } + + /// + /// OK + /// + [DataMember(Name = "event", IsRequired = false, EmitDefaultValue = false)] + public Event Event { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. + /// + public Event Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/events/get", requestOptions) + .EnsureData("/events/get") + .Event; + } + + /// + /// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. + /// + public Event Get( + string? deviceId = default, + string? eventId = default, + string? eventType = default + ) + { + return Get(new GetRequest(deviceId: deviceId, eventId: eventId, eventType: eventType)); + } + + /// + /// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/events/get", requestOptions)) + .EnsureData("/events/get") + .Event; + } + + /// + /// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. + /// + public async Task GetAsync( + string? deviceId = default, + string? eventId = default, + string? eventType = default + ) + { + return ( + await GetAsync( + new GetRequest(deviceId: deviceId, eventId: eventId, eventType: eventType) + ) + ); + } + + /// + /// Request parameters for List Events. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? accessCodeId = default, + List? accessCodeIds = default, + string? accessGrantId = default, + List? accessGrantIds = default, + string? accessMethodId = default, + List? accessMethodIds = default, + string? acsAccessGroupId = default, + string? acsCredentialId = default, + string? acsEncoderId = default, + string? acsEntranceId = default, + string? acsSystemId = default, + List? acsSystemIds = default, + string? acsUserId = default, + List? between = default, + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + string? deviceId = default, + List? deviceIds = default, + List? eventIds = default, + ListRequest.EventTypeEnum? eventType = default, + List? eventTypes = default, + float? limit = default, + string? since = default, + string? spaceId = default, + List? spaceIds = default, + float? unstableOffset = default, + string? userIdentityId = default + ) + { + AccessCodeId = accessCodeId; + AccessCodeIds = accessCodeIds; + AccessGrantId = accessGrantId; + AccessGrantIds = accessGrantIds; + AccessMethodId = accessMethodId; + AccessMethodIds = accessMethodIds; + AcsAccessGroupId = acsAccessGroupId; + AcsCredentialId = acsCredentialId; + AcsEncoderId = acsEncoderId; + AcsEntranceId = acsEntranceId; + AcsSystemId = acsSystemId; + AcsSystemIds = acsSystemIds; + AcsUserId = acsUserId; + Between = between; + ConnectWebviewId = connectWebviewId; + ConnectedAccountId = connectedAccountId; + CustomerKey = customerKey; + DeviceId = deviceId; + DeviceIds = deviceIds; + EventIds = eventIds; + EventType = eventType; + EventTypes = eventTypes; + Limit = limit; + Since = since; + SpaceId = spaceId; + SpaceIds = spaceIds; + UnstableOffset = unstableOffset; + UserIdentityId = userIdentityId; + } + + /// + /// Type of the events that you want to list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum EventTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "access_code.created")] + AccessCodeCreated = 1, + + [EnumMember(Value = "access_code.changed")] + AccessCodeChanged = 2, + + [EnumMember(Value = "access_code.name_changed")] + AccessCodeNameChanged = 3, + + [EnumMember(Value = "access_code.code_changed")] + AccessCodeCodeChanged = 4, + + [EnumMember(Value = "access_code.time_frame_changed")] + AccessCodeTimeFrameChanged = 5, + + [EnumMember(Value = "access_code.mutations_requested")] + AccessCodeMutationsRequested = 6, + + [EnumMember(Value = "access_code.scheduled_on_device")] + AccessCodeScheduledOnDevice = 7, + + [EnumMember(Value = "access_code.set_on_device")] + AccessCodeSetOnDevice = 8, + + [EnumMember(Value = "access_code.removed_from_device")] + AccessCodeRemovedFromDevice = 9, + + [EnumMember(Value = "access_code.delay_in_setting_on_device")] + AccessCodeDelayInSettingOnDevice = 10, + + [EnumMember(Value = "access_code.failed_to_set_on_device")] + AccessCodeFailedToSetOnDevice = 11, + + [EnumMember(Value = "access_code.issued")] + AccessCodeIssued = 12, + + [EnumMember(Value = "access_code.delay_in_issuing")] + AccessCodeDelayInIssuing = 13, + + [EnumMember(Value = "access_code.failed_to_issue")] + AccessCodeFailedToIssue = 14, + + [EnumMember(Value = "access_code.failed_to_update")] + AccessCodeFailedToUpdate = 15, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "access_code.failed_to_delete")] + AccessCodeFailedToDelete = 16, -/// -/// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. -/// -public Event Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/events/get", requestOptions).EnsureData("/events/get").Event; -} + [EnumMember(Value = "access_code.deleted")] + AccessCodeDeleted = 17, -/// -/// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. -/// -public Event Get(string? deviceId = default, string? eventId = default, string? eventType = default) -{ -return Get(new GetRequest(deviceId: deviceId, eventId: eventId, eventType: eventType)); -} + [EnumMember(Value = "access_code.delay_in_removing_from_device")] + AccessCodeDelayInRemovingFromDevice = 18, -/// -/// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/events/get", requestOptions)).EnsureData("/events/get").Event; -} + [EnumMember(Value = "access_code.failed_to_remove_from_device")] + AccessCodeFailedToRemoveFromDevice = 19, -/// -/// Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. -/// -public async Task GetAsync(string? deviceId = default, string? eventId = default, string? eventType = default) -{ -return (await GetAsync(new GetRequest(deviceId: deviceId, eventId: eventId, eventType: eventType))); -} + [EnumMember(Value = "access_code.modified_external_to_seam")] + AccessCodeModifiedExternalToSeam = 20, -/// -/// Request parameters for List Events. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } + [EnumMember(Value = "access_code.deleted_external_to_seam")] + AccessCodeDeletedExternalToSeam = 21, -public ListRequest(string? accessCodeId = default, List? accessCodeIds = default, string? accessGrantId = default, List? accessGrantIds = default, string? accessMethodId = default, List? accessMethodIds = default, string? acsAccessGroupId = default, string? acsCredentialId = default, string? acsEncoderId = default, string? acsEntranceId = default, string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, string? deviceId = default, List? deviceIds = default, List? eventIds = default, ListRequest.EventTypeEnum? eventType = default, List? eventTypes = default, float? limit = default, string? since = default, string? spaceId = default, List? spaceIds = default, float? unstableOffset = default, string? userIdentityId = default) -{ -AccessCodeId = accessCodeId; -AccessCodeIds = accessCodeIds; -AccessGrantId = accessGrantId; -AccessGrantIds = accessGrantIds; -AccessMethodId = accessMethodId; -AccessMethodIds = accessMethodIds; -AcsAccessGroupId = acsAccessGroupId; -AcsCredentialId = acsCredentialId; -AcsEncoderId = acsEncoderId; -AcsEntranceId = acsEntranceId; -AcsSystemId = acsSystemId; -AcsSystemIds = acsSystemIds; -AcsUserId = acsUserId; -Between = between; -ConnectWebviewId = connectWebviewId; -ConnectedAccountId = connectedAccountId; -CustomerKey = customerKey; -DeviceId = deviceId; -DeviceIds = deviceIds; -EventIds = eventIds; -EventType = eventType; -EventTypes = eventTypes; -Limit = limit; -Since = since; -SpaceId = spaceId; -SpaceIds = spaceIds; -UnstableOffset = unstableOffset; -UserIdentityId = userIdentityId; -} + [EnumMember(Value = "access_code.backup_access_code_pulled")] + AccessCodeBackupAccessCodePulled = 22, -/// -/// Type of the events that you want to list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum EventTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "access_code.created")] -AccessCodeCreated = 1, - -[EnumMember(Value = "access_code.changed")] -AccessCodeChanged = 2, - -[EnumMember(Value = "access_code.name_changed")] -AccessCodeNameChanged = 3, - -[EnumMember(Value = "access_code.code_changed")] -AccessCodeCodeChanged = 4, - -[EnumMember(Value = "access_code.time_frame_changed")] -AccessCodeTimeFrameChanged = 5, - -[EnumMember(Value = "access_code.mutations_requested")] -AccessCodeMutationsRequested = 6, + [EnumMember(Value = "access_code.unmanaged.converted_to_managed")] + AccessCodeUnmanagedConvertedToManaged = 23, -[EnumMember(Value = "access_code.scheduled_on_device")] -AccessCodeScheduledOnDevice = 7, + [EnumMember(Value = "access_code.unmanaged.failed_to_convert_to_managed")] + AccessCodeUnmanagedFailedToConvertToManaged = 24, -[EnumMember(Value = "access_code.set_on_device")] -AccessCodeSetOnDevice = 8, + [EnumMember(Value = "access_code.unmanaged.created")] + AccessCodeUnmanagedCreated = 25, -[EnumMember(Value = "access_code.removed_from_device")] -AccessCodeRemovedFromDevice = 9, + [EnumMember(Value = "access_code.unmanaged.removed")] + AccessCodeUnmanagedRemoved = 26, -[EnumMember(Value = "access_code.delay_in_setting_on_device")] -AccessCodeDelayInSettingOnDevice = 10, + [EnumMember(Value = "access_grant.created")] + AccessGrantCreated = 27, -[EnumMember(Value = "access_code.failed_to_set_on_device")] -AccessCodeFailedToSetOnDevice = 11, + [EnumMember(Value = "access_grant.deleted")] + AccessGrantDeleted = 28, -[EnumMember(Value = "access_code.issued")] -AccessCodeIssued = 12, + [EnumMember(Value = "access_grant.access_granted_to_all_doors")] + AccessGrantAccessGrantedToAllDoors = 29, -[EnumMember(Value = "access_code.delay_in_issuing")] -AccessCodeDelayInIssuing = 13, + [EnumMember(Value = "access_grant.access_granted_to_door")] + AccessGrantAccessGrantedToDoor = 30, -[EnumMember(Value = "access_code.failed_to_issue")] -AccessCodeFailedToIssue = 14, + [EnumMember(Value = "access_grant.access_to_door_lost")] + AccessGrantAccessToDoorLost = 31, -[EnumMember(Value = "access_code.failed_to_update")] -AccessCodeFailedToUpdate = 15, + [EnumMember(Value = "access_grant.access_times_changed")] + AccessGrantAccessTimesChanged = 32, -[EnumMember(Value = "access_code.failed_to_delete")] -AccessCodeFailedToDelete = 16, + [EnumMember(Value = "access_grant.could_not_create_requested_access_methods")] + AccessGrantCouldNotCreateRequestedAccessMethods = 33, -[EnumMember(Value = "access_code.deleted")] -AccessCodeDeleted = 17, + [EnumMember(Value = "access_method.issued")] + AccessMethodIssued = 34, -[EnumMember(Value = "access_code.delay_in_removing_from_device")] -AccessCodeDelayInRemovingFromDevice = 18, + [EnumMember(Value = "access_method.revoked")] + AccessMethodRevoked = 35, -[EnumMember(Value = "access_code.failed_to_remove_from_device")] -AccessCodeFailedToRemoveFromDevice = 19, + [EnumMember(Value = "access_method.card_encoding_required")] + AccessMethodCardEncodingRequired = 36, -[EnumMember(Value = "access_code.modified_external_to_seam")] -AccessCodeModifiedExternalToSeam = 20, + [EnumMember(Value = "access_method.deleted")] + AccessMethodDeleted = 37, -[EnumMember(Value = "access_code.deleted_external_to_seam")] -AccessCodeDeletedExternalToSeam = 21, + [EnumMember(Value = "access_method.reissued")] + AccessMethodReissued = 38, -[EnumMember(Value = "access_code.backup_access_code_pulled")] -AccessCodeBackupAccessCodePulled = 22, + [EnumMember(Value = "access_method.created")] + AccessMethodCreated = 39, -[EnumMember(Value = "access_code.unmanaged.converted_to_managed")] -AccessCodeUnmanagedConvertedToManaged = 23, + [EnumMember(Value = "access_method.delay_in_issuing")] + AccessMethodDelayInIssuing = 40, -[EnumMember(Value = "access_code.unmanaged.failed_to_convert_to_managed")] -AccessCodeUnmanagedFailedToConvertToManaged = 24, + [EnumMember(Value = "access_method.failed_to_issue")] + AccessMethodFailedToIssue = 41, -[EnumMember(Value = "access_code.unmanaged.created")] -AccessCodeUnmanagedCreated = 25, + [EnumMember(Value = "acs_system.connected")] + AcsSystemConnected = 42, -[EnumMember(Value = "access_code.unmanaged.removed")] -AccessCodeUnmanagedRemoved = 26, + [EnumMember(Value = "acs_system.added")] + AcsSystemAdded = 43, -[EnumMember(Value = "access_grant.created")] -AccessGrantCreated = 27, + [EnumMember(Value = "acs_system.disconnected")] + AcsSystemDisconnected = 44, -[EnumMember(Value = "access_grant.deleted")] -AccessGrantDeleted = 28, + [EnumMember(Value = "acs_credential.deleted")] + AcsCredentialDeleted = 45, -[EnumMember(Value = "access_grant.access_granted_to_all_doors")] -AccessGrantAccessGrantedToAllDoors = 29, + [EnumMember(Value = "acs_credential.issued")] + AcsCredentialIssued = 46, -[EnumMember(Value = "access_grant.access_granted_to_door")] -AccessGrantAccessGrantedToDoor = 30, + [EnumMember(Value = "acs_credential.reissued")] + AcsCredentialReissued = 47, -[EnumMember(Value = "access_grant.access_to_door_lost")] -AccessGrantAccessToDoorLost = 31, + [EnumMember(Value = "acs_credential.invalidated")] + AcsCredentialInvalidated = 48, -[EnumMember(Value = "access_grant.access_times_changed")] -AccessGrantAccessTimesChanged = 32, + [EnumMember(Value = "acs_user.created")] + AcsUserCreated = 49, -[EnumMember(Value = "access_grant.could_not_create_requested_access_methods")] -AccessGrantCouldNotCreateRequestedAccessMethods = 33, + [EnumMember(Value = "acs_user.deleted")] + AcsUserDeleted = 50, -[EnumMember(Value = "access_method.issued")] -AccessMethodIssued = 34, + [EnumMember(Value = "acs_encoder.added")] + AcsEncoderAdded = 51, -[EnumMember(Value = "access_method.revoked")] -AccessMethodRevoked = 35, + [EnumMember(Value = "acs_encoder.removed")] + AcsEncoderRemoved = 52, -[EnumMember(Value = "access_method.card_encoding_required")] -AccessMethodCardEncodingRequired = 36, + [EnumMember(Value = "acs_access_group.deleted")] + AcsAccessGroupDeleted = 53, -[EnumMember(Value = "access_method.deleted")] -AccessMethodDeleted = 37, + [EnumMember(Value = "acs_entrance.added")] + AcsEntranceAdded = 54, -[EnumMember(Value = "access_method.reissued")] -AccessMethodReissued = 38, + [EnumMember(Value = "acs_entrance.removed")] + AcsEntranceRemoved = 55, -[EnumMember(Value = "access_method.created")] -AccessMethodCreated = 39, + [EnumMember(Value = "client_session.deleted")] + ClientSessionDeleted = 56, -[EnumMember(Value = "access_method.delay_in_issuing")] -AccessMethodDelayInIssuing = 40, + [EnumMember(Value = "connected_account.connected")] + ConnectedAccountConnected = 57, -[EnumMember(Value = "access_method.failed_to_issue")] -AccessMethodFailedToIssue = 41, + [EnumMember(Value = "connected_account.created")] + ConnectedAccountCreated = 58, -[EnumMember(Value = "acs_system.connected")] -AcsSystemConnected = 42, + [EnumMember(Value = "connected_account.successful_login")] + ConnectedAccountSuccessfulLogin = 59, -[EnumMember(Value = "acs_system.added")] -AcsSystemAdded = 43, + [EnumMember(Value = "connected_account.disconnected")] + ConnectedAccountDisconnected = 60, -[EnumMember(Value = "acs_system.disconnected")] -AcsSystemDisconnected = 44, + [EnumMember(Value = "connected_account.completed_first_sync")] + ConnectedAccountCompletedFirstSync = 61, -[EnumMember(Value = "acs_credential.deleted")] -AcsCredentialDeleted = 45, + [EnumMember(Value = "connected_account.deleted")] + ConnectedAccountDeleted = 62, -[EnumMember(Value = "acs_credential.issued")] -AcsCredentialIssued = 46, + [EnumMember(Value = "connected_account.completed_first_sync_after_reconnection")] + ConnectedAccountCompletedFirstSyncAfterReconnection = 63, -[EnumMember(Value = "acs_credential.reissued")] -AcsCredentialReissued = 47, + [EnumMember(Value = "connected_account.reauthorization_requested")] + ConnectedAccountReauthorizationRequested = 64, -[EnumMember(Value = "acs_credential.invalidated")] -AcsCredentialInvalidated = 48, + [EnumMember(Value = "action_attempt.lock_door.succeeded")] + ActionAttemptLockDoorSucceeded = 65, -[EnumMember(Value = "acs_user.created")] -AcsUserCreated = 49, + [EnumMember(Value = "action_attempt.lock_door.failed")] + ActionAttemptLockDoorFailed = 66, -[EnumMember(Value = "acs_user.deleted")] -AcsUserDeleted = 50, + [EnumMember(Value = "action_attempt.unlock_door.succeeded")] + ActionAttemptUnlockDoorSucceeded = 67, -[EnumMember(Value = "acs_encoder.added")] -AcsEncoderAdded = 51, + [EnumMember(Value = "action_attempt.unlock_door.failed")] + ActionAttemptUnlockDoorFailed = 68, -[EnumMember(Value = "acs_encoder.removed")] -AcsEncoderRemoved = 52, + [EnumMember(Value = "action_attempt.simulate_keypad_code_entry.succeeded")] + ActionAttemptSimulateKeypadCodeEntrySucceeded = 69, -[EnumMember(Value = "acs_access_group.deleted")] -AcsAccessGroupDeleted = 53, + [EnumMember(Value = "action_attempt.simulate_keypad_code_entry.failed")] + ActionAttemptSimulateKeypadCodeEntryFailed = 70, -[EnumMember(Value = "acs_entrance.added")] -AcsEntranceAdded = 54, + [EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.succeeded")] + ActionAttemptSimulateManualLockViaKeypadSucceeded = 71, -[EnumMember(Value = "acs_entrance.removed")] -AcsEntranceRemoved = 55, + [EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.failed")] + ActionAttemptSimulateManualLockViaKeypadFailed = 72, -[EnumMember(Value = "client_session.deleted")] -ClientSessionDeleted = 56, + [EnumMember(Value = "connect_webview.login_succeeded")] + ConnectWebviewLoginSucceeded = 73, -[EnumMember(Value = "connected_account.connected")] -ConnectedAccountConnected = 57, + [EnumMember(Value = "connect_webview.login_failed")] + ConnectWebviewLoginFailed = 74, -[EnumMember(Value = "connected_account.created")] -ConnectedAccountCreated = 58, + [EnumMember(Value = "device.connected")] + DeviceConnected = 75, -[EnumMember(Value = "connected_account.successful_login")] -ConnectedAccountSuccessfulLogin = 59, + [EnumMember(Value = "device.added")] + DeviceAdded = 76, -[EnumMember(Value = "connected_account.disconnected")] -ConnectedAccountDisconnected = 60, + [EnumMember(Value = "device.converted_to_unmanaged")] + DeviceConvertedToUnmanaged = 77, -[EnumMember(Value = "connected_account.completed_first_sync")] -ConnectedAccountCompletedFirstSync = 61, + [EnumMember(Value = "device.unmanaged.converted_to_managed")] + DeviceUnmanagedConvertedToManaged = 78, -[EnumMember(Value = "connected_account.deleted")] -ConnectedAccountDeleted = 62, + [EnumMember(Value = "device.unmanaged.connected")] + DeviceUnmanagedConnected = 79, -[EnumMember(Value = "connected_account.completed_first_sync_after_reconnection")] -ConnectedAccountCompletedFirstSyncAfterReconnection = 63, + [EnumMember(Value = "device.disconnected")] + DeviceDisconnected = 80, -[EnumMember(Value = "connected_account.reauthorization_requested")] -ConnectedAccountReauthorizationRequested = 64, + [EnumMember(Value = "device.unmanaged.disconnected")] + DeviceUnmanagedDisconnected = 81, -[EnumMember(Value = "action_attempt.lock_door.succeeded")] -ActionAttemptLockDoorSucceeded = 65, + [EnumMember(Value = "device.tampered")] + DeviceTampered = 82, -[EnumMember(Value = "action_attempt.lock_door.failed")] -ActionAttemptLockDoorFailed = 66, + [EnumMember(Value = "device.low_battery")] + DeviceLowBattery = 83, -[EnumMember(Value = "action_attempt.unlock_door.succeeded")] -ActionAttemptUnlockDoorSucceeded = 67, + [EnumMember(Value = "device.battery_status_changed")] + DeviceBatteryStatusChanged = 84, -[EnumMember(Value = "action_attempt.unlock_door.failed")] -ActionAttemptUnlockDoorFailed = 68, + [EnumMember(Value = "device.removed")] + DeviceRemoved = 85, -[EnumMember(Value = "action_attempt.simulate_keypad_code_entry.succeeded")] -ActionAttemptSimulateKeypadCodeEntrySucceeded = 69, + [EnumMember(Value = "device.deleted")] + DeviceDeleted = 86, -[EnumMember(Value = "action_attempt.simulate_keypad_code_entry.failed")] -ActionAttemptSimulateKeypadCodeEntryFailed = 70, + [EnumMember(Value = "device.third_party_integration_detected")] + DeviceThirdPartyIntegrationDetected = 87, -[EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.succeeded")] -ActionAttemptSimulateManualLockViaKeypadSucceeded = 71, + [EnumMember(Value = "device.third_party_integration_no_longer_detected")] + DeviceThirdPartyIntegrationNoLongerDetected = 88, -[EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.failed")] -ActionAttemptSimulateManualLockViaKeypadFailed = 72, + [EnumMember(Value = "device.salto.privacy_mode_activated")] + DeviceSaltoPrivacyModeActivated = 89, -[EnumMember(Value = "connect_webview.login_succeeded")] -ConnectWebviewLoginSucceeded = 73, + [EnumMember(Value = "device.salto.privacy_mode_deactivated")] + DeviceSaltoPrivacyModeDeactivated = 90, -[EnumMember(Value = "connect_webview.login_failed")] -ConnectWebviewLoginFailed = 74, + [EnumMember(Value = "device.connection_became_flaky")] + DeviceConnectionBecameFlaky = 91, -[EnumMember(Value = "device.connected")] -DeviceConnected = 75, + [EnumMember(Value = "device.connection_stabilized")] + DeviceConnectionStabilized = 92, -[EnumMember(Value = "device.added")] -DeviceAdded = 76, + [EnumMember(Value = "device.error.subscription_required")] + DeviceErrorSubscriptionRequired = 93, -[EnumMember(Value = "device.converted_to_unmanaged")] -DeviceConvertedToUnmanaged = 77, + [EnumMember(Value = "device.error.subscription_required.resolved")] + DeviceErrorSubscriptionRequiredResolved = 94, -[EnumMember(Value = "device.unmanaged.converted_to_managed")] -DeviceUnmanagedConvertedToManaged = 78, + [EnumMember(Value = "device.accessory_keypad_connected")] + DeviceAccessoryKeypadConnected = 95, -[EnumMember(Value = "device.unmanaged.connected")] -DeviceUnmanagedConnected = 79, + [EnumMember(Value = "device.accessory_keypad_disconnected")] + DeviceAccessoryKeypadDisconnected = 96, -[EnumMember(Value = "device.disconnected")] -DeviceDisconnected = 80, + [EnumMember(Value = "noise_sensor.noise_threshold_triggered")] + NoiseSensorNoiseThresholdTriggered = 97, -[EnumMember(Value = "device.unmanaged.disconnected")] -DeviceUnmanagedDisconnected = 81, + [EnumMember(Value = "lock.locked")] + LockLocked = 98, -[EnumMember(Value = "device.tampered")] -DeviceTampered = 82, + [EnumMember(Value = "lock.unlocked")] + LockUnlocked = 99, -[EnumMember(Value = "device.low_battery")] -DeviceLowBattery = 83, + [EnumMember(Value = "lock.access_denied")] + LockAccessDenied = 100, -[EnumMember(Value = "device.battery_status_changed")] -DeviceBatteryStatusChanged = 84, + [EnumMember(Value = "thermostat.climate_preset_activated")] + ThermostatClimatePresetActivated = 101, -[EnumMember(Value = "device.removed")] -DeviceRemoved = 85, + [EnumMember(Value = "thermostat.manually_adjusted")] + ThermostatManuallyAdjusted = 102, -[EnumMember(Value = "device.deleted")] -DeviceDeleted = 86, + [EnumMember(Value = "thermostat.temperature_threshold_exceeded")] + ThermostatTemperatureThresholdExceeded = 103, -[EnumMember(Value = "device.third_party_integration_detected")] -DeviceThirdPartyIntegrationDetected = 87, + [EnumMember(Value = "thermostat.temperature_threshold_no_longer_exceeded")] + ThermostatTemperatureThresholdNoLongerExceeded = 104, -[EnumMember(Value = "device.third_party_integration_no_longer_detected")] -DeviceThirdPartyIntegrationNoLongerDetected = 88, + [EnumMember(Value = "thermostat.temperature_reached_set_point")] + ThermostatTemperatureReachedSetPoint = 105, -[EnumMember(Value = "device.salto.privacy_mode_activated")] -DeviceSaltoPrivacyModeActivated = 89, + [EnumMember(Value = "thermostat.temperature_changed")] + ThermostatTemperatureChanged = 106, -[EnumMember(Value = "device.salto.privacy_mode_deactivated")] -DeviceSaltoPrivacyModeDeactivated = 90, + [EnumMember(Value = "device.name_changed")] + DeviceNameChanged = 107, -[EnumMember(Value = "device.connection_became_flaky")] -DeviceConnectionBecameFlaky = 91, + [EnumMember(Value = "camera.activated")] + CameraActivated = 108, -[EnumMember(Value = "device.connection_stabilized")] -DeviceConnectionStabilized = 92, + [EnumMember(Value = "device.doorbell_rang")] + DeviceDoorbellRang = 109, -[EnumMember(Value = "device.error.subscription_required")] -DeviceErrorSubscriptionRequired = 93, + [EnumMember(Value = "enrollment_automation.deleted")] + EnrollmentAutomationDeleted = 110, -[EnumMember(Value = "device.error.subscription_required.resolved")] -DeviceErrorSubscriptionRequiredResolved = 94, + [EnumMember(Value = "phone.deactivated")] + PhoneDeactivated = 111, -[EnumMember(Value = "device.accessory_keypad_connected")] -DeviceAccessoryKeypadConnected = 95, + [EnumMember(Value = "space.device_membership_changed")] + SpaceDeviceMembershipChanged = 112, -[EnumMember(Value = "device.accessory_keypad_disconnected")] -DeviceAccessoryKeypadDisconnected = 96, + [EnumMember(Value = "space.created")] + SpaceCreated = 113, -[EnumMember(Value = "noise_sensor.noise_threshold_triggered")] -NoiseSensorNoiseThresholdTriggered = 97, + [EnumMember(Value = "space.deleted")] + SpaceDeleted = 114, + } -[EnumMember(Value = "lock.locked")] -LockLocked = 98, + /// + /// Types of the events that you want to list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum EventTypesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "lock.unlocked")] -LockUnlocked = 99, + [EnumMember(Value = "access_code.created")] + AccessCodeCreated = 1, -[EnumMember(Value = "lock.access_denied")] -LockAccessDenied = 100, + [EnumMember(Value = "access_code.changed")] + AccessCodeChanged = 2, -[EnumMember(Value = "thermostat.climate_preset_activated")] -ThermostatClimatePresetActivated = 101, + [EnumMember(Value = "access_code.name_changed")] + AccessCodeNameChanged = 3, -[EnumMember(Value = "thermostat.manually_adjusted")] -ThermostatManuallyAdjusted = 102, + [EnumMember(Value = "access_code.code_changed")] + AccessCodeCodeChanged = 4, -[EnumMember(Value = "thermostat.temperature_threshold_exceeded")] -ThermostatTemperatureThresholdExceeded = 103, + [EnumMember(Value = "access_code.time_frame_changed")] + AccessCodeTimeFrameChanged = 5, -[EnumMember(Value = "thermostat.temperature_threshold_no_longer_exceeded")] -ThermostatTemperatureThresholdNoLongerExceeded = 104, + [EnumMember(Value = "access_code.mutations_requested")] + AccessCodeMutationsRequested = 6, -[EnumMember(Value = "thermostat.temperature_reached_set_point")] -ThermostatTemperatureReachedSetPoint = 105, + [EnumMember(Value = "access_code.scheduled_on_device")] + AccessCodeScheduledOnDevice = 7, -[EnumMember(Value = "thermostat.temperature_changed")] -ThermostatTemperatureChanged = 106, + [EnumMember(Value = "access_code.set_on_device")] + AccessCodeSetOnDevice = 8, -[EnumMember(Value = "device.name_changed")] -DeviceNameChanged = 107, + [EnumMember(Value = "access_code.removed_from_device")] + AccessCodeRemovedFromDevice = 9, -[EnumMember(Value = "camera.activated")] -CameraActivated = 108, + [EnumMember(Value = "access_code.delay_in_setting_on_device")] + AccessCodeDelayInSettingOnDevice = 10, -[EnumMember(Value = "device.doorbell_rang")] -DeviceDoorbellRang = 109, + [EnumMember(Value = "access_code.failed_to_set_on_device")] + AccessCodeFailedToSetOnDevice = 11, -[EnumMember(Value = "enrollment_automation.deleted")] -EnrollmentAutomationDeleted = 110, + [EnumMember(Value = "access_code.issued")] + AccessCodeIssued = 12, -[EnumMember(Value = "phone.deactivated")] -PhoneDeactivated = 111, - -[EnumMember(Value = "space.device_membership_changed")] -SpaceDeviceMembershipChanged = 112, - -[EnumMember(Value = "space.created")] -SpaceCreated = 113, - -[EnumMember(Value = "space.deleted")] -SpaceDeleted = 114, -} - -/// -/// Types of the events that you want to list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum EventTypesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "access_code.delay_in_issuing")] + AccessCodeDelayInIssuing = 13, -[EnumMember(Value = "access_code.created")] -AccessCodeCreated = 1, + [EnumMember(Value = "access_code.failed_to_issue")] + AccessCodeFailedToIssue = 14, -[EnumMember(Value = "access_code.changed")] -AccessCodeChanged = 2, + [EnumMember(Value = "access_code.failed_to_update")] + AccessCodeFailedToUpdate = 15, -[EnumMember(Value = "access_code.name_changed")] -AccessCodeNameChanged = 3, + [EnumMember(Value = "access_code.failed_to_delete")] + AccessCodeFailedToDelete = 16, -[EnumMember(Value = "access_code.code_changed")] -AccessCodeCodeChanged = 4, + [EnumMember(Value = "access_code.deleted")] + AccessCodeDeleted = 17, -[EnumMember(Value = "access_code.time_frame_changed")] -AccessCodeTimeFrameChanged = 5, + [EnumMember(Value = "access_code.delay_in_removing_from_device")] + AccessCodeDelayInRemovingFromDevice = 18, -[EnumMember(Value = "access_code.mutations_requested")] -AccessCodeMutationsRequested = 6, + [EnumMember(Value = "access_code.failed_to_remove_from_device")] + AccessCodeFailedToRemoveFromDevice = 19, -[EnumMember(Value = "access_code.scheduled_on_device")] -AccessCodeScheduledOnDevice = 7, + [EnumMember(Value = "access_code.modified_external_to_seam")] + AccessCodeModifiedExternalToSeam = 20, -[EnumMember(Value = "access_code.set_on_device")] -AccessCodeSetOnDevice = 8, + [EnumMember(Value = "access_code.deleted_external_to_seam")] + AccessCodeDeletedExternalToSeam = 21, -[EnumMember(Value = "access_code.removed_from_device")] -AccessCodeRemovedFromDevice = 9, + [EnumMember(Value = "access_code.backup_access_code_pulled")] + AccessCodeBackupAccessCodePulled = 22, -[EnumMember(Value = "access_code.delay_in_setting_on_device")] -AccessCodeDelayInSettingOnDevice = 10, + [EnumMember(Value = "access_code.unmanaged.converted_to_managed")] + AccessCodeUnmanagedConvertedToManaged = 23, -[EnumMember(Value = "access_code.failed_to_set_on_device")] -AccessCodeFailedToSetOnDevice = 11, + [EnumMember(Value = "access_code.unmanaged.failed_to_convert_to_managed")] + AccessCodeUnmanagedFailedToConvertToManaged = 24, -[EnumMember(Value = "access_code.issued")] -AccessCodeIssued = 12, + [EnumMember(Value = "access_code.unmanaged.created")] + AccessCodeUnmanagedCreated = 25, -[EnumMember(Value = "access_code.delay_in_issuing")] -AccessCodeDelayInIssuing = 13, + [EnumMember(Value = "access_code.unmanaged.removed")] + AccessCodeUnmanagedRemoved = 26, -[EnumMember(Value = "access_code.failed_to_issue")] -AccessCodeFailedToIssue = 14, + [EnumMember(Value = "access_grant.created")] + AccessGrantCreated = 27, -[EnumMember(Value = "access_code.failed_to_update")] -AccessCodeFailedToUpdate = 15, + [EnumMember(Value = "access_grant.deleted")] + AccessGrantDeleted = 28, -[EnumMember(Value = "access_code.failed_to_delete")] -AccessCodeFailedToDelete = 16, + [EnumMember(Value = "access_grant.access_granted_to_all_doors")] + AccessGrantAccessGrantedToAllDoors = 29, -[EnumMember(Value = "access_code.deleted")] -AccessCodeDeleted = 17, + [EnumMember(Value = "access_grant.access_granted_to_door")] + AccessGrantAccessGrantedToDoor = 30, -[EnumMember(Value = "access_code.delay_in_removing_from_device")] -AccessCodeDelayInRemovingFromDevice = 18, + [EnumMember(Value = "access_grant.access_to_door_lost")] + AccessGrantAccessToDoorLost = 31, -[EnumMember(Value = "access_code.failed_to_remove_from_device")] -AccessCodeFailedToRemoveFromDevice = 19, + [EnumMember(Value = "access_grant.access_times_changed")] + AccessGrantAccessTimesChanged = 32, -[EnumMember(Value = "access_code.modified_external_to_seam")] -AccessCodeModifiedExternalToSeam = 20, + [EnumMember(Value = "access_grant.could_not_create_requested_access_methods")] + AccessGrantCouldNotCreateRequestedAccessMethods = 33, -[EnumMember(Value = "access_code.deleted_external_to_seam")] -AccessCodeDeletedExternalToSeam = 21, + [EnumMember(Value = "access_method.issued")] + AccessMethodIssued = 34, -[EnumMember(Value = "access_code.backup_access_code_pulled")] -AccessCodeBackupAccessCodePulled = 22, + [EnumMember(Value = "access_method.revoked")] + AccessMethodRevoked = 35, -[EnumMember(Value = "access_code.unmanaged.converted_to_managed")] -AccessCodeUnmanagedConvertedToManaged = 23, + [EnumMember(Value = "access_method.card_encoding_required")] + AccessMethodCardEncodingRequired = 36, -[EnumMember(Value = "access_code.unmanaged.failed_to_convert_to_managed")] -AccessCodeUnmanagedFailedToConvertToManaged = 24, + [EnumMember(Value = "access_method.deleted")] + AccessMethodDeleted = 37, -[EnumMember(Value = "access_code.unmanaged.created")] -AccessCodeUnmanagedCreated = 25, + [EnumMember(Value = "access_method.reissued")] + AccessMethodReissued = 38, -[EnumMember(Value = "access_code.unmanaged.removed")] -AccessCodeUnmanagedRemoved = 26, + [EnumMember(Value = "access_method.created")] + AccessMethodCreated = 39, -[EnumMember(Value = "access_grant.created")] -AccessGrantCreated = 27, + [EnumMember(Value = "access_method.delay_in_issuing")] + AccessMethodDelayInIssuing = 40, -[EnumMember(Value = "access_grant.deleted")] -AccessGrantDeleted = 28, + [EnumMember(Value = "access_method.failed_to_issue")] + AccessMethodFailedToIssue = 41, -[EnumMember(Value = "access_grant.access_granted_to_all_doors")] -AccessGrantAccessGrantedToAllDoors = 29, + [EnumMember(Value = "acs_system.connected")] + AcsSystemConnected = 42, -[EnumMember(Value = "access_grant.access_granted_to_door")] -AccessGrantAccessGrantedToDoor = 30, + [EnumMember(Value = "acs_system.added")] + AcsSystemAdded = 43, -[EnumMember(Value = "access_grant.access_to_door_lost")] -AccessGrantAccessToDoorLost = 31, + [EnumMember(Value = "acs_system.disconnected")] + AcsSystemDisconnected = 44, -[EnumMember(Value = "access_grant.access_times_changed")] -AccessGrantAccessTimesChanged = 32, + [EnumMember(Value = "acs_credential.deleted")] + AcsCredentialDeleted = 45, -[EnumMember(Value = "access_grant.could_not_create_requested_access_methods")] -AccessGrantCouldNotCreateRequestedAccessMethods = 33, + [EnumMember(Value = "acs_credential.issued")] + AcsCredentialIssued = 46, -[EnumMember(Value = "access_method.issued")] -AccessMethodIssued = 34, + [EnumMember(Value = "acs_credential.reissued")] + AcsCredentialReissued = 47, -[EnumMember(Value = "access_method.revoked")] -AccessMethodRevoked = 35, + [EnumMember(Value = "acs_credential.invalidated")] + AcsCredentialInvalidated = 48, -[EnumMember(Value = "access_method.card_encoding_required")] -AccessMethodCardEncodingRequired = 36, + [EnumMember(Value = "acs_user.created")] + AcsUserCreated = 49, -[EnumMember(Value = "access_method.deleted")] -AccessMethodDeleted = 37, + [EnumMember(Value = "acs_user.deleted")] + AcsUserDeleted = 50, -[EnumMember(Value = "access_method.reissued")] -AccessMethodReissued = 38, + [EnumMember(Value = "acs_encoder.added")] + AcsEncoderAdded = 51, -[EnumMember(Value = "access_method.created")] -AccessMethodCreated = 39, + [EnumMember(Value = "acs_encoder.removed")] + AcsEncoderRemoved = 52, -[EnumMember(Value = "access_method.delay_in_issuing")] -AccessMethodDelayInIssuing = 40, + [EnumMember(Value = "acs_access_group.deleted")] + AcsAccessGroupDeleted = 53, -[EnumMember(Value = "access_method.failed_to_issue")] -AccessMethodFailedToIssue = 41, + [EnumMember(Value = "acs_entrance.added")] + AcsEntranceAdded = 54, -[EnumMember(Value = "acs_system.connected")] -AcsSystemConnected = 42, + [EnumMember(Value = "acs_entrance.removed")] + AcsEntranceRemoved = 55, -[EnumMember(Value = "acs_system.added")] -AcsSystemAdded = 43, + [EnumMember(Value = "client_session.deleted")] + ClientSessionDeleted = 56, -[EnumMember(Value = "acs_system.disconnected")] -AcsSystemDisconnected = 44, + [EnumMember(Value = "connected_account.connected")] + ConnectedAccountConnected = 57, -[EnumMember(Value = "acs_credential.deleted")] -AcsCredentialDeleted = 45, + [EnumMember(Value = "connected_account.created")] + ConnectedAccountCreated = 58, -[EnumMember(Value = "acs_credential.issued")] -AcsCredentialIssued = 46, + [EnumMember(Value = "connected_account.successful_login")] + ConnectedAccountSuccessfulLogin = 59, -[EnumMember(Value = "acs_credential.reissued")] -AcsCredentialReissued = 47, + [EnumMember(Value = "connected_account.disconnected")] + ConnectedAccountDisconnected = 60, -[EnumMember(Value = "acs_credential.invalidated")] -AcsCredentialInvalidated = 48, + [EnumMember(Value = "connected_account.completed_first_sync")] + ConnectedAccountCompletedFirstSync = 61, -[EnumMember(Value = "acs_user.created")] -AcsUserCreated = 49, + [EnumMember(Value = "connected_account.deleted")] + ConnectedAccountDeleted = 62, -[EnumMember(Value = "acs_user.deleted")] -AcsUserDeleted = 50, + [EnumMember(Value = "connected_account.completed_first_sync_after_reconnection")] + ConnectedAccountCompletedFirstSyncAfterReconnection = 63, -[EnumMember(Value = "acs_encoder.added")] -AcsEncoderAdded = 51, + [EnumMember(Value = "connected_account.reauthorization_requested")] + ConnectedAccountReauthorizationRequested = 64, -[EnumMember(Value = "acs_encoder.removed")] -AcsEncoderRemoved = 52, + [EnumMember(Value = "action_attempt.lock_door.succeeded")] + ActionAttemptLockDoorSucceeded = 65, -[EnumMember(Value = "acs_access_group.deleted")] -AcsAccessGroupDeleted = 53, + [EnumMember(Value = "action_attempt.lock_door.failed")] + ActionAttemptLockDoorFailed = 66, -[EnumMember(Value = "acs_entrance.added")] -AcsEntranceAdded = 54, + [EnumMember(Value = "action_attempt.unlock_door.succeeded")] + ActionAttemptUnlockDoorSucceeded = 67, -[EnumMember(Value = "acs_entrance.removed")] -AcsEntranceRemoved = 55, + [EnumMember(Value = "action_attempt.unlock_door.failed")] + ActionAttemptUnlockDoorFailed = 68, -[EnumMember(Value = "client_session.deleted")] -ClientSessionDeleted = 56, + [EnumMember(Value = "action_attempt.simulate_keypad_code_entry.succeeded")] + ActionAttemptSimulateKeypadCodeEntrySucceeded = 69, -[EnumMember(Value = "connected_account.connected")] -ConnectedAccountConnected = 57, + [EnumMember(Value = "action_attempt.simulate_keypad_code_entry.failed")] + ActionAttemptSimulateKeypadCodeEntryFailed = 70, -[EnumMember(Value = "connected_account.created")] -ConnectedAccountCreated = 58, + [EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.succeeded")] + ActionAttemptSimulateManualLockViaKeypadSucceeded = 71, -[EnumMember(Value = "connected_account.successful_login")] -ConnectedAccountSuccessfulLogin = 59, + [EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.failed")] + ActionAttemptSimulateManualLockViaKeypadFailed = 72, -[EnumMember(Value = "connected_account.disconnected")] -ConnectedAccountDisconnected = 60, + [EnumMember(Value = "connect_webview.login_succeeded")] + ConnectWebviewLoginSucceeded = 73, -[EnumMember(Value = "connected_account.completed_first_sync")] -ConnectedAccountCompletedFirstSync = 61, + [EnumMember(Value = "connect_webview.login_failed")] + ConnectWebviewLoginFailed = 74, -[EnumMember(Value = "connected_account.deleted")] -ConnectedAccountDeleted = 62, + [EnumMember(Value = "device.connected")] + DeviceConnected = 75, -[EnumMember(Value = "connected_account.completed_first_sync_after_reconnection")] -ConnectedAccountCompletedFirstSyncAfterReconnection = 63, + [EnumMember(Value = "device.added")] + DeviceAdded = 76, -[EnumMember(Value = "connected_account.reauthorization_requested")] -ConnectedAccountReauthorizationRequested = 64, + [EnumMember(Value = "device.converted_to_unmanaged")] + DeviceConvertedToUnmanaged = 77, -[EnumMember(Value = "action_attempt.lock_door.succeeded")] -ActionAttemptLockDoorSucceeded = 65, + [EnumMember(Value = "device.unmanaged.converted_to_managed")] + DeviceUnmanagedConvertedToManaged = 78, -[EnumMember(Value = "action_attempt.lock_door.failed")] -ActionAttemptLockDoorFailed = 66, + [EnumMember(Value = "device.unmanaged.connected")] + DeviceUnmanagedConnected = 79, -[EnumMember(Value = "action_attempt.unlock_door.succeeded")] -ActionAttemptUnlockDoorSucceeded = 67, + [EnumMember(Value = "device.disconnected")] + DeviceDisconnected = 80, -[EnumMember(Value = "action_attempt.unlock_door.failed")] -ActionAttemptUnlockDoorFailed = 68, + [EnumMember(Value = "device.unmanaged.disconnected")] + DeviceUnmanagedDisconnected = 81, -[EnumMember(Value = "action_attempt.simulate_keypad_code_entry.succeeded")] -ActionAttemptSimulateKeypadCodeEntrySucceeded = 69, + [EnumMember(Value = "device.tampered")] + DeviceTampered = 82, -[EnumMember(Value = "action_attempt.simulate_keypad_code_entry.failed")] -ActionAttemptSimulateKeypadCodeEntryFailed = 70, + [EnumMember(Value = "device.low_battery")] + DeviceLowBattery = 83, -[EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.succeeded")] -ActionAttemptSimulateManualLockViaKeypadSucceeded = 71, + [EnumMember(Value = "device.battery_status_changed")] + DeviceBatteryStatusChanged = 84, -[EnumMember(Value = "action_attempt.simulate_manual_lock_via_keypad.failed")] -ActionAttemptSimulateManualLockViaKeypadFailed = 72, + [EnumMember(Value = "device.removed")] + DeviceRemoved = 85, -[EnumMember(Value = "connect_webview.login_succeeded")] -ConnectWebviewLoginSucceeded = 73, + [EnumMember(Value = "device.deleted")] + DeviceDeleted = 86, -[EnumMember(Value = "connect_webview.login_failed")] -ConnectWebviewLoginFailed = 74, + [EnumMember(Value = "device.third_party_integration_detected")] + DeviceThirdPartyIntegrationDetected = 87, -[EnumMember(Value = "device.connected")] -DeviceConnected = 75, + [EnumMember(Value = "device.third_party_integration_no_longer_detected")] + DeviceThirdPartyIntegrationNoLongerDetected = 88, -[EnumMember(Value = "device.added")] -DeviceAdded = 76, + [EnumMember(Value = "device.salto.privacy_mode_activated")] + DeviceSaltoPrivacyModeActivated = 89, -[EnumMember(Value = "device.converted_to_unmanaged")] -DeviceConvertedToUnmanaged = 77, + [EnumMember(Value = "device.salto.privacy_mode_deactivated")] + DeviceSaltoPrivacyModeDeactivated = 90, -[EnumMember(Value = "device.unmanaged.converted_to_managed")] -DeviceUnmanagedConvertedToManaged = 78, + [EnumMember(Value = "device.connection_became_flaky")] + DeviceConnectionBecameFlaky = 91, -[EnumMember(Value = "device.unmanaged.connected")] -DeviceUnmanagedConnected = 79, + [EnumMember(Value = "device.connection_stabilized")] + DeviceConnectionStabilized = 92, -[EnumMember(Value = "device.disconnected")] -DeviceDisconnected = 80, + [EnumMember(Value = "device.error.subscription_required")] + DeviceErrorSubscriptionRequired = 93, -[EnumMember(Value = "device.unmanaged.disconnected")] -DeviceUnmanagedDisconnected = 81, + [EnumMember(Value = "device.error.subscription_required.resolved")] + DeviceErrorSubscriptionRequiredResolved = 94, -[EnumMember(Value = "device.tampered")] -DeviceTampered = 82, + [EnumMember(Value = "device.accessory_keypad_connected")] + DeviceAccessoryKeypadConnected = 95, -[EnumMember(Value = "device.low_battery")] -DeviceLowBattery = 83, + [EnumMember(Value = "device.accessory_keypad_disconnected")] + DeviceAccessoryKeypadDisconnected = 96, -[EnumMember(Value = "device.battery_status_changed")] -DeviceBatteryStatusChanged = 84, + [EnumMember(Value = "noise_sensor.noise_threshold_triggered")] + NoiseSensorNoiseThresholdTriggered = 97, -[EnumMember(Value = "device.removed")] -DeviceRemoved = 85, + [EnumMember(Value = "lock.locked")] + LockLocked = 98, -[EnumMember(Value = "device.deleted")] -DeviceDeleted = 86, + [EnumMember(Value = "lock.unlocked")] + LockUnlocked = 99, -[EnumMember(Value = "device.third_party_integration_detected")] -DeviceThirdPartyIntegrationDetected = 87, + [EnumMember(Value = "lock.access_denied")] + LockAccessDenied = 100, -[EnumMember(Value = "device.third_party_integration_no_longer_detected")] -DeviceThirdPartyIntegrationNoLongerDetected = 88, + [EnumMember(Value = "thermostat.climate_preset_activated")] + ThermostatClimatePresetActivated = 101, -[EnumMember(Value = "device.salto.privacy_mode_activated")] -DeviceSaltoPrivacyModeActivated = 89, + [EnumMember(Value = "thermostat.manually_adjusted")] + ThermostatManuallyAdjusted = 102, -[EnumMember(Value = "device.salto.privacy_mode_deactivated")] -DeviceSaltoPrivacyModeDeactivated = 90, + [EnumMember(Value = "thermostat.temperature_threshold_exceeded")] + ThermostatTemperatureThresholdExceeded = 103, -[EnumMember(Value = "device.connection_became_flaky")] -DeviceConnectionBecameFlaky = 91, + [EnumMember(Value = "thermostat.temperature_threshold_no_longer_exceeded")] + ThermostatTemperatureThresholdNoLongerExceeded = 104, -[EnumMember(Value = "device.connection_stabilized")] -DeviceConnectionStabilized = 92, + [EnumMember(Value = "thermostat.temperature_reached_set_point")] + ThermostatTemperatureReachedSetPoint = 105, -[EnumMember(Value = "device.error.subscription_required")] -DeviceErrorSubscriptionRequired = 93, + [EnumMember(Value = "thermostat.temperature_changed")] + ThermostatTemperatureChanged = 106, -[EnumMember(Value = "device.error.subscription_required.resolved")] -DeviceErrorSubscriptionRequiredResolved = 94, + [EnumMember(Value = "device.name_changed")] + DeviceNameChanged = 107, -[EnumMember(Value = "device.accessory_keypad_connected")] -DeviceAccessoryKeypadConnected = 95, + [EnumMember(Value = "camera.activated")] + CameraActivated = 108, -[EnumMember(Value = "device.accessory_keypad_disconnected")] -DeviceAccessoryKeypadDisconnected = 96, + [EnumMember(Value = "device.doorbell_rang")] + DeviceDoorbellRang = 109, -[EnumMember(Value = "noise_sensor.noise_threshold_triggered")] -NoiseSensorNoiseThresholdTriggered = 97, + [EnumMember(Value = "enrollment_automation.deleted")] + EnrollmentAutomationDeleted = 110, -[EnumMember(Value = "lock.locked")] -LockLocked = 98, + [EnumMember(Value = "phone.deactivated")] + PhoneDeactivated = 111, -[EnumMember(Value = "lock.unlocked")] -LockUnlocked = 99, + [EnumMember(Value = "space.device_membership_changed")] + SpaceDeviceMembershipChanged = 112, -[EnumMember(Value = "lock.access_denied")] -LockAccessDenied = 100, + [EnumMember(Value = "space.created")] + SpaceCreated = 113, -[EnumMember(Value = "thermostat.climate_preset_activated")] -ThermostatClimatePresetActivated = 101, + [EnumMember(Value = "space.deleted")] + SpaceDeleted = 114, + } -[EnumMember(Value = "thermostat.manually_adjusted")] -ThermostatManuallyAdjusted = 102, - -[EnumMember(Value = "thermostat.temperature_threshold_exceeded")] -ThermostatTemperatureThresholdExceeded = 103, - -[EnumMember(Value = "thermostat.temperature_threshold_no_longer_exceeded")] -ThermostatTemperatureThresholdNoLongerExceeded = 104, - -[EnumMember(Value = "thermostat.temperature_reached_set_point")] -ThermostatTemperatureReachedSetPoint = 105, - -[EnumMember(Value = "thermostat.temperature_changed")] -ThermostatTemperatureChanged = 106, - -[EnumMember(Value = "device.name_changed")] -DeviceNameChanged = 107, - -[EnumMember(Value = "camera.activated")] -CameraActivated = 108, - -[EnumMember(Value = "device.doorbell_rang")] -DeviceDoorbellRang = 109, - -[EnumMember(Value = "enrollment_automation.deleted")] -EnrollmentAutomationDeleted = 110, - -[EnumMember(Value = "phone.deactivated")] -PhoneDeactivated = 111, - -[EnumMember(Value = "space.device_membership_changed")] -SpaceDeviceMembershipChanged = 112, - -[EnumMember(Value = "space.created")] -SpaceCreated = 113, - -[EnumMember(Value = "space.deleted")] -SpaceDeleted = 114, -} - -/// -/// ID of the access code for which you want to list events. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessCodeId { get; set; } - -/// -/// IDs of the access codes for which you want to list events. -/// -[DataMember(Name = "access_code_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AccessCodeIds { get; set; } - -/// -/// ID of the access grant for which you want to list events. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantId { get; set; } - -/// -/// IDs of the access grants for which you want to list events. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantIds { get; set; } - -/// -/// ID of the access method for which you want to list events. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessMethodId { get; set; } - -/// -/// IDs of the access methods for which you want to list events. -/// -[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AccessMethodIds { get; set; } - -/// -/// ID of the ACS access group for which you want to list events. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsAccessGroupId { get; set; } - -/// -/// ID of the ACS credential for which you want to list events. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialId { get; set; } - -/// -/// ID of the ACS encoder for which you want to list events. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsEncoderId { get; set; } - -/// -/// ID of the ACS entrance for which you want to list events. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsEntranceId { get; set; } - -/// -/// ID of the access system for which you want to list events. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// IDs of the access systems for which you want to list events. -/// -[DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsSystemIds { get; set; } - -/// -/// ID of the ACS user for which you want to list events. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`. -/// -[DataMember(Name = "between", IsRequired = false, EmitDefaultValue = false)] -public List? Between { get; set; } - -/// -/// ID of the Connect Webview for which you want to list events. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectWebviewId { get; set; } - -/// -/// ID of the connected account for which you want to list events. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Customer key for which you want to list events. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// ID of the device for which you want to list events. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// IDs of the devices for which you want to list events. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceIds { get; set; } - -/// -/// IDs of the events that you want to list. -/// -[DataMember(Name = "event_ids", IsRequired = false, EmitDefaultValue = false)] -public List? EventIds { get; set; } - -/// -/// Type of the events that you want to list. -/// -[DataMember(Name = "event_type", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.EventTypeEnum? EventType { get; set; } - -/// -/// Types of the events that you want to list. -/// -[DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] -public List? EventTypes { get; set; } - -/// -/// Numerical limit on the number of events to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`. -/// -[DataMember(Name = "since", IsRequired = false, EmitDefaultValue = false)] -public string? Since { get; set; } - -/// -/// ID of the space for which you want to list events. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -/// -/// IDs of the spaces for which you want to list events. -/// -[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceIds { get; set; } - -/// -/// Offset for the events that you want to list. -/// -[DataMember(Name = "unstable_offset", IsRequired = false, EmitDefaultValue = false)] -public float? UnstableOffset { get; set; } - -/// -/// ID of the user identity for which you want to list events. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List events = default) -{ -Events = events; -} - -/// -/// OK -/// -[DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] -public List Events { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/events/list", requestOptions).EnsureData("/events/list").Events; -} - -/// -/// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. -/// -public List List(string? accessCodeId = default, List? accessCodeIds = default, string? accessGrantId = default, List? accessGrantIds = default, string? accessMethodId = default, List? accessMethodIds = default, string? acsAccessGroupId = default, string? acsCredentialId = default, string? acsEncoderId = default, string? acsEntranceId = default, string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, string? deviceId = default, List? deviceIds = default, List? eventIds = default, ListRequest.EventTypeEnum? eventType = default, List? eventTypes = default, float? limit = default, string? since = default, string? spaceId = default, List? spaceIds = default, float? unstableOffset = default, string? userIdentityId = default) -{ -return List(new ListRequest(accessCodeId: accessCodeId, accessCodeIds: accessCodeIds, accessGrantId: accessGrantId, accessGrantIds: accessGrantIds, accessMethodId: accessMethodId, accessMethodIds: accessMethodIds, acsAccessGroupId: acsAccessGroupId, acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId, acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, acsUserId: acsUserId, between: between, connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceId: deviceId, deviceIds: deviceIds, eventIds: eventIds, eventType: eventType, eventTypes: eventTypes, limit: limit, since: since, spaceId: spaceId, spaceIds: spaceIds, unstableOffset: unstableOffset, userIdentityId: userIdentityId)); -} - -/// -/// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/events/list", requestOptions)).EnsureData("/events/list").Events; -} - -/// -/// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. -/// -public async Task> ListAsync(string? accessCodeId = default, List? accessCodeIds = default, string? accessGrantId = default, List? accessGrantIds = default, string? accessMethodId = default, List? accessMethodIds = default, string? acsAccessGroupId = default, string? acsCredentialId = default, string? acsEncoderId = default, string? acsEntranceId = default, string? acsSystemId = default, List? acsSystemIds = default, string? acsUserId = default, List? between = default, string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, string? deviceId = default, List? deviceIds = default, List? eventIds = default, ListRequest.EventTypeEnum? eventType = default, List? eventTypes = default, float? limit = default, string? since = default, string? spaceId = default, List? spaceIds = default, float? unstableOffset = default, string? userIdentityId = default) -{ -return (await ListAsync(new ListRequest(accessCodeId: accessCodeId, accessCodeIds: accessCodeIds, accessGrantId: accessGrantId, accessGrantIds: accessGrantIds, accessMethodId: accessMethodId, accessMethodIds: accessMethodIds, acsAccessGroupId: acsAccessGroupId, acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId, acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, acsSystemIds: acsSystemIds, acsUserId: acsUserId, between: between, connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceId: deviceId, deviceIds: deviceIds, eventIds: eventIds, eventType: eventType, eventTypes: eventTypes, limit: limit, since: since, spaceId: spaceId, spaceIds: spaceIds, unstableOffset: unstableOffset, userIdentityId: userIdentityId))); -} -} + /// + /// ID of the access code for which you want to list events. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessCodeId { get; set; } + + /// + /// IDs of the access codes for which you want to list events. + /// + [DataMember(Name = "access_code_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AccessCodeIds { get; set; } + + /// + /// ID of the access grant for which you want to list events. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantId { get; set; } + + /// + /// IDs of the access grants for which you want to list events. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantIds { get; set; } + + /// + /// ID of the access method for which you want to list events. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessMethodId { get; set; } + + /// + /// IDs of the access methods for which you want to list events. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AccessMethodIds { get; set; } + + /// + /// ID of the ACS access group for which you want to list events. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsAccessGroupId { get; set; } + + /// + /// ID of the ACS credential for which you want to list events. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialId { get; set; } + + /// + /// ID of the ACS encoder for which you want to list events. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsEncoderId { get; set; } + + /// + /// ID of the ACS entrance for which you want to list events. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsEntranceId { get; set; } + + /// + /// ID of the access system for which you want to list events. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// IDs of the access systems for which you want to list events. + /// + [DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsSystemIds { get; set; } + + /// + /// ID of the ACS user for which you want to list events. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`. + /// + [DataMember(Name = "between", IsRequired = false, EmitDefaultValue = false)] + public List? Between { get; set; } + + /// + /// ID of the Connect Webview for which you want to list events. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectWebviewId { get; set; } + + /// + /// ID of the connected account for which you want to list events. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Customer key for which you want to list events. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// ID of the device for which you want to list events. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// IDs of the devices for which you want to list events. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceIds { get; set; } + + /// + /// IDs of the events that you want to list. + /// + [DataMember(Name = "event_ids", IsRequired = false, EmitDefaultValue = false)] + public List? EventIds { get; set; } + + /// + /// Type of the events that you want to list. + /// + [DataMember(Name = "event_type", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.EventTypeEnum? EventType { get; set; } + + /// + /// Types of the events that you want to list. + /// + [DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] + public List? EventTypes { get; set; } + + /// + /// Numerical limit on the number of events to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`. + /// + [DataMember(Name = "since", IsRequired = false, EmitDefaultValue = false)] + public string? Since { get; set; } + + /// + /// ID of the space for which you want to list events. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + /// + /// IDs of the spaces for which you want to list events. + /// + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceIds { get; set; } + + /// + /// Offset for the events that you want to list. + /// + [DataMember(Name = "unstable_offset", IsRequired = false, EmitDefaultValue = false)] + public float? UnstableOffset { get; set; } + + /// + /// ID of the user identity for which you want to list events. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List events = default) + { + Events = events; + } + + /// + /// OK + /// + [DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] + public List Events { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/events/list", requestOptions) + .EnsureData("/events/list") + .Events; + } + + /// + /// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. + /// + public List List( + string? accessCodeId = default, + List? accessCodeIds = default, + string? accessGrantId = default, + List? accessGrantIds = default, + string? accessMethodId = default, + List? accessMethodIds = default, + string? acsAccessGroupId = default, + string? acsCredentialId = default, + string? acsEncoderId = default, + string? acsEntranceId = default, + string? acsSystemId = default, + List? acsSystemIds = default, + string? acsUserId = default, + List? between = default, + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + string? deviceId = default, + List? deviceIds = default, + List? eventIds = default, + ListRequest.EventTypeEnum? eventType = default, + List? eventTypes = default, + float? limit = default, + string? since = default, + string? spaceId = default, + List? spaceIds = default, + float? unstableOffset = default, + string? userIdentityId = default + ) + { + return List( + new ListRequest( + accessCodeId: accessCodeId, + accessCodeIds: accessCodeIds, + accessGrantId: accessGrantId, + accessGrantIds: accessGrantIds, + accessMethodId: accessMethodId, + accessMethodIds: accessMethodIds, + acsAccessGroupId: acsAccessGroupId, + acsCredentialId: acsCredentialId, + acsEncoderId: acsEncoderId, + acsEntranceId: acsEntranceId, + acsSystemId: acsSystemId, + acsSystemIds: acsSystemIds, + acsUserId: acsUserId, + between: between, + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + deviceId: deviceId, + deviceIds: deviceIds, + eventIds: eventIds, + eventType: eventType, + eventTypes: eventTypes, + limit: limit, + since: since, + spaceId: spaceId, + spaceIds: spaceIds, + unstableOffset: unstableOffset, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/events/list", requestOptions)) + .EnsureData("/events/list") + .Events; + } + + /// + /// Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. + /// + public async Task> ListAsync( + string? accessCodeId = default, + List? accessCodeIds = default, + string? accessGrantId = default, + List? accessGrantIds = default, + string? accessMethodId = default, + List? accessMethodIds = default, + string? acsAccessGroupId = default, + string? acsCredentialId = default, + string? acsEncoderId = default, + string? acsEntranceId = default, + string? acsSystemId = default, + List? acsSystemIds = default, + string? acsUserId = default, + List? between = default, + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + string? deviceId = default, + List? deviceIds = default, + List? eventIds = default, + ListRequest.EventTypeEnum? eventType = default, + List? eventTypes = default, + float? limit = default, + string? since = default, + string? spaceId = default, + List? spaceIds = default, + float? unstableOffset = default, + string? userIdentityId = default + ) + { + return ( + await ListAsync( + new ListRequest( + accessCodeId: accessCodeId, + accessCodeIds: accessCodeIds, + accessGrantId: accessGrantId, + accessGrantIds: accessGrantIds, + accessMethodId: accessMethodId, + accessMethodIds: accessMethodIds, + acsAccessGroupId: acsAccessGroupId, + acsCredentialId: acsCredentialId, + acsEncoderId: acsEncoderId, + acsEntranceId: acsEntranceId, + acsSystemId: acsSystemId, + acsSystemIds: acsSystemIds, + acsUserId: acsUserId, + between: between, + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + deviceId: deviceId, + deviceIds: deviceIds, + eventIds: eventIds, + eventType: eventType, + eventTypes: eventTypes, + limit: limit, + since: since, + spaceId: spaceId, + spaceIds: spaceIds, + unstableOffset: unstableOffset, + userIdentityId: userIdentityId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Events Events => new(this); -} - -public partial interface ISeamClient -{ -public Api.Events Events { get; } -} + public partial class SeamClient + { + public Api.Events Events => new(this); + } + + public partial interface ISeamClient + { + public Api.Events Events { get; } + } } diff --git a/src/Seam/Api/InstantKeys.cs b/src/Seam/Api/InstantKeys.cs index 9a83c43a..49f0047e 100644 --- a/src/Seam/Api/InstantKeys.cs +++ b/src/Seam/Api/InstantKeys.cs @@ -9,335 +9,352 @@ namespace Seam.Api { -public class InstantKeys -{ -private ISeamClient _seam; - -public InstantKeys(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Delete an Instant Key. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string instantKeyId = default) -{ -InstantKeyId = instantKeyId; -} - -/// -/// ID of the Instant Key that you want to delete. -/// -[DataMember(Name = "instant_key_id", IsRequired = true, EmitDefaultValue = false)] -public string InstantKeyId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/instant_keys/delete", requestOptions); -} - -/// -/// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public void Delete(string instantKeyId = default) -{ -Delete(new DeleteRequest(instantKeyId: instantKeyId)); -} - -/// -/// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/instant_keys/delete", requestOptions); -} - -/// -/// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public async Task DeleteAsync(string instantKeyId = default) -{ -await DeleteAsync(new DeleteRequest(instantKeyId: instantKeyId)); -} - -/// -/// Request parameters for Get an Instant Key. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? instantKeyId = default, string? instantKeyUrl = default) -{ -InstantKeyId = instantKeyId; -InstantKeyUrl = instantKeyUrl; -} - -/// -/// ID of the instant key to get. -/// -[DataMember(Name = "instant_key_id", IsRequired = false, EmitDefaultValue = false)] -public string? InstantKeyId { get; set; } - -/// -/// URL of the instant key to get. -/// -[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] -public string? InstantKeyUrl { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(InstantKey instantKey = default) -{ -InstantKey = instantKey; -} - -/// -/// OK -/// -[DataMember(Name = "instant_key", IsRequired = false, EmitDefaultValue = false)] -public InstantKey InstantKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public InstantKey Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/instant_keys/get", requestOptions).EnsureData("/instant_keys/get").InstantKey; -} - -/// -/// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public InstantKey Get(string? instantKeyId = default, string? instantKeyUrl = default) -{ -return Get(new GetRequest(instantKeyId: instantKeyId, instantKeyUrl: instantKeyUrl)); -} - -/// -/// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/instant_keys/get", requestOptions)).EnsureData("/instant_keys/get").InstantKey; -} - -/// -/// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public async Task GetAsync(string? instantKeyId = default, string? instantKeyUrl = default) -{ -return (await GetAsync(new GetRequest(instantKeyId: instantKeyId, instantKeyUrl: instantKeyUrl))); -} - -/// -/// Request parameters for List Instant Keys. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? userIdentityId = default) -{ -UserIdentityId = userIdentityId; -} - -/// -/// ID of the user identity by which you want to filter the list of Instant Keys. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List instantKeys = default) -{ -InstantKeys = instantKeys; -} - -/// -/// OK -/// -[DataMember(Name = "instant_keys", IsRequired = false, EmitDefaultValue = false)] -public List InstantKeys { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/instant_keys/list", requestOptions).EnsureData("/instant_keys/list").InstantKeys; -} - -/// -/// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public List List(string? userIdentityId = default) -{ -return List(new ListRequest(userIdentityId: userIdentityId)); -} - -/// -/// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/instant_keys/list", requestOptions)).EnsureData("/instant_keys/list").InstantKeys; -} - -/// -/// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). -/// -public async Task> ListAsync(string? userIdentityId = default) -{ -return (await ListAsync(new ListRequest(userIdentityId: userIdentityId))); -} -} + public class InstantKeys + { + private ISeamClient _seam; + + public InstantKeys(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Delete an Instant Key. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string instantKeyId = default) + { + InstantKeyId = instantKeyId; + } + + /// + /// ID of the Instant Key that you want to delete. + /// + [DataMember(Name = "instant_key_id", IsRequired = true, EmitDefaultValue = false)] + public string InstantKeyId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/instant_keys/delete", requestOptions); + } + + /// + /// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public void Delete(string instantKeyId = default) + { + Delete(new DeleteRequest(instantKeyId: instantKeyId)); + } + + /// + /// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/instant_keys/delete", requestOptions); + } + + /// + /// Deletes a specified [Instant Key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public async Task DeleteAsync(string instantKeyId = default) + { + await DeleteAsync(new DeleteRequest(instantKeyId: instantKeyId)); + } + + /// + /// Request parameters for Get an Instant Key. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string? instantKeyId = default, string? instantKeyUrl = default) + { + InstantKeyId = instantKeyId; + InstantKeyUrl = instantKeyUrl; + } + + /// + /// ID of the instant key to get. + /// + [DataMember(Name = "instant_key_id", IsRequired = false, EmitDefaultValue = false)] + public string? InstantKeyId { get; set; } + + /// + /// URL of the instant key to get. + /// + [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] + public string? InstantKeyUrl { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(InstantKey instantKey = default) + { + InstantKey = instantKey; + } + + /// + /// OK + /// + [DataMember(Name = "instant_key", IsRequired = false, EmitDefaultValue = false)] + public InstantKey InstantKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public InstantKey Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/instant_keys/get", requestOptions) + .EnsureData("/instant_keys/get") + .InstantKey; + } + + /// + /// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public InstantKey Get(string? instantKeyId = default, string? instantKeyUrl = default) + { + return Get(new GetRequest(instantKeyId: instantKeyId, instantKeyUrl: instantKeyUrl)); + } + + /// + /// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/instant_keys/get", requestOptions)) + .EnsureData("/instant_keys/get") + .InstantKey; + } + + /// + /// Gets an [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public async Task GetAsync( + string? instantKeyId = default, + string? instantKeyUrl = default + ) + { + return ( + await GetAsync( + new GetRequest(instantKeyId: instantKeyId, instantKeyUrl: instantKeyUrl) + ) + ); + } + + /// + /// Request parameters for List Instant Keys. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest(string? userIdentityId = default) + { + UserIdentityId = userIdentityId; + } + + /// + /// ID of the user identity by which you want to filter the list of Instant Keys. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List instantKeys = default) + { + InstantKeys = instantKeys; + } + + /// + /// OK + /// + [DataMember(Name = "instant_keys", IsRequired = false, EmitDefaultValue = false)] + public List InstantKeys { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/instant_keys/list", requestOptions) + .EnsureData("/instant_keys/list") + .InstantKeys; + } + + /// + /// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public List List(string? userIdentityId = default) + { + return List(new ListRequest(userIdentityId: userIdentityId)); + } + + /// + /// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/instant_keys/list", requestOptions)) + .EnsureData("/instant_keys/list") + .InstantKeys; + } + + /// + /// Returns a list of all [instant keys](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys). + /// + public async Task> ListAsync(string? userIdentityId = default) + { + return (await ListAsync(new ListRequest(userIdentityId: userIdentityId))); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.InstantKeys InstantKeys => new(this); -} + public partial class SeamClient + { + public Api.InstantKeys InstantKeys => new(this); + } -public partial interface ISeamClient -{ -public Api.InstantKeys InstantKeys { get; } -} + public partial interface ISeamClient + { + public Api.InstantKeys InstantKeys { get; } + } } diff --git a/src/Seam/Api/LiveViewsCameras.cs b/src/Seam/Api/LiveViewsCameras.cs index 388f1c54..8f31a69a 100644 --- a/src/Seam/Api/LiveViewsCameras.cs +++ b/src/Seam/Api/LiveViewsCameras.cs @@ -9,387 +9,474 @@ namespace Seam.Api { -public class LiveViewsCameras -{ -private ISeamClient _seam; - -public LiveViewsCameras(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Camera Live View Session. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(string deviceId = default, int? durationSeconds = default, bool? includeAudio = default) -{ -DeviceId = deviceId; -DurationSeconds = durationSeconds; -IncludeAudio = includeAudio; -} - -/// -/// ID of the camera to view. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Number of seconds for which the live view session is valid, up to 600. -/// -[DataMember(Name = "duration_seconds", IsRequired = false, EmitDefaultValue = false)] -public int? DurationSeconds { get; set; } - -/// -/// Indicates whether to include the camera's audio. -/// -[DataMember(Name = "include_audio", IsRequired = false, EmitDefaultValue = false)] -public bool? IncludeAudio { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(CameraLiveViewSession cameraLiveViewSession = default) -{ -CameraLiveViewSession = cameraLiveViewSession; -} - -/// -/// OK -/// -[DataMember(Name = "camera_live_view_session", IsRequired = false, EmitDefaultValue = false)] -public CameraLiveViewSession CameraLiveViewSession { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. -/// -public CameraLiveViewSession Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/cameras/live_views/create", requestOptions).EnsureData("/cameras/live_views/create").CameraLiveViewSession; -} - -/// -/// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. -/// -public CameraLiveViewSession Create(string deviceId = default, int? durationSeconds = default, bool? includeAudio = default) -{ -return Create(new CreateRequest(deviceId: deviceId, durationSeconds: durationSeconds, includeAudio: includeAudio)); -} - -/// -/// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/cameras/live_views/create", requestOptions)).EnsureData("/cameras/live_views/create").CameraLiveViewSession; -} - -/// -/// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. -/// -public async Task CreateAsync(string deviceId = default, int? durationSeconds = default, bool? includeAudio = default) -{ -return (await CreateAsync(new CreateRequest(deviceId: deviceId, durationSeconds: durationSeconds, includeAudio: includeAudio))); -} - -/// -/// Request parameters for Negotiate a Camera Live View. -/// -[DataContract(Name = "offerRequest_request")] -public class OfferRequest -{ -[JsonConstructorAttribute] -protected OfferRequest() { } - -public OfferRequest(string cameraLiveViewSessionId = default, string sdpOffer = default, string token = default) -{ -CameraLiveViewSessionId = cameraLiveViewSessionId; -SdpOffer = sdpOffer; -Token = token; -} - -/// -/// ID of the camera live view session. -/// -[DataMember(Name = "camera_live_view_session_id", IsRequired = true, EmitDefaultValue = false)] -public string CameraLiveViewSessionId { get; set; } - -/// -/// WebRTC SDP offer from the viewer, limited to 64 KiB of UTF-8 data. -/// -[DataMember(Name = "sdp_offer", IsRequired = true, EmitDefaultValue = false)] -public string SdpOffer { get; set; } - -/// -/// Token returned when the camera live view session was created. -/// -[DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] -public string Token { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "offerResponse_response")] -public class OfferResponse -{ -[JsonConstructorAttribute] -protected OfferResponse() { } - -public OfferResponse(CameraLiveViewAnswer cameraLiveViewAnswer = default) -{ -CameraLiveViewAnswer = cameraLiveViewAnswer; -} - -/// -/// OK -/// -[DataMember(Name = "camera_live_view_answer", IsRequired = false, EmitDefaultValue = false)] -public CameraLiveViewAnswer CameraLiveViewAnswer { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. -/// -public CameraLiveViewAnswer Offer(OfferRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/cameras/live_views/offer", requestOptions).EnsureData("/cameras/live_views/offer").CameraLiveViewAnswer; -} - -/// -/// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. -/// -public CameraLiveViewAnswer Offer(string cameraLiveViewSessionId = default, string sdpOffer = default, string token = default) -{ -return Offer(new OfferRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, sdpOffer: sdpOffer, token: token)); -} - -/// -/// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. -/// -public async Task OfferAsync(OfferRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/cameras/live_views/offer", requestOptions)).EnsureData("/cameras/live_views/offer").CameraLiveViewAnswer; -} - -/// -/// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. -/// -public async Task OfferAsync(string cameraLiveViewSessionId = default, string sdpOffer = default, string token = default) -{ -return (await OfferAsync(new OfferRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, sdpOffer: sdpOffer, token: token))); -} - -/// -/// Request parameters for Stop a Camera Live View Session. -/// -[DataContract(Name = "stopRequest_request")] -public class StopRequest -{ -[JsonConstructorAttribute] -protected StopRequest() { } - -public StopRequest(string cameraLiveViewSessionId = default, string token = default) -{ -CameraLiveViewSessionId = cameraLiveViewSessionId; -Token = token; -} - -/// -/// ID of the camera live view session. -/// -[DataMember(Name = "camera_live_view_session_id", IsRequired = true, EmitDefaultValue = false)] -public string CameraLiveViewSessionId { get; set; } - -/// -/// Token returned when the camera live view session was created. -/// -[DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] -public string Token { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Stops a camera live view session that the current client session owns. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. -/// -public void Stop(StopRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/cameras/live_views/stop", requestOptions); -} - -/// -/// Stops a camera live view session that the current client session owns. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. -/// -public void Stop(string cameraLiveViewSessionId = default, string token = default) -{ -Stop(new StopRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, token: token)); -} - -/// -/// Stops a camera live view session that the current client session owns. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. -/// -public async Task StopAsync(StopRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/cameras/live_views/stop", requestOptions); -} - -/// -/// Stops a camera live view session that the current client session owns. -/// -/// Camera live view is in beta. To enable it for your workspace, contact Seam support. -/// -public async Task StopAsync(string cameraLiveViewSessionId = default, string token = default) -{ -await StopAsync(new StopRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, token: token)); -} -} + public class LiveViewsCameras + { + private ISeamClient _seam; + + public LiveViewsCameras(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Camera Live View Session. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + string deviceId = default, + int? durationSeconds = default, + bool? includeAudio = default + ) + { + DeviceId = deviceId; + DurationSeconds = durationSeconds; + IncludeAudio = includeAudio; + } + + /// + /// ID of the camera to view. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Number of seconds for which the live view session is valid, up to 600. + /// + [DataMember(Name = "duration_seconds", IsRequired = false, EmitDefaultValue = false)] + public int? DurationSeconds { get; set; } + + /// + /// Indicates whether to include the camera's audio. + /// + [DataMember(Name = "include_audio", IsRequired = false, EmitDefaultValue = false)] + public bool? IncludeAudio { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(CameraLiveViewSession cameraLiveViewSession = default) + { + CameraLiveViewSession = cameraLiveViewSession; + } + + /// + /// OK + /// + [DataMember( + Name = "camera_live_view_session", + IsRequired = false, + EmitDefaultValue = false + )] + public CameraLiveViewSession CameraLiveViewSession { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. + /// + public CameraLiveViewSession Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/cameras/live_views/create", requestOptions) + .EnsureData("/cameras/live_views/create") + .CameraLiveViewSession; + } + + /// + /// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. + /// + public CameraLiveViewSession Create( + string deviceId = default, + int? durationSeconds = default, + bool? includeAudio = default + ) + { + return Create( + new CreateRequest( + deviceId: deviceId, + durationSeconds: durationSeconds, + includeAudio: includeAudio + ) + ); + } + + /// + /// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync("/cameras/live_views/create", requestOptions) + ) + .EnsureData("/cameras/live_views/create") + .CameraLiveViewSession; + } + + /// + /// Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`. + /// + public async Task CreateAsync( + string deviceId = default, + int? durationSeconds = default, + bool? includeAudio = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + deviceId: deviceId, + durationSeconds: durationSeconds, + includeAudio: includeAudio + ) + ) + ); + } + + /// + /// Request parameters for Negotiate a Camera Live View. + /// + [DataContract(Name = "offerRequest_request")] + public class OfferRequest + { + [JsonConstructorAttribute] + protected OfferRequest() { } + + public OfferRequest( + string cameraLiveViewSessionId = default, + string sdpOffer = default, + string token = default + ) + { + CameraLiveViewSessionId = cameraLiveViewSessionId; + SdpOffer = sdpOffer; + Token = token; + } + + /// + /// ID of the camera live view session. + /// + [DataMember( + Name = "camera_live_view_session_id", + IsRequired = true, + EmitDefaultValue = false + )] + public string CameraLiveViewSessionId { get; set; } + + /// + /// WebRTC SDP offer from the viewer, limited to 64 KiB of UTF-8 data. + /// + [DataMember(Name = "sdp_offer", IsRequired = true, EmitDefaultValue = false)] + public string SdpOffer { get; set; } + + /// + /// Token returned when the camera live view session was created. + /// + [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] + public string Token { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "offerResponse_response")] + public class OfferResponse + { + [JsonConstructorAttribute] + protected OfferResponse() { } + + public OfferResponse(CameraLiveViewAnswer cameraLiveViewAnswer = default) + { + CameraLiveViewAnswer = cameraLiveViewAnswer; + } + + /// + /// OK + /// + [DataMember( + Name = "camera_live_view_answer", + IsRequired = false, + EmitDefaultValue = false + )] + public CameraLiveViewAnswer CameraLiveViewAnswer { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. + /// + public CameraLiveViewAnswer Offer(OfferRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/cameras/live_views/offer", requestOptions) + .EnsureData("/cameras/live_views/offer") + .CameraLiveViewAnswer; + } + + /// + /// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. + /// + public CameraLiveViewAnswer Offer( + string cameraLiveViewSessionId = default, + string sdpOffer = default, + string token = default + ) + { + return Offer( + new OfferRequest( + cameraLiveViewSessionId: cameraLiveViewSessionId, + sdpOffer: sdpOffer, + token: token + ) + ); + } + + /// + /// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. + /// + public async Task OfferAsync(OfferRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync("/cameras/live_views/offer", requestOptions) + ) + .EnsureData("/cameras/live_views/offer") + .CameraLiveViewAnswer; + } + + /// + /// Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. + /// + public async Task OfferAsync( + string cameraLiveViewSessionId = default, + string sdpOffer = default, + string token = default + ) + { + return ( + await OfferAsync( + new OfferRequest( + cameraLiveViewSessionId: cameraLiveViewSessionId, + sdpOffer: sdpOffer, + token: token + ) + ) + ); + } + + /// + /// Request parameters for Stop a Camera Live View Session. + /// + [DataContract(Name = "stopRequest_request")] + public class StopRequest + { + [JsonConstructorAttribute] + protected StopRequest() { } + + public StopRequest(string cameraLiveViewSessionId = default, string token = default) + { + CameraLiveViewSessionId = cameraLiveViewSessionId; + Token = token; + } + + /// + /// ID of the camera live view session. + /// + [DataMember( + Name = "camera_live_view_session_id", + IsRequired = true, + EmitDefaultValue = false + )] + public string CameraLiveViewSessionId { get; set; } + + /// + /// Token returned when the camera live view session was created. + /// + [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = false)] + public string Token { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Stops a camera live view session that the current client session owns. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. + /// + public void Stop(StopRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/cameras/live_views/stop", requestOptions); + } + + /// + /// Stops a camera live view session that the current client session owns. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. + /// + public void Stop(string cameraLiveViewSessionId = default, string token = default) + { + Stop(new StopRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, token: token)); + } + + /// + /// Stops a camera live view session that the current client session owns. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. + /// + public async Task StopAsync(StopRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/cameras/live_views/stop", requestOptions); + } + + /// + /// Stops a camera live view session that the current client session owns. + /// + /// Camera live view is in beta. To enable it for your workspace, contact Seam support. + /// + public async Task StopAsync( + string cameraLiveViewSessionId = default, + string token = default + ) + { + await StopAsync( + new StopRequest(cameraLiveViewSessionId: cameraLiveViewSessionId, token: token) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.LiveViewsCameras LiveViewsCameras => new(this); -} + public partial class SeamClient + { + public Api.LiveViewsCameras LiveViewsCameras => new(this); + } -public partial interface ISeamClient -{ -public Api.LiveViewsCameras LiveViewsCameras { get; } -} + public partial interface ISeamClient + { + public Api.LiveViewsCameras LiveViewsCameras { get; } + } } diff --git a/src/Seam/Api/Locks.cs b/src/Seam/Api/Locks.cs index b332e04c..1fbd9d6e 100644 --- a/src/Seam/Api/Locks.cs +++ b/src/Seam/Api/Locks.cs @@ -9,973 +9,1078 @@ namespace Seam.Api { -public class Locks -{ -private ISeamClient _seam; - -public Locks(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Configure Auto-Lock. -/// -[DataContract(Name = "configureAutoLockRequest_request")] -public class ConfigureAutoLockRequest -{ -[JsonConstructorAttribute] -protected ConfigureAutoLockRequest() { } - -public ConfigureAutoLockRequest(float? autoLockDelaySeconds = default, bool autoLockEnabled = default, string deviceId = default) -{ -AutoLockDelaySeconds = autoLockDelaySeconds; -AutoLockEnabled = autoLockEnabled; -DeviceId = deviceId; -} - -/// -/// Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60. -/// -[DataMember(Name = "auto_lock_delay_seconds", IsRequired = false, EmitDefaultValue = false)] -public float? AutoLockDelaySeconds { get; set; } - -/// -/// Whether to enable or disable auto-lock. -/// -[DataMember(Name = "auto_lock_enabled", IsRequired = true, EmitDefaultValue = false)] -public bool AutoLockEnabled { get; set; } - -/// -/// ID of the lock for which you want to configure the auto-lock. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "configureAutoLockResponse_response")] -public class ConfigureAutoLockResponse -{ -[JsonConstructorAttribute] -protected ConfigureAutoLockResponse() { } - -public ConfigureAutoLockResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -public ActionAttempt ConfigureAutoLock(ConfigureAutoLockRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/locks/configure_auto_lock", requestOptions).EnsureData("/locks/configure_auto_lock").ActionAttempt; -} - -/// -/// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -public ActionAttempt ConfigureAutoLock(float? autoLockDelaySeconds = default, bool autoLockEnabled = default, string deviceId = default) -{ -return ConfigureAutoLock(new ConfigureAutoLockRequest(autoLockDelaySeconds: autoLockDelaySeconds, autoLockEnabled: autoLockEnabled, deviceId: deviceId)); -} - -/// -/// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -public async Task ConfigureAutoLockAsync(ConfigureAutoLockRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/locks/configure_auto_lock", requestOptions)).EnsureData("/locks/configure_auto_lock").ActionAttempt; -} - -/// -/// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -public async Task ConfigureAutoLockAsync(float? autoLockDelaySeconds = default, bool autoLockEnabled = default, string deviceId = default) -{ -return (await ConfigureAutoLockAsync(new ConfigureAutoLockRequest(autoLockDelaySeconds: autoLockDelaySeconds, autoLockEnabled: autoLockEnabled, deviceId: deviceId))); -} - -/// -/// Request parameters for Get a Lock. -/// -[Obsolete("Use `/devices/get` instead.")] -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? deviceId = default, string? name = default) -{ -DeviceId = deviceId; -Name = name; -} - -/// -/// ID of the lock that you want to get. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Name of the lock that you want to get. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} + public class Locks + { + private ISeamClient _seam; + + public Locks(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Configure Auto-Lock. + /// + [DataContract(Name = "configureAutoLockRequest_request")] + public class ConfigureAutoLockRequest + { + [JsonConstructorAttribute] + protected ConfigureAutoLockRequest() { } + + public ConfigureAutoLockRequest( + float? autoLockDelaySeconds = default, + bool autoLockEnabled = default, + string deviceId = default + ) + { + AutoLockDelaySeconds = autoLockDelaySeconds; + AutoLockEnabled = autoLockEnabled; + DeviceId = deviceId; + } + + /// + /// Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60. + /// + [DataMember( + Name = "auto_lock_delay_seconds", + IsRequired = false, + EmitDefaultValue = false + )] + public float? AutoLockDelaySeconds { get; set; } + + /// + /// Whether to enable or disable auto-lock. + /// + [DataMember(Name = "auto_lock_enabled", IsRequired = true, EmitDefaultValue = false)] + public bool AutoLockEnabled { get; set; } + + /// + /// ID of the lock for which you want to configure the auto-lock. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "configureAutoLockResponse_response")] + public class ConfigureAutoLockResponse + { + [JsonConstructorAttribute] + protected ConfigureAutoLockResponse() { } + + public ConfigureAutoLockResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + public ActionAttempt ConfigureAutoLock(ConfigureAutoLockRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/locks/configure_auto_lock", requestOptions) + .EnsureData("/locks/configure_auto_lock") + .ActionAttempt; + } + + /// + /// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + public ActionAttempt ConfigureAutoLock( + float? autoLockDelaySeconds = default, + bool autoLockEnabled = default, + string deviceId = default + ) + { + return ConfigureAutoLock( + new ConfigureAutoLockRequest( + autoLockDelaySeconds: autoLockDelaySeconds, + autoLockEnabled: autoLockEnabled, + deviceId: deviceId + ) + ); + } + + /// + /// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + public async Task ConfigureAutoLockAsync(ConfigureAutoLockRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/locks/configure_auto_lock", + requestOptions + ) + ) + .EnsureData("/locks/configure_auto_lock") + .ActionAttempt; + } + + /// + /// Configures the auto-lock setting for a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + public async Task ConfigureAutoLockAsync( + float? autoLockDelaySeconds = default, + bool autoLockEnabled = default, + string deviceId = default + ) + { + return ( + await ConfigureAutoLockAsync( + new ConfigureAutoLockRequest( + autoLockDelaySeconds: autoLockDelaySeconds, + autoLockEnabled: autoLockEnabled, + deviceId: deviceId + ) + ) + ); + } + + /// + /// Request parameters for Get a Lock. + /// + [Obsolete("Use `/devices/get` instead.")] + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string? deviceId = default, string? name = default) + { + DeviceId = deviceId; + Name = name; + } + + /// + /// ID of the lock that you want to get. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Name of the lock that you want to get. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Device device = default) + { + Device = device; + } + + /// + /// OK + /// + [DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] + public Device Device { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + [Obsolete("Use `/devices/get` instead.")] + public Device Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/locks/get", requestOptions) + .EnsureData("/locks/get") + .Device; + } + + /// + /// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + [Obsolete("Use `/devices/get` instead.")] + public Device Get(string? deviceId = default, string? name = default) + { + return Get(new GetRequest(deviceId: deviceId, name: name)); + } + + /// + /// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + [Obsolete("Use `/devices/get` instead.")] + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/locks/get", requestOptions)) + .EnsureData("/locks/get") + .Device; + } + + /// + /// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + [Obsolete("Use `/devices/get` instead.")] + public async Task GetAsync(string? deviceId = default, string? name = default) + { + return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); + } + + /// + /// Request parameters for List Locks. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountId = connectedAccountId; + CustomerKey = customerKey; + DeviceType = deviceType; + DeviceTypes = deviceTypes; + Manufacturer = manufacturer; + } + + /// + /// Device type of the locks that you want to list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "akuvox_lock")] + AkuvoxLock = 1, + + [EnumMember(Value = "august_lock")] + AugustLock = 2, + + [EnumMember(Value = "brivo_access_point")] + BrivoAccessPoint = 3, + + [EnumMember(Value = "butterflymx_panel")] + ButterflymxPanel = 4, + + [EnumMember(Value = "avigilon_alta_entry")] + AvigilonAltaEntry = 5, + + [EnumMember(Value = "doorking_lock")] + DoorkingLock = 6, + + [EnumMember(Value = "genie_door")] + GenieDoor = 7, + + [EnumMember(Value = "igloo_lock")] + IglooLock = 8, + + [EnumMember(Value = "linear_lock")] + LinearLock = 9, + + [EnumMember(Value = "lockly_lock")] + LocklyLock = 10, + + [EnumMember(Value = "kwikset_lock")] + KwiksetLock = 11, + + [EnumMember(Value = "nuki_lock")] + NukiLock = 12, + + [EnumMember(Value = "salto_lock")] + SaltoLock = 13, -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(Device device = default) -{ -Device = device; -} - -/// -/// OK -/// -[DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] -public Device Device { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -[Obsolete("Use `/devices/get` instead.")] -public Device Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/locks/get", requestOptions).EnsureData("/locks/get").Device; -} - -/// -/// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -[Obsolete("Use `/devices/get` instead.")] -public Device Get(string? deviceId = default, string? name = default) -{ -return Get(new GetRequest(deviceId: deviceId, name: name)); -} - -/// -/// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -[Obsolete("Use `/devices/get` instead.")] -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/locks/get", requestOptions)).EnsureData("/locks/get").Device; -} - -/// -/// Returns a specified [lock](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -[Obsolete("Use `/devices/get` instead.")] -public async Task GetAsync(string? deviceId = default, string? name = default) -{ -return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); -} - -/// -/// Request parameters for List Locks. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountId = connectedAccountId; -CustomerKey = customerKey; -DeviceType = deviceType; -DeviceTypes = deviceTypes; -Manufacturer = manufacturer; -} - -/// -/// Device type of the locks that you want to list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "akuvox_lock")] -AkuvoxLock = 1, + [EnumMember(Value = "schlage_lock")] + SchlageLock = 14, -[EnumMember(Value = "august_lock")] -AugustLock = 2, + [EnumMember(Value = "smartthings_lock")] + SmartthingsLock = 15, -[EnumMember(Value = "brivo_access_point")] -BrivoAccessPoint = 3, + [EnumMember(Value = "wyze_lock")] + WyzeLock = 16, -[EnumMember(Value = "butterflymx_panel")] -ButterflymxPanel = 4, + [EnumMember(Value = "yale_lock")] + YaleLock = 17, -[EnumMember(Value = "avigilon_alta_entry")] -AvigilonAltaEntry = 5, + [EnumMember(Value = "two_n_intercom")] + TwoNIntercom = 18, -[EnumMember(Value = "doorking_lock")] -DoorkingLock = 6, + [EnumMember(Value = "controlbyweb_device")] + ControlbywebDevice = 19, -[EnumMember(Value = "genie_door")] -GenieDoor = 7, + [EnumMember(Value = "ttlock_lock")] + TtlockLock = 20, -[EnumMember(Value = "igloo_lock")] -IglooLock = 8, + [EnumMember(Value = "igloohome_lock")] + IgloohomeLock = 21, -[EnumMember(Value = "linear_lock")] -LinearLock = 9, + [EnumMember(Value = "four_suites_door")] + FourSuitesDoor = 22, -[EnumMember(Value = "lockly_lock")] -LocklyLock = 10, + [EnumMember(Value = "dormakaba_oracode_door")] + DormakabaOracodeDoor = 23, -[EnumMember(Value = "kwikset_lock")] -KwiksetLock = 11, + [EnumMember(Value = "tedee_lock")] + TedeeLock = 24, -[EnumMember(Value = "nuki_lock")] -NukiLock = 12, + [EnumMember(Value = "akiles_lock")] + AkilesLock = 25, -[EnumMember(Value = "salto_lock")] -SaltoLock = 13, + [EnumMember(Value = "ultraloq_lock")] + UltraloqLock = 26, -[EnumMember(Value = "schlage_lock")] -SchlageLock = 14, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, -[EnumMember(Value = "smartthings_lock")] -SmartthingsLock = 15, + [EnumMember(Value = "keyincode_lock")] + KeyincodeLock = 28, -[EnumMember(Value = "wyze_lock")] -WyzeLock = 16, + [EnumMember(Value = "omnitec_lock")] + OmnitecLock = 29, -[EnumMember(Value = "yale_lock")] -YaleLock = 17, + [EnumMember(Value = "kisi_lock")] + KisiLock = 30, -[EnumMember(Value = "two_n_intercom")] -TwoNIntercom = 18, + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, + } -[EnumMember(Value = "controlbyweb_device")] -ControlbywebDevice = 19, + /// + /// Device types of the locks that you want to list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "ttlock_lock")] -TtlockLock = 20, + [EnumMember(Value = "akuvox_lock")] + AkuvoxLock = 1, -[EnumMember(Value = "igloohome_lock")] -IgloohomeLock = 21, + [EnumMember(Value = "august_lock")] + AugustLock = 2, -[EnumMember(Value = "four_suites_door")] -FourSuitesDoor = 22, + [EnumMember(Value = "brivo_access_point")] + BrivoAccessPoint = 3, -[EnumMember(Value = "dormakaba_oracode_door")] -DormakabaOracodeDoor = 23, + [EnumMember(Value = "butterflymx_panel")] + ButterflymxPanel = 4, -[EnumMember(Value = "tedee_lock")] -TedeeLock = 24, + [EnumMember(Value = "avigilon_alta_entry")] + AvigilonAltaEntry = 5, -[EnumMember(Value = "akiles_lock")] -AkilesLock = 25, + [EnumMember(Value = "doorking_lock")] + DoorkingLock = 6, -[EnumMember(Value = "ultraloq_lock")] -UltraloqLock = 26, + [EnumMember(Value = "genie_door")] + GenieDoor = 7, -[EnumMember(Value = "yacan_lock")] -YacanLock = 27, + [EnumMember(Value = "igloo_lock")] + IglooLock = 8, -[EnumMember(Value = "keyincode_lock")] -KeyincodeLock = 28, + [EnumMember(Value = "linear_lock")] + LinearLock = 9, -[EnumMember(Value = "omnitec_lock")] -OmnitecLock = 29, + [EnumMember(Value = "lockly_lock")] + LocklyLock = 10, -[EnumMember(Value = "kisi_lock")] -KisiLock = 30, - -[EnumMember(Value = "aqara_lock")] -AqaraLock = 31, -} - -/// -/// Device types of the locks that you want to list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "kwikset_lock")] + KwiksetLock = 11, -[EnumMember(Value = "akuvox_lock")] -AkuvoxLock = 1, + [EnumMember(Value = "nuki_lock")] + NukiLock = 12, -[EnumMember(Value = "august_lock")] -AugustLock = 2, + [EnumMember(Value = "salto_lock")] + SaltoLock = 13, -[EnumMember(Value = "brivo_access_point")] -BrivoAccessPoint = 3, + [EnumMember(Value = "schlage_lock")] + SchlageLock = 14, -[EnumMember(Value = "butterflymx_panel")] -ButterflymxPanel = 4, + [EnumMember(Value = "smartthings_lock")] + SmartthingsLock = 15, -[EnumMember(Value = "avigilon_alta_entry")] -AvigilonAltaEntry = 5, + [EnumMember(Value = "wyze_lock")] + WyzeLock = 16, -[EnumMember(Value = "doorking_lock")] -DoorkingLock = 6, + [EnumMember(Value = "yale_lock")] + YaleLock = 17, -[EnumMember(Value = "genie_door")] -GenieDoor = 7, + [EnumMember(Value = "two_n_intercom")] + TwoNIntercom = 18, -[EnumMember(Value = "igloo_lock")] -IglooLock = 8, + [EnumMember(Value = "controlbyweb_device")] + ControlbywebDevice = 19, -[EnumMember(Value = "linear_lock")] -LinearLock = 9, + [EnumMember(Value = "ttlock_lock")] + TtlockLock = 20, -[EnumMember(Value = "lockly_lock")] -LocklyLock = 10, + [EnumMember(Value = "igloohome_lock")] + IgloohomeLock = 21, -[EnumMember(Value = "kwikset_lock")] -KwiksetLock = 11, + [EnumMember(Value = "four_suites_door")] + FourSuitesDoor = 22, -[EnumMember(Value = "nuki_lock")] -NukiLock = 12, + [EnumMember(Value = "dormakaba_oracode_door")] + DormakabaOracodeDoor = 23, -[EnumMember(Value = "salto_lock")] -SaltoLock = 13, + [EnumMember(Value = "tedee_lock")] + TedeeLock = 24, -[EnumMember(Value = "schlage_lock")] -SchlageLock = 14, + [EnumMember(Value = "akiles_lock")] + AkilesLock = 25, -[EnumMember(Value = "smartthings_lock")] -SmartthingsLock = 15, + [EnumMember(Value = "ultraloq_lock")] + UltraloqLock = 26, -[EnumMember(Value = "wyze_lock")] -WyzeLock = 16, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, -[EnumMember(Value = "yale_lock")] -YaleLock = 17, + [EnumMember(Value = "keyincode_lock")] + KeyincodeLock = 28, -[EnumMember(Value = "two_n_intercom")] -TwoNIntercom = 18, + [EnumMember(Value = "omnitec_lock")] + OmnitecLock = 29, -[EnumMember(Value = "controlbyweb_device")] -ControlbywebDevice = 19, + [EnumMember(Value = "kisi_lock")] + KisiLock = 30, -[EnumMember(Value = "ttlock_lock")] -TtlockLock = 20, + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, + } -[EnumMember(Value = "igloohome_lock")] -IgloohomeLock = 21, + /// + /// Manufacturer of the locks that you want to list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ManufacturerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "four_suites_door")] -FourSuitesDoor = 22, + [EnumMember(Value = "akuvox")] + Akuvox = 1, -[EnumMember(Value = "dormakaba_oracode_door")] -DormakabaOracodeDoor = 23, + [EnumMember(Value = "august")] + August = 2, -[EnumMember(Value = "tedee_lock")] -TedeeLock = 24, + [EnumMember(Value = "brivo")] + Brivo = 3, -[EnumMember(Value = "akiles_lock")] -AkilesLock = 25, + [EnumMember(Value = "butterflymx")] + Butterflymx = 4, -[EnumMember(Value = "ultraloq_lock")] -UltraloqLock = 26, + [EnumMember(Value = "avigilon_alta")] + AvigilonAlta = 5, -[EnumMember(Value = "yacan_lock")] -YacanLock = 27, - -[EnumMember(Value = "keyincode_lock")] -KeyincodeLock = 28, - -[EnumMember(Value = "omnitec_lock")] -OmnitecLock = 29, - -[EnumMember(Value = "kisi_lock")] -KisiLock = 30, - -[EnumMember(Value = "aqara_lock")] -AqaraLock = 31, -} - -/// -/// Manufacturer of the locks that you want to list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ManufacturerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "doorking")] + Doorking = 6, -[EnumMember(Value = "akuvox")] -Akuvox = 1, + [EnumMember(Value = "genie")] + Genie = 7, -[EnumMember(Value = "august")] -August = 2, + [EnumMember(Value = "igloo")] + Igloo = 8, -[EnumMember(Value = "brivo")] -Brivo = 3, + [EnumMember(Value = "linear")] + Linear = 9, -[EnumMember(Value = "butterflymx")] -Butterflymx = 4, + [EnumMember(Value = "kwikset")] + Kwikset = 10, -[EnumMember(Value = "avigilon_alta")] -AvigilonAlta = 5, + [EnumMember(Value = "nuki")] + Nuki = 11, -[EnumMember(Value = "doorking")] -Doorking = 6, + [EnumMember(Value = "salto")] + Salto = 12, -[EnumMember(Value = "genie")] -Genie = 7, + [EnumMember(Value = "schlage")] + Schlage = 13, -[EnumMember(Value = "igloo")] -Igloo = 8, + [EnumMember(Value = "seam")] + Seam = 14, -[EnumMember(Value = "linear")] -Linear = 9, + [EnumMember(Value = "wyze")] + Wyze = 15, -[EnumMember(Value = "kwikset")] -Kwikset = 10, + [EnumMember(Value = "yale")] + Yale = 16, -[EnumMember(Value = "nuki")] -Nuki = 11, + [EnumMember(Value = "two_n")] + TwoN = 17, -[EnumMember(Value = "salto")] -Salto = 12, + [EnumMember(Value = "controlbyweb")] + Controlbyweb = 18, -[EnumMember(Value = "schlage")] -Schlage = 13, + [EnumMember(Value = "ttlock")] + Ttlock = 19, -[EnumMember(Value = "seam")] -Seam = 14, + [EnumMember(Value = "igloohome")] + Igloohome = 20, -[EnumMember(Value = "wyze")] -Wyze = 15, + [EnumMember(Value = "four_suites")] + FourSuites = 21, -[EnumMember(Value = "yale")] -Yale = 16, + [EnumMember(Value = "tedee")] + Tedee = 22, -[EnumMember(Value = "two_n")] -TwoN = 17, + [EnumMember(Value = "keyincode")] + Keyincode = 23, -[EnumMember(Value = "controlbyweb")] -Controlbyweb = 18, + [EnumMember(Value = "akiles")] + Akiles = 24, -[EnumMember(Value = "ttlock")] -Ttlock = 19, + [EnumMember(Value = "aqara")] + Aqara = 25, -[EnumMember(Value = "igloohome")] -Igloohome = 20, + [EnumMember(Value = "eufy")] + Eufy = 26, -[EnumMember(Value = "four_suites")] -FourSuites = 21, + [EnumMember(Value = "dormakaba_oracode")] + DormakabaOracode = 27, -[EnumMember(Value = "tedee")] -Tedee = 22, + [EnumMember(Value = "dormakaba_oracode_iho")] + DormakabaOracodeIho = 28, -[EnumMember(Value = "keyincode")] -Keyincode = 23, + [EnumMember(Value = "korelock")] + Korelock = 29, -[EnumMember(Value = "akiles")] -Akiles = 24, + [EnumMember(Value = "lockly")] + Lockly = 30, -[EnumMember(Value = "aqara")] -Aqara = 25, + [EnumMember(Value = "smartthings")] + Smartthings = 31, + + [EnumMember(Value = "ultraloq")] + Ultraloq = 32, + + [EnumMember(Value = "omnitec")] + Omnitec = 33, -[EnumMember(Value = "eufy")] -Eufy = 26, - -[EnumMember(Value = "dormakaba_oracode")] -DormakabaOracode = 27, - -[EnumMember(Value = "dormakaba_oracode_iho")] -DormakabaOracodeIho = 28, - -[EnumMember(Value = "korelock")] -Korelock = 29, - -[EnumMember(Value = "lockly")] -Lockly = 30, - -[EnumMember(Value = "smartthings")] -Smartthings = 31, - -[EnumMember(Value = "ultraloq")] -Ultraloq = 32, - -[EnumMember(Value = "omnitec")] -Omnitec = 33, - -[EnumMember(Value = "kisi")] -Kisi = 34, - -[EnumMember(Value = "yacan")] -Yacan = 35, -} - -/// -/// ID of the Connect Webview for which you want to list devices. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectWebviewId { get; set; } - -/// -/// ID of the connected account for which you want to list devices. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Customer key for which you want to list devices. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Device type of the locks that you want to list. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - -/// -/// Device types of the locks that you want to list. -/// -[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceTypes { get; set; } - -/// -/// Manufacturer of the locks that you want to list. -/// -[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List devices = default) -{ -Devices = devices; -} - -/// -/// OK -/// -[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] -public List Devices { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/locks/list", requestOptions).EnsureData("/locks/list").Devices; -} - -/// -/// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -public List List(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer)); -} - -/// -/// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/locks/list", requestOptions)).EnsureData("/locks/list").Devices; -} - -/// -/// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). -/// -public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer))); -} - -/// -/// Request parameters for Lock a Lock. -/// -[DataContract(Name = "lockDoorRequest_request")] -public class LockDoorRequest -{ -[JsonConstructorAttribute] -protected LockDoorRequest() { } - -public LockDoorRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the lock that you want to lock. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "lockDoorResponse_response")] -public class LockDoorResponse -{ -[JsonConstructorAttribute] -protected LockDoorResponse() { } - -public LockDoorResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). -/// -public ActionAttempt LockDoor(LockDoorRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/locks/lock_door", requestOptions).EnsureData("/locks/lock_door").ActionAttempt; -} - -/// -/// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). -/// -public ActionAttempt LockDoor(string deviceId = default) -{ -return LockDoor(new LockDoorRequest(deviceId: deviceId)); -} - -/// -/// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). -/// -public async Task LockDoorAsync(LockDoorRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/locks/lock_door", requestOptions)).EnsureData("/locks/lock_door").ActionAttempt; -} - -/// -/// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). -/// -public async Task LockDoorAsync(string deviceId = default) -{ -return (await LockDoorAsync(new LockDoorRequest(deviceId: deviceId))); -} - -/// -/// Request parameters for Unlock a Lock. -/// -[DataContract(Name = "unlockDoorRequest_request")] -public class UnlockDoorRequest -{ -[JsonConstructorAttribute] -protected UnlockDoorRequest() { } - -public UnlockDoorRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the lock that you want to unlock. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "unlockDoorResponse_response")] -public class UnlockDoorResponse -{ -[JsonConstructorAttribute] -protected UnlockDoorResponse() { } - -public UnlockDoorResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). -/// -public ActionAttempt UnlockDoor(UnlockDoorRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/locks/unlock_door", requestOptions).EnsureData("/locks/unlock_door").ActionAttempt; -} - -/// -/// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). -/// -public ActionAttempt UnlockDoor(string deviceId = default) -{ -return UnlockDoor(new UnlockDoorRequest(deviceId: deviceId)); -} - -/// -/// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). -/// -public async Task UnlockDoorAsync(UnlockDoorRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/locks/unlock_door", requestOptions)).EnsureData("/locks/unlock_door").ActionAttempt; -} - -/// -/// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). -/// -public async Task UnlockDoorAsync(string deviceId = default) -{ -return (await UnlockDoorAsync(new UnlockDoorRequest(deviceId: deviceId))); -} -} + [EnumMember(Value = "kisi")] + Kisi = 34, + + [EnumMember(Value = "yacan")] + Yacan = 35, + } + + /// + /// ID of the Connect Webview for which you want to list devices. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectWebviewId { get; set; } + + /// + /// ID of the connected account for which you want to list devices. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Customer key for which you want to list devices. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Device type of the locks that you want to list. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + + /// + /// Device types of the locks that you want to list. + /// + [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceTypes { get; set; } + + /// + /// Manufacturer of the locks that you want to list. + /// + [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List devices = default) + { + Devices = devices; + } + + /// + /// OK + /// + [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] + public List Devices { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/locks/list", requestOptions) + .EnsureData("/locks/list") + .Devices; + } + + /// + /// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + public List List( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + return List( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + deviceType: deviceType, + deviceTypes: deviceTypes, + manufacturer: manufacturer + ) + ); + } + + /// + /// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/locks/list", requestOptions)) + .EnsureData("/locks/list") + .Devices; + } + + /// + /// Returns a list of all [locks](https://www.seam.co/docs/low-level-apis/smart-locks). + /// + public async Task> ListAsync( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + return ( + await ListAsync( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + deviceType: deviceType, + deviceTypes: deviceTypes, + manufacturer: manufacturer + ) + ) + ); + } + + /// + /// Request parameters for Lock a Lock. + /// + [DataContract(Name = "lockDoorRequest_request")] + public class LockDoorRequest + { + [JsonConstructorAttribute] + protected LockDoorRequest() { } + + public LockDoorRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the lock that you want to lock. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "lockDoorResponse_response")] + public class LockDoorResponse + { + [JsonConstructorAttribute] + protected LockDoorResponse() { } + + public LockDoorResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). + /// + public ActionAttempt LockDoor(LockDoorRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/locks/lock_door", requestOptions) + .EnsureData("/locks/lock_door") + .ActionAttempt; + } + + /// + /// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). + /// + public ActionAttempt LockDoor(string deviceId = default) + { + return LockDoor(new LockDoorRequest(deviceId: deviceId)); + } + + /// + /// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). + /// + public async Task LockDoorAsync(LockDoorRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/locks/lock_door", requestOptions)) + .EnsureData("/locks/lock_door") + .ActionAttempt; + } + + /// + /// Locks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). + /// + public async Task LockDoorAsync(string deviceId = default) + { + return (await LockDoorAsync(new LockDoorRequest(deviceId: deviceId))); + } + + /// + /// Request parameters for Unlock a Lock. + /// + [DataContract(Name = "unlockDoorRequest_request")] + public class UnlockDoorRequest + { + [JsonConstructorAttribute] + protected UnlockDoorRequest() { } + + public UnlockDoorRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the lock that you want to unlock. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "unlockDoorResponse_response")] + public class UnlockDoorResponse + { + [JsonConstructorAttribute] + protected UnlockDoorResponse() { } + + public UnlockDoorResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). + /// + public ActionAttempt UnlockDoor(UnlockDoorRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/locks/unlock_door", requestOptions) + .EnsureData("/locks/unlock_door") + .ActionAttempt; + } + + /// + /// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). + /// + public ActionAttempt UnlockDoor(string deviceId = default) + { + return UnlockDoor(new UnlockDoorRequest(deviceId: deviceId)); + } + + /// + /// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). + /// + public async Task UnlockDoorAsync(UnlockDoorRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/locks/unlock_door", requestOptions)) + .EnsureData("/locks/unlock_door") + .ActionAttempt; + } + + /// + /// Unlocks a [lock](https://www.seam.co/docs/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://www.seam.co/docs/low-level-apis/smart-locks/lock-and-unlock). + /// + public async Task UnlockDoorAsync(string deviceId = default) + { + return (await UnlockDoorAsync(new UnlockDoorRequest(deviceId: deviceId))); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Locks Locks => new(this); -} + public partial class SeamClient + { + public Api.Locks Locks => new(this); + } -public partial interface ISeamClient -{ -public Api.Locks Locks { get; } -} + public partial interface ISeamClient + { + public Api.Locks Locks { get; } + } } diff --git a/src/Seam/Api/Media.cs b/src/Seam/Api/Media.cs index cb4546fe..d45aea10 100644 --- a/src/Seam/Api/Media.cs +++ b/src/Seam/Api/Media.cs @@ -9,162 +9,173 @@ namespace Seam.Api { -public class Media -{ -private ISeamClient _seam; - -public Media(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get Media. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(GetRequest.FormatEnum? format = default, string mediaId = default) -{ -Format = format; -MediaId = mediaId; -} - -/// -/// Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FormatEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "json")] -Json = 1, - -[EnumMember(Value = "redirect")] -Redirect = 2, -} - -/// -/// Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video. -/// -[DataMember(Name = "format", IsRequired = false, EmitDefaultValue = false)] -public GetRequest.FormatEnum? Format { get; set; } - -/// -/// ID of the media that you want to get. -/// -[DataMember(Name = "media_id", IsRequired = true, EmitDefaultValue = false)] -public string MediaId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(Seam.Model.Media media = default) -{ -Media = media; -} - -/// -/// OK -/// -[DataMember(Name = "media", IsRequired = false, EmitDefaultValue = false)] -public Seam.Model.Media Media { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. -/// -public Seam.Model.Media Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/media/get", requestOptions).EnsureData("/media/get").Media; -} - -/// -/// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. -/// -public Seam.Model.Media Get(GetRequest.FormatEnum? format = default, string mediaId = default) -{ -return Get(new GetRequest(format: format, mediaId: mediaId)); -} - -/// -/// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/media/get", requestOptions)).EnsureData("/media/get").Media; -} - -/// -/// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. -/// -public async Task GetAsync(GetRequest.FormatEnum? format = default, string mediaId = default) -{ -return (await GetAsync(new GetRequest(format: format, mediaId: mediaId))); -} -} + public class Media + { + private ISeamClient _seam; + + public Media(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get Media. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(GetRequest.FormatEnum? format = default, string mediaId = default) + { + Format = format; + MediaId = mediaId; + } + + /// + /// Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FormatEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "json")] + Json = 1, + + [EnumMember(Value = "redirect")] + Redirect = 2, + } + + /// + /// Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video. + /// + [DataMember(Name = "format", IsRequired = false, EmitDefaultValue = false)] + public GetRequest.FormatEnum? Format { get; set; } + + /// + /// ID of the media that you want to get. + /// + [DataMember(Name = "media_id", IsRequired = true, EmitDefaultValue = false)] + public string MediaId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Seam.Model.Media media = default) + { + Media = media; + } + + /// + /// OK + /// + [DataMember(Name = "media", IsRequired = false, EmitDefaultValue = false)] + public Seam.Model.Media Media { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. + /// + public Seam.Model.Media Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/media/get", requestOptions) + .EnsureData("/media/get") + .Media; + } + + /// + /// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. + /// + public Seam.Model.Media Get( + GetRequest.FormatEnum? format = default, + string mediaId = default + ) + { + return Get(new GetRequest(format: format, mediaId: mediaId)); + } + + /// + /// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/media/get", requestOptions)) + .EnsureData("/media/get") + .Media; + } + + /// + /// Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta. + /// + public async Task GetAsync( + GetRequest.FormatEnum? format = default, + string mediaId = default + ) + { + return (await GetAsync(new GetRequest(format: format, mediaId: mediaId))); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Media Media => new(this); -} + public partial class SeamClient + { + public Api.Media Media => new(this); + } -public partial interface ISeamClient -{ -public Api.Media Media { get; } -} + public partial interface ISeamClient + { + public Api.Media Media { get; } + } } diff --git a/src/Seam/Api/NoiseSensors.cs b/src/Seam/Api/NoiseSensors.cs index 2d0072d6..c184a935 100644 --- a/src/Seam/Api/NoiseSensors.cs +++ b/src/Seam/Api/NoiseSensors.cs @@ -9,222 +9,272 @@ namespace Seam.Api { -public class NoiseSensors -{ -private ISeamClient _seam; - -public NoiseSensors(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for List Noise Sensors. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountId = connectedAccountId; -CustomerKey = customerKey; -DeviceType = deviceType; -DeviceTypes = deviceTypes; -Manufacturer = manufacturer; -} - -/// -/// Device type of the noise sensors that you want to list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "noiseaware_activity_zone")] -NoiseawareActivityZone = 1, - -[EnumMember(Value = "minut_sensor")] -MinutSensor = 2, -} - -/// -/// Device types of the noise sensors that you want to list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "noiseaware_activity_zone")] -NoiseawareActivityZone = 1, - -[EnumMember(Value = "minut_sensor")] -MinutSensor = 2, -} - -/// -/// Manufacturers of the noise sensors that you want to list. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ManufacturerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "minut")] -Minut = 1, - -[EnumMember(Value = "noiseaware")] -Noiseaware = 2, -} - -/// -/// ID of the Connect Webview for which you want to list devices. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectWebviewId { get; set; } - -/// -/// ID of the connected account for which you want to list devices. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Customer key for which you want to list devices. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Device type of the noise sensors that you want to list. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - -/// -/// Device types of the noise sensors that you want to list. -/// -[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceTypes { get; set; } - -/// -/// Manufacturers of the noise sensors that you want to list. -/// -[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List devices = default) -{ -Devices = devices; -} - -/// -/// OK -/// -[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] -public List Devices { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/noise_sensors/list", requestOptions).EnsureData("/noise_sensors/list").Devices; -} - -/// -/// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public List List(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer)); -} - -/// -/// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/noise_sensors/list", requestOptions)).EnsureData("/noise_sensors/list").Devices; -} - -/// -/// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer))); -} -} + public class NoiseSensors + { + private ISeamClient _seam; + + public NoiseSensors(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for List Noise Sensors. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountId = connectedAccountId; + CustomerKey = customerKey; + DeviceType = deviceType; + DeviceTypes = deviceTypes; + Manufacturer = manufacturer; + } + + /// + /// Device type of the noise sensors that you want to list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "noiseaware_activity_zone")] + NoiseawareActivityZone = 1, + + [EnumMember(Value = "minut_sensor")] + MinutSensor = 2, + } + + /// + /// Device types of the noise sensors that you want to list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "noiseaware_activity_zone")] + NoiseawareActivityZone = 1, + + [EnumMember(Value = "minut_sensor")] + MinutSensor = 2, + } + + /// + /// Manufacturers of the noise sensors that you want to list. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ManufacturerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "minut")] + Minut = 1, + + [EnumMember(Value = "noiseaware")] + Noiseaware = 2, + } + + /// + /// ID of the Connect Webview for which you want to list devices. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectWebviewId { get; set; } + + /// + /// ID of the connected account for which you want to list devices. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Customer key for which you want to list devices. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Device type of the noise sensors that you want to list. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + + /// + /// Device types of the noise sensors that you want to list. + /// + [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceTypes { get; set; } + + /// + /// Manufacturers of the noise sensors that you want to list. + /// + [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List devices = default) + { + Devices = devices; + } + + /// + /// OK + /// + [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] + public List Devices { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/noise_sensors/list", requestOptions) + .EnsureData("/noise_sensors/list") + .Devices; + } + + /// + /// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public List List( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + return List( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + deviceType: deviceType, + deviceTypes: deviceTypes, + manufacturer: manufacturer + ) + ); + } + + /// + /// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/noise_sensors/list", requestOptions)) + .EnsureData("/noise_sensors/list") + .Devices; + } + + /// + /// Returns a list of all [noise sensors](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task> ListAsync( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + return ( + await ListAsync( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + deviceType: deviceType, + deviceTypes: deviceTypes, + manufacturer: manufacturer + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.NoiseSensors NoiseSensors => new(this); -} - -public partial interface ISeamClient -{ -public Api.NoiseSensors NoiseSensors { get; } -} + public partial class SeamClient + { + public Api.NoiseSensors NoiseSensors => new(this); + } + + public partial interface ISeamClient + { + public Api.NoiseSensors NoiseSensors { get; } + } } diff --git a/src/Seam/Api/NoiseThresholdsNoiseSensors.cs b/src/Seam/Api/NoiseThresholdsNoiseSensors.cs index 1dda94f2..23bd5513 100644 --- a/src/Seam/Api/NoiseThresholdsNoiseSensors.cs +++ b/src/Seam/Api/NoiseThresholdsNoiseSensors.cs @@ -9,601 +9,732 @@ namespace Seam.Api { -public class NoiseThresholdsNoiseSensors -{ -private ISeamClient _seam; - -public NoiseThresholdsNoiseSensors(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Noise Threshold. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(string deviceId = default, string endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, float? noiseThresholdNrs = default, string startsDailyAt = default) -{ -DeviceId = deviceId; -EndsDailyAt = endsDailyAt; -Name = name; -NoiseThresholdDecibels = noiseThresholdDecibels; -NoiseThresholdNrs = noiseThresholdNrs; -StartsDailyAt = startsDailyAt; -} - -/// -/// ID of the device for which you want to create a noise threshold. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Time at which the new noise threshold should become inactive daily. -/// -[DataMember(Name = "ends_daily_at", IsRequired = true, EmitDefaultValue = false)] -public string EndsDailyAt { get; set; } - -/// -/// Name of the new noise threshold. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Noise level in decibels for the new noise threshold. -/// -[DataMember(Name = "noise_threshold_decibels", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseThresholdDecibels { get; set; } - -/// -/// Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). -/// -[DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseThresholdNrs { get; set; } - -/// -/// Time at which the new noise threshold should become active daily. -/// -[DataMember(Name = "starts_daily_at", IsRequired = true, EmitDefaultValue = false)] -public string StartsDailyAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(NoiseThreshold noiseThreshold = default) -{ -NoiseThreshold = noiseThreshold; -} - -/// -/// OK -/// -[DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] -public NoiseThreshold NoiseThreshold { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. -/// -public NoiseThreshold Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/noise_sensors/noise_thresholds/create", requestOptions).EnsureData("/noise_sensors/noise_thresholds/create").NoiseThreshold; -} - -/// -/// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. -/// -public NoiseThreshold Create(string deviceId = default, string endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, float? noiseThresholdNrs = default, string startsDailyAt = default) -{ -return Create(new CreateRequest(deviceId: deviceId, endsDailyAt: endsDailyAt, name: name, noiseThresholdDecibels: noiseThresholdDecibels, noiseThresholdNrs: noiseThresholdNrs, startsDailyAt: startsDailyAt)); -} - -/// -/// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/noise_sensors/noise_thresholds/create", requestOptions)).EnsureData("/noise_sensors/noise_thresholds/create").NoiseThreshold; -} - -/// -/// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. -/// -public async Task CreateAsync(string deviceId = default, string endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, float? noiseThresholdNrs = default, string startsDailyAt = default) -{ -return (await CreateAsync(new CreateRequest(deviceId: deviceId, endsDailyAt: endsDailyAt, name: name, noiseThresholdDecibels: noiseThresholdDecibels, noiseThresholdNrs: noiseThresholdNrs, startsDailyAt: startsDailyAt))); -} - -/// -/// Request parameters for Delete a Noise Threshold. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string deviceId = default, string noiseThresholdId = default) -{ -DeviceId = deviceId; -NoiseThresholdId = noiseThresholdId; -} - -/// -/// ID of the device that contains the noise threshold that you want to delete. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// ID of the noise threshold that you want to delete. -/// -[DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] -public string NoiseThresholdId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/noise_sensors/noise_thresholds/delete", requestOptions); -} - -/// -/// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public void Delete(string deviceId = default, string noiseThresholdId = default) -{ -Delete(new DeleteRequest(deviceId: deviceId, noiseThresholdId: noiseThresholdId)); -} - -/// -/// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/noise_sensors/noise_thresholds/delete", requestOptions); -} - -/// -/// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task DeleteAsync(string deviceId = default, string noiseThresholdId = default) -{ -await DeleteAsync(new DeleteRequest(deviceId: deviceId, noiseThresholdId: noiseThresholdId)); -} - -/// -/// Request parameters for Get a Noise Threshold. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string noiseThresholdId = default) -{ -NoiseThresholdId = noiseThresholdId; -} - -/// -/// ID of the noise threshold that you want to get. -/// -[DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] -public string NoiseThresholdId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(NoiseThreshold noiseThreshold = default) -{ -NoiseThreshold = noiseThreshold; -} - -/// -/// OK -/// -[DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] -public NoiseThreshold NoiseThreshold { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public NoiseThreshold Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/noise_sensors/noise_thresholds/get", requestOptions).EnsureData("/noise_sensors/noise_thresholds/get").NoiseThreshold; -} - -/// -/// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public NoiseThreshold Get(string noiseThresholdId = default) -{ -return Get(new GetRequest(noiseThresholdId: noiseThresholdId)); -} - -/// -/// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/noise_sensors/noise_thresholds/get", requestOptions)).EnsureData("/noise_sensors/noise_thresholds/get").NoiseThreshold; -} - -/// -/// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task GetAsync(string noiseThresholdId = default) -{ -return (await GetAsync(new GetRequest(noiseThresholdId: noiseThresholdId))); -} - -/// -/// Request parameters for List Noise Thresholds. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the device for which you want to list noise thresholds. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List noiseThresholds = default) -{ -NoiseThresholds = noiseThresholds; -} - -/// -/// OK -/// -[DataMember(Name = "noise_thresholds", IsRequired = false, EmitDefaultValue = false)] -public List NoiseThresholds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/noise_sensors/noise_thresholds/list", requestOptions).EnsureData("/noise_sensors/noise_thresholds/list").NoiseThresholds; -} - -/// -/// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public List List(string deviceId = default) -{ -return List(new ListRequest(deviceId: deviceId)); -} - -/// -/// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/noise_sensors/noise_thresholds/list", requestOptions)).EnsureData("/noise_sensors/noise_thresholds/list").NoiseThresholds; -} - -/// -/// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task> ListAsync(string deviceId = default) -{ -return (await ListAsync(new ListRequest(deviceId: deviceId))); -} - -/// -/// Request parameters for Update a Noise Threshold. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string deviceId = default, string? endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, string noiseThresholdId = default, float? noiseThresholdNrs = default, string? startsDailyAt = default) -{ -DeviceId = deviceId; -EndsDailyAt = endsDailyAt; -Name = name; -NoiseThresholdDecibels = noiseThresholdDecibels; -NoiseThresholdId = noiseThresholdId; -NoiseThresholdNrs = noiseThresholdNrs; -StartsDailyAt = startsDailyAt; -} - -/// -/// ID of the device that contains the noise threshold that you want to update. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Time at which the noise threshold should become inactive daily. -/// -[DataMember(Name = "ends_daily_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsDailyAt { get; set; } - -/// -/// Name of the noise threshold that you want to update. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Noise level in decibels for the noise threshold. -/// -[DataMember(Name = "noise_threshold_decibels", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseThresholdDecibels { get; set; } - -/// -/// ID of the noise threshold that you want to update. -/// -[DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] -public string NoiseThresholdId { get; set; } - -/// -/// Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). -/// -[DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseThresholdNrs { get; set; } - -/// -/// Time at which the noise threshold should become active daily. -/// -[DataMember(Name = "starts_daily_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsDailyAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/noise_sensors/noise_thresholds/update", requestOptions); -} - -/// -/// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public void Update(string deviceId = default, string? endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, string noiseThresholdId = default, float? noiseThresholdNrs = default, string? startsDailyAt = default) -{ -Update(new UpdateRequest(deviceId: deviceId, endsDailyAt: endsDailyAt, name: name, noiseThresholdDecibels: noiseThresholdDecibels, noiseThresholdId: noiseThresholdId, noiseThresholdNrs: noiseThresholdNrs, startsDailyAt: startsDailyAt)); -} - -/// -/// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/noise_sensors/noise_thresholds/update", requestOptions); -} - -/// -/// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). -/// -public async Task UpdateAsync(string deviceId = default, string? endsDailyAt = default, string? name = default, float? noiseThresholdDecibels = default, string noiseThresholdId = default, float? noiseThresholdNrs = default, string? startsDailyAt = default) -{ -await UpdateAsync(new UpdateRequest(deviceId: deviceId, endsDailyAt: endsDailyAt, name: name, noiseThresholdDecibels: noiseThresholdDecibels, noiseThresholdId: noiseThresholdId, noiseThresholdNrs: noiseThresholdNrs, startsDailyAt: startsDailyAt)); -} -} + public class NoiseThresholdsNoiseSensors + { + private ISeamClient _seam; + + public NoiseThresholdsNoiseSensors(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Noise Threshold. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + string deviceId = default, + string endsDailyAt = default, + string? name = default, + float? noiseThresholdDecibels = default, + float? noiseThresholdNrs = default, + string startsDailyAt = default + ) + { + DeviceId = deviceId; + EndsDailyAt = endsDailyAt; + Name = name; + NoiseThresholdDecibels = noiseThresholdDecibels; + NoiseThresholdNrs = noiseThresholdNrs; + StartsDailyAt = startsDailyAt; + } + + /// + /// ID of the device for which you want to create a noise threshold. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Time at which the new noise threshold should become inactive daily. + /// + [DataMember(Name = "ends_daily_at", IsRequired = true, EmitDefaultValue = false)] + public string EndsDailyAt { get; set; } + + /// + /// Name of the new noise threshold. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Noise level in decibels for the new noise threshold. + /// + [DataMember( + Name = "noise_threshold_decibels", + IsRequired = false, + EmitDefaultValue = false + )] + public float? NoiseThresholdDecibels { get; set; } + + /// + /// Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). + /// + [DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] + public float? NoiseThresholdNrs { get; set; } + + /// + /// Time at which the new noise threshold should become active daily. + /// + [DataMember(Name = "starts_daily_at", IsRequired = true, EmitDefaultValue = false)] + public string StartsDailyAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(NoiseThreshold noiseThreshold = default) + { + NoiseThreshold = noiseThreshold; + } + + /// + /// OK + /// + [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] + public NoiseThreshold NoiseThreshold { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + /// + public NoiseThreshold Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/noise_sensors/noise_thresholds/create", requestOptions) + .EnsureData("/noise_sensors/noise_thresholds/create") + .NoiseThreshold; + } + + /// + /// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + /// + public NoiseThreshold Create( + string deviceId = default, + string endsDailyAt = default, + string? name = default, + float? noiseThresholdDecibels = default, + float? noiseThresholdNrs = default, + string startsDailyAt = default + ) + { + return Create( + new CreateRequest( + deviceId: deviceId, + endsDailyAt: endsDailyAt, + name: name, + noiseThresholdDecibels: noiseThresholdDecibels, + noiseThresholdNrs: noiseThresholdNrs, + startsDailyAt: startsDailyAt + ) + ); + } + + /// + /// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/noise_sensors/noise_thresholds/create", + requestOptions + ) + ) + .EnsureData("/noise_sensors/noise_thresholds/create") + .NoiseThreshold; + } + + /// + /// Creates a new [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + /// + public async Task CreateAsync( + string deviceId = default, + string endsDailyAt = default, + string? name = default, + float? noiseThresholdDecibels = default, + float? noiseThresholdNrs = default, + string startsDailyAt = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + deviceId: deviceId, + endsDailyAt: endsDailyAt, + name: name, + noiseThresholdDecibels: noiseThresholdDecibels, + noiseThresholdNrs: noiseThresholdNrs, + startsDailyAt: startsDailyAt + ) + ) + ); + } + + /// + /// Request parameters for Delete a Noise Threshold. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string deviceId = default, string noiseThresholdId = default) + { + DeviceId = deviceId; + NoiseThresholdId = noiseThresholdId; + } + + /// + /// ID of the device that contains the noise threshold that you want to delete. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// ID of the noise threshold that you want to delete. + /// + [DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] + public string NoiseThresholdId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/noise_sensors/noise_thresholds/delete", requestOptions); + } + + /// + /// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public void Delete(string deviceId = default, string noiseThresholdId = default) + { + Delete(new DeleteRequest(deviceId: deviceId, noiseThresholdId: noiseThresholdId)); + } + + /// + /// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync( + "/noise_sensors/noise_thresholds/delete", + requestOptions + ); + } + + /// + /// Deletes a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task DeleteAsync(string deviceId = default, string noiseThresholdId = default) + { + await DeleteAsync( + new DeleteRequest(deviceId: deviceId, noiseThresholdId: noiseThresholdId) + ); + } + + /// + /// Request parameters for Get a Noise Threshold. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string noiseThresholdId = default) + { + NoiseThresholdId = noiseThresholdId; + } + + /// + /// ID of the noise threshold that you want to get. + /// + [DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] + public string NoiseThresholdId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(NoiseThreshold noiseThreshold = default) + { + NoiseThreshold = noiseThreshold; + } + + /// + /// OK + /// + [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] + public NoiseThreshold NoiseThreshold { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public NoiseThreshold Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/noise_sensors/noise_thresholds/get", requestOptions) + .EnsureData("/noise_sensors/noise_thresholds/get") + .NoiseThreshold; + } + + /// + /// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public NoiseThreshold Get(string noiseThresholdId = default) + { + return Get(new GetRequest(noiseThresholdId: noiseThresholdId)); + } + + /// + /// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/noise_sensors/noise_thresholds/get", + requestOptions + ) + ) + .EnsureData("/noise_sensors/noise_thresholds/get") + .NoiseThreshold; + } + + /// + /// Returns a specified [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task GetAsync(string noiseThresholdId = default) + { + return (await GetAsync(new GetRequest(noiseThresholdId: noiseThresholdId))); + } + + /// + /// Request parameters for List Noise Thresholds. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the device for which you want to list noise thresholds. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List noiseThresholds = default) + { + NoiseThresholds = noiseThresholds; + } + + /// + /// OK + /// + [DataMember(Name = "noise_thresholds", IsRequired = false, EmitDefaultValue = false)] + public List NoiseThresholds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/noise_sensors/noise_thresholds/list", requestOptions) + .EnsureData("/noise_sensors/noise_thresholds/list") + .NoiseThresholds; + } + + /// + /// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public List List(string deviceId = default) + { + return List(new ListRequest(deviceId: deviceId)); + } + + /// + /// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/noise_sensors/noise_thresholds/list", + requestOptions + ) + ) + .EnsureData("/noise_sensors/noise_thresholds/list") + .NoiseThresholds; + } + + /// + /// Returns a list of all [noise thresholds](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task> ListAsync(string deviceId = default) + { + return (await ListAsync(new ListRequest(deviceId: deviceId))); + } + + /// + /// Request parameters for Update a Noise Threshold. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string deviceId = default, + string? endsDailyAt = default, + string? name = default, + float? noiseThresholdDecibels = default, + string noiseThresholdId = default, + float? noiseThresholdNrs = default, + string? startsDailyAt = default + ) + { + DeviceId = deviceId; + EndsDailyAt = endsDailyAt; + Name = name; + NoiseThresholdDecibels = noiseThresholdDecibels; + NoiseThresholdId = noiseThresholdId; + NoiseThresholdNrs = noiseThresholdNrs; + StartsDailyAt = startsDailyAt; + } + + /// + /// ID of the device that contains the noise threshold that you want to update. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Time at which the noise threshold should become inactive daily. + /// + [DataMember(Name = "ends_daily_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsDailyAt { get; set; } + + /// + /// Name of the noise threshold that you want to update. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Noise level in decibels for the noise threshold. + /// + [DataMember( + Name = "noise_threshold_decibels", + IsRequired = false, + EmitDefaultValue = false + )] + public float? NoiseThresholdDecibels { get; set; } + + /// + /// ID of the noise threshold that you want to update. + /// + [DataMember(Name = "noise_threshold_id", IsRequired = true, EmitDefaultValue = false)] + public string NoiseThresholdId { get; set; } + + /// + /// Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). + /// + [DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] + public float? NoiseThresholdNrs { get; set; } + + /// + /// Time at which the noise threshold should become active daily. + /// + [DataMember(Name = "starts_daily_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsDailyAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/noise_sensors/noise_thresholds/update", requestOptions); + } + + /// + /// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public void Update( + string deviceId = default, + string? endsDailyAt = default, + string? name = default, + float? noiseThresholdDecibels = default, + string noiseThresholdId = default, + float? noiseThresholdNrs = default, + string? startsDailyAt = default + ) + { + Update( + new UpdateRequest( + deviceId: deviceId, + endsDailyAt: endsDailyAt, + name: name, + noiseThresholdDecibels: noiseThresholdDecibels, + noiseThresholdId: noiseThresholdId, + noiseThresholdNrs: noiseThresholdNrs, + startsDailyAt: startsDailyAt + ) + ); + } + + /// + /// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync( + "/noise_sensors/noise_thresholds/update", + requestOptions + ); + } + + /// + /// Updates a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). + /// + public async Task UpdateAsync( + string deviceId = default, + string? endsDailyAt = default, + string? name = default, + float? noiseThresholdDecibels = default, + string noiseThresholdId = default, + float? noiseThresholdNrs = default, + string? startsDailyAt = default + ) + { + await UpdateAsync( + new UpdateRequest( + deviceId: deviceId, + endsDailyAt: endsDailyAt, + name: name, + noiseThresholdDecibels: noiseThresholdDecibels, + noiseThresholdId: noiseThresholdId, + noiseThresholdNrs: noiseThresholdNrs, + startsDailyAt: startsDailyAt + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.NoiseThresholdsNoiseSensors NoiseThresholdsNoiseSensors => new(this); -} + public partial class SeamClient + { + public Api.NoiseThresholdsNoiseSensors NoiseThresholdsNoiseSensors => new(this); + } -public partial interface ISeamClient -{ -public Api.NoiseThresholdsNoiseSensors NoiseThresholdsNoiseSensors { get; } -} + public partial interface ISeamClient + { + public Api.NoiseThresholdsNoiseSensors NoiseThresholdsNoiseSensors { get; } + } } diff --git a/src/Seam/Api/Phones.cs b/src/Seam/Api/Phones.cs index f8867822..a5b45b3e 100644 --- a/src/Seam/Api/Phones.cs +++ b/src/Seam/Api/Phones.cs @@ -9,335 +9,370 @@ namespace Seam.Api { -public class Phones -{ -private ISeamClient _seam; - -public Phones(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Deactivate a Phone. -/// -[DataContract(Name = "deactivateRequest_request")] -public class DeactivateRequest -{ -[JsonConstructorAttribute] -protected DeactivateRequest() { } - -public DeactivateRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// Device ID of the phone that you want to deactivate. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). -/// -public void Deactivate(DeactivateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/phones/deactivate", requestOptions); -} - -/// -/// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). -/// -public void Deactivate(string deviceId = default) -{ -Deactivate(new DeactivateRequest(deviceId: deviceId)); -} - -/// -/// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). -/// -public async Task DeactivateAsync(DeactivateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/phones/deactivate", requestOptions); -} - -/// -/// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). -/// -public async Task DeactivateAsync(string deviceId = default) -{ -await DeactivateAsync(new DeactivateRequest(deviceId: deviceId)); -} - -/// -/// Request parameters for Get a Phone. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// Device ID of the phone that you want to get. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(Phone phone = default) -{ -Phone = phone; -} - -/// -/// OK -/// -[DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] -public Phone Phone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). -/// -public Phone Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/phones/get", requestOptions).EnsureData("/phones/get").Phone; -} - -/// -/// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). -/// -public Phone Get(string deviceId = default) -{ -return Get(new GetRequest(deviceId: deviceId)); -} - -/// -/// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/phones/get", requestOptions)).EnsureData("/phones/get").Phone; -} - -/// -/// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). -/// -public async Task GetAsync(string deviceId = default) -{ -return (await GetAsync(new GetRequest(deviceId: deviceId))); -} - -/// -/// Request parameters for List Phones. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? acsCredentialId = default, string? ownerUserIdentityId = default) -{ -AcsCredentialId = acsCredentialId; -OwnerUserIdentityId = ownerUserIdentityId; -} - -/// -/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialId { get; set; } - -/// -/// ID of the user identity that represents the owner by which you want to filter the list of returned phones. -/// -[DataMember(Name = "owner_user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? OwnerUserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List phones = default) -{ -Phones = phones; -} - -/// -/// OK -/// -[DataMember(Name = "phones", IsRequired = false, EmitDefaultValue = false)] -public List Phones { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/phones/list", requestOptions).EnsureData("/phones/list").Phones; -} - -/// -/// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. -/// -public List List(string? acsCredentialId = default, string? ownerUserIdentityId = default) -{ -return List(new ListRequest(acsCredentialId: acsCredentialId, ownerUserIdentityId: ownerUserIdentityId)); -} - -/// -/// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/phones/list", requestOptions)).EnsureData("/phones/list").Phones; -} - -/// -/// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. -/// -public async Task> ListAsync(string? acsCredentialId = default, string? ownerUserIdentityId = default) -{ -return (await ListAsync(new ListRequest(acsCredentialId: acsCredentialId, ownerUserIdentityId: ownerUserIdentityId))); -} -} + public class Phones + { + private ISeamClient _seam; + + public Phones(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Deactivate a Phone. + /// + [DataContract(Name = "deactivateRequest_request")] + public class DeactivateRequest + { + [JsonConstructorAttribute] + protected DeactivateRequest() { } + + public DeactivateRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// Device ID of the phone that you want to deactivate. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). + /// + public void Deactivate(DeactivateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/phones/deactivate", requestOptions); + } + + /// + /// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). + /// + public void Deactivate(string deviceId = default) + { + Deactivate(new DeactivateRequest(deviceId: deviceId)); + } + + /// + /// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). + /// + public async Task DeactivateAsync(DeactivateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/phones/deactivate", requestOptions); + } + + /// + /// Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). + /// + public async Task DeactivateAsync(string deviceId = default) + { + await DeactivateAsync(new DeactivateRequest(deviceId: deviceId)); + } + + /// + /// Request parameters for Get a Phone. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// Device ID of the phone that you want to get. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Phone phone = default) + { + Phone = phone; + } + + /// + /// OK + /// + [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] + public Phone Phone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). + /// + public Phone Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/phones/get", requestOptions) + .EnsureData("/phones/get") + .Phone; + } + + /// + /// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). + /// + public Phone Get(string deviceId = default) + { + return Get(new GetRequest(deviceId: deviceId)); + } + + /// + /// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/phones/get", requestOptions)) + .EnsureData("/phones/get") + .Phone; + } + + /// + /// Returns a specified [phone](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). + /// + public async Task GetAsync(string deviceId = default) + { + return (await GetAsync(new GetRequest(deviceId: deviceId))); + } + + /// + /// Request parameters for List Phones. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? acsCredentialId = default, + string? ownerUserIdentityId = default + ) + { + AcsCredentialId = acsCredentialId; + OwnerUserIdentityId = ownerUserIdentityId; + } + + /// + /// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialId { get; set; } + + /// + /// ID of the user identity that represents the owner by which you want to filter the list of returned phones. + /// + [DataMember( + Name = "owner_user_identity_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? OwnerUserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List phones = default) + { + Phones = phones; + } + + /// + /// OK + /// + [DataMember(Name = "phones", IsRequired = false, EmitDefaultValue = false)] + public List Phones { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/phones/list", requestOptions) + .EnsureData("/phones/list") + .Phones; + } + + /// + /// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. + /// + public List List( + string? acsCredentialId = default, + string? ownerUserIdentityId = default + ) + { + return List( + new ListRequest( + acsCredentialId: acsCredentialId, + ownerUserIdentityId: ownerUserIdentityId + ) + ); + } + + /// + /// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/phones/list", requestOptions)) + .EnsureData("/phones/list") + .Phones; + } + + /// + /// Returns a list of all [phones](https://www.seam.co/docs/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. + /// + public async Task> ListAsync( + string? acsCredentialId = default, + string? ownerUserIdentityId = default + ) + { + return ( + await ListAsync( + new ListRequest( + acsCredentialId: acsCredentialId, + ownerUserIdentityId: ownerUserIdentityId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Phones Phones => new(this); -} + public partial class SeamClient + { + public Api.Phones Phones => new(this); + } -public partial interface ISeamClient -{ -public Api.Phones Phones { get; } -} + public partial interface ISeamClient + { + public Api.Phones Phones { get; } + } } diff --git a/src/Seam/Api/SchedulesThermostats.cs b/src/Seam/Api/SchedulesThermostats.cs index d005aa9a..abb50e15 100644 --- a/src/Seam/Api/SchedulesThermostats.cs +++ b/src/Seam/Api/SchedulesThermostats.cs @@ -9,608 +9,754 @@ namespace Seam.Api { -public class SchedulesThermostats -{ -private ISeamClient _seam; - -public SchedulesThermostats(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Thermostat Schedule. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(string climatePresetKey = default, string deviceId = default, string endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default) -{ -ClimatePresetKey = climatePresetKey; -DeviceId = deviceId; -EndsAt = endsAt; -IsOverrideAllowed = isOverrideAllowed; -MaxOverridePeriodMinutes = maxOverridePeriodMinutes; -Name = name; -StartsAt = startsAt; -} - -/// -/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the new thermostat schedule. -/// -[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// ID of the thermostat device for which you want to create a schedule. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Date and time at which the new thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "ends_at", IsRequired = true, EmitDefaultValue = false)] -public string EndsAt { get; set; } - -/// -/// Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the new schedule is active. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOverrideAllowed { get; set; } - -/// -/// Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[DataMember(Name = "max_override_period_minutes", IsRequired = false, EmitDefaultValue = false)] -public int? MaxOverridePeriodMinutes { get; set; } - -/// -/// Name of the thermostat schedule. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Date and time at which the new thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = true, EmitDefaultValue = false)] -public string StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(ThermostatSchedule thermostatSchedule = default) -{ -ThermostatSchedule = thermostatSchedule; -} - -/// -/// OK -/// -[DataMember(Name = "thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] -public ThermostatSchedule ThermostatSchedule { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public ThermostatSchedule Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/schedules/create", requestOptions).EnsureData("/thermostats/schedules/create").ThermostatSchedule; -} - -/// -/// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public ThermostatSchedule Create(string climatePresetKey = default, string deviceId = default, string endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default) -{ -return Create(new CreateRequest(climatePresetKey: climatePresetKey, deviceId: deviceId, endsAt: endsAt, isOverrideAllowed: isOverrideAllowed, maxOverridePeriodMinutes: maxOverridePeriodMinutes, name: name, startsAt: startsAt)); -} - -/// -/// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/schedules/create", requestOptions)).EnsureData("/thermostats/schedules/create").ThermostatSchedule; -} - -/// -/// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task CreateAsync(string climatePresetKey = default, string deviceId = default, string endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default) -{ -return (await CreateAsync(new CreateRequest(climatePresetKey: climatePresetKey, deviceId: deviceId, endsAt: endsAt, isOverrideAllowed: isOverrideAllowed, maxOverridePeriodMinutes: maxOverridePeriodMinutes, name: name, startsAt: startsAt))); -} - -/// -/// Request parameters for Delete a Thermostat Schedule. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string thermostatScheduleId = default) -{ -ThermostatScheduleId = thermostatScheduleId; -} - -/// -/// ID of the thermostat schedule that you want to delete. -/// -[DataMember(Name = "thermostat_schedule_id", IsRequired = true, EmitDefaultValue = false)] -public string ThermostatScheduleId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/thermostats/schedules/delete", requestOptions); -} - -/// -/// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void Delete(string thermostatScheduleId = default) -{ -Delete(new DeleteRequest(thermostatScheduleId: thermostatScheduleId)); -} - -/// -/// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/thermostats/schedules/delete", requestOptions); -} - -/// -/// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task DeleteAsync(string thermostatScheduleId = default) -{ -await DeleteAsync(new DeleteRequest(thermostatScheduleId: thermostatScheduleId)); -} - -/// -/// Request parameters for Get a Thermostat Schedule. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string thermostatScheduleId = default) -{ -ThermostatScheduleId = thermostatScheduleId; -} - -/// -/// ID of the thermostat schedule that you want to get. -/// -[DataMember(Name = "thermostat_schedule_id", IsRequired = true, EmitDefaultValue = false)] -public string ThermostatScheduleId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(ThermostatSchedule thermostatSchedule = default) -{ -ThermostatSchedule = thermostatSchedule; -} - -/// -/// OK -/// -[DataMember(Name = "thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] -public ThermostatSchedule ThermostatSchedule { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -public ThermostatSchedule Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/thermostats/schedules/get", requestOptions).EnsureData("/thermostats/schedules/get").ThermostatSchedule; -} - -/// -/// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -public ThermostatSchedule Get(string thermostatScheduleId = default) -{ -return Get(new GetRequest(thermostatScheduleId: thermostatScheduleId)); -} - -/// -/// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/thermostats/schedules/get", requestOptions)).EnsureData("/thermostats/schedules/get").ThermostatSchedule; -} - -/// -/// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -public async Task GetAsync(string thermostatScheduleId = default) -{ -return (await GetAsync(new GetRequest(thermostatScheduleId: thermostatScheduleId))); -} - -/// -/// Request parameters for List Thermostat Schedules. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string deviceId = default, string? userIdentifierKey = default) -{ -DeviceId = deviceId; -UserIdentifierKey = userIdentifierKey; -} - -/// -/// ID of the thermostat device for which you want to list schedules. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// User identifier key by which to filter the list of returned thermostat schedules. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List thermostatSchedules = default) -{ -ThermostatSchedules = thermostatSchedules; -} - -/// -/// OK -/// -[DataMember(Name = "thermostat_schedules", IsRequired = false, EmitDefaultValue = false)] -public List ThermostatSchedules { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/thermostats/schedules/list", requestOptions).EnsureData("/thermostats/schedules/list").ThermostatSchedules; -} - -/// -/// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public List List(string deviceId = default, string? userIdentifierKey = default) -{ -return List(new ListRequest(deviceId: deviceId, userIdentifierKey: userIdentifierKey)); -} - -/// -/// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/thermostats/schedules/list", requestOptions)).EnsureData("/thermostats/schedules/list").ThermostatSchedules; -} - -/// -/// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task> ListAsync(string deviceId = default, string? userIdentifierKey = default) -{ -return (await ListAsync(new ListRequest(deviceId: deviceId, userIdentifierKey: userIdentifierKey))); -} - -/// -/// Request parameters for Update a Thermostat Schedule. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string? climatePresetKey = default, string? endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string? startsAt = default, string thermostatScheduleId = default) -{ -ClimatePresetKey = climatePresetKey; -EndsAt = endsAt; -IsOverrideAllowed = isOverrideAllowed; -MaxOverridePeriodMinutes = maxOverridePeriodMinutes; -Name = name; -StartsAt = startsAt; -ThermostatScheduleId = thermostatScheduleId; -} - -/// -/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the thermostat schedule. -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string? ClimatePresetKey { get; set; } - -/// -/// Date and time at which the thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the schedule is active. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOverrideAllowed { get; set; } - -/// -/// Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[DataMember(Name = "max_override_period_minutes", IsRequired = false, EmitDefaultValue = false)] -public int? MaxOverridePeriodMinutes { get; set; } - -/// -/// Name of the thermostat schedule. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Date and time at which the thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// ID of the thermostat schedule that you want to update. -/// -[DataMember(Name = "thermostat_schedule_id", IsRequired = true, EmitDefaultValue = false)] -public string ThermostatScheduleId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/thermostats/schedules/update", requestOptions); -} - -/// -/// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -public void Update(string? climatePresetKey = default, string? endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string? startsAt = default, string thermostatScheduleId = default) -{ -Update(new UpdateRequest(climatePresetKey: climatePresetKey, endsAt: endsAt, isOverrideAllowed: isOverrideAllowed, maxOverridePeriodMinutes: maxOverridePeriodMinutes, name: name, startsAt: startsAt, thermostatScheduleId: thermostatScheduleId)); -} - -/// -/// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/thermostats/schedules/update", requestOptions); -} - -/// -/// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -public async Task UpdateAsync(string? climatePresetKey = default, string? endsAt = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string? startsAt = default, string thermostatScheduleId = default) -{ -await UpdateAsync(new UpdateRequest(climatePresetKey: climatePresetKey, endsAt: endsAt, isOverrideAllowed: isOverrideAllowed, maxOverridePeriodMinutes: maxOverridePeriodMinutes, name: name, startsAt: startsAt, thermostatScheduleId: thermostatScheduleId)); -} -} + public class SchedulesThermostats + { + private ISeamClient _seam; + + public SchedulesThermostats(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Thermostat Schedule. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + string climatePresetKey = default, + string deviceId = default, + string endsAt = default, + bool? isOverrideAllowed = default, + int? maxOverridePeriodMinutes = default, + string? name = default, + string startsAt = default + ) + { + ClimatePresetKey = climatePresetKey; + DeviceId = deviceId; + EndsAt = endsAt; + IsOverrideAllowed = isOverrideAllowed; + MaxOverridePeriodMinutes = maxOverridePeriodMinutes; + Name = name; + StartsAt = startsAt; + } + + /// + /// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the new thermostat schedule. + /// + [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// ID of the thermostat device for which you want to create a schedule. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Date and time at which the new thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "ends_at", IsRequired = true, EmitDefaultValue = false)] + public string EndsAt { get; set; } + + /// + /// Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the new schedule is active. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOverrideAllowed { get; set; } + + /// + /// Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [DataMember( + Name = "max_override_period_minutes", + IsRequired = false, + EmitDefaultValue = false + )] + public int? MaxOverridePeriodMinutes { get; set; } + + /// + /// Name of the thermostat schedule. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Date and time at which the new thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = true, EmitDefaultValue = false)] + public string StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(ThermostatSchedule thermostatSchedule = default) + { + ThermostatSchedule = thermostatSchedule; + } + + /// + /// OK + /// + [DataMember(Name = "thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] + public ThermostatSchedule ThermostatSchedule { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public ThermostatSchedule Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/thermostats/schedules/create", requestOptions) + .EnsureData("/thermostats/schedules/create") + .ThermostatSchedule; + } + + /// + /// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public ThermostatSchedule Create( + string climatePresetKey = default, + string deviceId = default, + string endsAt = default, + bool? isOverrideAllowed = default, + int? maxOverridePeriodMinutes = default, + string? name = default, + string startsAt = default + ) + { + return Create( + new CreateRequest( + climatePresetKey: climatePresetKey, + deviceId: deviceId, + endsAt: endsAt, + isOverrideAllowed: isOverrideAllowed, + maxOverridePeriodMinutes: maxOverridePeriodMinutes, + name: name, + startsAt: startsAt + ) + ); + } + + /// + /// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/thermostats/schedules/create", + requestOptions + ) + ) + .EnsureData("/thermostats/schedules/create") + .ThermostatSchedule; + } + + /// + /// Creates a new [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task CreateAsync( + string climatePresetKey = default, + string deviceId = default, + string endsAt = default, + bool? isOverrideAllowed = default, + int? maxOverridePeriodMinutes = default, + string? name = default, + string startsAt = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + climatePresetKey: climatePresetKey, + deviceId: deviceId, + endsAt: endsAt, + isOverrideAllowed: isOverrideAllowed, + maxOverridePeriodMinutes: maxOverridePeriodMinutes, + name: name, + startsAt: startsAt + ) + ) + ); + } + + /// + /// Request parameters for Delete a Thermostat Schedule. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string thermostatScheduleId = default) + { + ThermostatScheduleId = thermostatScheduleId; + } + + /// + /// ID of the thermostat schedule that you want to delete. + /// + [DataMember( + Name = "thermostat_schedule_id", + IsRequired = true, + EmitDefaultValue = false + )] + public string ThermostatScheduleId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/thermostats/schedules/delete", requestOptions); + } + + /// + /// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void Delete(string thermostatScheduleId = default) + { + Delete(new DeleteRequest(thermostatScheduleId: thermostatScheduleId)); + } + + /// + /// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/thermostats/schedules/delete", requestOptions); + } + + /// + /// Deletes a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task DeleteAsync(string thermostatScheduleId = default) + { + await DeleteAsync(new DeleteRequest(thermostatScheduleId: thermostatScheduleId)); + } + + /// + /// Request parameters for Get a Thermostat Schedule. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string thermostatScheduleId = default) + { + ThermostatScheduleId = thermostatScheduleId; + } + + /// + /// ID of the thermostat schedule that you want to get. + /// + [DataMember( + Name = "thermostat_schedule_id", + IsRequired = true, + EmitDefaultValue = false + )] + public string ThermostatScheduleId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(ThermostatSchedule thermostatSchedule = default) + { + ThermostatSchedule = thermostatSchedule; + } + + /// + /// OK + /// + [DataMember(Name = "thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] + public ThermostatSchedule ThermostatSchedule { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + public ThermostatSchedule Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/thermostats/schedules/get", requestOptions) + .EnsureData("/thermostats/schedules/get") + .ThermostatSchedule; + } + + /// + /// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + public ThermostatSchedule Get(string thermostatScheduleId = default) + { + return Get(new GetRequest(thermostatScheduleId: thermostatScheduleId)); + } + + /// + /// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/thermostats/schedules/get", requestOptions)) + .EnsureData("/thermostats/schedules/get") + .ThermostatSchedule; + } + + /// + /// Returns a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + public async Task GetAsync(string thermostatScheduleId = default) + { + return (await GetAsync(new GetRequest(thermostatScheduleId: thermostatScheduleId))); + } + + /// + /// Request parameters for List Thermostat Schedules. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest(string deviceId = default, string? userIdentifierKey = default) + { + DeviceId = deviceId; + UserIdentifierKey = userIdentifierKey; + } + + /// + /// ID of the thermostat device for which you want to list schedules. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// User identifier key by which to filter the list of returned thermostat schedules. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List thermostatSchedules = default) + { + ThermostatSchedules = thermostatSchedules; + } + + /// + /// OK + /// + [DataMember( + Name = "thermostat_schedules", + IsRequired = false, + EmitDefaultValue = false + )] + public List ThermostatSchedules { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/thermostats/schedules/list", requestOptions) + .EnsureData("/thermostats/schedules/list") + .ThermostatSchedules; + } + + /// + /// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public List List( + string deviceId = default, + string? userIdentifierKey = default + ) + { + return List(new ListRequest(deviceId: deviceId, userIdentifierKey: userIdentifierKey)); + } + + /// + /// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync("/thermostats/schedules/list", requestOptions) + ) + .EnsureData("/thermostats/schedules/list") + .ThermostatSchedules; + } + + /// + /// Returns a list of all [thermostat schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task> ListAsync( + string deviceId = default, + string? userIdentifierKey = default + ) + { + return ( + await ListAsync( + new ListRequest(deviceId: deviceId, userIdentifierKey: userIdentifierKey) + ) + ); + } + + /// + /// Request parameters for Update a Thermostat Schedule. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string? climatePresetKey = default, + string? endsAt = default, + bool? isOverrideAllowed = default, + int? maxOverridePeriodMinutes = default, + string? name = default, + string? startsAt = default, + string thermostatScheduleId = default + ) + { + ClimatePresetKey = climatePresetKey; + EndsAt = endsAt; + IsOverrideAllowed = isOverrideAllowed; + MaxOverridePeriodMinutes = maxOverridePeriodMinutes; + Name = name; + StartsAt = startsAt; + ThermostatScheduleId = thermostatScheduleId; + } + + /// + /// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the thermostat schedule. + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string? ClimatePresetKey { get; set; } + + /// + /// Date and time at which the thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the schedule is active. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOverrideAllowed { get; set; } + + /// + /// Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [DataMember( + Name = "max_override_period_minutes", + IsRequired = false, + EmitDefaultValue = false + )] + public int? MaxOverridePeriodMinutes { get; set; } + + /// + /// Name of the thermostat schedule. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Date and time at which the thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// ID of the thermostat schedule that you want to update. + /// + [DataMember( + Name = "thermostat_schedule_id", + IsRequired = true, + EmitDefaultValue = false + )] + public string ThermostatScheduleId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/thermostats/schedules/update", requestOptions); + } + + /// + /// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + public void Update( + string? climatePresetKey = default, + string? endsAt = default, + bool? isOverrideAllowed = default, + int? maxOverridePeriodMinutes = default, + string? name = default, + string? startsAt = default, + string thermostatScheduleId = default + ) + { + Update( + new UpdateRequest( + climatePresetKey: climatePresetKey, + endsAt: endsAt, + isOverrideAllowed: isOverrideAllowed, + maxOverridePeriodMinutes: maxOverridePeriodMinutes, + name: name, + startsAt: startsAt, + thermostatScheduleId: thermostatScheduleId + ) + ); + } + + /// + /// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/thermostats/schedules/update", requestOptions); + } + + /// + /// Updates a specified [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + public async Task UpdateAsync( + string? climatePresetKey = default, + string? endsAt = default, + bool? isOverrideAllowed = default, + int? maxOverridePeriodMinutes = default, + string? name = default, + string? startsAt = default, + string thermostatScheduleId = default + ) + { + await UpdateAsync( + new UpdateRequest( + climatePresetKey: climatePresetKey, + endsAt: endsAt, + isOverrideAllowed: isOverrideAllowed, + maxOverridePeriodMinutes: maxOverridePeriodMinutes, + name: name, + startsAt: startsAt, + thermostatScheduleId: thermostatScheduleId + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SchedulesThermostats SchedulesThermostats => new(this); -} + public partial class SeamClient + { + public Api.SchedulesThermostats SchedulesThermostats => new(this); + } -public partial interface ISeamClient -{ -public Api.SchedulesThermostats SchedulesThermostats { get; } -} + public partial interface ISeamClient + { + public Api.SchedulesThermostats SchedulesThermostats { get; } + } } diff --git a/src/Seam/Api/SimulateAccessCodes.cs b/src/Seam/Api/SimulateAccessCodes.cs index dfb4d671..97f34fef 100644 --- a/src/Seam/Api/SimulateAccessCodes.cs +++ b/src/Seam/Api/SimulateAccessCodes.cs @@ -9,153 +9,188 @@ namespace Seam.Api { -public class SimulateAccessCodes -{ -private ISeamClient _seam; - -public SimulateAccessCodes(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Simulate Creating an Unmanaged Access Code. -/// -[DataContract(Name = "createUnmanagedAccessCodeRequest_request")] -public class CreateUnmanagedAccessCodeRequest -{ -[JsonConstructorAttribute] -protected CreateUnmanagedAccessCodeRequest() { } - -public CreateUnmanagedAccessCodeRequest(string code = default, string deviceId = default, string name = default) -{ -Code = code; -DeviceId = deviceId; -Name = name; -} - -/// -/// Code of the simulated unmanaged access code. -/// -[DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] -public string Code { get; set; } - -/// -/// ID of the device for which you want to simulate the creation of an unmanaged access code. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Name of the simulated unmanaged access code. -/// -[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] -public string Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createUnmanagedAccessCodeResponse_response")] -public class CreateUnmanagedAccessCodeResponse -{ -[JsonConstructorAttribute] -protected CreateUnmanagedAccessCodeResponse() { } - -public CreateUnmanagedAccessCodeResponse(UnmanagedAccessCode accessCode = default) -{ -AccessCode = accessCode; -} - -/// -/// OK -/// -[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessCode AccessCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public UnmanagedAccessCode CreateUnmanagedAccessCode(CreateUnmanagedAccessCodeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/access_codes/simulate/create_unmanaged_access_code", requestOptions).EnsureData("/access_codes/simulate/create_unmanaged_access_code").AccessCode; -} - -/// -/// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public UnmanagedAccessCode CreateUnmanagedAccessCode(string code = default, string deviceId = default, string name = default) -{ -return CreateUnmanagedAccessCode(new CreateUnmanagedAccessCodeRequest(code: code, deviceId: deviceId, name: name)); -} - -/// -/// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task CreateUnmanagedAccessCodeAsync(CreateUnmanagedAccessCodeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/access_codes/simulate/create_unmanaged_access_code", requestOptions)).EnsureData("/access_codes/simulate/create_unmanaged_access_code").AccessCode; -} - -/// -/// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task CreateUnmanagedAccessCodeAsync(string code = default, string deviceId = default, string name = default) -{ -return (await CreateUnmanagedAccessCodeAsync(new CreateUnmanagedAccessCodeRequest(code: code, deviceId: deviceId, name: name))); -} -} + public class SimulateAccessCodes + { + private ISeamClient _seam; + + public SimulateAccessCodes(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Simulate Creating an Unmanaged Access Code. + /// + [DataContract(Name = "createUnmanagedAccessCodeRequest_request")] + public class CreateUnmanagedAccessCodeRequest + { + [JsonConstructorAttribute] + protected CreateUnmanagedAccessCodeRequest() { } + + public CreateUnmanagedAccessCodeRequest( + string code = default, + string deviceId = default, + string name = default + ) + { + Code = code; + DeviceId = deviceId; + Name = name; + } + + /// + /// Code of the simulated unmanaged access code. + /// + [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] + public string Code { get; set; } + + /// + /// ID of the device for which you want to simulate the creation of an unmanaged access code. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Name of the simulated unmanaged access code. + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createUnmanagedAccessCodeResponse_response")] + public class CreateUnmanagedAccessCodeResponse + { + [JsonConstructorAttribute] + protected CreateUnmanagedAccessCodeResponse() { } + + public CreateUnmanagedAccessCodeResponse(UnmanagedAccessCode accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// OK + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessCode AccessCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public UnmanagedAccessCode CreateUnmanagedAccessCode( + CreateUnmanagedAccessCodeRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/access_codes/simulate/create_unmanaged_access_code", + requestOptions + ) + .EnsureData("/access_codes/simulate/create_unmanaged_access_code") + .AccessCode; + } + + /// + /// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public UnmanagedAccessCode CreateUnmanagedAccessCode( + string code = default, + string deviceId = default, + string name = default + ) + { + return CreateUnmanagedAccessCode( + new CreateUnmanagedAccessCodeRequest(code: code, deviceId: deviceId, name: name) + ); + } + + /// + /// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task CreateUnmanagedAccessCodeAsync( + CreateUnmanagedAccessCodeRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/access_codes/simulate/create_unmanaged_access_code", + requestOptions + ) + ) + .EnsureData("/access_codes/simulate/create_unmanaged_access_code") + .AccessCode; + } + + /// + /// Simulates the creation of an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task CreateUnmanagedAccessCodeAsync( + string code = default, + string deviceId = default, + string name = default + ) + { + return ( + await CreateUnmanagedAccessCodeAsync( + new CreateUnmanagedAccessCodeRequest(code: code, deviceId: deviceId, name: name) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SimulateAccessCodes SimulateAccessCodes => new(this); -} + public partial class SeamClient + { + public Api.SimulateAccessCodes SimulateAccessCodes => new(this); + } -public partial interface ISeamClient -{ -public Api.SimulateAccessCodes SimulateAccessCodes { get; } -} + public partial interface ISeamClient + { + public Api.SimulateAccessCodes SimulateAccessCodes { get; } + } } diff --git a/src/Seam/Api/SimulateConnectedAccounts.cs b/src/Seam/Api/SimulateConnectedAccounts.cs index 52b72deb..214394df 100644 --- a/src/Seam/Api/SimulateConnectedAccounts.cs +++ b/src/Seam/Api/SimulateConnectedAccounts.cs @@ -9,102 +9,105 @@ namespace Seam.Api { -public class SimulateConnectedAccounts -{ -private ISeamClient _seam; + public class SimulateConnectedAccounts + { + private ISeamClient _seam; -public SimulateConnectedAccounts(ISeamClient seam) -{ -_seam = seam; -} + public SimulateConnectedAccounts(ISeamClient seam) + { + _seam = seam; + } -/// -/// Request parameters for Simulate Connected Account Disconnection. -/// -[DataContract(Name = "disconnectRequest_request")] -public class DisconnectRequest -{ -[JsonConstructorAttribute] -protected DisconnectRequest() { } + /// + /// Request parameters for Simulate Connected Account Disconnection. + /// + [DataContract(Name = "disconnectRequest_request")] + public class DisconnectRequest + { + [JsonConstructorAttribute] + protected DisconnectRequest() { } -public DisconnectRequest(string connectedAccountId = default) -{ -ConnectedAccountId = connectedAccountId; -} + public DisconnectRequest(string connectedAccountId = default) + { + ConnectedAccountId = connectedAccountId; + } -/// -/// ID of the connected account you want to simulate as disconnected. -/// -[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } + /// + /// ID of the connected account you want to simulate as disconnected. + /// + [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } -return stringWriter.ToString(); -} -} + return stringWriter.ToString(); + } + } -/// -/// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void Disconnect(DisconnectRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/connected_accounts/simulate/disconnect", requestOptions); -} + /// + /// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void Disconnect(DisconnectRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/connected_accounts/simulate/disconnect", requestOptions); + } -/// -/// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void Disconnect(string connectedAccountId = default) -{ -Disconnect(new DisconnectRequest(connectedAccountId: connectedAccountId)); -} + /// + /// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void Disconnect(string connectedAccountId = default) + { + Disconnect(new DisconnectRequest(connectedAccountId: connectedAccountId)); + } -/// -/// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task DisconnectAsync(DisconnectRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/connected_accounts/simulate/disconnect", requestOptions); -} + /// + /// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task DisconnectAsync(DisconnectRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/connected_accounts/simulate/disconnect", + requestOptions + ); + } -/// -/// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task DisconnectAsync(string connectedAccountId = default) -{ -await DisconnectAsync(new DisconnectRequest(connectedAccountId: connectedAccountId)); -} -} + /// + /// Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task DisconnectAsync(string connectedAccountId = default) + { + await DisconnectAsync(new DisconnectRequest(connectedAccountId: connectedAccountId)); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SimulateConnectedAccounts SimulateConnectedAccounts => new(this); -} + public partial class SeamClient + { + public Api.SimulateConnectedAccounts SimulateConnectedAccounts => new(this); + } -public partial interface ISeamClient -{ -public Api.SimulateConnectedAccounts SimulateConnectedAccounts { get; } -} + public partial interface ISeamClient + { + public Api.SimulateConnectedAccounts SimulateConnectedAccounts { get; } + } } diff --git a/src/Seam/Api/SimulateDevices.cs b/src/Seam/Api/SimulateDevices.cs index 336cf8ea..8ef9c7bb 100644 --- a/src/Seam/Api/SimulateDevices.cs +++ b/src/Seam/Api/SimulateDevices.cs @@ -9,519 +9,521 @@ namespace Seam.Api { -public class SimulateDevices -{ -private ISeamClient _seam; - -public SimulateDevices(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Simulate Device Connection. -/// -[DataContract(Name = "connectRequest_request")] -public class ConnectRequest -{ -[JsonConstructorAttribute] -protected ConnectRequest() { } - -public ConnectRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the device that you want to simulate connecting to Seam. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public void Connect(ConnectRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/devices/simulate/connect", requestOptions); -} - -/// -/// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public void Connect(string deviceId = default) -{ -Connect(new ConnectRequest(deviceId: deviceId)); -} - -/// -/// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public async Task ConnectAsync(ConnectRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/devices/simulate/connect", requestOptions); -} - -/// -/// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public async Task ConnectAsync(string deviceId = default) -{ -await ConnectAsync(new ConnectRequest(deviceId: deviceId)); -} - -/// -/// Request parameters for Simulate Hub Connection. -/// -[DataContract(Name = "connectToHubRequest_request")] -public class ConnectToHubRequest -{ -[JsonConstructorAttribute] -protected ConnectToHubRequest() { } - -public ConnectToHubRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the device whose hub you want to reconnect. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. -/// Only applicable for sandbox workspaces and currently -/// implemented for August and TTLock locks. -/// This will clear the `hub_disconnected` error on the device. -/// -public void ConnectToHub(ConnectToHubRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/devices/simulate/connect_to_hub", requestOptions); -} - -/// -/// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. -/// Only applicable for sandbox workspaces and currently -/// implemented for August and TTLock locks. -/// This will clear the `hub_disconnected` error on the device. -/// -public void ConnectToHub(string deviceId = default) -{ -ConnectToHub(new ConnectToHubRequest(deviceId: deviceId)); -} - -/// -/// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. -/// Only applicable for sandbox workspaces and currently -/// implemented for August and TTLock locks. -/// This will clear the `hub_disconnected` error on the device. -/// -public async Task ConnectToHubAsync(ConnectToHubRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/devices/simulate/connect_to_hub", requestOptions); -} - -/// -/// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. -/// Only applicable for sandbox workspaces and currently -/// implemented for August and TTLock locks. -/// This will clear the `hub_disconnected` error on the device. -/// -public async Task ConnectToHubAsync(string deviceId = default) -{ -await ConnectToHubAsync(new ConnectToHubRequest(deviceId: deviceId)); -} - -/// -/// Request parameters for Simulate Device Disconnection. -/// -[DataContract(Name = "disconnectRequest_request")] -public class DisconnectRequest -{ -[JsonConstructorAttribute] -protected DisconnectRequest() { } - -public DisconnectRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the device that you want to simulate disconnecting from Seam. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public void Disconnect(DisconnectRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/devices/simulate/disconnect", requestOptions); -} - -/// -/// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public void Disconnect(string deviceId = default) -{ -Disconnect(new DisconnectRequest(deviceId: deviceId)); -} - -/// -/// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public async Task DisconnectAsync(DisconnectRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/devices/simulate/disconnect", requestOptions); -} - -/// -/// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public async Task DisconnectAsync(string deviceId = default) -{ -await DisconnectAsync(new DisconnectRequest(deviceId: deviceId)); -} - -/// -/// Request parameters for Simulate Hub Disconnection. -/// -[DataContract(Name = "disconnectFromHubRequest_request")] -public class DisconnectFromHubRequest -{ -[JsonConstructorAttribute] -protected DisconnectFromHubRequest() { } - -public DisconnectFromHubRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the device whose hub you want to disconnect. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates taking the Wi‑Fi hub (bridge) offline for a device. -/// Only applicable for sandbox workspaces and currently -/// implemented for August, TTLock, and IglooHome devices. -/// This will set the `hub_disconnected` error on the device, or mark the -/// IglooHome bridge offline in sandbox. -/// -public void DisconnectFromHub(DisconnectFromHubRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/devices/simulate/disconnect_from_hub", requestOptions); -} - -/// -/// Simulates taking the Wi‑Fi hub (bridge) offline for a device. -/// Only applicable for sandbox workspaces and currently -/// implemented for August, TTLock, and IglooHome devices. -/// This will set the `hub_disconnected` error on the device, or mark the -/// IglooHome bridge offline in sandbox. -/// -public void DisconnectFromHub(string deviceId = default) -{ -DisconnectFromHub(new DisconnectFromHubRequest(deviceId: deviceId)); -} - -/// -/// Simulates taking the Wi‑Fi hub (bridge) offline for a device. -/// Only applicable for sandbox workspaces and currently -/// implemented for August, TTLock, and IglooHome devices. -/// This will set the `hub_disconnected` error on the device, or mark the -/// IglooHome bridge offline in sandbox. -/// -public async Task DisconnectFromHubAsync(DisconnectFromHubRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/devices/simulate/disconnect_from_hub", requestOptions); -} - -/// -/// Simulates taking the Wi‑Fi hub (bridge) offline for a device. -/// Only applicable for sandbox workspaces and currently -/// implemented for August, TTLock, and IglooHome devices. -/// This will set the `hub_disconnected` error on the device, or mark the -/// IglooHome bridge offline in sandbox. -/// -public async Task DisconnectFromHubAsync(string deviceId = default) -{ -await DisconnectFromHubAsync(new DisconnectFromHubRequest(deviceId: deviceId)); -} - -/// -/// Request parameters for Simulate Paid Subscription. -/// -[DataContract(Name = "paidSubscriptionRequest_request")] -public class PaidSubscriptionRequest -{ -[JsonConstructorAttribute] -protected PaidSubscriptionRequest() { } - -public PaidSubscriptionRequest(string deviceId = default, bool isExpired = default) -{ -DeviceId = deviceId; -IsExpired = isExpired; -} - -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -[DataMember(Name = "is_expired", IsRequired = true, EmitDefaultValue = false)] -public bool IsExpired { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). -/// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. -/// The actual device error is created/cleared by the poller after this state change. -/// -public void PaidSubscription(PaidSubscriptionRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/devices/simulate/paid_subscription", requestOptions); -} - -/// -/// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). -/// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. -/// The actual device error is created/cleared by the poller after this state change. -/// -public void PaidSubscription(string deviceId = default, bool isExpired = default) -{ -PaidSubscription(new PaidSubscriptionRequest(deviceId: deviceId, isExpired: isExpired)); -} - -/// -/// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). -/// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. -/// The actual device error is created/cleared by the poller after this state change. -/// -public async Task PaidSubscriptionAsync(PaidSubscriptionRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/devices/simulate/paid_subscription", requestOptions); -} - -/// -/// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). -/// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. -/// The actual device error is created/cleared by the poller after this state change. -/// -public async Task PaidSubscriptionAsync(string deviceId = default, bool isExpired = default) -{ -await PaidSubscriptionAsync(new PaidSubscriptionRequest(deviceId: deviceId, isExpired: isExpired)); -} - -/// -/// Request parameters for Simulate Device Removal. -/// -[DataContract(Name = "removeRequest_request")] -public class RemoveRequest -{ -[JsonConstructorAttribute] -protected RemoveRequest() { } - -public RemoveRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the device that you want to simulate removing from Seam. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public void Remove(RemoveRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/devices/simulate/remove", requestOptions); -} - -/// -/// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public void Remove(string deviceId = default) -{ -Remove(new RemoveRequest(deviceId: deviceId)); -} - -/// -/// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public async Task RemoveAsync(RemoveRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/devices/simulate/remove", requestOptions); -} - -/// -/// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). -/// -public async Task RemoveAsync(string deviceId = default) -{ -await RemoveAsync(new RemoveRequest(deviceId: deviceId)); -} -} + public class SimulateDevices + { + private ISeamClient _seam; + + public SimulateDevices(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Simulate Device Connection. + /// + [DataContract(Name = "connectRequest_request")] + public class ConnectRequest + { + [JsonConstructorAttribute] + protected ConnectRequest() { } + + public ConnectRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the device that you want to simulate connecting to Seam. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public void Connect(ConnectRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/devices/simulate/connect", requestOptions); + } + + /// + /// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public void Connect(string deviceId = default) + { + Connect(new ConnectRequest(deviceId: deviceId)); + } + + /// + /// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public async Task ConnectAsync(ConnectRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/devices/simulate/connect", requestOptions); + } + + /// + /// Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public async Task ConnectAsync(string deviceId = default) + { + await ConnectAsync(new ConnectRequest(deviceId: deviceId)); + } + + /// + /// Request parameters for Simulate Hub Connection. + /// + [DataContract(Name = "connectToHubRequest_request")] + public class ConnectToHubRequest + { + [JsonConstructorAttribute] + protected ConnectToHubRequest() { } + + public ConnectToHubRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the device whose hub you want to reconnect. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. + /// Only applicable for sandbox workspaces and currently + /// implemented for August and TTLock locks. + /// This will clear the `hub_disconnected` error on the device. + /// + public void ConnectToHub(ConnectToHubRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/devices/simulate/connect_to_hub", requestOptions); + } + + /// + /// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. + /// Only applicable for sandbox workspaces and currently + /// implemented for August and TTLock locks. + /// This will clear the `hub_disconnected` error on the device. + /// + public void ConnectToHub(string deviceId = default) + { + ConnectToHub(new ConnectToHubRequest(deviceId: deviceId)); + } + + /// + /// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. + /// Only applicable for sandbox workspaces and currently + /// implemented for August and TTLock locks. + /// This will clear the `hub_disconnected` error on the device. + /// + public async Task ConnectToHubAsync(ConnectToHubRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/devices/simulate/connect_to_hub", requestOptions); + } + + /// + /// Simulates bringing the Wi‑Fi hub (bridge) back online for a device. + /// Only applicable for sandbox workspaces and currently + /// implemented for August and TTLock locks. + /// This will clear the `hub_disconnected` error on the device. + /// + public async Task ConnectToHubAsync(string deviceId = default) + { + await ConnectToHubAsync(new ConnectToHubRequest(deviceId: deviceId)); + } + + /// + /// Request parameters for Simulate Device Disconnection. + /// + [DataContract(Name = "disconnectRequest_request")] + public class DisconnectRequest + { + [JsonConstructorAttribute] + protected DisconnectRequest() { } + + public DisconnectRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the device that you want to simulate disconnecting from Seam. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public void Disconnect(DisconnectRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/devices/simulate/disconnect", requestOptions); + } + + /// + /// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public void Disconnect(string deviceId = default) + { + Disconnect(new DisconnectRequest(deviceId: deviceId)); + } + + /// + /// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public async Task DisconnectAsync(DisconnectRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/devices/simulate/disconnect", requestOptions); + } + + /// + /// Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public async Task DisconnectAsync(string deviceId = default) + { + await DisconnectAsync(new DisconnectRequest(deviceId: deviceId)); + } + + /// + /// Request parameters for Simulate Hub Disconnection. + /// + [DataContract(Name = "disconnectFromHubRequest_request")] + public class DisconnectFromHubRequest + { + [JsonConstructorAttribute] + protected DisconnectFromHubRequest() { } + + public DisconnectFromHubRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the device whose hub you want to disconnect. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates taking the Wi‑Fi hub (bridge) offline for a device. + /// Only applicable for sandbox workspaces and currently + /// implemented for August, TTLock, and IglooHome devices. + /// This will set the `hub_disconnected` error on the device, or mark the + /// IglooHome bridge offline in sandbox. + /// + public void DisconnectFromHub(DisconnectFromHubRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/devices/simulate/disconnect_from_hub", requestOptions); + } + + /// + /// Simulates taking the Wi‑Fi hub (bridge) offline for a device. + /// Only applicable for sandbox workspaces and currently + /// implemented for August, TTLock, and IglooHome devices. + /// This will set the `hub_disconnected` error on the device, or mark the + /// IglooHome bridge offline in sandbox. + /// + public void DisconnectFromHub(string deviceId = default) + { + DisconnectFromHub(new DisconnectFromHubRequest(deviceId: deviceId)); + } + + /// + /// Simulates taking the Wi‑Fi hub (bridge) offline for a device. + /// Only applicable for sandbox workspaces and currently + /// implemented for August, TTLock, and IglooHome devices. + /// This will set the `hub_disconnected` error on the device, or mark the + /// IglooHome bridge offline in sandbox. + /// + public async Task DisconnectFromHubAsync(DisconnectFromHubRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/devices/simulate/disconnect_from_hub", requestOptions); + } + + /// + /// Simulates taking the Wi‑Fi hub (bridge) offline for a device. + /// Only applicable for sandbox workspaces and currently + /// implemented for August, TTLock, and IglooHome devices. + /// This will set the `hub_disconnected` error on the device, or mark the + /// IglooHome bridge offline in sandbox. + /// + public async Task DisconnectFromHubAsync(string deviceId = default) + { + await DisconnectFromHubAsync(new DisconnectFromHubRequest(deviceId: deviceId)); + } + + /// + /// Request parameters for Simulate Paid Subscription. + /// + [DataContract(Name = "paidSubscriptionRequest_request")] + public class PaidSubscriptionRequest + { + [JsonConstructorAttribute] + protected PaidSubscriptionRequest() { } + + public PaidSubscriptionRequest(string deviceId = default, bool isExpired = default) + { + DeviceId = deviceId; + IsExpired = isExpired; + } + + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + [DataMember(Name = "is_expired", IsRequired = true, EmitDefaultValue = false)] + public bool IsExpired { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). + /// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. + /// The actual device error is created/cleared by the poller after this state change. + /// + public void PaidSubscription(PaidSubscriptionRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/devices/simulate/paid_subscription", requestOptions); + } + + /// + /// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). + /// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. + /// The actual device error is created/cleared by the poller after this state change. + /// + public void PaidSubscription(string deviceId = default, bool isExpired = default) + { + PaidSubscription(new PaidSubscriptionRequest(deviceId: deviceId, isExpired: isExpired)); + } + + /// + /// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). + /// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. + /// The actual device error is created/cleared by the poller after this state change. + /// + public async Task PaidSubscriptionAsync(PaidSubscriptionRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/devices/simulate/paid_subscription", requestOptions); + } + + /// + /// Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). + /// Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. + /// The actual device error is created/cleared by the poller after this state change. + /// + public async Task PaidSubscriptionAsync(string deviceId = default, bool isExpired = default) + { + await PaidSubscriptionAsync( + new PaidSubscriptionRequest(deviceId: deviceId, isExpired: isExpired) + ); + } + + /// + /// Request parameters for Simulate Device Removal. + /// + [DataContract(Name = "removeRequest_request")] + public class RemoveRequest + { + [JsonConstructorAttribute] + protected RemoveRequest() { } + + public RemoveRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the device that you want to simulate removing from Seam. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public void Remove(RemoveRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/devices/simulate/remove", requestOptions); + } + + /// + /// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public void Remove(string deviceId = default) + { + Remove(new RemoveRequest(deviceId: deviceId)); + } + + /// + /// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public async Task RemoveAsync(RemoveRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/devices/simulate/remove", requestOptions); + } + + /// + /// Simulates removing a device from Seam. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://www.seam.co/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + /// + public async Task RemoveAsync(string deviceId = default) + { + await RemoveAsync(new RemoveRequest(deviceId: deviceId)); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SimulateDevices SimulateDevices => new(this); -} + public partial class SeamClient + { + public Api.SimulateDevices SimulateDevices => new(this); + } -public partial interface ISeamClient -{ -public Api.SimulateDevices SimulateDevices { get; } -} + public partial interface ISeamClient + { + public Api.SimulateDevices SimulateDevices { get; } + } } diff --git a/src/Seam/Api/SimulateEncodersAcs.cs b/src/Seam/Api/SimulateEncodersAcs.cs index 9b37286d..50a6423a 100644 --- a/src/Seam/Api/SimulateEncodersAcs.cs +++ b/src/Seam/Api/SimulateEncodersAcs.cs @@ -9,446 +9,575 @@ namespace Seam.Api { -public class SimulateEncodersAcs -{ -private ISeamClient _seam; - -public SimulateEncodersAcs(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Simulate that the Next Credential Encoding Will Fail. -/// -[DataContract(Name = "nextCredentialEncodeWillFailRequest_request")] -public class NextCredentialEncodeWillFailRequest -{ -[JsonConstructorAttribute] -protected NextCredentialEncodeWillFailRequest() { } - -public NextCredentialEncodeWillFailRequest(string? acsCredentialId = default, string acsEncoderId = default, NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default) -{ -AcsCredentialId = acsCredentialId; -AcsEncoderId = acsEncoderId; -ErrorCode = errorCode; -} - -/// -/// Code of the error to simulate. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ErrorCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "no_credential_on_encoder")] -NoCredentialOnEncoder = 1, - -[EnumMember(Value = "encoding_interrupted")] -EncodingInterrupted = 2, - -[EnumMember(Value = "uncategorized_error")] -UncategorizedError = 3, - -[EnumMember(Value = "action_attempt_expired")] -ActionAttemptExpired = 4, -} - -/// -/// ID of the `acs_credential` that will fail to be encoded onto a card in the next request. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialId { get; set; } - -/// -/// ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -/// -/// Code of the error to simulate. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public NextCredentialEncodeWillFailRequest.ErrorCodeEnum? ErrorCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void NextCredentialEncodeWillFail(NextCredentialEncodeWillFailRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/encoders/simulate/next_credential_encode_will_fail", requestOptions); -} - -/// -/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void NextCredentialEncodeWillFail(string? acsCredentialId = default, string acsEncoderId = default, NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default) -{ -NextCredentialEncodeWillFail(new NextCredentialEncodeWillFailRequest(acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId, errorCode: errorCode)); -} - -/// -/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task NextCredentialEncodeWillFailAsync(NextCredentialEncodeWillFailRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/encoders/simulate/next_credential_encode_will_fail", requestOptions); -} - -/// -/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task NextCredentialEncodeWillFailAsync(string? acsCredentialId = default, string acsEncoderId = default, NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default) -{ -await NextCredentialEncodeWillFailAsync(new NextCredentialEncodeWillFailRequest(acsCredentialId: acsCredentialId, acsEncoderId: acsEncoderId, errorCode: errorCode)); -} - -/// -/// Request parameters for Simulate that the Next Credential Encoding Will Succeed. -/// -[DataContract(Name = "nextCredentialEncodeWillSucceedRequest_request")] -public class NextCredentialEncodeWillSucceedRequest -{ -[JsonConstructorAttribute] -protected NextCredentialEncodeWillSucceedRequest() { } - -public NextCredentialEncodeWillSucceedRequest(string acsEncoderId = default, NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default) -{ -AcsEncoderId = acsEncoderId; -Scenario = scenario; -} - -/// -/// Scenario to simulate. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ScenarioEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "credential_is_issued")] -CredentialIsIssued = 1, -} - -/// -/// ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -/// -/// Scenario to simulate. -/// -[DataMember(Name = "scenario", IsRequired = false, EmitDefaultValue = false)] -public NextCredentialEncodeWillSucceedRequest.ScenarioEnum? Scenario { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void NextCredentialEncodeWillSucceed(NextCredentialEncodeWillSucceedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/encoders/simulate/next_credential_encode_will_succeed", requestOptions); -} - -/// -/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void NextCredentialEncodeWillSucceed(string acsEncoderId = default, NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default) -{ -NextCredentialEncodeWillSucceed(new NextCredentialEncodeWillSucceedRequest(acsEncoderId: acsEncoderId, scenario: scenario)); -} - -/// -/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task NextCredentialEncodeWillSucceedAsync(NextCredentialEncodeWillSucceedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/encoders/simulate/next_credential_encode_will_succeed", requestOptions); -} - -/// -/// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task NextCredentialEncodeWillSucceedAsync(string acsEncoderId = default, NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default) -{ -await NextCredentialEncodeWillSucceedAsync(new NextCredentialEncodeWillSucceedRequest(acsEncoderId: acsEncoderId, scenario: scenario)); -} - -/// -/// Request parameters for Simulate that the Next Credential Scan Will Fail. -/// -[DataContract(Name = "nextCredentialScanWillFailRequest_request")] -public class NextCredentialScanWillFailRequest -{ -[JsonConstructorAttribute] -protected NextCredentialScanWillFailRequest() { } - -public NextCredentialScanWillFailRequest(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default) -{ -AcsCredentialIdOnSeam = acsCredentialIdOnSeam; -AcsEncoderId = acsEncoderId; -ErrorCode = errorCode; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ErrorCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "no_credential_on_encoder")] -NoCredentialOnEncoder = 1, - -[EnumMember(Value = "uncategorized_error")] -UncategorizedError = 2, - -[EnumMember(Value = "action_attempt_expired")] -ActionAttemptExpired = 3, -} - -[DataMember(Name = "acs_credential_id_on_seam", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialIdOnSeam { get; set; } - -/// -/// ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public NextCredentialScanWillFailRequest.ErrorCodeEnum? ErrorCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void NextCredentialScanWillFail(NextCredentialScanWillFailRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/encoders/simulate/next_credential_scan_will_fail", requestOptions); -} - -/// -/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void NextCredentialScanWillFail(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default) -{ -NextCredentialScanWillFail(new NextCredentialScanWillFailRequest(acsCredentialIdOnSeam: acsCredentialIdOnSeam, acsEncoderId: acsEncoderId, errorCode: errorCode)); -} - -/// -/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task NextCredentialScanWillFailAsync(NextCredentialScanWillFailRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/encoders/simulate/next_credential_scan_will_fail", requestOptions); -} - -/// -/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task NextCredentialScanWillFailAsync(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default) -{ -await NextCredentialScanWillFailAsync(new NextCredentialScanWillFailRequest(acsCredentialIdOnSeam: acsCredentialIdOnSeam, acsEncoderId: acsEncoderId, errorCode: errorCode)); -} - -/// -/// Request parameters for Simulate that the Next Credential Scan Will Succeed. -/// -[DataContract(Name = "nextCredentialScanWillSucceedRequest_request")] -public class NextCredentialScanWillSucceedRequest -{ -[JsonConstructorAttribute] -protected NextCredentialScanWillSucceedRequest() { } - -public NextCredentialScanWillSucceedRequest(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default) -{ -AcsCredentialIdOnSeam = acsCredentialIdOnSeam; -AcsEncoderId = acsEncoderId; -Scenario = scenario; -} - -/// -/// Scenario to simulate. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ScenarioEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "credential_exists_on_seam")] -CredentialExistsOnSeam = 1, - -[EnumMember(Value = "credential_on_encoder_needs_update")] -CredentialOnEncoderNeedsUpdate = 2, - -[EnumMember(Value = "credential_does_not_exist_on_seam")] -CredentialDoesNotExistOnSeam = 3, - -[EnumMember(Value = "credential_on_encoder_is_empty")] -CredentialOnEncoderIsEmpty = 4, -} - -/// -/// ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation. -/// -[DataMember(Name = "acs_credential_id_on_seam", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialIdOnSeam { get; set; } - -/// -/// ID of the `acs_encoder` that will be used in the next request to scan the `acs_credential`. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -/// -/// Scenario to simulate. -/// -[DataMember(Name = "scenario", IsRequired = false, EmitDefaultValue = false)] -public NextCredentialScanWillSucceedRequest.ScenarioEnum? Scenario { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void NextCredentialScanWillSucceed(NextCredentialScanWillSucceedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/encoders/simulate/next_credential_scan_will_succeed", requestOptions); -} - -/// -/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void NextCredentialScanWillSucceed(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default) -{ -NextCredentialScanWillSucceed(new NextCredentialScanWillSucceedRequest(acsCredentialIdOnSeam: acsCredentialIdOnSeam, acsEncoderId: acsEncoderId, scenario: scenario)); -} - -/// -/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task NextCredentialScanWillSucceedAsync(NextCredentialScanWillSucceedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/encoders/simulate/next_credential_scan_will_succeed", requestOptions); -} - -/// -/// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task NextCredentialScanWillSucceedAsync(string? acsCredentialIdOnSeam = default, string acsEncoderId = default, NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default) -{ -await NextCredentialScanWillSucceedAsync(new NextCredentialScanWillSucceedRequest(acsCredentialIdOnSeam: acsCredentialIdOnSeam, acsEncoderId: acsEncoderId, scenario: scenario)); -} -} + public class SimulateEncodersAcs + { + private ISeamClient _seam; + + public SimulateEncodersAcs(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Simulate that the Next Credential Encoding Will Fail. + /// + [DataContract(Name = "nextCredentialEncodeWillFailRequest_request")] + public class NextCredentialEncodeWillFailRequest + { + [JsonConstructorAttribute] + protected NextCredentialEncodeWillFailRequest() { } + + public NextCredentialEncodeWillFailRequest( + string? acsCredentialId = default, + string acsEncoderId = default, + NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default + ) + { + AcsCredentialId = acsCredentialId; + AcsEncoderId = acsEncoderId; + ErrorCode = errorCode; + } + + /// + /// Code of the error to simulate. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ErrorCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "no_credential_on_encoder")] + NoCredentialOnEncoder = 1, + + [EnumMember(Value = "encoding_interrupted")] + EncodingInterrupted = 2, + + [EnumMember(Value = "uncategorized_error")] + UncategorizedError = 3, + + [EnumMember(Value = "action_attempt_expired")] + ActionAttemptExpired = 4, + } + + /// + /// ID of the `acs_credential` that will fail to be encoded onto a card in the next request. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialId { get; set; } + + /// + /// ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + /// + /// Code of the error to simulate. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public NextCredentialEncodeWillFailRequest.ErrorCodeEnum? ErrorCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void NextCredentialEncodeWillFail(NextCredentialEncodeWillFailRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post( + "/acs/encoders/simulate/next_credential_encode_will_fail", + requestOptions + ); + } + + /// + /// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void NextCredentialEncodeWillFail( + string? acsCredentialId = default, + string acsEncoderId = default, + NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default + ) + { + NextCredentialEncodeWillFail( + new NextCredentialEncodeWillFailRequest( + acsCredentialId: acsCredentialId, + acsEncoderId: acsEncoderId, + errorCode: errorCode + ) + ); + } + + /// + /// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task NextCredentialEncodeWillFailAsync( + NextCredentialEncodeWillFailRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/acs/encoders/simulate/next_credential_encode_will_fail", + requestOptions + ); + } + + /// + /// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task NextCredentialEncodeWillFailAsync( + string? acsCredentialId = default, + string acsEncoderId = default, + NextCredentialEncodeWillFailRequest.ErrorCodeEnum? errorCode = default + ) + { + await NextCredentialEncodeWillFailAsync( + new NextCredentialEncodeWillFailRequest( + acsCredentialId: acsCredentialId, + acsEncoderId: acsEncoderId, + errorCode: errorCode + ) + ); + } + + /// + /// Request parameters for Simulate that the Next Credential Encoding Will Succeed. + /// + [DataContract(Name = "nextCredentialEncodeWillSucceedRequest_request")] + public class NextCredentialEncodeWillSucceedRequest + { + [JsonConstructorAttribute] + protected NextCredentialEncodeWillSucceedRequest() { } + + public NextCredentialEncodeWillSucceedRequest( + string acsEncoderId = default, + NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default + ) + { + AcsEncoderId = acsEncoderId; + Scenario = scenario; + } + + /// + /// Scenario to simulate. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ScenarioEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "credential_is_issued")] + CredentialIsIssued = 1, + } + + /// + /// ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + /// + /// Scenario to simulate. + /// + [DataMember(Name = "scenario", IsRequired = false, EmitDefaultValue = false)] + public NextCredentialEncodeWillSucceedRequest.ScenarioEnum? Scenario { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void NextCredentialEncodeWillSucceed(NextCredentialEncodeWillSucceedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post( + "/acs/encoders/simulate/next_credential_encode_will_succeed", + requestOptions + ); + } + + /// + /// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void NextCredentialEncodeWillSucceed( + string acsEncoderId = default, + NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default + ) + { + NextCredentialEncodeWillSucceed( + new NextCredentialEncodeWillSucceedRequest( + acsEncoderId: acsEncoderId, + scenario: scenario + ) + ); + } + + /// + /// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task NextCredentialEncodeWillSucceedAsync( + NextCredentialEncodeWillSucceedRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/acs/encoders/simulate/next_credential_encode_will_succeed", + requestOptions + ); + } + + /// + /// Simulates that the next attempt to encode a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task NextCredentialEncodeWillSucceedAsync( + string acsEncoderId = default, + NextCredentialEncodeWillSucceedRequest.ScenarioEnum? scenario = default + ) + { + await NextCredentialEncodeWillSucceedAsync( + new NextCredentialEncodeWillSucceedRequest( + acsEncoderId: acsEncoderId, + scenario: scenario + ) + ); + } + + /// + /// Request parameters for Simulate that the Next Credential Scan Will Fail. + /// + [DataContract(Name = "nextCredentialScanWillFailRequest_request")] + public class NextCredentialScanWillFailRequest + { + [JsonConstructorAttribute] + protected NextCredentialScanWillFailRequest() { } + + public NextCredentialScanWillFailRequest( + string? acsCredentialIdOnSeam = default, + string acsEncoderId = default, + NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default + ) + { + AcsCredentialIdOnSeam = acsCredentialIdOnSeam; + AcsEncoderId = acsEncoderId; + ErrorCode = errorCode; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ErrorCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "no_credential_on_encoder")] + NoCredentialOnEncoder = 1, + + [EnumMember(Value = "uncategorized_error")] + UncategorizedError = 2, + + [EnumMember(Value = "action_attempt_expired")] + ActionAttemptExpired = 3, + } + + [DataMember( + Name = "acs_credential_id_on_seam", + IsRequired = false, + EmitDefaultValue = false + )] + public string? AcsCredentialIdOnSeam { get; set; } + + /// + /// ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public NextCredentialScanWillFailRequest.ErrorCodeEnum? ErrorCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void NextCredentialScanWillFail(NextCredentialScanWillFailRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post( + "/acs/encoders/simulate/next_credential_scan_will_fail", + requestOptions + ); + } + + /// + /// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void NextCredentialScanWillFail( + string? acsCredentialIdOnSeam = default, + string acsEncoderId = default, + NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default + ) + { + NextCredentialScanWillFail( + new NextCredentialScanWillFailRequest( + acsCredentialIdOnSeam: acsCredentialIdOnSeam, + acsEncoderId: acsEncoderId, + errorCode: errorCode + ) + ); + } + + /// + /// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task NextCredentialScanWillFailAsync(NextCredentialScanWillFailRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/acs/encoders/simulate/next_credential_scan_will_fail", + requestOptions + ); + } + + /// + /// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task NextCredentialScanWillFailAsync( + string? acsCredentialIdOnSeam = default, + string acsEncoderId = default, + NextCredentialScanWillFailRequest.ErrorCodeEnum? errorCode = default + ) + { + await NextCredentialScanWillFailAsync( + new NextCredentialScanWillFailRequest( + acsCredentialIdOnSeam: acsCredentialIdOnSeam, + acsEncoderId: acsEncoderId, + errorCode: errorCode + ) + ); + } + + /// + /// Request parameters for Simulate that the Next Credential Scan Will Succeed. + /// + [DataContract(Name = "nextCredentialScanWillSucceedRequest_request")] + public class NextCredentialScanWillSucceedRequest + { + [JsonConstructorAttribute] + protected NextCredentialScanWillSucceedRequest() { } + + public NextCredentialScanWillSucceedRequest( + string? acsCredentialIdOnSeam = default, + string acsEncoderId = default, + NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default + ) + { + AcsCredentialIdOnSeam = acsCredentialIdOnSeam; + AcsEncoderId = acsEncoderId; + Scenario = scenario; + } + + /// + /// Scenario to simulate. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ScenarioEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "credential_exists_on_seam")] + CredentialExistsOnSeam = 1, + + [EnumMember(Value = "credential_on_encoder_needs_update")] + CredentialOnEncoderNeedsUpdate = 2, + + [EnumMember(Value = "credential_does_not_exist_on_seam")] + CredentialDoesNotExistOnSeam = 3, + + [EnumMember(Value = "credential_on_encoder_is_empty")] + CredentialOnEncoderIsEmpty = 4, + } + + /// + /// ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation. + /// + [DataMember( + Name = "acs_credential_id_on_seam", + IsRequired = false, + EmitDefaultValue = false + )] + public string? AcsCredentialIdOnSeam { get; set; } + + /// + /// ID of the `acs_encoder` that will be used in the next request to scan the `acs_credential`. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + /// + /// Scenario to simulate. + /// + [DataMember(Name = "scenario", IsRequired = false, EmitDefaultValue = false)] + public NextCredentialScanWillSucceedRequest.ScenarioEnum? Scenario { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void NextCredentialScanWillSucceed(NextCredentialScanWillSucceedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post( + "/acs/encoders/simulate/next_credential_scan_will_succeed", + requestOptions + ); + } + + /// + /// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void NextCredentialScanWillSucceed( + string? acsCredentialIdOnSeam = default, + string acsEncoderId = default, + NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default + ) + { + NextCredentialScanWillSucceed( + new NextCredentialScanWillSucceedRequest( + acsCredentialIdOnSeam: acsCredentialIdOnSeam, + acsEncoderId: acsEncoderId, + scenario: scenario + ) + ); + } + + /// + /// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task NextCredentialScanWillSucceedAsync( + NextCredentialScanWillSucceedRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/acs/encoders/simulate/next_credential_scan_will_succeed", + requestOptions + ); + } + + /// + /// Simulates that the next attempt to scan a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task NextCredentialScanWillSucceedAsync( + string? acsCredentialIdOnSeam = default, + string acsEncoderId = default, + NextCredentialScanWillSucceedRequest.ScenarioEnum? scenario = default + ) + { + await NextCredentialScanWillSucceedAsync( + new NextCredentialScanWillSucceedRequest( + acsCredentialIdOnSeam: acsCredentialIdOnSeam, + acsEncoderId: acsEncoderId, + scenario: scenario + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SimulateEncodersAcs SimulateEncodersAcs => new(this); -} + public partial class SeamClient + { + public Api.SimulateEncodersAcs SimulateEncodersAcs => new(this); + } -public partial interface ISeamClient -{ -public Api.SimulateEncodersAcs SimulateEncodersAcs { get; } -} + public partial interface ISeamClient + { + public Api.SimulateEncodersAcs SimulateEncodersAcs { get; } + } } diff --git a/src/Seam/Api/SimulateLocks.cs b/src/Seam/Api/SimulateLocks.cs index 82f333f2..f86d81f8 100644 --- a/src/Seam/Api/SimulateLocks.cs +++ b/src/Seam/Api/SimulateLocks.cs @@ -9,259 +9,293 @@ namespace Seam.Api { -public class SimulateLocks -{ -private ISeamClient _seam; - -public SimulateLocks(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Simulate a Keypad Code Entry. -/// -[DataContract(Name = "keypadCodeEntryRequest_request")] -public class KeypadCodeEntryRequest -{ -[JsonConstructorAttribute] -protected KeypadCodeEntryRequest() { } - -public KeypadCodeEntryRequest(string code = default, string deviceId = default) -{ -Code = code; -DeviceId = deviceId; -} - -/// -/// Code that you want to simulate entering on a keypad. -/// -[DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] -public string Code { get; set; } - -/// -/// ID of the device for which you want to simulate a keypad code entry. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "keypadCodeEntryResponse_response")] -public class KeypadCodeEntryResponse -{ -[JsonConstructorAttribute] -protected KeypadCodeEntryResponse() { } - -public KeypadCodeEntryResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public ActionAttempt KeypadCodeEntry(KeypadCodeEntryRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/locks/simulate/keypad_code_entry", requestOptions).EnsureData("/locks/simulate/keypad_code_entry").ActionAttempt; -} - -/// -/// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public ActionAttempt KeypadCodeEntry(string code = default, string deviceId = default) -{ -return KeypadCodeEntry(new KeypadCodeEntryRequest(code: code, deviceId: deviceId)); -} - -/// -/// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task KeypadCodeEntryAsync(KeypadCodeEntryRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/locks/simulate/keypad_code_entry", requestOptions)).EnsureData("/locks/simulate/keypad_code_entry").ActionAttempt; -} - -/// -/// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task KeypadCodeEntryAsync(string code = default, string deviceId = default) -{ -return (await KeypadCodeEntryAsync(new KeypadCodeEntryRequest(code: code, deviceId: deviceId))); -} - -/// -/// Request parameters for Simulate a Manual Lock Action Using a Keypad. -/// -[DataContract(Name = "manualLockViaKeypadRequest_request")] -public class ManualLockViaKeypadRequest -{ -[JsonConstructorAttribute] -protected ManualLockViaKeypadRequest() { } - -public ManualLockViaKeypadRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the device for which you want to simulate a manual lock action using a keypad. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "manualLockViaKeypadResponse_response")] -public class ManualLockViaKeypadResponse -{ -[JsonConstructorAttribute] -protected ManualLockViaKeypadResponse() { } - -public ManualLockViaKeypadResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public ActionAttempt ManualLockViaKeypad(ManualLockViaKeypadRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/locks/simulate/manual_lock_via_keypad", requestOptions).EnsureData("/locks/simulate/manual_lock_via_keypad").ActionAttempt; -} - -/// -/// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public ActionAttempt ManualLockViaKeypad(string deviceId = default) -{ -return ManualLockViaKeypad(new ManualLockViaKeypadRequest(deviceId: deviceId)); -} - -/// -/// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task ManualLockViaKeypadAsync(ManualLockViaKeypadRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/locks/simulate/manual_lock_via_keypad", requestOptions)).EnsureData("/locks/simulate/manual_lock_via_keypad").ActionAttempt; -} - -/// -/// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task ManualLockViaKeypadAsync(string deviceId = default) -{ -return (await ManualLockViaKeypadAsync(new ManualLockViaKeypadRequest(deviceId: deviceId))); -} -} + public class SimulateLocks + { + private ISeamClient _seam; + + public SimulateLocks(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Simulate a Keypad Code Entry. + /// + [DataContract(Name = "keypadCodeEntryRequest_request")] + public class KeypadCodeEntryRequest + { + [JsonConstructorAttribute] + protected KeypadCodeEntryRequest() { } + + public KeypadCodeEntryRequest(string code = default, string deviceId = default) + { + Code = code; + DeviceId = deviceId; + } + + /// + /// Code that you want to simulate entering on a keypad. + /// + [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = false)] + public string Code { get; set; } + + /// + /// ID of the device for which you want to simulate a keypad code entry. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "keypadCodeEntryResponse_response")] + public class KeypadCodeEntryResponse + { + [JsonConstructorAttribute] + protected KeypadCodeEntryResponse() { } + + public KeypadCodeEntryResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public ActionAttempt KeypadCodeEntry(KeypadCodeEntryRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/locks/simulate/keypad_code_entry", requestOptions) + .EnsureData("/locks/simulate/keypad_code_entry") + .ActionAttempt; + } + + /// + /// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public ActionAttempt KeypadCodeEntry(string code = default, string deviceId = default) + { + return KeypadCodeEntry(new KeypadCodeEntryRequest(code: code, deviceId: deviceId)); + } + + /// + /// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task KeypadCodeEntryAsync(KeypadCodeEntryRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/locks/simulate/keypad_code_entry", + requestOptions + ) + ) + .EnsureData("/locks/simulate/keypad_code_entry") + .ActionAttempt; + } + + /// + /// Simulates the entry of a code on a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task KeypadCodeEntryAsync( + string code = default, + string deviceId = default + ) + { + return ( + await KeypadCodeEntryAsync( + new KeypadCodeEntryRequest(code: code, deviceId: deviceId) + ) + ); + } + + /// + /// Request parameters for Simulate a Manual Lock Action Using a Keypad. + /// + [DataContract(Name = "manualLockViaKeypadRequest_request")] + public class ManualLockViaKeypadRequest + { + [JsonConstructorAttribute] + protected ManualLockViaKeypadRequest() { } + + public ManualLockViaKeypadRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the device for which you want to simulate a manual lock action using a keypad. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "manualLockViaKeypadResponse_response")] + public class ManualLockViaKeypadResponse + { + [JsonConstructorAttribute] + protected ManualLockViaKeypadResponse() { } + + public ManualLockViaKeypadResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public ActionAttempt ManualLockViaKeypad(ManualLockViaKeypadRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/locks/simulate/manual_lock_via_keypad", + requestOptions + ) + .EnsureData("/locks/simulate/manual_lock_via_keypad") + .ActionAttempt; + } + + /// + /// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public ActionAttempt ManualLockViaKeypad(string deviceId = default) + { + return ManualLockViaKeypad(new ManualLockViaKeypadRequest(deviceId: deviceId)); + } + + /// + /// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task ManualLockViaKeypadAsync( + ManualLockViaKeypadRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/locks/simulate/manual_lock_via_keypad", + requestOptions + ) + ) + .EnsureData("/locks/simulate/manual_lock_via_keypad") + .ActionAttempt; + } + + /// + /// Simulates a manual lock action using a keypad. You can only perform this action for [August](https://www.seam.co/docs/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task ManualLockViaKeypadAsync(string deviceId = default) + { + return ( + await ManualLockViaKeypadAsync(new ManualLockViaKeypadRequest(deviceId: deviceId)) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SimulateLocks SimulateLocks => new(this); -} - -public partial interface ISeamClient -{ -public Api.SimulateLocks SimulateLocks { get; } -} + public partial class SeamClient + { + public Api.SimulateLocks SimulateLocks => new(this); + } + + public partial interface ISeamClient + { + public Api.SimulateLocks SimulateLocks { get; } + } } diff --git a/src/Seam/Api/SimulateNoiseSensors.cs b/src/Seam/Api/SimulateNoiseSensors.cs index 33aaefc9..b2409f72 100644 --- a/src/Seam/Api/SimulateNoiseSensors.cs +++ b/src/Seam/Api/SimulateNoiseSensors.cs @@ -9,102 +9,105 @@ namespace Seam.Api { -public class SimulateNoiseSensors -{ -private ISeamClient _seam; + public class SimulateNoiseSensors + { + private ISeamClient _seam; -public SimulateNoiseSensors(ISeamClient seam) -{ -_seam = seam; -} + public SimulateNoiseSensors(ISeamClient seam) + { + _seam = seam; + } -/// -/// Request parameters for Simulate Triggering a Noise Threshold. -/// -[DataContract(Name = "triggerNoiseThresholdRequest_request")] -public class TriggerNoiseThresholdRequest -{ -[JsonConstructorAttribute] -protected TriggerNoiseThresholdRequest() { } + /// + /// Request parameters for Simulate Triggering a Noise Threshold. + /// + [DataContract(Name = "triggerNoiseThresholdRequest_request")] + public class TriggerNoiseThresholdRequest + { + [JsonConstructorAttribute] + protected TriggerNoiseThresholdRequest() { } -public TriggerNoiseThresholdRequest(string deviceId = default) -{ -DeviceId = deviceId; -} + public TriggerNoiseThresholdRequest(string deviceId = default) + { + DeviceId = deviceId; + } -/// -/// ID of the device for which you want to simulate the triggering of a noise threshold. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } + /// + /// ID of the device for which you want to simulate the triggering of a noise threshold. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } -return stringWriter.ToString(); -} -} + return stringWriter.ToString(); + } + } -/// -/// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void TriggerNoiseThreshold(TriggerNoiseThresholdRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/noise_sensors/simulate/trigger_noise_threshold", requestOptions); -} + /// + /// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void TriggerNoiseThreshold(TriggerNoiseThresholdRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/noise_sensors/simulate/trigger_noise_threshold", requestOptions); + } -/// -/// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public void TriggerNoiseThreshold(string deviceId = default) -{ -TriggerNoiseThreshold(new TriggerNoiseThresholdRequest(deviceId: deviceId)); -} + /// + /// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public void TriggerNoiseThreshold(string deviceId = default) + { + TriggerNoiseThreshold(new TriggerNoiseThresholdRequest(deviceId: deviceId)); + } -/// -/// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task TriggerNoiseThresholdAsync(TriggerNoiseThresholdRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/noise_sensors/simulate/trigger_noise_threshold", requestOptions); -} + /// + /// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task TriggerNoiseThresholdAsync(TriggerNoiseThresholdRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/noise_sensors/simulate/trigger_noise_threshold", + requestOptions + ); + } -/// -/// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -public async Task TriggerNoiseThresholdAsync(string deviceId = default) -{ -await TriggerNoiseThresholdAsync(new TriggerNoiseThresholdRequest(deviceId: deviceId)); -} -} + /// + /// Simulates the triggering of a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors) in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + public async Task TriggerNoiseThresholdAsync(string deviceId = default) + { + await TriggerNoiseThresholdAsync(new TriggerNoiseThresholdRequest(deviceId: deviceId)); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SimulateNoiseSensors SimulateNoiseSensors => new(this); -} + public partial class SeamClient + { + public Api.SimulateNoiseSensors SimulateNoiseSensors => new(this); + } -public partial interface ISeamClient -{ -public Api.SimulateNoiseSensors SimulateNoiseSensors { get; } -} + public partial interface ISeamClient + { + public Api.SimulateNoiseSensors SimulateNoiseSensors { get; } + } } diff --git a/src/Seam/Api/SimulatePhones.cs b/src/Seam/Api/SimulatePhones.cs index 4d85ec32..85df60f5 100644 --- a/src/Seam/Api/SimulatePhones.cs +++ b/src/Seam/Api/SimulatePhones.cs @@ -9,306 +9,371 @@ namespace Seam.Api { -public class SimulatePhones -{ -private ISeamClient _seam; - -public SimulatePhones(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Sandbox Phone. -/// -[DataContract(Name = "createSandboxPhoneRequest_request")] -public class CreateSandboxPhoneRequest -{ -[JsonConstructorAttribute] -protected CreateSandboxPhoneRequest() { } - -public CreateSandboxPhoneRequest(CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, string? customSdkInstallationId = default, CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, string userIdentityId = default) -{ -AssaAbloyMetadata = assaAbloyMetadata; -CustomSdkInstallationId = customSdkInstallationId; -PhoneMetadata = phoneMetadata; -UserIdentityId = userIdentityId; -} - -/// -/// ASSA ABLOY metadata that you want to associate with the simulated phone. -/// -[DataMember(Name = "assa_abloy_metadata", IsRequired = false, EmitDefaultValue = false)] -public CreateSandboxPhoneRequestAssaAbloyMetadata? AssaAbloyMetadata { get; set; } - -/// -/// ID of the custom SDK installation that you want to use for the simulated phone. -/// -[DataMember(Name = "custom_sdk_installation_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomSdkInstallationId { get; set; } - -/// -/// Metadata that you want to associate with the simulated phone. -/// -[DataMember(Name = "phone_metadata", IsRequired = false, EmitDefaultValue = false)] -public CreateSandboxPhoneRequestPhoneMetadata? PhoneMetadata { get; set; } - -/// -/// ID of the user identity that you want to associate with the simulated phone. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createSandboxPhoneRequestAssaAbloyMetadata_model")] -public class CreateSandboxPhoneRequestAssaAbloyMetadata -{ -[JsonConstructorAttribute] -protected CreateSandboxPhoneRequestAssaAbloyMetadata() { } - -public CreateSandboxPhoneRequestAssaAbloyMetadata(string? applicationVersion = default, bool? bleCapability = default, bool? hceCapability = default, bool? nfcCapability = default, string? seosAppletVersion = default, float? seosTsmEndpointId = default) -{ -ApplicationVersion = applicationVersion; -BleCapability = bleCapability; -HceCapability = hceCapability; -NfcCapability = nfcCapability; -SeosAppletVersion = seosAppletVersion; -SeosTsmEndpointId = seosTsmEndpointId; -} - -/// -/// Application version that you want to use for the simulated phone. -/// -[DataMember(Name = "application_version", IsRequired = false, EmitDefaultValue = false)] -public string? ApplicationVersion { get; set; } - -/// -/// Indicates whether the simulated phone should have Bluetooth low energy (BLE) capability. -/// -[DataMember(Name = "ble_capability", IsRequired = false, EmitDefaultValue = false)] -public bool? BleCapability { get; set; } - -/// -/// Indicates whether the simulated phone should have host card emulation (HCE) capability. -/// -[DataMember(Name = "hce_capability", IsRequired = false, EmitDefaultValue = false)] -public bool? HceCapability { get; set; } - -/// -/// Indicates whether the simulated phone should have near-field communication (NFC) capability. -/// -[DataMember(Name = "nfc_capability", IsRequired = false, EmitDefaultValue = false)] -public bool? NfcCapability { get; set; } - -/// -/// SEOS applet version that you want to use for the simulated phone. -/// -[DataMember(Name = "seos_applet_version", IsRequired = false, EmitDefaultValue = false)] -public string? SeosAppletVersion { get; set; } - -/// -/// ID of the SEOS trusted service manager (TSM) endpoint that you want to use for the simulated phone. -/// -[DataMember(Name = "seos_tsm_endpoint_id", IsRequired = false, EmitDefaultValue = false)] -public float? SeosTsmEndpointId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createSandboxPhoneRequestPhoneMetadata_model")] -public class CreateSandboxPhoneRequestPhoneMetadata -{ -[JsonConstructorAttribute] -protected CreateSandboxPhoneRequestPhoneMetadata() { } - -public CreateSandboxPhoneRequestPhoneMetadata(string? deviceManufacturer = default, string? deviceModel = default, CreateSandboxPhoneRequestPhoneMetadata.OperatingSystemEnum? operatingSystem = default, string? osVersion = default) -{ -DeviceManufacturer = deviceManufacturer; -DeviceModel = deviceModel; -OperatingSystem = operatingSystem; -OsVersion = osVersion; -} - -/// -/// Mobile operating system that you want to use for the simulated phone. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum OperatingSystemEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "android")] -Android = 1, - -[EnumMember(Value = "ios")] -Ios = 2, -} - -/// -/// Manufacturer that you want to use for the simulated phone. -/// -[DataMember(Name = "device_manufacturer", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceManufacturer { get; set; } - -/// -/// Device model that you want to use for the simulated phone. -/// -[DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceModel { get; set; } - -/// -/// Mobile operating system that you want to use for the simulated phone. -/// -[DataMember(Name = "operating_system", IsRequired = false, EmitDefaultValue = false)] -public CreateSandboxPhoneRequestPhoneMetadata.OperatingSystemEnum? OperatingSystem { get; set; } - -/// -/// Mobile operating system version that you want to use for the simulated phone. -/// -[DataMember(Name = "os_version", IsRequired = false, EmitDefaultValue = false)] -public string? OsVersion { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createSandboxPhoneResponse_response")] -public class CreateSandboxPhoneResponse -{ -[JsonConstructorAttribute] -protected CreateSandboxPhoneResponse() { } - -public CreateSandboxPhoneResponse(Phone phone = default) -{ -Phone = phone; -} - -/// -/// OK -/// -[DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] -public Phone Phone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). -/// -public Phone CreateSandboxPhone(CreateSandboxPhoneRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/phones/simulate/create_sandbox_phone", requestOptions).EnsureData("/phones/simulate/create_sandbox_phone").Phone; -} - -/// -/// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). -/// -public Phone CreateSandboxPhone(CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, string? customSdkInstallationId = default, CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, string userIdentityId = default) -{ -return CreateSandboxPhone(new CreateSandboxPhoneRequest(assaAbloyMetadata: assaAbloyMetadata, customSdkInstallationId: customSdkInstallationId, phoneMetadata: phoneMetadata, userIdentityId: userIdentityId)); -} - -/// -/// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). -/// -public async Task CreateSandboxPhoneAsync(CreateSandboxPhoneRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/phones/simulate/create_sandbox_phone", requestOptions)).EnsureData("/phones/simulate/create_sandbox_phone").Phone; -} - -/// -/// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). -/// -public async Task CreateSandboxPhoneAsync(CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, string? customSdkInstallationId = default, CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, string userIdentityId = default) -{ -return (await CreateSandboxPhoneAsync(new CreateSandboxPhoneRequest(assaAbloyMetadata: assaAbloyMetadata, customSdkInstallationId: customSdkInstallationId, phoneMetadata: phoneMetadata, userIdentityId: userIdentityId))); -} -} + public class SimulatePhones + { + private ISeamClient _seam; + + public SimulatePhones(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Sandbox Phone. + /// + [DataContract(Name = "createSandboxPhoneRequest_request")] + public class CreateSandboxPhoneRequest + { + [JsonConstructorAttribute] + protected CreateSandboxPhoneRequest() { } + + public CreateSandboxPhoneRequest( + CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, + string? customSdkInstallationId = default, + CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, + string userIdentityId = default + ) + { + AssaAbloyMetadata = assaAbloyMetadata; + CustomSdkInstallationId = customSdkInstallationId; + PhoneMetadata = phoneMetadata; + UserIdentityId = userIdentityId; + } + + /// + /// ASSA ABLOY metadata that you want to associate with the simulated phone. + /// + [DataMember(Name = "assa_abloy_metadata", IsRequired = false, EmitDefaultValue = false)] + public CreateSandboxPhoneRequestAssaAbloyMetadata? AssaAbloyMetadata { get; set; } + + /// + /// ID of the custom SDK installation that you want to use for the simulated phone. + /// + [DataMember( + Name = "custom_sdk_installation_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomSdkInstallationId { get; set; } + + /// + /// Metadata that you want to associate with the simulated phone. + /// + [DataMember(Name = "phone_metadata", IsRequired = false, EmitDefaultValue = false)] + public CreateSandboxPhoneRequestPhoneMetadata? PhoneMetadata { get; set; } + + /// + /// ID of the user identity that you want to associate with the simulated phone. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createSandboxPhoneRequestAssaAbloyMetadata_model")] + public class CreateSandboxPhoneRequestAssaAbloyMetadata + { + [JsonConstructorAttribute] + protected CreateSandboxPhoneRequestAssaAbloyMetadata() { } + + public CreateSandboxPhoneRequestAssaAbloyMetadata( + string? applicationVersion = default, + bool? bleCapability = default, + bool? hceCapability = default, + bool? nfcCapability = default, + string? seosAppletVersion = default, + float? seosTsmEndpointId = default + ) + { + ApplicationVersion = applicationVersion; + BleCapability = bleCapability; + HceCapability = hceCapability; + NfcCapability = nfcCapability; + SeosAppletVersion = seosAppletVersion; + SeosTsmEndpointId = seosTsmEndpointId; + } + + /// + /// Application version that you want to use for the simulated phone. + /// + [DataMember(Name = "application_version", IsRequired = false, EmitDefaultValue = false)] + public string? ApplicationVersion { get; set; } + + /// + /// Indicates whether the simulated phone should have Bluetooth low energy (BLE) capability. + /// + [DataMember(Name = "ble_capability", IsRequired = false, EmitDefaultValue = false)] + public bool? BleCapability { get; set; } + + /// + /// Indicates whether the simulated phone should have host card emulation (HCE) capability. + /// + [DataMember(Name = "hce_capability", IsRequired = false, EmitDefaultValue = false)] + public bool? HceCapability { get; set; } + + /// + /// Indicates whether the simulated phone should have near-field communication (NFC) capability. + /// + [DataMember(Name = "nfc_capability", IsRequired = false, EmitDefaultValue = false)] + public bool? NfcCapability { get; set; } + + /// + /// SEOS applet version that you want to use for the simulated phone. + /// + [DataMember(Name = "seos_applet_version", IsRequired = false, EmitDefaultValue = false)] + public string? SeosAppletVersion { get; set; } + + /// + /// ID of the SEOS trusted service manager (TSM) endpoint that you want to use for the simulated phone. + /// + [DataMember( + Name = "seos_tsm_endpoint_id", + IsRequired = false, + EmitDefaultValue = false + )] + public float? SeosTsmEndpointId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createSandboxPhoneRequestPhoneMetadata_model")] + public class CreateSandboxPhoneRequestPhoneMetadata + { + [JsonConstructorAttribute] + protected CreateSandboxPhoneRequestPhoneMetadata() { } + + public CreateSandboxPhoneRequestPhoneMetadata( + string? deviceManufacturer = default, + string? deviceModel = default, + CreateSandboxPhoneRequestPhoneMetadata.OperatingSystemEnum? operatingSystem = + default, + string? osVersion = default + ) + { + DeviceManufacturer = deviceManufacturer; + DeviceModel = deviceModel; + OperatingSystem = operatingSystem; + OsVersion = osVersion; + } + + /// + /// Mobile operating system that you want to use for the simulated phone. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum OperatingSystemEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "android")] + Android = 1, + + [EnumMember(Value = "ios")] + Ios = 2, + } + + /// + /// Manufacturer that you want to use for the simulated phone. + /// + [DataMember(Name = "device_manufacturer", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceManufacturer { get; set; } + + /// + /// Device model that you want to use for the simulated phone. + /// + [DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceModel { get; set; } + + /// + /// Mobile operating system that you want to use for the simulated phone. + /// + [DataMember(Name = "operating_system", IsRequired = false, EmitDefaultValue = false)] + public CreateSandboxPhoneRequestPhoneMetadata.OperatingSystemEnum? OperatingSystem { get; set; } + + /// + /// Mobile operating system version that you want to use for the simulated phone. + /// + [DataMember(Name = "os_version", IsRequired = false, EmitDefaultValue = false)] + public string? OsVersion { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createSandboxPhoneResponse_response")] + public class CreateSandboxPhoneResponse + { + [JsonConstructorAttribute] + protected CreateSandboxPhoneResponse() { } + + public CreateSandboxPhoneResponse(Phone phone = default) + { + Phone = phone; + } + + /// + /// OK + /// + [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] + public Phone Phone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). + /// + public Phone CreateSandboxPhone(CreateSandboxPhoneRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/phones/simulate/create_sandbox_phone", + requestOptions + ) + .EnsureData("/phones/simulate/create_sandbox_phone") + .Phone; + } + + /// + /// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). + /// + public Phone CreateSandboxPhone( + CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, + string? customSdkInstallationId = default, + CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, + string userIdentityId = default + ) + { + return CreateSandboxPhone( + new CreateSandboxPhoneRequest( + assaAbloyMetadata: assaAbloyMetadata, + customSdkInstallationId: customSdkInstallationId, + phoneMetadata: phoneMetadata, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). + /// + public async Task CreateSandboxPhoneAsync(CreateSandboxPhoneRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/phones/simulate/create_sandbox_phone", + requestOptions + ) + ) + .EnsureData("/phones/simulate/create_sandbox_phone") + .Phone; + } + + /// + /// Creates a new simulated phone in a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://www.seam.co/docs/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). + /// + public async Task CreateSandboxPhoneAsync( + CreateSandboxPhoneRequestAssaAbloyMetadata? assaAbloyMetadata = default, + string? customSdkInstallationId = default, + CreateSandboxPhoneRequestPhoneMetadata? phoneMetadata = default, + string userIdentityId = default + ) + { + return ( + await CreateSandboxPhoneAsync( + new CreateSandboxPhoneRequest( + assaAbloyMetadata: assaAbloyMetadata, + customSdkInstallationId: customSdkInstallationId, + phoneMetadata: phoneMetadata, + userIdentityId: userIdentityId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SimulatePhones SimulatePhones => new(this); -} - -public partial interface ISeamClient -{ -public Api.SimulatePhones SimulatePhones { get; } -} + public partial class SeamClient + { + public Api.SimulatePhones SimulatePhones => new(this); + } + + public partial interface ISeamClient + { + public Api.SimulatePhones SimulatePhones { get; } + } } diff --git a/src/Seam/Api/SimulateThermostats.cs b/src/Seam/Api/SimulateThermostats.cs index cd055ce7..859817dd 100644 --- a/src/Seam/Api/SimulateThermostats.cs +++ b/src/Seam/Api/SimulateThermostats.cs @@ -9,249 +9,338 @@ namespace Seam.Api { -public class SimulateThermostats -{ -private ISeamClient _seam; - -public SimulateThermostats(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for HVAC Mode Adjusted. -/// -[DataContract(Name = "hvacModeAdjustedRequest_request")] -public class HvacModeAdjustedRequest -{ -[JsonConstructorAttribute] -protected HvacModeAdjustedRequest() { } - -public HvacModeAdjustedRequest(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, HvacModeAdjustedRequest.HvacModeEnum hvacMode = default) -{ -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DeviceId = deviceId; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -HvacMode = hvacMode; -} - -/// -/// HVAC mode that you want to simulate. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum HvacModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, - -[EnumMember(Value = "cool")] -Cool = 2, - -[EnumMember(Value = "heat")] -Heat = 3, - -[EnumMember(Value = "heat_cool")] -HeatCool = 4, -} - -/// -/// Cooling [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `cooling_set_point_celsius` or `cooling_set_point_fahrenheit`. -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// Cooling [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `cooling_set_point_fahrenheit` or `cooling_set_point_celsius`. -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// ID of the thermostat device for which you want to simulate having adjusted the HVAC mode. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `heating_set_point_celsius` or `heating_set_point_fahrenheit`. -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// Heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `heating_set_point_fahrenheit` or `heating_set_point_celsius`. -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -/// -/// HVAC mode that you want to simulate. -/// -[DataMember(Name = "hvac_mode", IsRequired = true, EmitDefaultValue = false)] -public HvacModeAdjustedRequest.HvacModeEnum HvacMode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). -/// -public void HvacModeAdjusted(HvacModeAdjustedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/thermostats/simulate/hvac_mode_adjusted", requestOptions); -} - -/// -/// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). -/// -public void HvacModeAdjusted(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, HvacModeAdjustedRequest.HvacModeEnum hvacMode = default) -{ -HvacModeAdjusted(new HvacModeAdjustedRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacMode: hvacMode)); -} - -/// -/// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). -/// -public async Task HvacModeAdjustedAsync(HvacModeAdjustedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/thermostats/simulate/hvac_mode_adjusted", requestOptions); -} - -/// -/// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). -/// -public async Task HvacModeAdjustedAsync(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, HvacModeAdjustedRequest.HvacModeEnum hvacMode = default) -{ -await HvacModeAdjustedAsync(new HvacModeAdjustedRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacMode: hvacMode)); -} - -/// -/// Request parameters for Temperature Reached. -/// -[DataContract(Name = "temperatureReachedRequest_request")] -public class TemperatureReachedRequest -{ -[JsonConstructorAttribute] -protected TemperatureReachedRequest() { } - -public TemperatureReachedRequest(string deviceId = default, float? temperatureCelsius = default, float? temperatureFahrenheit = default) -{ -DeviceId = deviceId; -TemperatureCelsius = temperatureCelsius; -TemperatureFahrenheit = temperatureFahrenheit; -} - -/// -/// ID of the thermostat device that you want to simulate reaching a specified temperature. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Temperature in °C that you want simulate the thermostat reaching. You must set `temperature_celsius` or `temperature_fahrenheit`. -/// -[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? TemperatureCelsius { get; set; } - -/// -/// Temperature in °F that you want simulate the thermostat reaching. You must set `temperature_fahrenheit` or `temperature_celsius`. -/// -[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? TemperatureFahrenheit { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). -/// -public void TemperatureReached(TemperatureReachedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/thermostats/simulate/temperature_reached", requestOptions); -} - -/// -/// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). -/// -public void TemperatureReached(string deviceId = default, float? temperatureCelsius = default, float? temperatureFahrenheit = default) -{ -TemperatureReached(new TemperatureReachedRequest(deviceId: deviceId, temperatureCelsius: temperatureCelsius, temperatureFahrenheit: temperatureFahrenheit)); -} - -/// -/// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). -/// -public async Task TemperatureReachedAsync(TemperatureReachedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/thermostats/simulate/temperature_reached", requestOptions); -} - -/// -/// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). -/// -public async Task TemperatureReachedAsync(string deviceId = default, float? temperatureCelsius = default, float? temperatureFahrenheit = default) -{ -await TemperatureReachedAsync(new TemperatureReachedRequest(deviceId: deviceId, temperatureCelsius: temperatureCelsius, temperatureFahrenheit: temperatureFahrenheit)); -} -} + public class SimulateThermostats + { + private ISeamClient _seam; + + public SimulateThermostats(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for HVAC Mode Adjusted. + /// + [DataContract(Name = "hvacModeAdjustedRequest_request")] + public class HvacModeAdjustedRequest + { + [JsonConstructorAttribute] + protected HvacModeAdjustedRequest() { } + + public HvacModeAdjustedRequest( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + HvacModeAdjustedRequest.HvacModeEnum hvacMode = default + ) + { + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DeviceId = deviceId; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + HvacMode = hvacMode; + } + + /// + /// HVAC mode that you want to simulate. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum HvacModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "cool")] + Cool = 2, + + [EnumMember(Value = "heat")] + Heat = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + } + + /// + /// Cooling [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `cooling_set_point_celsius` or `cooling_set_point_fahrenheit`. + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// Cooling [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `cooling_set_point_fahrenheit` or `cooling_set_point_celsius`. + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// ID of the thermostat device for which you want to simulate having adjusted the HVAC mode. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `heating_set_point_celsius` or `heating_set_point_fahrenheit`. + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// Heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `heating_set_point_fahrenheit` or `heating_set_point_celsius`. + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + /// + /// HVAC mode that you want to simulate. + /// + [DataMember(Name = "hvac_mode", IsRequired = true, EmitDefaultValue = false)] + public HvacModeAdjustedRequest.HvacModeEnum HvacMode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + /// + public void HvacModeAdjusted(HvacModeAdjustedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/thermostats/simulate/hvac_mode_adjusted", requestOptions); + } + + /// + /// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + /// + public void HvacModeAdjusted( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + HvacModeAdjustedRequest.HvacModeEnum hvacMode = default + ) + { + HvacModeAdjusted( + new HvacModeAdjustedRequest( + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit, + hvacMode: hvacMode + ) + ); + } + + /// + /// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + /// + public async Task HvacModeAdjustedAsync(HvacModeAdjustedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/thermostats/simulate/hvac_mode_adjusted", + requestOptions + ); + } + + /// + /// Simulates having adjusted the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://www.seam.co/docs/capability-guides/thermostats). Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + /// + public async Task HvacModeAdjustedAsync( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + HvacModeAdjustedRequest.HvacModeEnum hvacMode = default + ) + { + await HvacModeAdjustedAsync( + new HvacModeAdjustedRequest( + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit, + hvacMode: hvacMode + ) + ); + } + + /// + /// Request parameters for Temperature Reached. + /// + [DataContract(Name = "temperatureReachedRequest_request")] + public class TemperatureReachedRequest + { + [JsonConstructorAttribute] + protected TemperatureReachedRequest() { } + + public TemperatureReachedRequest( + string deviceId = default, + float? temperatureCelsius = default, + float? temperatureFahrenheit = default + ) + { + DeviceId = deviceId; + TemperatureCelsius = temperatureCelsius; + TemperatureFahrenheit = temperatureFahrenheit; + } + + /// + /// ID of the thermostat device that you want to simulate reaching a specified temperature. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Temperature in °C that you want simulate the thermostat reaching. You must set `temperature_celsius` or `temperature_fahrenheit`. + /// + [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? TemperatureCelsius { get; set; } + + /// + /// Temperature in °F that you want simulate the thermostat reaching. You must set `temperature_fahrenheit` or `temperature_celsius`. + /// + [DataMember( + Name = "temperature_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? TemperatureFahrenheit { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + /// + public void TemperatureReached(TemperatureReachedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/thermostats/simulate/temperature_reached", requestOptions); + } + + /// + /// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + /// + public void TemperatureReached( + string deviceId = default, + float? temperatureCelsius = default, + float? temperatureFahrenheit = default + ) + { + TemperatureReached( + new TemperatureReachedRequest( + deviceId: deviceId, + temperatureCelsius: temperatureCelsius, + temperatureFahrenheit: temperatureFahrenheit + ) + ); + } + + /// + /// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + /// + public async Task TemperatureReachedAsync(TemperatureReachedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/thermostats/simulate/temperature_reached", + requestOptions + ); + } + + /// + /// Simulates a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + /// + public async Task TemperatureReachedAsync( + string deviceId = default, + float? temperatureCelsius = default, + float? temperatureFahrenheit = default + ) + { + await TemperatureReachedAsync( + new TemperatureReachedRequest( + deviceId: deviceId, + temperatureCelsius: temperatureCelsius, + temperatureFahrenheit: temperatureFahrenheit + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SimulateThermostats SimulateThermostats => new(this); -} - -public partial interface ISeamClient -{ -public Api.SimulateThermostats SimulateThermostats { get; } -} + public partial class SeamClient + { + public Api.SimulateThermostats SimulateThermostats => new(this); + } + + public partial interface ISeamClient + { + public Api.SimulateThermostats SimulateThermostats { get; } + } } diff --git a/src/Seam/Api/Spaces.cs b/src/Seam/Api/Spaces.cs index 8cc4868f..db2fcb4f 100644 --- a/src/Seam/Api/Spaces.cs +++ b/src/Seam/Api/Spaces.cs @@ -9,1458 +9,1736 @@ namespace Seam.Api { -public class Spaces -{ -private ISeamClient _seam; - -public Spaces(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Add Entrances to a Space. -/// -[DataContract(Name = "addAcsEntrancesRequest_request")] -public class AddAcsEntrancesRequest -{ -[JsonConstructorAttribute] -protected AddAcsEntrancesRequest() { } - -public AddAcsEntrancesRequest(List acsEntranceIds = default, string spaceId = default) -{ -AcsEntranceIds = acsEntranceIds; -SpaceId = spaceId; -} - -/// -/// IDs of the entrances that you want to add to the space. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = true, EmitDefaultValue = false)] -public List AcsEntranceIds { get; set; } - -/// -/// ID of the space to which you want to add entrances. -/// -[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. -/// -public void AddAcsEntrances(AddAcsEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Put("/spaces/add_acs_entrances", requestOptions); -} - -/// -/// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. -/// -public void AddAcsEntrances(List acsEntranceIds = default, string spaceId = default) -{ -AddAcsEntrances(new AddAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId)); -} - -/// -/// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. -/// -public async Task AddAcsEntrancesAsync(AddAcsEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PutAsync("/spaces/add_acs_entrances", requestOptions); -} - -/// -/// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. -/// -public async Task AddAcsEntrancesAsync(List acsEntranceIds = default, string spaceId = default) -{ -await AddAcsEntrancesAsync(new AddAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId)); -} - -/// -/// Request parameters for Add a Connected Account to a Space. -/// -[DataContract(Name = "addConnectedAccountRequest_request")] -public class AddConnectedAccountRequest -{ -[JsonConstructorAttribute] -protected AddConnectedAccountRequest() { } - -public AddConnectedAccountRequest(string connectedAccountId = default, string spaceId = default) -{ -ConnectedAccountId = connectedAccountId; -SpaceId = spaceId; -} - -/// -/// ID of the connected account that you want to add to the space. -/// -[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// ID of the space to which you want to add the connected account. -/// -[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. -/// -public void AddConnectedAccount(AddConnectedAccountRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Put("/spaces/add_connected_account", requestOptions); -} - -/// -/// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. -/// -public void AddConnectedAccount(string connectedAccountId = default, string spaceId = default) -{ -AddConnectedAccount(new AddConnectedAccountRequest(connectedAccountId: connectedAccountId, spaceId: spaceId)); -} - -/// -/// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. -/// -public async Task AddConnectedAccountAsync(AddConnectedAccountRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PutAsync("/spaces/add_connected_account", requestOptions); -} - -/// -/// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. -/// -public async Task AddConnectedAccountAsync(string connectedAccountId = default, string spaceId = default) -{ -await AddConnectedAccountAsync(new AddConnectedAccountRequest(connectedAccountId: connectedAccountId, spaceId: spaceId)); -} - -/// -/// Request parameters for Add Devices to a Space. -/// -[DataContract(Name = "addDevicesRequest_request")] -public class AddDevicesRequest -{ -[JsonConstructorAttribute] -protected AddDevicesRequest() { } - -public AddDevicesRequest(List deviceIds = default, string spaceId = default) -{ -DeviceIds = deviceIds; -SpaceId = spaceId; -} - -/// -/// IDs of the devices that you want to add to the space. -/// -[DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -/// -/// ID of the space to which you want to add devices. -/// -[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Adds devices to a specific space. -/// -public void AddDevices(AddDevicesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Put("/spaces/add_devices", requestOptions); -} - -/// -/// Adds devices to a specific space. -/// -public void AddDevices(List deviceIds = default, string spaceId = default) -{ -AddDevices(new AddDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); -} - -/// -/// Adds devices to a specific space. -/// -public async Task AddDevicesAsync(AddDevicesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PutAsync("/spaces/add_devices", requestOptions); -} - -/// -/// Adds devices to a specific space. -/// -public async Task AddDevicesAsync(List deviceIds = default, string spaceId = default) -{ -await AddDevicesAsync(new AddDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); -} - -/// -/// Request parameters for Create a Space. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(List? acsEntranceIds = default, List? connectedAccountIds = default, CreateRequestCustomerData? customerData = default, string? customerKey = default, List? deviceIds = default, string name = default, string? spaceKey = default) -{ -AcsEntranceIds = acsEntranceIds; -ConnectedAccountIds = connectedAccountIds; -CustomerData = customerData; -CustomerKey = customerKey; -DeviceIds = deviceIds; -Name = name; -SpaceKey = spaceKey; -} - -/// -/// IDs of the entrances that you want to add to the new space. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsEntranceIds { get; set; } - -/// -/// IDs of connected accounts to associate with the new space. Persisted on seam.location_third_party_account so the UI can show which provider account(s) a space came from. -/// -[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectedAccountIds { get; set; } - -/// -/// Reservation/stay-related defaults for the space. -/// -[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestCustomerData? CustomerData { get; set; } - -/// -/// Customer key for which you want to create the space. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// IDs of the devices that you want to add to the new space. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceIds { get; set; } - -/// -/// Name of the space that you want to create. -/// -[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// Unique key for the space within the workspace. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestCustomerData_model")] -public class CreateRequestCustomerData -{ -[JsonConstructorAttribute] -protected CreateRequestCustomerData() { } - -public CreateRequestCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) -{ -Address = address; -DefaultCheckinTime = defaultCheckinTime; -DefaultCheckoutTime = defaultCheckoutTime; -TimeZone = timeZone; -} - -/// -/// Postal address for the space. -/// -[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] -public string? Address { get; set; } - -/// -/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckinTime { get; set; } - -/// -/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckoutTime { get; set; } - -/// -/// IANA time zone for the space, e.g. America/Los_Angeles. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(Space space = default) -{ -Space = space; -} - -/// -/// OK -/// -[DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] -public Space Space { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new space. -/// -public Space Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/spaces/create", requestOptions).EnsureData("/spaces/create").Space; -} - -/// -/// Creates a new space. -/// -public Space Create(List? acsEntranceIds = default, List? connectedAccountIds = default, CreateRequestCustomerData? customerData = default, string? customerKey = default, List? deviceIds = default, string name = default, string? spaceKey = default) -{ -return Create(new CreateRequest(acsEntranceIds: acsEntranceIds, connectedAccountIds: connectedAccountIds, customerData: customerData, customerKey: customerKey, deviceIds: deviceIds, name: name, spaceKey: spaceKey)); -} - -/// -/// Creates a new space. -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/spaces/create", requestOptions)).EnsureData("/spaces/create").Space; -} - -/// -/// Creates a new space. -/// -public async Task CreateAsync(List? acsEntranceIds = default, List? connectedAccountIds = default, CreateRequestCustomerData? customerData = default, string? customerKey = default, List? deviceIds = default, string name = default, string? spaceKey = default) -{ -return (await CreateAsync(new CreateRequest(acsEntranceIds: acsEntranceIds, connectedAccountIds: connectedAccountIds, customerData: customerData, customerKey: customerKey, deviceIds: deviceIds, name: name, spaceKey: spaceKey))); -} - -/// -/// Request parameters for Delete a Space. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string spaceId = default) -{ -SpaceId = spaceId; -} - -/// -/// ID of the space that you want to delete. -/// -[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a space. -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/spaces/delete", requestOptions); -} - -/// -/// Deletes a space. -/// -public void Delete(string spaceId = default) -{ -Delete(new DeleteRequest(spaceId: spaceId)); -} - -/// -/// Deletes a space. -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/spaces/delete", requestOptions); -} - -/// -/// Deletes a space. -/// -public async Task DeleteAsync(string spaceId = default) -{ -await DeleteAsync(new DeleteRequest(spaceId: spaceId)); -} - -/// -/// Request parameters for Get a Space. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? spaceId = default, string? spaceKey = default) -{ -SpaceId = spaceId; -SpaceKey = spaceKey; -} - -/// -/// ID of the space that you want to get. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -/// -/// Unique key of the space that you want to get. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(Space space = default) -{ -Space = space; -} - -/// -/// OK -/// -[DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] -public Space Space { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets a space. -/// -public Space Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/spaces/get", requestOptions).EnsureData("/spaces/get").Space; -} - -/// -/// Gets a space. -/// -public Space Get(string? spaceId = default, string? spaceKey = default) -{ -return Get(new GetRequest(spaceId: spaceId, spaceKey: spaceKey)); -} - -/// -/// Gets a space. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/spaces/get", requestOptions)).EnsureData("/spaces/get").Space; -} - -/// -/// Gets a space. -/// -public async Task GetAsync(string? spaceId = default, string? spaceKey = default) -{ -return (await GetAsync(new GetRequest(spaceId: spaceId, spaceKey: spaceKey))); -} - -/// -/// Request parameters for Get related Space resources. -/// -[DataContract(Name = "getRelatedRequest_request")] -public class GetRelatedRequest -{ -[JsonConstructorAttribute] -protected GetRelatedRequest() { } - -public GetRelatedRequest(List? exclude = default, List? include = default, List? spaceIds = default, List? spaceKeys = default) -{ -Exclude = exclude; -Include = include; -SpaceIds = spaceIds; -SpaceKeys = spaceKeys; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExcludeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "spaces")] -Spaces = 1, - -[EnumMember(Value = "devices")] -Devices = 2, - -[EnumMember(Value = "acs_entrances")] -AcsEntrances = 3, - -[EnumMember(Value = "connected_accounts")] -ConnectedAccounts = 4, - -[EnumMember(Value = "acs_systems")] -AcsSystems = 5, - -[EnumMember(Value = "access_methods")] -AccessMethods = 6, -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum IncludeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "spaces")] -Spaces = 1, - -[EnumMember(Value = "devices")] -Devices = 2, - -[EnumMember(Value = "acs_entrances")] -AcsEntrances = 3, - -[EnumMember(Value = "connected_accounts")] -ConnectedAccounts = 4, - -[EnumMember(Value = "acs_systems")] -AcsSystems = 5, - -[EnumMember(Value = "access_methods")] -AccessMethods = 6, -} - -[DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] -public List? Exclude { get; set; } - -[DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] -public List? Include { get; set; } - -/// -/// IDs of the spaces that you want to get along with their related resources. -/// -[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceIds { get; set; } - -/// -/// Keys of the spaces that you want to get along with their related resources. -/// -[DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] -public List? SpaceKeys { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getRelatedResponse_response")] -public class GetRelatedResponse -{ -[JsonConstructorAttribute] -protected GetRelatedResponse() { } - -public GetRelatedResponse(Batch batch = default) -{ -Batch = batch; -} - -/// -/// OK -/// -[DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] -public Batch Batch { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets all related resources for one or more Spaces. -/// -public Batch GetRelated(GetRelatedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/spaces/get_related", requestOptions).EnsureData("/spaces/get_related").Batch; -} - -/// -/// Gets all related resources for one or more Spaces. -/// -public Batch GetRelated(List? exclude = default, List? include = default, List? spaceIds = default, List? spaceKeys = default) -{ -return GetRelated(new GetRelatedRequest(exclude: exclude, include: include, spaceIds: spaceIds, spaceKeys: spaceKeys)); -} - -/// -/// Gets all related resources for one or more Spaces. -/// -public async Task GetRelatedAsync(GetRelatedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/spaces/get_related", requestOptions)).EnsureData("/spaces/get_related").Batch; -} - -/// -/// Gets all related resources for one or more Spaces. -/// -public async Task GetRelatedAsync(List? exclude = default, List? include = default, List? spaceIds = default, List? spaceKeys = default) -{ -return (await GetRelatedAsync(new GetRelatedRequest(exclude: exclude, include: include, spaceIds: spaceIds, spaceKeys: spaceKeys))); -} - -/// -/// Request parameters for List Spaces. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? spaceKey = default) -{ -CustomerKey = customerKey; -Limit = limit; -PageCursor = pageCursor; -Search = search; -SpaceKey = spaceKey; -} - -/// -/// Customer key for which you want to list spaces. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned spaces to include all records that satisfy a partial match using `name`, `space_key`, or `customer_key`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// Filter spaces by space_key. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List spaces = default) -{ -Spaces = spaces; -} - -/// -/// OK -/// -[DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] -public List Spaces { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all spaces. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/spaces/list", requestOptions).EnsureData("/spaces/list").Spaces; -} - -/// -/// Returns a list of all spaces. -/// -public List List(string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? spaceKey = default) -{ -return List(new ListRequest(customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, spaceKey: spaceKey)); -} - -/// -/// Returns a list of all spaces. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/spaces/list", requestOptions)).EnsureData("/spaces/list").Spaces; -} - -/// -/// Returns a list of all spaces. -/// -public async Task> ListAsync(string? customerKey = default, float? limit = default, string? pageCursor = default, string? search = default, string? spaceKey = default) -{ -return (await ListAsync(new ListRequest(customerKey: customerKey, limit: limit, pageCursor: pageCursor, search: search, spaceKey: spaceKey))); -} - -/// -/// Request parameters for Remove Entrances from a Space. -/// -[DataContract(Name = "removeAcsEntrancesRequest_request")] -public class RemoveAcsEntrancesRequest -{ -[JsonConstructorAttribute] -protected RemoveAcsEntrancesRequest() { } - -public RemoveAcsEntrancesRequest(List acsEntranceIds = default, string spaceId = default) -{ -AcsEntranceIds = acsEntranceIds; -SpaceId = spaceId; -} - -/// -/// IDs of the entrances that you want to remove from the space. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = true, EmitDefaultValue = false)] -public List AcsEntranceIds { get; set; } - -/// -/// ID of the space from which you want to remove entrances. -/// -[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. -/// -public void RemoveAcsEntrances(RemoveAcsEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/spaces/remove_acs_entrances", requestOptions); -} - -/// -/// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. -/// -public void RemoveAcsEntrances(List acsEntranceIds = default, string spaceId = default) -{ -RemoveAcsEntrances(new RemoveAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId)); -} - -/// -/// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. -/// -public async Task RemoveAcsEntrancesAsync(RemoveAcsEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/spaces/remove_acs_entrances", requestOptions); -} - -/// -/// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. -/// -public async Task RemoveAcsEntrancesAsync(List acsEntranceIds = default, string spaceId = default) -{ -await RemoveAcsEntrancesAsync(new RemoveAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId)); -} - -/// -/// Request parameters for Remove a Connected Account from a Space. -/// -[DataContract(Name = "removeConnectedAccountRequest_request")] -public class RemoveConnectedAccountRequest -{ -[JsonConstructorAttribute] -protected RemoveConnectedAccountRequest() { } - -public RemoveConnectedAccountRequest(string connectedAccountId = default, string spaceId = default) -{ -ConnectedAccountId = connectedAccountId; -SpaceId = spaceId; -} - -/// -/// ID of the connected account that you want to remove from the space. -/// -[DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// ID of the space from which you want to remove the connected account. -/// -[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. -/// -public void RemoveConnectedAccount(RemoveConnectedAccountRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/spaces/remove_connected_account", requestOptions); -} - -/// -/// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. -/// -public void RemoveConnectedAccount(string connectedAccountId = default, string spaceId = default) -{ -RemoveConnectedAccount(new RemoveConnectedAccountRequest(connectedAccountId: connectedAccountId, spaceId: spaceId)); -} - -/// -/// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. -/// -public async Task RemoveConnectedAccountAsync(RemoveConnectedAccountRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/spaces/remove_connected_account", requestOptions); -} - -/// -/// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. -/// -public async Task RemoveConnectedAccountAsync(string connectedAccountId = default, string spaceId = default) -{ -await RemoveConnectedAccountAsync(new RemoveConnectedAccountRequest(connectedAccountId: connectedAccountId, spaceId: spaceId)); -} - -/// -/// Request parameters for Remove Devices from a Space. -/// -[DataContract(Name = "removeDevicesRequest_request")] -public class RemoveDevicesRequest -{ -[JsonConstructorAttribute] -protected RemoveDevicesRequest() { } - -public RemoveDevicesRequest(List deviceIds = default, string spaceId = default) -{ -DeviceIds = deviceIds; -SpaceId = spaceId; -} - -/// -/// IDs of the devices that you want to remove from the space. -/// -[DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -/// -/// ID of the space from which you want to remove devices. -/// -[DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Removes devices from a specific space. -/// -public void RemoveDevices(RemoveDevicesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/spaces/remove_devices", requestOptions); -} - -/// -/// Removes devices from a specific space. -/// -public void RemoveDevices(List deviceIds = default, string spaceId = default) -{ -RemoveDevices(new RemoveDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); -} - -/// -/// Removes devices from a specific space. -/// -public async Task RemoveDevicesAsync(RemoveDevicesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/spaces/remove_devices", requestOptions); -} - -/// -/// Removes devices from a specific space. -/// -public async Task RemoveDevicesAsync(List deviceIds = default, string spaceId = default) -{ -await RemoveDevicesAsync(new RemoveDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); -} - -/// -/// Request parameters for Update a Space. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(List? acsEntranceIds = default, UpdateRequestCustomerData? customerData = default, List? deviceIds = default, string? name = default, string? spaceId = default, string? spaceKey = default) -{ -AcsEntranceIds = acsEntranceIds; -CustomerData = customerData; -DeviceIds = deviceIds; -Name = name; -SpaceId = spaceId; -SpaceKey = spaceKey; -} - -/// -/// IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsEntranceIds { get; set; } - -/// -/// Reservation/stay-related defaults for the space. Only the keys you provide are updated; omit a key to leave it unchanged. Pass null on a key to clear it. -/// -[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] -public UpdateRequestCustomerData? CustomerData { get; set; } - -/// -/// IDs of the devices that you want to set for the space. If specified, this will replace all existing devices. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceIds { get; set; } - -/// -/// Name of the space. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// ID of the space that you want to update. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -/// -/// Unique key of the space that you want to update. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateRequestCustomerData_model")] -public class UpdateRequestCustomerData -{ -[JsonConstructorAttribute] -protected UpdateRequestCustomerData() { } - -public UpdateRequestCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) -{ -Address = address; -DefaultCheckinTime = defaultCheckinTime; -DefaultCheckoutTime = defaultCheckoutTime; -TimeZone = timeZone; -} - -/// -/// Postal address for the space. -/// -[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] -public string? Address { get; set; } - -/// -/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckinTime { get; set; } - -/// -/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckoutTime { get; set; } - -/// -/// IANA time zone for the space, e.g. America/Los_Angeles. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateResponse_response")] -public class UpdateResponse -{ -[JsonConstructorAttribute] -protected UpdateResponse() { } - -public UpdateResponse(Space space = default) -{ -Space = space; -} - -/// -/// OK -/// -[DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] -public Space Space { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates an existing space. -/// -public Space Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Patch("/spaces/update", requestOptions).EnsureData("/spaces/update").Space; -} - -/// -/// Updates an existing space. -/// -public Space Update(List? acsEntranceIds = default, UpdateRequestCustomerData? customerData = default, List? deviceIds = default, string? name = default, string? spaceId = default, string? spaceKey = default) -{ -return Update(new UpdateRequest(acsEntranceIds: acsEntranceIds, customerData: customerData, deviceIds: deviceIds, name: name, spaceId: spaceId, spaceKey: spaceKey)); -} - -/// -/// Updates an existing space. -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PatchAsync("/spaces/update", requestOptions)).EnsureData("/spaces/update").Space; -} - -/// -/// Updates an existing space. -/// -public async Task UpdateAsync(List? acsEntranceIds = default, UpdateRequestCustomerData? customerData = default, List? deviceIds = default, string? name = default, string? spaceId = default, string? spaceKey = default) -{ -return (await UpdateAsync(new UpdateRequest(acsEntranceIds: acsEntranceIds, customerData: customerData, deviceIds: deviceIds, name: name, spaceId: spaceId, spaceKey: spaceKey))); -} -} + public class Spaces + { + private ISeamClient _seam; + + public Spaces(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Add Entrances to a Space. + /// + [DataContract(Name = "addAcsEntrancesRequest_request")] + public class AddAcsEntrancesRequest + { + [JsonConstructorAttribute] + protected AddAcsEntrancesRequest() { } + + public AddAcsEntrancesRequest( + List acsEntranceIds = default, + string spaceId = default + ) + { + AcsEntranceIds = acsEntranceIds; + SpaceId = spaceId; + } + + /// + /// IDs of the entrances that you want to add to the space. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = true, EmitDefaultValue = false)] + public List AcsEntranceIds { get; set; } + + /// + /// ID of the space to which you want to add entrances. + /// + [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. + /// + public void AddAcsEntrances(AddAcsEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Put("/spaces/add_acs_entrances", requestOptions); + } + + /// + /// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. + /// + public void AddAcsEntrances(List acsEntranceIds = default, string spaceId = default) + { + AddAcsEntrances( + new AddAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId) + ); + } + + /// + /// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. + /// + public async Task AddAcsEntrancesAsync(AddAcsEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PutAsync("/spaces/add_acs_entrances", requestOptions); + } + + /// + /// Adds [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. + /// + public async Task AddAcsEntrancesAsync( + List acsEntranceIds = default, + string spaceId = default + ) + { + await AddAcsEntrancesAsync( + new AddAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId) + ); + } + + /// + /// Request parameters for Add a Connected Account to a Space. + /// + [DataContract(Name = "addConnectedAccountRequest_request")] + public class AddConnectedAccountRequest + { + [JsonConstructorAttribute] + protected AddConnectedAccountRequest() { } + + public AddConnectedAccountRequest( + string connectedAccountId = default, + string spaceId = default + ) + { + ConnectedAccountId = connectedAccountId; + SpaceId = spaceId; + } + + /// + /// ID of the connected account that you want to add to the space. + /// + [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// ID of the space to which you want to add the connected account. + /// + [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. + /// + public void AddConnectedAccount(AddConnectedAccountRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Put("/spaces/add_connected_account", requestOptions); + } + + /// + /// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. + /// + public void AddConnectedAccount( + string connectedAccountId = default, + string spaceId = default + ) + { + AddConnectedAccount( + new AddConnectedAccountRequest( + connectedAccountId: connectedAccountId, + spaceId: spaceId + ) + ); + } + + /// + /// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. + /// + public async Task AddConnectedAccountAsync(AddConnectedAccountRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PutAsync("/spaces/add_connected_account", requestOptions); + } + + /// + /// Adds a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to a specific space. + /// + public async Task AddConnectedAccountAsync( + string connectedAccountId = default, + string spaceId = default + ) + { + await AddConnectedAccountAsync( + new AddConnectedAccountRequest( + connectedAccountId: connectedAccountId, + spaceId: spaceId + ) + ); + } + + /// + /// Request parameters for Add Devices to a Space. + /// + [DataContract(Name = "addDevicesRequest_request")] + public class AddDevicesRequest + { + [JsonConstructorAttribute] + protected AddDevicesRequest() { } + + public AddDevicesRequest(List deviceIds = default, string spaceId = default) + { + DeviceIds = deviceIds; + SpaceId = spaceId; + } + + /// + /// IDs of the devices that you want to add to the space. + /// + [DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + /// + /// ID of the space to which you want to add devices. + /// + [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Adds devices to a specific space. + /// + public void AddDevices(AddDevicesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Put("/spaces/add_devices", requestOptions); + } + + /// + /// Adds devices to a specific space. + /// + public void AddDevices(List deviceIds = default, string spaceId = default) + { + AddDevices(new AddDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); + } + + /// + /// Adds devices to a specific space. + /// + public async Task AddDevicesAsync(AddDevicesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PutAsync("/spaces/add_devices", requestOptions); + } + + /// + /// Adds devices to a specific space. + /// + public async Task AddDevicesAsync( + List deviceIds = default, + string spaceId = default + ) + { + await AddDevicesAsync(new AddDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); + } + + /// + /// Request parameters for Create a Space. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + List? acsEntranceIds = default, + List? connectedAccountIds = default, + CreateRequestCustomerData? customerData = default, + string? customerKey = default, + List? deviceIds = default, + string name = default, + string? spaceKey = default + ) + { + AcsEntranceIds = acsEntranceIds; + ConnectedAccountIds = connectedAccountIds; + CustomerData = customerData; + CustomerKey = customerKey; + DeviceIds = deviceIds; + Name = name; + SpaceKey = spaceKey; + } + + /// + /// IDs of the entrances that you want to add to the new space. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEntranceIds { get; set; } + + /// + /// IDs of connected accounts to associate with the new space. Persisted on seam.location_third_party_account so the UI can show which provider account(s) a space came from. + /// + [DataMember( + Name = "connected_account_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? ConnectedAccountIds { get; set; } + + /// + /// Reservation/stay-related defaults for the space. + /// + [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestCustomerData? CustomerData { get; set; } + + /// + /// Customer key for which you want to create the space. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// IDs of the devices that you want to add to the new space. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceIds { get; set; } + + /// + /// Name of the space that you want to create. + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Unique key for the space within the workspace. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestCustomerData_model")] + public class CreateRequestCustomerData + { + [JsonConstructorAttribute] + protected CreateRequestCustomerData() { } + + public CreateRequestCustomerData( + string? address = default, + string? defaultCheckinTime = default, + string? defaultCheckoutTime = default, + string? timeZone = default + ) + { + Address = address; + DefaultCheckinTime = defaultCheckinTime; + DefaultCheckoutTime = defaultCheckoutTime; + TimeZone = timeZone; + } + + /// + /// Postal address for the space. + /// + [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] + public string? Address { get; set; } + + /// + /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember( + Name = "default_checkin_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCheckinTime { get; set; } + + /// + /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember( + Name = "default_checkout_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCheckoutTime { get; set; } + + /// + /// IANA time zone for the space, e.g. America/Los_Angeles. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(Space space = default) + { + Space = space; + } + + /// + /// OK + /// + [DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] + public Space Space { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new space. + /// + public Space Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/spaces/create", requestOptions) + .EnsureData("/spaces/create") + .Space; + } + + /// + /// Creates a new space. + /// + public Space Create( + List? acsEntranceIds = default, + List? connectedAccountIds = default, + CreateRequestCustomerData? customerData = default, + string? customerKey = default, + List? deviceIds = default, + string name = default, + string? spaceKey = default + ) + { + return Create( + new CreateRequest( + acsEntranceIds: acsEntranceIds, + connectedAccountIds: connectedAccountIds, + customerData: customerData, + customerKey: customerKey, + deviceIds: deviceIds, + name: name, + spaceKey: spaceKey + ) + ); + } + + /// + /// Creates a new space. + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/spaces/create", requestOptions)) + .EnsureData("/spaces/create") + .Space; + } + + /// + /// Creates a new space. + /// + public async Task CreateAsync( + List? acsEntranceIds = default, + List? connectedAccountIds = default, + CreateRequestCustomerData? customerData = default, + string? customerKey = default, + List? deviceIds = default, + string name = default, + string? spaceKey = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + acsEntranceIds: acsEntranceIds, + connectedAccountIds: connectedAccountIds, + customerData: customerData, + customerKey: customerKey, + deviceIds: deviceIds, + name: name, + spaceKey: spaceKey + ) + ) + ); + } + + /// + /// Request parameters for Delete a Space. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string spaceId = default) + { + SpaceId = spaceId; + } + + /// + /// ID of the space that you want to delete. + /// + [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a space. + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/spaces/delete", requestOptions); + } + + /// + /// Deletes a space. + /// + public void Delete(string spaceId = default) + { + Delete(new DeleteRequest(spaceId: spaceId)); + } + + /// + /// Deletes a space. + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/spaces/delete", requestOptions); + } + + /// + /// Deletes a space. + /// + public async Task DeleteAsync(string spaceId = default) + { + await DeleteAsync(new DeleteRequest(spaceId: spaceId)); + } + + /// + /// Request parameters for Get a Space. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string? spaceId = default, string? spaceKey = default) + { + SpaceId = spaceId; + SpaceKey = spaceKey; + } + + /// + /// ID of the space that you want to get. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + /// + /// Unique key of the space that you want to get. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Space space = default) + { + Space = space; + } + + /// + /// OK + /// + [DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] + public Space Space { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets a space. + /// + public Space Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/spaces/get", requestOptions) + .EnsureData("/spaces/get") + .Space; + } + + /// + /// Gets a space. + /// + public Space Get(string? spaceId = default, string? spaceKey = default) + { + return Get(new GetRequest(spaceId: spaceId, spaceKey: spaceKey)); + } + + /// + /// Gets a space. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/spaces/get", requestOptions)) + .EnsureData("/spaces/get") + .Space; + } + + /// + /// Gets a space. + /// + public async Task GetAsync(string? spaceId = default, string? spaceKey = default) + { + return (await GetAsync(new GetRequest(spaceId: spaceId, spaceKey: spaceKey))); + } + + /// + /// Request parameters for Get related Space resources. + /// + [DataContract(Name = "getRelatedRequest_request")] + public class GetRelatedRequest + { + [JsonConstructorAttribute] + protected GetRelatedRequest() { } + + public GetRelatedRequest( + List? exclude = default, + List? include = default, + List? spaceIds = default, + List? spaceKeys = default + ) + { + Exclude = exclude; + Include = include; + SpaceIds = spaceIds; + SpaceKeys = spaceKeys; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExcludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "connected_accounts")] + ConnectedAccounts = 4, + + [EnumMember(Value = "acs_systems")] + AcsSystems = 5, + + [EnumMember(Value = "access_methods")] + AccessMethods = 6, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum IncludeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "spaces")] + Spaces = 1, + + [EnumMember(Value = "devices")] + Devices = 2, + + [EnumMember(Value = "acs_entrances")] + AcsEntrances = 3, + + [EnumMember(Value = "connected_accounts")] + ConnectedAccounts = 4, + + [EnumMember(Value = "acs_systems")] + AcsSystems = 5, + + [EnumMember(Value = "access_methods")] + AccessMethods = 6, + } + + [DataMember(Name = "exclude", IsRequired = false, EmitDefaultValue = false)] + public List? Exclude { get; set; } + + [DataMember(Name = "include", IsRequired = false, EmitDefaultValue = false)] + public List? Include { get; set; } + + /// + /// IDs of the spaces that you want to get along with their related resources. + /// + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceIds { get; set; } + + /// + /// Keys of the spaces that you want to get along with their related resources. + /// + [DataMember(Name = "space_keys", IsRequired = false, EmitDefaultValue = false)] + public List? SpaceKeys { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getRelatedResponse_response")] + public class GetRelatedResponse + { + [JsonConstructorAttribute] + protected GetRelatedResponse() { } + + public GetRelatedResponse(Batch batch = default) + { + Batch = batch; + } + + /// + /// OK + /// + [DataMember(Name = "batch", IsRequired = false, EmitDefaultValue = false)] + public Batch Batch { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets all related resources for one or more Spaces. + /// + public Batch GetRelated(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/spaces/get_related", requestOptions) + .EnsureData("/spaces/get_related") + .Batch; + } + + /// + /// Gets all related resources for one or more Spaces. + /// + public Batch GetRelated( + List? exclude = default, + List? include = default, + List? spaceIds = default, + List? spaceKeys = default + ) + { + return GetRelated( + new GetRelatedRequest( + exclude: exclude, + include: include, + spaceIds: spaceIds, + spaceKeys: spaceKeys + ) + ); + } + + /// + /// Gets all related resources for one or more Spaces. + /// + public async Task GetRelatedAsync(GetRelatedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/spaces/get_related", requestOptions)) + .EnsureData("/spaces/get_related") + .Batch; + } + + /// + /// Gets all related resources for one or more Spaces. + /// + public async Task GetRelatedAsync( + List? exclude = default, + List? include = default, + List? spaceIds = default, + List? spaceKeys = default + ) + { + return ( + await GetRelatedAsync( + new GetRelatedRequest( + exclude: exclude, + include: include, + spaceIds: spaceIds, + spaceKeys: spaceKeys + ) + ) + ); + } + + /// + /// Request parameters for List Spaces. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? customerKey = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? spaceKey = default + ) + { + CustomerKey = customerKey; + Limit = limit; + PageCursor = pageCursor; + Search = search; + SpaceKey = spaceKey; + } + + /// + /// Customer key for which you want to list spaces. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned spaces to include all records that satisfy a partial match using `name`, `space_key`, or `customer_key`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// Filter spaces by space_key. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List spaces = default) + { + Spaces = spaces; + } + + /// + /// OK + /// + [DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] + public List Spaces { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all spaces. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/spaces/list", requestOptions) + .EnsureData("/spaces/list") + .Spaces; + } + + /// + /// Returns a list of all spaces. + /// + public List List( + string? customerKey = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? spaceKey = default + ) + { + return List( + new ListRequest( + customerKey: customerKey, + limit: limit, + pageCursor: pageCursor, + search: search, + spaceKey: spaceKey + ) + ); + } + + /// + /// Returns a list of all spaces. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/spaces/list", requestOptions)) + .EnsureData("/spaces/list") + .Spaces; + } + + /// + /// Returns a list of all spaces. + /// + public async Task> ListAsync( + string? customerKey = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? spaceKey = default + ) + { + return ( + await ListAsync( + new ListRequest( + customerKey: customerKey, + limit: limit, + pageCursor: pageCursor, + search: search, + spaceKey: spaceKey + ) + ) + ); + } + + /// + /// Request parameters for Remove Entrances from a Space. + /// + [DataContract(Name = "removeAcsEntrancesRequest_request")] + public class RemoveAcsEntrancesRequest + { + [JsonConstructorAttribute] + protected RemoveAcsEntrancesRequest() { } + + public RemoveAcsEntrancesRequest( + List acsEntranceIds = default, + string spaceId = default + ) + { + AcsEntranceIds = acsEntranceIds; + SpaceId = spaceId; + } + + /// + /// IDs of the entrances that you want to remove from the space. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = true, EmitDefaultValue = false)] + public List AcsEntranceIds { get; set; } + + /// + /// ID of the space from which you want to remove entrances. + /// + [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. + /// + public void RemoveAcsEntrances(RemoveAcsEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/spaces/remove_acs_entrances", requestOptions); + } + + /// + /// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. + /// + public void RemoveAcsEntrances( + List acsEntranceIds = default, + string spaceId = default + ) + { + RemoveAcsEntrances( + new RemoveAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId) + ); + } + + /// + /// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. + /// + public async Task RemoveAcsEntrancesAsync(RemoveAcsEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/spaces/remove_acs_entrances", requestOptions); + } + + /// + /// Removes [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. + /// + public async Task RemoveAcsEntrancesAsync( + List acsEntranceIds = default, + string spaceId = default + ) + { + await RemoveAcsEntrancesAsync( + new RemoveAcsEntrancesRequest(acsEntranceIds: acsEntranceIds, spaceId: spaceId) + ); + } + + /// + /// Request parameters for Remove a Connected Account from a Space. + /// + [DataContract(Name = "removeConnectedAccountRequest_request")] + public class RemoveConnectedAccountRequest + { + [JsonConstructorAttribute] + protected RemoveConnectedAccountRequest() { } + + public RemoveConnectedAccountRequest( + string connectedAccountId = default, + string spaceId = default + ) + { + ConnectedAccountId = connectedAccountId; + SpaceId = spaceId; + } + + /// + /// ID of the connected account that you want to remove from the space. + /// + [DataMember(Name = "connected_account_id", IsRequired = true, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// ID of the space from which you want to remove the connected account. + /// + [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. + /// + public void RemoveConnectedAccount(RemoveConnectedAccountRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/spaces/remove_connected_account", requestOptions); + } + + /// + /// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. + /// + public void RemoveConnectedAccount( + string connectedAccountId = default, + string spaceId = default + ) + { + RemoveConnectedAccount( + new RemoveConnectedAccountRequest( + connectedAccountId: connectedAccountId, + spaceId: spaceId + ) + ); + } + + /// + /// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. + /// + public async Task RemoveConnectedAccountAsync(RemoveConnectedAccountRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/spaces/remove_connected_account", requestOptions); + } + + /// + /// Removes a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) from a specific space. + /// + public async Task RemoveConnectedAccountAsync( + string connectedAccountId = default, + string spaceId = default + ) + { + await RemoveConnectedAccountAsync( + new RemoveConnectedAccountRequest( + connectedAccountId: connectedAccountId, + spaceId: spaceId + ) + ); + } + + /// + /// Request parameters for Remove Devices from a Space. + /// + [DataContract(Name = "removeDevicesRequest_request")] + public class RemoveDevicesRequest + { + [JsonConstructorAttribute] + protected RemoveDevicesRequest() { } + + public RemoveDevicesRequest(List deviceIds = default, string spaceId = default) + { + DeviceIds = deviceIds; + SpaceId = spaceId; + } + + /// + /// IDs of the devices that you want to remove from the space. + /// + [DataMember(Name = "device_ids", IsRequired = true, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + /// + /// ID of the space from which you want to remove devices. + /// + [DataMember(Name = "space_id", IsRequired = true, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Removes devices from a specific space. + /// + public void RemoveDevices(RemoveDevicesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/spaces/remove_devices", requestOptions); + } + + /// + /// Removes devices from a specific space. + /// + public void RemoveDevices(List deviceIds = default, string spaceId = default) + { + RemoveDevices(new RemoveDevicesRequest(deviceIds: deviceIds, spaceId: spaceId)); + } + + /// + /// Removes devices from a specific space. + /// + public async Task RemoveDevicesAsync(RemoveDevicesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/spaces/remove_devices", requestOptions); + } + + /// + /// Removes devices from a specific space. + /// + public async Task RemoveDevicesAsync( + List deviceIds = default, + string spaceId = default + ) + { + await RemoveDevicesAsync( + new RemoveDevicesRequest(deviceIds: deviceIds, spaceId: spaceId) + ); + } + + /// + /// Request parameters for Update a Space. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + List? acsEntranceIds = default, + UpdateRequestCustomerData? customerData = default, + List? deviceIds = default, + string? name = default, + string? spaceId = default, + string? spaceKey = default + ) + { + AcsEntranceIds = acsEntranceIds; + CustomerData = customerData; + DeviceIds = deviceIds; + Name = name; + SpaceId = spaceId; + SpaceKey = spaceKey; + } + + /// + /// IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEntranceIds { get; set; } + + /// + /// Reservation/stay-related defaults for the space. Only the keys you provide are updated; omit a key to leave it unchanged. Pass null on a key to clear it. + /// + [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] + public UpdateRequestCustomerData? CustomerData { get; set; } + + /// + /// IDs of the devices that you want to set for the space. If specified, this will replace all existing devices. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceIds { get; set; } + + /// + /// Name of the space. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// ID of the space that you want to update. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + /// + /// Unique key of the space that you want to update. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateRequestCustomerData_model")] + public class UpdateRequestCustomerData + { + [JsonConstructorAttribute] + protected UpdateRequestCustomerData() { } + + public UpdateRequestCustomerData( + string? address = default, + string? defaultCheckinTime = default, + string? defaultCheckoutTime = default, + string? timeZone = default + ) + { + Address = address; + DefaultCheckinTime = defaultCheckinTime; + DefaultCheckoutTime = defaultCheckoutTime; + TimeZone = timeZone; + } + + /// + /// Postal address for the space. + /// + [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] + public string? Address { get; set; } + + /// + /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember( + Name = "default_checkin_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCheckinTime { get; set; } + + /// + /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember( + Name = "default_checkout_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCheckoutTime { get; set; } + + /// + /// IANA time zone for the space, e.g. America/Los_Angeles. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateResponse_response")] + public class UpdateResponse + { + [JsonConstructorAttribute] + protected UpdateResponse() { } + + public UpdateResponse(Space space = default) + { + Space = space; + } + + /// + /// OK + /// + [DataMember(Name = "space", IsRequired = false, EmitDefaultValue = false)] + public Space Space { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates an existing space. + /// + public Space Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Patch("/spaces/update", requestOptions) + .EnsureData("/spaces/update") + .Space; + } + + /// + /// Updates an existing space. + /// + public Space Update( + List? acsEntranceIds = default, + UpdateRequestCustomerData? customerData = default, + List? deviceIds = default, + string? name = default, + string? spaceId = default, + string? spaceKey = default + ) + { + return Update( + new UpdateRequest( + acsEntranceIds: acsEntranceIds, + customerData: customerData, + deviceIds: deviceIds, + name: name, + spaceId: spaceId, + spaceKey: spaceKey + ) + ); + } + + /// + /// Updates an existing space. + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PatchAsync("/spaces/update", requestOptions)) + .EnsureData("/spaces/update") + .Space; + } + + /// + /// Updates an existing space. + /// + public async Task UpdateAsync( + List? acsEntranceIds = default, + UpdateRequestCustomerData? customerData = default, + List? deviceIds = default, + string? name = default, + string? spaceId = default, + string? spaceKey = default + ) + { + return ( + await UpdateAsync( + new UpdateRequest( + acsEntranceIds: acsEntranceIds, + customerData: customerData, + deviceIds: deviceIds, + name: name, + spaceId: spaceId, + spaceKey: spaceKey + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Spaces Spaces => new(this); -} + public partial class SeamClient + { + public Api.Spaces Spaces => new(this); + } -public partial interface ISeamClient -{ -public Api.Spaces Spaces { get; } -} + public partial interface ISeamClient + { + public Api.Spaces Spaces { get; } + } } diff --git a/src/Seam/Api/SystemsAcs.cs b/src/Seam/Api/SystemsAcs.cs index 99c34e1c..84a89e3b 100644 --- a/src/Seam/Api/SystemsAcs.cs +++ b/src/Seam/Api/SystemsAcs.cs @@ -9,661 +9,764 @@ namespace Seam.Api { -public class SystemsAcs -{ -private ISeamClient _seam; - -public SystemsAcs(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get an ACS System. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string acsSystemId = default) -{ -AcsSystemId = acsSystemId; -} - -/// -/// ID of the access system that you want to get. -/// -[DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AcsSystem acsSystem = default) -{ -AcsSystem = acsSystem; -} - -/// -/// OK -/// -[DataMember(Name = "acs_system", IsRequired = false, EmitDefaultValue = false)] -public AcsSystem AcsSystem { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -public AcsSystem Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/systems/get", requestOptions).EnsureData("/acs/systems/get").AcsSystem; -} - -/// -/// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -public AcsSystem Get(string acsSystemId = default) -{ -return Get(new GetRequest(acsSystemId: acsSystemId)); -} - -/// -/// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/systems/get", requestOptions)).EnsureData("/acs/systems/get").AcsSystem; -} - -/// -/// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -public async Task GetAsync(string acsSystemId = default) -{ -return (await GetAsync(new GetRequest(acsSystemId: acsSystemId))); -} - -/// -/// Request parameters for List ACS Systems. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? connectedAccountId = default, string? customerKey = default, string? search = default) -{ -ConnectedAccountId = connectedAccountId; -CustomerKey = customerKey; -Search = search; -} - -/// -/// ID of the connected account by which you want to filter the list of access systems. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Customer key for which you want to list access systems. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// String for which to search. Filters returned access systems to include all records that satisfy a partial match using `name` or `acs_system_id`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List acsSystems = default) -{ -AcsSystems = acsSystems; -} - -/// -/// OK -/// -[DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] -public List AcsSystems { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/systems/list", requestOptions).EnsureData("/acs/systems/list").AcsSystems; -} - -/// -/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. -/// -public List List(string? connectedAccountId = default, string? customerKey = default, string? search = default) -{ -return List(new ListRequest(connectedAccountId: connectedAccountId, customerKey: customerKey, search: search)); -} - -/// -/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/systems/list", requestOptions)).EnsureData("/acs/systems/list").AcsSystems; -} - -/// -/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. -/// -public async Task> ListAsync(string? connectedAccountId = default, string? customerKey = default, string? search = default) -{ -return (await ListAsync(new ListRequest(connectedAccountId: connectedAccountId, customerKey: customerKey, search: search))); -} - -/// -/// Request parameters for List Compatible Credential Manager ACS Systems. -/// -[DataContract(Name = "listCompatibleCredentialManagerAcsSystemsRequest_request")] -public class ListCompatibleCredentialManagerAcsSystemsRequest -{ -[JsonConstructorAttribute] -protected ListCompatibleCredentialManagerAcsSystemsRequest() { } - -public ListCompatibleCredentialManagerAcsSystemsRequest(string acsSystemId = default) -{ -AcsSystemId = acsSystemId; -} - -/// -/// ID of the access system for which you want to retrieve all compatible credential manager systems. -/// -[DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listCompatibleCredentialManagerAcsSystemsResponse_response")] -public class ListCompatibleCredentialManagerAcsSystemsResponse -{ -[JsonConstructorAttribute] -protected ListCompatibleCredentialManagerAcsSystemsResponse() { } - -public ListCompatibleCredentialManagerAcsSystemsResponse(List acsSystems = default) -{ -AcsSystems = acsSystems; -} - -/// -/// OK -/// -[DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] -public List AcsSystems { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. -/// -public List ListCompatibleCredentialManagerAcsSystems(ListCompatibleCredentialManagerAcsSystemsRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/systems/list_compatible_credential_manager_acs_systems", requestOptions).EnsureData("/acs/systems/list_compatible_credential_manager_acs_systems").AcsSystems; -} - -/// -/// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. -/// -public List ListCompatibleCredentialManagerAcsSystems(string acsSystemId = default) -{ -return ListCompatibleCredentialManagerAcsSystems(new ListCompatibleCredentialManagerAcsSystemsRequest(acsSystemId: acsSystemId)); -} - -/// -/// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. -/// -public async Task> ListCompatibleCredentialManagerAcsSystemsAsync(ListCompatibleCredentialManagerAcsSystemsRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/systems/list_compatible_credential_manager_acs_systems", requestOptions)).EnsureData("/acs/systems/list_compatible_credential_manager_acs_systems").AcsSystems; -} - -/// -/// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. -/// -public async Task> ListCompatibleCredentialManagerAcsSystemsAsync(string acsSystemId = default) -{ -return (await ListCompatibleCredentialManagerAcsSystemsAsync(new ListCompatibleCredentialManagerAcsSystemsRequest(acsSystemId: acsSystemId))); -} - -/// -/// Request parameters for Report Devices. -/// -[DataContract(Name = "reportDevicesRequest_request")] -public class ReportDevicesRequest -{ -[JsonConstructorAttribute] -protected ReportDevicesRequest() { } - -public ReportDevicesRequest(List? acsEncoders = default, List? acsEntrances = default, string acsSystemId = default) -{ -AcsEncoders = acsEncoders; -AcsEntrances = acsEntrances; -AcsSystemId = acsSystemId; -} - -/// -/// Array of ACS encoders to report -/// -[DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] -public List? AcsEncoders { get; set; } - -/// -/// Array of ACS entrances to report -/// -[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public List? AcsEntrances { get; set; } - -/// -/// ID of the ACS system to report resources for -/// -[DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "reportDevicesRequestAcsEncoders_model")] -public class ReportDevicesRequestAcsEncoders -{ -[JsonConstructorAttribute] -protected ReportDevicesRequestAcsEncoders() { } - -public ReportDevicesRequestAcsEncoders(ReportDevicesRequestAcsEncodersHotekMetadata? hotekMetadata = default, bool? isRemoved = default) -{ -HotekMetadata = hotekMetadata; -IsRemoved = isRemoved; -} - -/// -/// Hotek-specific metadata associated with the entrance. -/// -[DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] -public ReportDevicesRequestAcsEncodersHotekMetadata? HotekMetadata { get; set; } - -/// -/// Whether the encoder is removed -/// -[DataMember(Name = "is_removed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsRemoved { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "reportDevicesRequestAcsEncodersHotekMetadata_model")] -public class ReportDevicesRequestAcsEncodersHotekMetadata -{ -[JsonConstructorAttribute] -protected ReportDevicesRequestAcsEncodersHotekMetadata() { } - -public ReportDevicesRequestAcsEncodersHotekMetadata(string? encoderNumber = default) -{ -EncoderNumber = encoderNumber; -} - -/// -/// The encoder number determined by the USB port connection. -/// -[DataMember(Name = "encoder_number", IsRequired = false, EmitDefaultValue = false)] -public string? EncoderNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "reportDevicesRequestAcsEntrances_model")] -public class ReportDevicesRequestAcsEntrances -{ -[JsonConstructorAttribute] -protected ReportDevicesRequestAcsEntrances() { } - -public ReportDevicesRequestAcsEntrances(ReportDevicesRequestAcsEntrancesHotekMetadata? hotekMetadata = default, bool? isRemoved = default) -{ -HotekMetadata = hotekMetadata; -IsRemoved = isRemoved; -} - -/// -/// Hotek-specific metadata associated with the entrance. -/// -[DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] -public ReportDevicesRequestAcsEntrancesHotekMetadata? HotekMetadata { get; set; } - -/// -/// Whether the entrance is removed -/// -[DataMember(Name = "is_removed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsRemoved { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "reportDevicesRequestAcsEntrancesHotekMetadata_model")] -public class ReportDevicesRequestAcsEntrancesHotekMetadata -{ -[JsonConstructorAttribute] -protected ReportDevicesRequestAcsEntrancesHotekMetadata() { } - -public ReportDevicesRequestAcsEntrancesHotekMetadata(string? commonAreaName = default, string? commonAreaNumber = default, string? roomNumber = default) -{ -CommonAreaName = commonAreaName; -CommonAreaNumber = commonAreaNumber; -RoomNumber = roomNumber; -} - -/// -/// The common area name -/// -[DataMember(Name = "common_area_name", IsRequired = false, EmitDefaultValue = false)] -public string? CommonAreaName { get; set; } - -/// -/// The room number identifier -/// -[DataMember(Name = "common_area_number", IsRequired = false, EmitDefaultValue = false)] -public string? CommonAreaNumber { get; set; } - -/// -/// The room number identifier -/// -[DataMember(Name = "room_number", IsRequired = false, EmitDefaultValue = false)] -public string? RoomNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Reports ACS system device status including encoders and entrances. -/// -public void ReportDevices(ReportDevicesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/systems/report_devices", requestOptions); -} - -/// -/// Reports ACS system device status including encoders and entrances. -/// -public void ReportDevices(List? acsEncoders = default, List? acsEntrances = default, string acsSystemId = default) -{ -ReportDevices(new ReportDevicesRequest(acsEncoders: acsEncoders, acsEntrances: acsEntrances, acsSystemId: acsSystemId)); -} - -/// -/// Reports ACS system device status including encoders and entrances. -/// -public async Task ReportDevicesAsync(ReportDevicesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/systems/report_devices", requestOptions); -} - -/// -/// Reports ACS system device status including encoders and entrances. -/// -public async Task ReportDevicesAsync(List? acsEncoders = default, List? acsEntrances = default, string acsSystemId = default) -{ -await ReportDevicesAsync(new ReportDevicesRequest(acsEncoders: acsEncoders, acsEntrances: acsEntrances, acsSystemId: acsSystemId)); -} -} + public class SystemsAcs + { + private ISeamClient _seam; + + public SystemsAcs(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get an ACS System. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string acsSystemId = default) + { + AcsSystemId = acsSystemId; + } + + /// + /// ID of the access system that you want to get. + /// + [DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AcsSystem acsSystem = default) + { + AcsSystem = acsSystem; + } + + /// + /// OK + /// + [DataMember(Name = "acs_system", IsRequired = false, EmitDefaultValue = false)] + public AcsSystem AcsSystem { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + public AcsSystem Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/systems/get", requestOptions) + .EnsureData("/acs/systems/get") + .AcsSystem; + } + + /// + /// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + public AcsSystem Get(string acsSystemId = default) + { + return Get(new GetRequest(acsSystemId: acsSystemId)); + } + + /// + /// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/systems/get", requestOptions)) + .EnsureData("/acs/systems/get") + .AcsSystem; + } + + /// + /// Returns a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + public async Task GetAsync(string acsSystemId = default) + { + return (await GetAsync(new GetRequest(acsSystemId: acsSystemId))); + } + + /// + /// Request parameters for List ACS Systems. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? connectedAccountId = default, + string? customerKey = default, + string? search = default + ) + { + ConnectedAccountId = connectedAccountId; + CustomerKey = customerKey; + Search = search; + } + + /// + /// ID of the connected account by which you want to filter the list of access systems. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Customer key for which you want to list access systems. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// String for which to search. Filters returned access systems to include all records that satisfy a partial match using `name` or `acs_system_id`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List acsSystems = default) + { + AcsSystems = acsSystems; + } + + /// + /// OK + /// + [DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] + public List AcsSystems { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/systems/list", requestOptions) + .EnsureData("/acs/systems/list") + .AcsSystems; + } + + /// + /// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. + /// + public List List( + string? connectedAccountId = default, + string? customerKey = default, + string? search = default + ) + { + return List( + new ListRequest( + connectedAccountId: connectedAccountId, + customerKey: customerKey, + search: search + ) + ); + } + + /// + /// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/systems/list", requestOptions)) + .EnsureData("/acs/systems/list") + .AcsSystems; + } + + /// + /// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. + /// + public async Task> ListAsync( + string? connectedAccountId = default, + string? customerKey = default, + string? search = default + ) + { + return ( + await ListAsync( + new ListRequest( + connectedAccountId: connectedAccountId, + customerKey: customerKey, + search: search + ) + ) + ); + } + + /// + /// Request parameters for List Compatible Credential Manager ACS Systems. + /// + [DataContract(Name = "listCompatibleCredentialManagerAcsSystemsRequest_request")] + public class ListCompatibleCredentialManagerAcsSystemsRequest + { + [JsonConstructorAttribute] + protected ListCompatibleCredentialManagerAcsSystemsRequest() { } + + public ListCompatibleCredentialManagerAcsSystemsRequest(string acsSystemId = default) + { + AcsSystemId = acsSystemId; + } + + /// + /// ID of the access system for which you want to retrieve all compatible credential manager systems. + /// + [DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listCompatibleCredentialManagerAcsSystemsResponse_response")] + public class ListCompatibleCredentialManagerAcsSystemsResponse + { + [JsonConstructorAttribute] + protected ListCompatibleCredentialManagerAcsSystemsResponse() { } + + public ListCompatibleCredentialManagerAcsSystemsResponse( + List acsSystems = default + ) + { + AcsSystems = acsSystems; + } + + /// + /// OK + /// + [DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] + public List AcsSystems { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. + /// + public List ListCompatibleCredentialManagerAcsSystems( + ListCompatibleCredentialManagerAcsSystemsRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get( + "/acs/systems/list_compatible_credential_manager_acs_systems", + requestOptions + ) + .EnsureData("/acs/systems/list_compatible_credential_manager_acs_systems") + .AcsSystems; + } + + /// + /// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. + /// + public List ListCompatibleCredentialManagerAcsSystems( + string acsSystemId = default + ) + { + return ListCompatibleCredentialManagerAcsSystems( + new ListCompatibleCredentialManagerAcsSystemsRequest(acsSystemId: acsSystemId) + ); + } + + /// + /// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. + /// + public async Task> ListCompatibleCredentialManagerAcsSystemsAsync( + ListCompatibleCredentialManagerAcsSystemsRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/acs/systems/list_compatible_credential_manager_acs_systems", + requestOptions + ) + ) + .EnsureData("/acs/systems/list_compatible_credential_manager_acs_systems") + .AcsSystems; + } + + /// + /// Returns a list of all credential manager systems that are compatible with a specified [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. + /// + public async Task> ListCompatibleCredentialManagerAcsSystemsAsync( + string acsSystemId = default + ) + { + return ( + await ListCompatibleCredentialManagerAcsSystemsAsync( + new ListCompatibleCredentialManagerAcsSystemsRequest(acsSystemId: acsSystemId) + ) + ); + } + + /// + /// Request parameters for Report Devices. + /// + [DataContract(Name = "reportDevicesRequest_request")] + public class ReportDevicesRequest + { + [JsonConstructorAttribute] + protected ReportDevicesRequest() { } + + public ReportDevicesRequest( + List? acsEncoders = default, + List? acsEntrances = default, + string acsSystemId = default + ) + { + AcsEncoders = acsEncoders; + AcsEntrances = acsEntrances; + AcsSystemId = acsSystemId; + } + + /// + /// Array of ACS encoders to report + /// + [DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEncoders { get; set; } + + /// + /// Array of ACS entrances to report + /// + [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] + public List? AcsEntrances { get; set; } + + /// + /// ID of the ACS system to report resources for + /// + [DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "reportDevicesRequestAcsEncoders_model")] + public class ReportDevicesRequestAcsEncoders + { + [JsonConstructorAttribute] + protected ReportDevicesRequestAcsEncoders() { } + + public ReportDevicesRequestAcsEncoders( + ReportDevicesRequestAcsEncodersHotekMetadata? hotekMetadata = default, + bool? isRemoved = default + ) + { + HotekMetadata = hotekMetadata; + IsRemoved = isRemoved; + } + + /// + /// Hotek-specific metadata associated with the entrance. + /// + [DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] + public ReportDevicesRequestAcsEncodersHotekMetadata? HotekMetadata { get; set; } + + /// + /// Whether the encoder is removed + /// + [DataMember(Name = "is_removed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsRemoved { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "reportDevicesRequestAcsEncodersHotekMetadata_model")] + public class ReportDevicesRequestAcsEncodersHotekMetadata + { + [JsonConstructorAttribute] + protected ReportDevicesRequestAcsEncodersHotekMetadata() { } + + public ReportDevicesRequestAcsEncodersHotekMetadata(string? encoderNumber = default) + { + EncoderNumber = encoderNumber; + } + + /// + /// The encoder number determined by the USB port connection. + /// + [DataMember(Name = "encoder_number", IsRequired = false, EmitDefaultValue = false)] + public string? EncoderNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "reportDevicesRequestAcsEntrances_model")] + public class ReportDevicesRequestAcsEntrances + { + [JsonConstructorAttribute] + protected ReportDevicesRequestAcsEntrances() { } + + public ReportDevicesRequestAcsEntrances( + ReportDevicesRequestAcsEntrancesHotekMetadata? hotekMetadata = default, + bool? isRemoved = default + ) + { + HotekMetadata = hotekMetadata; + IsRemoved = isRemoved; + } + + /// + /// Hotek-specific metadata associated with the entrance. + /// + [DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] + public ReportDevicesRequestAcsEntrancesHotekMetadata? HotekMetadata { get; set; } + + /// + /// Whether the entrance is removed + /// + [DataMember(Name = "is_removed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsRemoved { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "reportDevicesRequestAcsEntrancesHotekMetadata_model")] + public class ReportDevicesRequestAcsEntrancesHotekMetadata + { + [JsonConstructorAttribute] + protected ReportDevicesRequestAcsEntrancesHotekMetadata() { } + + public ReportDevicesRequestAcsEntrancesHotekMetadata( + string? commonAreaName = default, + string? commonAreaNumber = default, + string? roomNumber = default + ) + { + CommonAreaName = commonAreaName; + CommonAreaNumber = commonAreaNumber; + RoomNumber = roomNumber; + } + + /// + /// The common area name + /// + [DataMember(Name = "common_area_name", IsRequired = false, EmitDefaultValue = false)] + public string? CommonAreaName { get; set; } + + /// + /// The room number identifier + /// + [DataMember(Name = "common_area_number", IsRequired = false, EmitDefaultValue = false)] + public string? CommonAreaNumber { get; set; } + + /// + /// The room number identifier + /// + [DataMember(Name = "room_number", IsRequired = false, EmitDefaultValue = false)] + public string? RoomNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Reports ACS system device status including encoders and entrances. + /// + public void ReportDevices(ReportDevicesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/acs/systems/report_devices", requestOptions); + } + + /// + /// Reports ACS system device status including encoders and entrances. + /// + public void ReportDevices( + List? acsEncoders = default, + List? acsEntrances = default, + string acsSystemId = default + ) + { + ReportDevices( + new ReportDevicesRequest( + acsEncoders: acsEncoders, + acsEntrances: acsEntrances, + acsSystemId: acsSystemId + ) + ); + } + + /// + /// Reports ACS system device status including encoders and entrances. + /// + public async Task ReportDevicesAsync(ReportDevicesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/acs/systems/report_devices", requestOptions); + } + + /// + /// Reports ACS system device status including encoders and entrances. + /// + public async Task ReportDevicesAsync( + List? acsEncoders = default, + List? acsEntrances = default, + string acsSystemId = default + ) + { + await ReportDevicesAsync( + new ReportDevicesRequest( + acsEncoders: acsEncoders, + acsEntrances: acsEntrances, + acsSystemId: acsSystemId + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.SystemsAcs SystemsAcs => new(this); -} + public partial class SeamClient + { + public Api.SystemsAcs SystemsAcs => new(this); + } -public partial interface ISeamClient -{ -public Api.SystemsAcs SystemsAcs { get; } -} + public partial interface ISeamClient + { + public Api.SystemsAcs SystemsAcs { get; } + } } diff --git a/src/Seam/Api/Thermostats.cs b/src/Seam/Api/Thermostats.cs index 33f3d3b5..dcfa48d2 100644 --- a/src/Seam/Api/Thermostats.cs +++ b/src/Seam/Api/Thermostats.cs @@ -9,2350 +9,3042 @@ namespace Seam.Api { -public class Thermostats -{ -private ISeamClient _seam; - -public Thermostats(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Activate a Climate Preset. -/// -[DataContract(Name = "activateClimatePresetRequest_request")] -public class ActivateClimatePresetRequest -{ -[JsonConstructorAttribute] -protected ActivateClimatePresetRequest() { } - -public ActivateClimatePresetRequest(string climatePresetKey = default, string deviceId = default) -{ -ClimatePresetKey = climatePresetKey; -DeviceId = deviceId; -} - -/// -/// Climate preset key of the climate preset that you want to activate. -/// -[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// ID of the thermostat device for which you want to activate a climate preset. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "activateClimatePresetResponse_response")] -public class ActivateClimatePresetResponse -{ -[JsonConstructorAttribute] -protected ActivateClimatePresetResponse() { } - -public ActivateClimatePresetResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public ActionAttempt ActivateClimatePreset(ActivateClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/activate_climate_preset", requestOptions).EnsureData("/thermostats/activate_climate_preset").ActionAttempt; -} - -/// -/// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public ActionAttempt ActivateClimatePreset(string climatePresetKey = default, string deviceId = default) -{ -return ActivateClimatePreset(new ActivateClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); -} - -/// -/// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task ActivateClimatePresetAsync(ActivateClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/activate_climate_preset", requestOptions)).EnsureData("/thermostats/activate_climate_preset").ActionAttempt; -} - -/// -/// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task ActivateClimatePresetAsync(string climatePresetKey = default, string deviceId = default) -{ -return (await ActivateClimatePresetAsync(new ActivateClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId))); -} - -/// -/// Request parameters for Activate the Weekly Program. -/// -[DataContract(Name = "activateWeeklyProgramRequest_request")] -public class ActivateWeeklyProgramRequest -{ -[JsonConstructorAttribute] -protected ActivateWeeklyProgramRequest() { } - -public ActivateWeeklyProgramRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the thermostat device that you want to return to its weekly program. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "activateWeeklyProgramResponse_response")] -public class ActivateWeeklyProgramResponse -{ -[JsonConstructorAttribute] -protected ActivateWeeklyProgramResponse() { } - -public ActivateWeeklyProgramResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. -/// -public ActionAttempt ActivateWeeklyProgram(ActivateWeeklyProgramRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/activate_weekly_program", requestOptions).EnsureData("/thermostats/activate_weekly_program").ActionAttempt; -} - -/// -/// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. -/// -public ActionAttempt ActivateWeeklyProgram(string deviceId = default) -{ -return ActivateWeeklyProgram(new ActivateWeeklyProgramRequest(deviceId: deviceId)); -} - -/// -/// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. -/// -public async Task ActivateWeeklyProgramAsync(ActivateWeeklyProgramRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/activate_weekly_program", requestOptions)).EnsureData("/thermostats/activate_weekly_program").ActionAttempt; -} - -/// -/// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. -/// -public async Task ActivateWeeklyProgramAsync(string deviceId = default) -{ -return (await ActivateWeeklyProgramAsync(new ActivateWeeklyProgramRequest(deviceId: deviceId))); -} - -/// -/// Request parameters for Set to Cool Mode. -/// -[DataContract(Name = "coolRequest_request")] -public class CoolRequest -{ -[JsonConstructorAttribute] -protected CoolRequest() { } - -public CoolRequest(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default) -{ -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DeviceId = deviceId; -} - -/// -/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// ID of the thermostat device that you want to set to cool mode. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "coolResponse_response")] -public class CoolResponse -{ -[JsonConstructorAttribute] -protected CoolResponse() { } - -public CoolResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public ActionAttempt Cool(CoolRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/cool", requestOptions).EnsureData("/thermostats/cool").ActionAttempt; -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public ActionAttempt Cool(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default) -{ -return Cool(new CoolRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId)); -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public async Task CoolAsync(CoolRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/cool", requestOptions)).EnsureData("/thermostats/cool").ActionAttempt; -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public async Task CoolAsync(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default) -{ -return (await CoolAsync(new CoolRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId))); -} - -/// -/// Request parameters for Create a Climate Preset. -/// -[DataContract(Name = "createClimatePresetRequest_request")] -public class CreateClimatePresetRequest -{ -[JsonConstructorAttribute] -protected CreateClimatePresetRequest() { } - -public CreateClimatePresetRequest(string climatePresetKey = default, CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) -{ -ClimatePresetKey = climatePresetKey; -ClimatePresetMode = climatePresetMode; -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DeviceId = deviceId; -EcobeeMetadata = ecobeeMetadata; -FanModeSetting = fanModeSetting; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -HvacModeSetting = hvacModeSetting; -ManualOverrideAllowed = manualOverrideAllowed; -Name = name; -} - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ClimatePresetModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "home")] -Home = 1, - -[EnumMember(Value = "away")] -Away = 2, - -[EnumMember(Value = "wake")] -Wake = 3, - -[EnumMember(Value = "sleep")] -Sleep = 4, - -[EnumMember(Value = "occupied")] -Occupied = 5, - -[EnumMember(Value = "unoccupied")] -Unoccupied = 6, -} - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum HvacModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, - -[EnumMember(Value = "heat")] -Heat = 2, - -[EnumMember(Value = "cool")] -Cool = 3, - -[EnumMember(Value = "heat_cool")] -HeatCool = 4, - -[EnumMember(Value = "eco")] -Eco = 5, -} - -/// -/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] -public CreateClimatePresetRequest.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// ID of the thermostat device for which you want create a climate preset. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Metadata specific to the Ecobee climate, if applicable. -/// -[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] -public CreateClimatePresetRequestEcobeeMetadata? EcobeeMetadata { get; set; } - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public CreateClimatePresetRequest.FanModeSettingEnum? FanModeSetting { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public CreateClimatePresetRequest.HvacModeSettingEnum? HvacModeSetting { get; set; } - -/// -/// Indicates whether a person at the thermostat or using the API can change the thermostat's settings. -/// -[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] -[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? ManualOverrideAllowed { get; set; } - -/// -/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createClimatePresetRequestEcobeeMetadata_model")] -public class CreateClimatePresetRequestEcobeeMetadata -{ -[JsonConstructorAttribute] -protected CreateClimatePresetRequestEcobeeMetadata() { } - -public CreateClimatePresetRequestEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, CreateClimatePresetRequestEcobeeMetadata.OwnerEnum? owner = default) -{ -ClimateRef = climateRef; -IsOptimized = isOptimized; -Owner = owner; -} - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum OwnerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "user")] -User = 1, - -[EnumMember(Value = "system")] -System = 2, -} - -/// -/// Reference to the Ecobee climate, if applicable. -/// -[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] -public string? ClimateRef { get; set; } - -/// -/// Indicates if the climate preset is optimized by Ecobee. -/// -[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOptimized { get; set; } - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] -public CreateClimatePresetRequestEcobeeMetadata.OwnerEnum? Owner { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void CreateClimatePreset(CreateClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/thermostats/create_climate_preset", requestOptions); -} - -/// -/// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void CreateClimatePreset(string climatePresetKey = default, CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) -{ -CreateClimatePreset(new CreateClimatePresetRequest(climatePresetKey: climatePresetKey, climatePresetMode: climatePresetMode, coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, ecobeeMetadata: ecobeeMetadata, fanModeSetting: fanModeSetting, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting, manualOverrideAllowed: manualOverrideAllowed, name: name)); -} - -/// -/// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task CreateClimatePresetAsync(CreateClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/thermostats/create_climate_preset", requestOptions); -} - -/// -/// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task CreateClimatePresetAsync(string climatePresetKey = default, CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) -{ -await CreateClimatePresetAsync(new CreateClimatePresetRequest(climatePresetKey: climatePresetKey, climatePresetMode: climatePresetMode, coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, ecobeeMetadata: ecobeeMetadata, fanModeSetting: fanModeSetting, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting, manualOverrideAllowed: manualOverrideAllowed, name: name)); -} - -/// -/// Request parameters for Delete a Climate Preset. -/// -[DataContract(Name = "deleteClimatePresetRequest_request")] -public class DeleteClimatePresetRequest -{ -[JsonConstructorAttribute] -protected DeleteClimatePresetRequest() { } - -public DeleteClimatePresetRequest(string climatePresetKey = default, string deviceId = default) -{ -ClimatePresetKey = climatePresetKey; -DeviceId = deviceId; -} - -/// -/// Climate preset key of the climate preset that you want to delete. -/// -[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// ID of the thermostat device for which you want to delete a climate preset. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void DeleteClimatePreset(DeleteClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/thermostats/delete_climate_preset", requestOptions); -} - -/// -/// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void DeleteClimatePreset(string climatePresetKey = default, string deviceId = default) -{ -DeleteClimatePreset(new DeleteClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); -} - -/// -/// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task DeleteClimatePresetAsync(DeleteClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/thermostats/delete_climate_preset", requestOptions); -} - -/// -/// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task DeleteClimatePresetAsync(string climatePresetKey = default, string deviceId = default) -{ -await DeleteClimatePresetAsync(new DeleteClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); -} - -/// -/// Request parameters for Set to Heat Mode. -/// -[DataContract(Name = "heatRequest_request")] -public class HeatRequest -{ -[JsonConstructorAttribute] -protected HeatRequest() { } - -public HeatRequest(string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) -{ -DeviceId = deviceId; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -} - -/// -/// ID of the thermostat device that you want to set to heat mode. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "heatResponse_response")] -public class HeatResponse -{ -[JsonConstructorAttribute] -protected HeatResponse() { } - -public HeatResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public ActionAttempt Heat(HeatRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/heat", requestOptions).EnsureData("/thermostats/heat").ActionAttempt; -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public ActionAttempt Heat(string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) -{ -return Heat(new HeatRequest(deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit)); -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public async Task HeatAsync(HeatRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/heat", requestOptions)).EnsureData("/thermostats/heat").ActionAttempt; -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public async Task HeatAsync(string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) -{ -return (await HeatAsync(new HeatRequest(deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit))); -} - -/// -/// Request parameters for Set to Heat-Cool (Auto) Mode. -/// -[DataContract(Name = "heatCoolRequest_request")] -public class HeatCoolRequest -{ -[JsonConstructorAttribute] -protected HeatCoolRequest() { } - -public HeatCoolRequest(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) -{ -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DeviceId = deviceId; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -} - -/// -/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// ID of the thermostat device that you want to set to heat-cool mode. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "heatCoolResponse_response")] -public class HeatCoolResponse -{ -[JsonConstructorAttribute] -protected HeatCoolResponse() { } - -public HeatCoolResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public ActionAttempt HeatCool(HeatCoolRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/heat_cool", requestOptions).EnsureData("/thermostats/heat_cool").ActionAttempt; -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public ActionAttempt HeatCool(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) -{ -return HeatCool(new HeatCoolRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit)); -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public async Task HeatCoolAsync(HeatCoolRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/heat_cool", requestOptions)).EnsureData("/thermostats/heat_cool").ActionAttempt; -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public async Task HeatCoolAsync(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default) -{ -return (await HeatCoolAsync(new HeatCoolRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit))); -} - -/// -/// Request parameters for List Thermostats. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountId = connectedAccountId; -CustomerKey = customerKey; -DeviceType = deviceType; -DeviceTypes = deviceTypes; -Manufacturer = manufacturer; -} - -/// -/// Device type by which you want to filter thermostat devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "ecobee_thermostat")] -EcobeeThermostat = 1, - -[EnumMember(Value = "nest_thermostat")] -NestThermostat = 2, - -[EnumMember(Value = "honeywell_resideo_thermostat")] -HoneywellResideoThermostat = 3, - -[EnumMember(Value = "tado_thermostat")] -TadoThermostat = 4, - -[EnumMember(Value = "sensi_thermostat")] -SensiThermostat = 5, - -[EnumMember(Value = "smartthings_thermostat")] -SmartthingsThermostat = 6, -} - -/// -/// Array of device types by which you want to filter thermostat devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "ecobee_thermostat")] -EcobeeThermostat = 1, - -[EnumMember(Value = "nest_thermostat")] -NestThermostat = 2, - -[EnumMember(Value = "honeywell_resideo_thermostat")] -HoneywellResideoThermostat = 3, - -[EnumMember(Value = "tado_thermostat")] -TadoThermostat = 4, - -[EnumMember(Value = "sensi_thermostat")] -SensiThermostat = 5, - -[EnumMember(Value = "smartthings_thermostat")] -SmartthingsThermostat = 6, -} - -/// -/// Manufacturer by which you want to filter thermostat devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ManufacturerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "ecobee")] -Ecobee = 1, - -[EnumMember(Value = "honeywell_resideo")] -HoneywellResideo = 2, - -[EnumMember(Value = "nest")] -Nest = 3, - -[EnumMember(Value = "sensi")] -Sensi = 4, - -[EnumMember(Value = "smartthings")] -Smartthings = 5, - -[EnumMember(Value = "tado")] -Tado = 6, -} - -/// -/// ID of the Connect Webview for which you want to list devices. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectWebviewId { get; set; } - -/// -/// ID of the connected account for which you want to list devices. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Customer key for which you want to list devices. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Device type by which you want to filter thermostat devices. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - -/// -/// Array of device types by which you want to filter thermostat devices. -/// -[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceTypes { get; set; } - -/// -/// Manufacturer by which you want to filter thermostat devices. -/// -[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List devices = default) -{ -Devices = devices; -} - -/// -/// OK -/// -[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] -public List Devices { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/thermostats/list", requestOptions).EnsureData("/thermostats/list").Devices; -} - -/// -/// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). -/// -public List List(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer)); -} - -/// -/// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/thermostats/list", requestOptions)).EnsureData("/thermostats/list").Devices; -} - -/// -/// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, string? customerKey = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, ListRequest.ManufacturerEnum? manufacturer = default) -{ -return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, customerKey: customerKey, deviceType: deviceType, deviceTypes: deviceTypes, manufacturer: manufacturer))); -} - -/// -/// Request parameters for Set to Off Mode. -/// -[DataContract(Name = "offRequest_request")] -public class OffRequest -{ -[JsonConstructorAttribute] -protected OffRequest() { } - -public OffRequest(string deviceId = default) -{ -DeviceId = deviceId; -} - -/// -/// ID of the thermostat device that you want to set to off mode. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "offResponse_response")] -public class OffResponse -{ -[JsonConstructorAttribute] -protected OffResponse() { } - -public OffResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public ActionAttempt Off(OffRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/off", requestOptions).EnsureData("/thermostats/off").ActionAttempt; -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public ActionAttempt Off(string deviceId = default) -{ -return Off(new OffRequest(deviceId: deviceId)); -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public async Task OffAsync(OffRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/off", requestOptions)).EnsureData("/thermostats/off").ActionAttempt; -} - -/// -/// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). -/// -public async Task OffAsync(string deviceId = default) -{ -return (await OffAsync(new OffRequest(deviceId: deviceId))); -} - -/// -/// Request parameters for Set the Fallback Climate Preset. -/// -[DataContract(Name = "setFallbackClimatePresetRequest_request")] -public class SetFallbackClimatePresetRequest -{ -[JsonConstructorAttribute] -protected SetFallbackClimatePresetRequest() { } - -public SetFallbackClimatePresetRequest(string climatePresetKey = default, string deviceId = default) -{ -ClimatePresetKey = climatePresetKey; -DeviceId = deviceId; -} - -/// -/// Climate preset key of the climate preset that you want to set as the fallback climate preset. -/// -[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// ID of the thermostat device for which you want to set the fallback climate preset. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void SetFallbackClimatePreset(SetFallbackClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/thermostats/set_fallback_climate_preset", requestOptions); -} - -/// -/// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void SetFallbackClimatePreset(string climatePresetKey = default, string deviceId = default) -{ -SetFallbackClimatePreset(new SetFallbackClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); -} - -/// -/// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task SetFallbackClimatePresetAsync(SetFallbackClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/thermostats/set_fallback_climate_preset", requestOptions); -} - -/// -/// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task SetFallbackClimatePresetAsync(string climatePresetKey = default, string deviceId = default) -{ -await SetFallbackClimatePresetAsync(new SetFallbackClimatePresetRequest(climatePresetKey: climatePresetKey, deviceId: deviceId)); -} - -/// -/// Request parameters for Set the Fan Mode Setting. -/// -[DataContract(Name = "setFanModeRequest_request")] -public class SetFanModeRequest -{ -[JsonConstructorAttribute] -protected SetFanModeRequest() { } - -public SetFanModeRequest(string deviceId = default, SetFanModeRequest.FanModeEnum? fanMode = default, SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default) -{ -DeviceId = deviceId; -FanMode = fanMode; -FanModeSetting = fanModeSetting; -} - -/// -/// Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// [Fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// ID of the thermostat device for which you want to set the fan mode. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. -/// -[Obsolete("Use `fan_mode_setting` instead.")] -[DataMember(Name = "fan_mode", IsRequired = false, EmitDefaultValue = false)] -public SetFanModeRequest.FanModeEnum? FanMode { get; set; } - -/// -/// [Fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. -/// -[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public SetFanModeRequest.FanModeSettingEnum? FanModeSetting { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "setFanModeResponse_response")] -public class SetFanModeResponse -{ -[JsonConstructorAttribute] -protected SetFanModeResponse() { } - -public SetFanModeResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public ActionAttempt SetFanMode(SetFanModeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/set_fan_mode", requestOptions).EnsureData("/thermostats/set_fan_mode").ActionAttempt; -} - -/// -/// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public ActionAttempt SetFanMode(string deviceId = default, SetFanModeRequest.FanModeEnum? fanMode = default, SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default) -{ -return SetFanMode(new SetFanModeRequest(deviceId: deviceId, fanMode: fanMode, fanModeSetting: fanModeSetting)); -} - -/// -/// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task SetFanModeAsync(SetFanModeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/set_fan_mode", requestOptions)).EnsureData("/thermostats/set_fan_mode").ActionAttempt; -} - -/// -/// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task SetFanModeAsync(string deviceId = default, SetFanModeRequest.FanModeEnum? fanMode = default, SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default) -{ -return (await SetFanModeAsync(new SetFanModeRequest(deviceId: deviceId, fanMode: fanMode, fanModeSetting: fanModeSetting))); -} - -/// -/// Request parameters for Set the HVAC Mode. -/// -[DataContract(Name = "setHvacModeRequest_request")] -public class SetHvacModeRequest -{ -[JsonConstructorAttribute] -protected SetHvacModeRequest() { } - -public SetHvacModeRequest(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default) -{ -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DeviceId = deviceId; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -HvacModeSetting = hvacModeSetting; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum HvacModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, - -[EnumMember(Value = "cool")] -Cool = 2, - -[EnumMember(Value = "heat")] -Heat = 3, - -[EnumMember(Value = "heat_cool")] -HeatCool = 4, - -[EnumMember(Value = "eco")] -Eco = 5, -} - -/// -/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// ID of the thermostat device for which you want to set the HVAC mode. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -[DataMember(Name = "hvac_mode_setting", IsRequired = true, EmitDefaultValue = false)] -public SetHvacModeRequest.HvacModeSettingEnum HvacModeSetting { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "setHvacModeResponse_response")] -public class SetHvacModeResponse -{ -[JsonConstructorAttribute] -protected SetHvacModeResponse() { } - -public SetHvacModeResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public ActionAttempt SetHvacMode(SetHvacModeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/set_hvac_mode", requestOptions).EnsureData("/thermostats/set_hvac_mode").ActionAttempt; -} - -/// -/// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public ActionAttempt SetHvacMode(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default) -{ -return SetHvacMode(new SetHvacModeRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting)); -} - -/// -/// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task SetHvacModeAsync(SetHvacModeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/set_hvac_mode", requestOptions)).EnsureData("/thermostats/set_hvac_mode").ActionAttempt; -} - -/// -/// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task SetHvacModeAsync(float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default) -{ -return (await SetHvacModeAsync(new SetHvacModeRequest(coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting))); -} - -/// -/// Request parameters for Set a Temperature Threshold. -/// -[DataContract(Name = "setTemperatureThresholdRequest_request")] -public class SetTemperatureThresholdRequest -{ -[JsonConstructorAttribute] -protected SetTemperatureThresholdRequest() { } - -public SetTemperatureThresholdRequest(string deviceId = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default) -{ -DeviceId = deviceId; -LowerLimitCelsius = lowerLimitCelsius; -LowerLimitFahrenheit = lowerLimitFahrenheit; -UpperLimitCelsius = upperLimitCelsius; -UpperLimitFahrenheit = upperLimitFahrenheit; -} - -/// -/// ID of the thermostat device for which you want to set a temperature threshold. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Lower temperature limit in in °C. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. -/// -[DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? LowerLimitCelsius { get; set; } - -/// -/// Lower temperature limit in in °F. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. -/// -[DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? LowerLimitFahrenheit { get; set; } - -/// -/// Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. -/// -[DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? UpperLimitCelsius { get; set; } - -/// -/// Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. -/// -[DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? UpperLimitFahrenheit { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. -/// -public void SetTemperatureThreshold(SetTemperatureThresholdRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/thermostats/set_temperature_threshold", requestOptions); -} - -/// -/// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. -/// -public void SetTemperatureThreshold(string deviceId = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default) -{ -SetTemperatureThreshold(new SetTemperatureThresholdRequest(deviceId: deviceId, lowerLimitCelsius: lowerLimitCelsius, lowerLimitFahrenheit: lowerLimitFahrenheit, upperLimitCelsius: upperLimitCelsius, upperLimitFahrenheit: upperLimitFahrenheit)); -} - -/// -/// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. -/// -public async Task SetTemperatureThresholdAsync(SetTemperatureThresholdRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/thermostats/set_temperature_threshold", requestOptions); -} - -/// -/// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. -/// -public async Task SetTemperatureThresholdAsync(string deviceId = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default) -{ -await SetTemperatureThresholdAsync(new SetTemperatureThresholdRequest(deviceId: deviceId, lowerLimitCelsius: lowerLimitCelsius, lowerLimitFahrenheit: lowerLimitFahrenheit, upperLimitCelsius: upperLimitCelsius, upperLimitFahrenheit: upperLimitFahrenheit)); -} - -/// -/// Request parameters for Update a Climate Preset. -/// -[DataContract(Name = "updateClimatePresetRequest_request")] -public class UpdateClimatePresetRequest -{ -[JsonConstructorAttribute] -protected UpdateClimatePresetRequest() { } - -public UpdateClimatePresetRequest(string climatePresetKey = default, UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) -{ -ClimatePresetKey = climatePresetKey; -ClimatePresetMode = climatePresetMode; -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DeviceId = deviceId; -EcobeeMetadata = ecobeeMetadata; -FanModeSetting = fanModeSetting; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -HvacModeSetting = hvacModeSetting; -ManualOverrideAllowed = manualOverrideAllowed; -Name = name; -} - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ClimatePresetModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "home")] -Home = 1, - -[EnumMember(Value = "away")] -Away = 2, - -[EnumMember(Value = "wake")] -Wake = 3, - -[EnumMember(Value = "sleep")] -Sleep = 4, - -[EnumMember(Value = "occupied")] -Occupied = 5, - -[EnumMember(Value = "unoccupied")] -Unoccupied = 6, -} - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum HvacModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, - -[EnumMember(Value = "heat")] -Heat = 2, - -[EnumMember(Value = "cool")] -Cool = 3, - -[EnumMember(Value = "heat_cool")] -HeatCool = 4, - -[EnumMember(Value = "eco")] -Eco = 5, -} - -/// -/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] -public UpdateClimatePresetRequest.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// ID of the thermostat device for which you want to update a climate preset. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Metadata specific to the Ecobee climate, if applicable. -/// -[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] -public UpdateClimatePresetRequestEcobeeMetadata? EcobeeMetadata { get; set; } - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public UpdateClimatePresetRequest.FanModeSettingEnum? FanModeSetting { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public UpdateClimatePresetRequest.HvacModeSettingEnum? HvacModeSetting { get; set; } - -/// -/// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] -[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? ManualOverrideAllowed { get; set; } - -/// -/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateClimatePresetRequestEcobeeMetadata_model")] -public class UpdateClimatePresetRequestEcobeeMetadata -{ -[JsonConstructorAttribute] -protected UpdateClimatePresetRequestEcobeeMetadata() { } - -public UpdateClimatePresetRequestEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, UpdateClimatePresetRequestEcobeeMetadata.OwnerEnum? owner = default) -{ -ClimateRef = climateRef; -IsOptimized = isOptimized; -Owner = owner; -} - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum OwnerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "user")] -User = 1, - -[EnumMember(Value = "system")] -System = 2, -} - -/// -/// Reference to the Ecobee climate, if applicable. -/// -[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] -public string? ClimateRef { get; set; } - -/// -/// Indicates if the climate preset is optimized by Ecobee. -/// -[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOptimized { get; set; } - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] -public UpdateClimatePresetRequestEcobeeMetadata.OwnerEnum? Owner { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void UpdateClimatePreset(UpdateClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/thermostats/update_climate_preset", requestOptions); -} - -/// -/// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public void UpdateClimatePreset(string climatePresetKey = default, UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) -{ -UpdateClimatePreset(new UpdateClimatePresetRequest(climatePresetKey: climatePresetKey, climatePresetMode: climatePresetMode, coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, ecobeeMetadata: ecobeeMetadata, fanModeSetting: fanModeSetting, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting, manualOverrideAllowed: manualOverrideAllowed, name: name)); -} - -/// -/// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task UpdateClimatePresetAsync(UpdateClimatePresetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/thermostats/update_climate_preset", requestOptions); -} - -/// -/// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). -/// -public async Task UpdateClimatePresetAsync(string climatePresetKey = default, UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string deviceId = default, UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) -{ -await UpdateClimatePresetAsync(new UpdateClimatePresetRequest(climatePresetKey: climatePresetKey, climatePresetMode: climatePresetMode, coolingSetPointCelsius: coolingSetPointCelsius, coolingSetPointFahrenheit: coolingSetPointFahrenheit, deviceId: deviceId, ecobeeMetadata: ecobeeMetadata, fanModeSetting: fanModeSetting, heatingSetPointCelsius: heatingSetPointCelsius, heatingSetPointFahrenheit: heatingSetPointFahrenheit, hvacModeSetting: hvacModeSetting, manualOverrideAllowed: manualOverrideAllowed, name: name)); -} - -/// -/// Request parameters for Update the Thermostat Weekly Program. -/// -[DataContract(Name = "updateWeeklyProgramRequest_request")] -public class UpdateWeeklyProgramRequest -{ -[JsonConstructorAttribute] -protected UpdateWeeklyProgramRequest() { } - -public UpdateWeeklyProgramRequest(string deviceId = default, string? fridayProgramId = default, string? mondayProgramId = default, string? saturdayProgramId = default, string? sundayProgramId = default, string? thursdayProgramId = default, string? tuesdayProgramId = default, string? wednesdayProgramId = default) -{ -DeviceId = deviceId; -FridayProgramId = fridayProgramId; -MondayProgramId = mondayProgramId; -SaturdayProgramId = saturdayProgramId; -SundayProgramId = sundayProgramId; -ThursdayProgramId = thursdayProgramId; -TuesdayProgramId = tuesdayProgramId; -WednesdayProgramId = wednesdayProgramId; -} - -/// -/// ID of the thermostat device for which you want to update the weekly program. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// ID of the thermostat daily program to run on Fridays. -/// -[DataMember(Name = "friday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? FridayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Mondays. -/// -[DataMember(Name = "monday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? MondayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Saturdays. -/// -[DataMember(Name = "saturday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? SaturdayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Sundays. -/// -[DataMember(Name = "sunday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? SundayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Thursdays. -/// -[DataMember(Name = "thursday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? ThursdayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Tuesdays. -/// -[DataMember(Name = "tuesday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? TuesdayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Wednesdays. -/// -[DataMember(Name = "wednesday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? WednesdayProgramId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateWeeklyProgramResponse_response")] -public class UpdateWeeklyProgramResponse -{ -[JsonConstructorAttribute] -protected UpdateWeeklyProgramResponse() { } - -public UpdateWeeklyProgramResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. -/// -public ActionAttempt UpdateWeeklyProgram(UpdateWeeklyProgramRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/thermostats/update_weekly_program", requestOptions).EnsureData("/thermostats/update_weekly_program").ActionAttempt; -} - -/// -/// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. -/// -public ActionAttempt UpdateWeeklyProgram(string deviceId = default, string? fridayProgramId = default, string? mondayProgramId = default, string? saturdayProgramId = default, string? sundayProgramId = default, string? thursdayProgramId = default, string? tuesdayProgramId = default, string? wednesdayProgramId = default) -{ -return UpdateWeeklyProgram(new UpdateWeeklyProgramRequest(deviceId: deviceId, fridayProgramId: fridayProgramId, mondayProgramId: mondayProgramId, saturdayProgramId: saturdayProgramId, sundayProgramId: sundayProgramId, thursdayProgramId: thursdayProgramId, tuesdayProgramId: tuesdayProgramId, wednesdayProgramId: wednesdayProgramId)); -} - -/// -/// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. -/// -public async Task UpdateWeeklyProgramAsync(UpdateWeeklyProgramRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/thermostats/update_weekly_program", requestOptions)).EnsureData("/thermostats/update_weekly_program").ActionAttempt; -} - -/// -/// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. -/// -public async Task UpdateWeeklyProgramAsync(string deviceId = default, string? fridayProgramId = default, string? mondayProgramId = default, string? saturdayProgramId = default, string? sundayProgramId = default, string? thursdayProgramId = default, string? tuesdayProgramId = default, string? wednesdayProgramId = default) -{ -return (await UpdateWeeklyProgramAsync(new UpdateWeeklyProgramRequest(deviceId: deviceId, fridayProgramId: fridayProgramId, mondayProgramId: mondayProgramId, saturdayProgramId: saturdayProgramId, sundayProgramId: sundayProgramId, thursdayProgramId: thursdayProgramId, tuesdayProgramId: tuesdayProgramId, wednesdayProgramId: wednesdayProgramId))); -} -} + public class Thermostats + { + private ISeamClient _seam; + + public Thermostats(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Activate a Climate Preset. + /// + [DataContract(Name = "activateClimatePresetRequest_request")] + public class ActivateClimatePresetRequest + { + [JsonConstructorAttribute] + protected ActivateClimatePresetRequest() { } + + public ActivateClimatePresetRequest( + string climatePresetKey = default, + string deviceId = default + ) + { + ClimatePresetKey = climatePresetKey; + DeviceId = deviceId; + } + + /// + /// Climate preset key of the climate preset that you want to activate. + /// + [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// ID of the thermostat device for which you want to activate a climate preset. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "activateClimatePresetResponse_response")] + public class ActivateClimatePresetResponse + { + [JsonConstructorAttribute] + protected ActivateClimatePresetResponse() { } + + public ActivateClimatePresetResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public ActionAttempt ActivateClimatePreset(ActivateClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/thermostats/activate_climate_preset", + requestOptions + ) + .EnsureData("/thermostats/activate_climate_preset") + .ActionAttempt; + } + + /// + /// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public ActionAttempt ActivateClimatePreset( + string climatePresetKey = default, + string deviceId = default + ) + { + return ActivateClimatePreset( + new ActivateClimatePresetRequest( + climatePresetKey: climatePresetKey, + deviceId: deviceId + ) + ); + } + + /// + /// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task ActivateClimatePresetAsync( + ActivateClimatePresetRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/thermostats/activate_climate_preset", + requestOptions + ) + ) + .EnsureData("/thermostats/activate_climate_preset") + .ActionAttempt; + } + + /// + /// Activates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task ActivateClimatePresetAsync( + string climatePresetKey = default, + string deviceId = default + ) + { + return ( + await ActivateClimatePresetAsync( + new ActivateClimatePresetRequest( + climatePresetKey: climatePresetKey, + deviceId: deviceId + ) + ) + ); + } + + /// + /// Request parameters for Activate the Weekly Program. + /// + [DataContract(Name = "activateWeeklyProgramRequest_request")] + public class ActivateWeeklyProgramRequest + { + [JsonConstructorAttribute] + protected ActivateWeeklyProgramRequest() { } + + public ActivateWeeklyProgramRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the thermostat device that you want to return to its weekly program. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "activateWeeklyProgramResponse_response")] + public class ActivateWeeklyProgramResponse + { + [JsonConstructorAttribute] + protected ActivateWeeklyProgramResponse() { } + + public ActivateWeeklyProgramResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. + /// + public ActionAttempt ActivateWeeklyProgram(ActivateWeeklyProgramRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/thermostats/activate_weekly_program", + requestOptions + ) + .EnsureData("/thermostats/activate_weekly_program") + .ActionAttempt; + } + + /// + /// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. + /// + public ActionAttempt ActivateWeeklyProgram(string deviceId = default) + { + return ActivateWeeklyProgram(new ActivateWeeklyProgramRequest(deviceId: deviceId)); + } + + /// + /// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. + /// + public async Task ActivateWeeklyProgramAsync( + ActivateWeeklyProgramRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/thermostats/activate_weekly_program", + requestOptions + ) + ) + .EnsureData("/thermostats/activate_weekly_program") + .ActionAttempt; + } + + /// + /// Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time. + /// + public async Task ActivateWeeklyProgramAsync(string deviceId = default) + { + return ( + await ActivateWeeklyProgramAsync( + new ActivateWeeklyProgramRequest(deviceId: deviceId) + ) + ); + } + + /// + /// Request parameters for Set to Cool Mode. + /// + [DataContract(Name = "coolRequest_request")] + public class CoolRequest + { + [JsonConstructorAttribute] + protected CoolRequest() { } + + public CoolRequest( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default + ) + { + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DeviceId = deviceId; + } + + /// + /// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// ID of the thermostat device that you want to set to cool mode. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "coolResponse_response")] + public class CoolResponse + { + [JsonConstructorAttribute] + protected CoolResponse() { } + + public CoolResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public ActionAttempt Cool(CoolRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/thermostats/cool", requestOptions) + .EnsureData("/thermostats/cool") + .ActionAttempt; + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public ActionAttempt Cool( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default + ) + { + return Cool( + new CoolRequest( + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId + ) + ); + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public async Task CoolAsync(CoolRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/thermostats/cool", requestOptions)) + .EnsureData("/thermostats/cool") + .ActionAttempt; + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [cool mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public async Task CoolAsync( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default + ) + { + return ( + await CoolAsync( + new CoolRequest( + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId + ) + ) + ); + } + + /// + /// Request parameters for Create a Climate Preset. + /// + [DataContract(Name = "createClimatePresetRequest_request")] + public class CreateClimatePresetRequest + { + [JsonConstructorAttribute] + protected CreateClimatePresetRequest() { } + + public CreateClimatePresetRequest( + string climatePresetKey = default, + CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, + CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, + bool? manualOverrideAllowed = default, + string? name = default + ) + { + ClimatePresetKey = climatePresetKey; + ClimatePresetMode = climatePresetMode; + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DeviceId = deviceId; + EcobeeMetadata = ecobeeMetadata; + FanModeSetting = fanModeSetting; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + HvacModeSetting = hvacModeSetting; + ManualOverrideAllowed = manualOverrideAllowed; + Name = name; + } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ClimatePresetModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "home")] + Home = 1, + + [EnumMember(Value = "away")] + Away = 2, + + [EnumMember(Value = "wake")] + Wake = 3, + + [EnumMember(Value = "sleep")] + Sleep = 4, + + [EnumMember(Value = "occupied")] + Occupied = 5, + + [EnumMember(Value = "unoccupied")] + Unoccupied = 6, + } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum HvacModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "heat")] + Heat = 2, + + [EnumMember(Value = "cool")] + Cool = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + + [EnumMember(Value = "eco")] + Eco = 5, + } + + /// + /// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] + public CreateClimatePresetRequest.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// ID of the thermostat device for which you want create a climate preset. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Metadata specific to the Ecobee climate, if applicable. + /// + [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] + public CreateClimatePresetRequestEcobeeMetadata? EcobeeMetadata { get; set; } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public CreateClimatePresetRequest.FanModeSettingEnum? FanModeSetting { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public CreateClimatePresetRequest.HvacModeSettingEnum? HvacModeSetting { get; set; } + + /// + /// Indicates whether a person at the thermostat or using the API can change the thermostat's settings. + /// + [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] + [DataMember( + Name = "manual_override_allowed", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? ManualOverrideAllowed { get; set; } + + /// + /// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createClimatePresetRequestEcobeeMetadata_model")] + public class CreateClimatePresetRequestEcobeeMetadata + { + [JsonConstructorAttribute] + protected CreateClimatePresetRequestEcobeeMetadata() { } + + public CreateClimatePresetRequestEcobeeMetadata( + string? climateRef = default, + bool? isOptimized = default, + CreateClimatePresetRequestEcobeeMetadata.OwnerEnum? owner = default + ) + { + ClimateRef = climateRef; + IsOptimized = isOptimized; + Owner = owner; + } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum OwnerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "user")] + User = 1, + + [EnumMember(Value = "system")] + System = 2, + } + + /// + /// Reference to the Ecobee climate, if applicable. + /// + [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] + public string? ClimateRef { get; set; } + + /// + /// Indicates if the climate preset is optimized by Ecobee. + /// + [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOptimized { get; set; } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] + public CreateClimatePresetRequestEcobeeMetadata.OwnerEnum? Owner { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void CreateClimatePreset(CreateClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/thermostats/create_climate_preset", requestOptions); + } + + /// + /// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void CreateClimatePreset( + string climatePresetKey = default, + CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, + CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, + bool? manualOverrideAllowed = default, + string? name = default + ) + { + CreateClimatePreset( + new CreateClimatePresetRequest( + climatePresetKey: climatePresetKey, + climatePresetMode: climatePresetMode, + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + ecobeeMetadata: ecobeeMetadata, + fanModeSetting: fanModeSetting, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit, + hvacModeSetting: hvacModeSetting, + manualOverrideAllowed: manualOverrideAllowed, + name: name + ) + ); + } + + /// + /// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task CreateClimatePresetAsync(CreateClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/thermostats/create_climate_preset", requestOptions); + } + + /// + /// Creates a [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task CreateClimatePresetAsync( + string climatePresetKey = default, + CreateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + CreateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, + CreateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + CreateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, + bool? manualOverrideAllowed = default, + string? name = default + ) + { + await CreateClimatePresetAsync( + new CreateClimatePresetRequest( + climatePresetKey: climatePresetKey, + climatePresetMode: climatePresetMode, + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + ecobeeMetadata: ecobeeMetadata, + fanModeSetting: fanModeSetting, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit, + hvacModeSetting: hvacModeSetting, + manualOverrideAllowed: manualOverrideAllowed, + name: name + ) + ); + } + + /// + /// Request parameters for Delete a Climate Preset. + /// + [DataContract(Name = "deleteClimatePresetRequest_request")] + public class DeleteClimatePresetRequest + { + [JsonConstructorAttribute] + protected DeleteClimatePresetRequest() { } + + public DeleteClimatePresetRequest( + string climatePresetKey = default, + string deviceId = default + ) + { + ClimatePresetKey = climatePresetKey; + DeviceId = deviceId; + } + + /// + /// Climate preset key of the climate preset that you want to delete. + /// + [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// ID of the thermostat device for which you want to delete a climate preset. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void DeleteClimatePreset(DeleteClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/thermostats/delete_climate_preset", requestOptions); + } + + /// + /// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void DeleteClimatePreset( + string climatePresetKey = default, + string deviceId = default + ) + { + DeleteClimatePreset( + new DeleteClimatePresetRequest( + climatePresetKey: climatePresetKey, + deviceId: deviceId + ) + ); + } + + /// + /// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task DeleteClimatePresetAsync(DeleteClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/thermostats/delete_climate_preset", requestOptions); + } + + /// + /// Deletes a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task DeleteClimatePresetAsync( + string climatePresetKey = default, + string deviceId = default + ) + { + await DeleteClimatePresetAsync( + new DeleteClimatePresetRequest( + climatePresetKey: climatePresetKey, + deviceId: deviceId + ) + ); + } + + /// + /// Request parameters for Set to Heat Mode. + /// + [DataContract(Name = "heatRequest_request")] + public class HeatRequest + { + [JsonConstructorAttribute] + protected HeatRequest() { } + + public HeatRequest( + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default + ) + { + DeviceId = deviceId; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + } + + /// + /// ID of the thermostat device that you want to set to heat mode. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "heatResponse_response")] + public class HeatResponse + { + [JsonConstructorAttribute] + protected HeatResponse() { } + + public HeatResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public ActionAttempt Heat(HeatRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/thermostats/heat", requestOptions) + .EnsureData("/thermostats/heat") + .ActionAttempt; + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public ActionAttempt Heat( + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default + ) + { + return Heat( + new HeatRequest( + deviceId: deviceId, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit + ) + ); + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public async Task HeatAsync(HeatRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/thermostats/heat", requestOptions)) + .EnsureData("/thermostats/heat") + .ActionAttempt; + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public async Task HeatAsync( + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default + ) + { + return ( + await HeatAsync( + new HeatRequest( + deviceId: deviceId, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit + ) + ) + ); + } + + /// + /// Request parameters for Set to Heat-Cool (Auto) Mode. + /// + [DataContract(Name = "heatCoolRequest_request")] + public class HeatCoolRequest + { + [JsonConstructorAttribute] + protected HeatCoolRequest() { } + + public HeatCoolRequest( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default + ) + { + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DeviceId = deviceId; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + } + + /// + /// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// ID of the thermostat device that you want to set to heat-cool mode. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "heatCoolResponse_response")] + public class HeatCoolResponse + { + [JsonConstructorAttribute] + protected HeatCoolResponse() { } + + public HeatCoolResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public ActionAttempt HeatCool(HeatCoolRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/thermostats/heat_cool", requestOptions) + .EnsureData("/thermostats/heat_cool") + .ActionAttempt; + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public ActionAttempt HeatCool( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default + ) + { + return HeatCool( + new HeatCoolRequest( + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit + ) + ); + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public async Task HeatCoolAsync(HeatCoolRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync("/thermostats/heat_cool", requestOptions) + ) + .EnsureData("/thermostats/heat_cool") + .ActionAttempt; + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to [heat-cool ("auto") mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public async Task HeatCoolAsync( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default + ) + { + return ( + await HeatCoolAsync( + new HeatCoolRequest( + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit + ) + ) + ); + } + + /// + /// Request parameters for List Thermostats. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountId = connectedAccountId; + CustomerKey = customerKey; + DeviceType = deviceType; + DeviceTypes = deviceTypes; + Manufacturer = manufacturer; + } + + /// + /// Device type by which you want to filter thermostat devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "ecobee_thermostat")] + EcobeeThermostat = 1, + + [EnumMember(Value = "nest_thermostat")] + NestThermostat = 2, + + [EnumMember(Value = "honeywell_resideo_thermostat")] + HoneywellResideoThermostat = 3, + + [EnumMember(Value = "tado_thermostat")] + TadoThermostat = 4, + + [EnumMember(Value = "sensi_thermostat")] + SensiThermostat = 5, + + [EnumMember(Value = "smartthings_thermostat")] + SmartthingsThermostat = 6, + } + + /// + /// Array of device types by which you want to filter thermostat devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "ecobee_thermostat")] + EcobeeThermostat = 1, + + [EnumMember(Value = "nest_thermostat")] + NestThermostat = 2, + + [EnumMember(Value = "honeywell_resideo_thermostat")] + HoneywellResideoThermostat = 3, + + [EnumMember(Value = "tado_thermostat")] + TadoThermostat = 4, + + [EnumMember(Value = "sensi_thermostat")] + SensiThermostat = 5, + + [EnumMember(Value = "smartthings_thermostat")] + SmartthingsThermostat = 6, + } + + /// + /// Manufacturer by which you want to filter thermostat devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ManufacturerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "ecobee")] + Ecobee = 1, + + [EnumMember(Value = "honeywell_resideo")] + HoneywellResideo = 2, + + [EnumMember(Value = "nest")] + Nest = 3, + + [EnumMember(Value = "sensi")] + Sensi = 4, + + [EnumMember(Value = "smartthings")] + Smartthings = 5, + + [EnumMember(Value = "tado")] + Tado = 6, + } + + /// + /// ID of the Connect Webview for which you want to list devices. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectWebviewId { get; set; } + + /// + /// ID of the connected account for which you want to list devices. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Customer key for which you want to list devices. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Device type by which you want to filter thermostat devices. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + + /// + /// Array of device types by which you want to filter thermostat devices. + /// + [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceTypes { get; set; } + + /// + /// Manufacturer by which you want to filter thermostat devices. + /// + [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List devices = default) + { + Devices = devices; + } + + /// + /// OK + /// + [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] + public List Devices { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/thermostats/list", requestOptions) + .EnsureData("/thermostats/list") + .Devices; + } + + /// + /// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). + /// + public List List( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + return List( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + deviceType: deviceType, + deviceTypes: deviceTypes, + manufacturer: manufacturer + ) + ); + } + + /// + /// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/thermostats/list", requestOptions)) + .EnsureData("/thermostats/list") + .Devices; + } + + /// + /// Returns a list of all [thermostats](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task> ListAsync( + string? connectWebviewId = default, + string? connectedAccountId = default, + string? customerKey = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + ListRequest.ManufacturerEnum? manufacturer = default + ) + { + return ( + await ListAsync( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + customerKey: customerKey, + deviceType: deviceType, + deviceTypes: deviceTypes, + manufacturer: manufacturer + ) + ) + ); + } + + /// + /// Request parameters for Set to Off Mode. + /// + [DataContract(Name = "offRequest_request")] + public class OffRequest + { + [JsonConstructorAttribute] + protected OffRequest() { } + + public OffRequest(string deviceId = default) + { + DeviceId = deviceId; + } + + /// + /// ID of the thermostat device that you want to set to off mode. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "offResponse_response")] + public class OffResponse + { + [JsonConstructorAttribute] + protected OffResponse() { } + + public OffResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public ActionAttempt Off(OffRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/thermostats/off", requestOptions) + .EnsureData("/thermostats/off") + .ActionAttempt; + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public ActionAttempt Off(string deviceId = default) + { + return Off(new OffRequest(deviceId: deviceId)); + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public async Task OffAsync(OffRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/thermostats/off", requestOptions)) + .EnsureData("/thermostats/off") + .ActionAttempt; + } + + /// + /// Sets a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to ["off" mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings). + /// + public async Task OffAsync(string deviceId = default) + { + return (await OffAsync(new OffRequest(deviceId: deviceId))); + } + + /// + /// Request parameters for Set the Fallback Climate Preset. + /// + [DataContract(Name = "setFallbackClimatePresetRequest_request")] + public class SetFallbackClimatePresetRequest + { + [JsonConstructorAttribute] + protected SetFallbackClimatePresetRequest() { } + + public SetFallbackClimatePresetRequest( + string climatePresetKey = default, + string deviceId = default + ) + { + ClimatePresetKey = climatePresetKey; + DeviceId = deviceId; + } + + /// + /// Climate preset key of the climate preset that you want to set as the fallback climate preset. + /// + [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// ID of the thermostat device for which you want to set the fallback climate preset. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void SetFallbackClimatePreset(SetFallbackClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/thermostats/set_fallback_climate_preset", requestOptions); + } + + /// + /// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void SetFallbackClimatePreset( + string climatePresetKey = default, + string deviceId = default + ) + { + SetFallbackClimatePreset( + new SetFallbackClimatePresetRequest( + climatePresetKey: climatePresetKey, + deviceId: deviceId + ) + ); + } + + /// + /// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task SetFallbackClimatePresetAsync(SetFallbackClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/thermostats/set_fallback_climate_preset", + requestOptions + ); + } + + /// + /// Sets a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task SetFallbackClimatePresetAsync( + string climatePresetKey = default, + string deviceId = default + ) + { + await SetFallbackClimatePresetAsync( + new SetFallbackClimatePresetRequest( + climatePresetKey: climatePresetKey, + deviceId: deviceId + ) + ); + } + + /// + /// Request parameters for Set the Fan Mode Setting. + /// + [DataContract(Name = "setFanModeRequest_request")] + public class SetFanModeRequest + { + [JsonConstructorAttribute] + protected SetFanModeRequest() { } + + public SetFanModeRequest( + string deviceId = default, + SetFanModeRequest.FanModeEnum? fanMode = default, + SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default + ) + { + DeviceId = deviceId; + FanMode = fanMode; + FanModeSetting = fanModeSetting; + } + + /// + /// Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// [Fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// ID of the thermostat device for which you want to set the fan mode. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. + /// + [Obsolete("Use `fan_mode_setting` instead.")] + [DataMember(Name = "fan_mode", IsRequired = false, EmitDefaultValue = false)] + public SetFanModeRequest.FanModeEnum? FanMode { get; set; } + + /// + /// [Fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. + /// + [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public SetFanModeRequest.FanModeSettingEnum? FanModeSetting { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "setFanModeResponse_response")] + public class SetFanModeResponse + { + [JsonConstructorAttribute] + protected SetFanModeResponse() { } + + public SetFanModeResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public ActionAttempt SetFanMode(SetFanModeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/thermostats/set_fan_mode", requestOptions) + .EnsureData("/thermostats/set_fan_mode") + .ActionAttempt; + } + + /// + /// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public ActionAttempt SetFanMode( + string deviceId = default, + SetFanModeRequest.FanModeEnum? fanMode = default, + SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default + ) + { + return SetFanMode( + new SetFanModeRequest( + deviceId: deviceId, + fanMode: fanMode, + fanModeSetting: fanModeSetting + ) + ); + } + + /// + /// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task SetFanModeAsync(SetFanModeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/thermostats/set_fan_mode", + requestOptions + ) + ) + .EnsureData("/thermostats/set_fan_mode") + .ActionAttempt; + } + + /// + /// Sets the [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task SetFanModeAsync( + string deviceId = default, + SetFanModeRequest.FanModeEnum? fanMode = default, + SetFanModeRequest.FanModeSettingEnum? fanModeSetting = default + ) + { + return ( + await SetFanModeAsync( + new SetFanModeRequest( + deviceId: deviceId, + fanMode: fanMode, + fanModeSetting: fanModeSetting + ) + ) + ); + } + + /// + /// Request parameters for Set the HVAC Mode. + /// + [DataContract(Name = "setHvacModeRequest_request")] + public class SetHvacModeRequest + { + [JsonConstructorAttribute] + protected SetHvacModeRequest() { } + + public SetHvacModeRequest( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default + ) + { + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DeviceId = deviceId; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + HvacModeSetting = hvacModeSetting; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum HvacModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "cool")] + Cool = 2, + + [EnumMember(Value = "heat")] + Heat = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + + [EnumMember(Value = "eco")] + Eco = 5, + } + + /// + /// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// [Cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// ID of the thermostat device for which you want to set the HVAC mode. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// [Heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + [DataMember(Name = "hvac_mode_setting", IsRequired = true, EmitDefaultValue = false)] + public SetHvacModeRequest.HvacModeSettingEnum HvacModeSetting { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "setHvacModeResponse_response")] + public class SetHvacModeResponse + { + [JsonConstructorAttribute] + protected SetHvacModeResponse() { } + + public SetHvacModeResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public ActionAttempt SetHvacMode(SetHvacModeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/thermostats/set_hvac_mode", requestOptions) + .EnsureData("/thermostats/set_hvac_mode") + .ActionAttempt; + } + + /// + /// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public ActionAttempt SetHvacMode( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default + ) + { + return SetHvacMode( + new SetHvacModeRequest( + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit, + hvacModeSetting: hvacModeSetting + ) + ); + } + + /// + /// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task SetHvacModeAsync(SetHvacModeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/thermostats/set_hvac_mode", + requestOptions + ) + ) + .EnsureData("/thermostats/set_hvac_mode") + .ActionAttempt; + } + + /// + /// Sets the [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task SetHvacModeAsync( + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + SetHvacModeRequest.HvacModeSettingEnum hvacModeSetting = default + ) + { + return ( + await SetHvacModeAsync( + new SetHvacModeRequest( + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit, + hvacModeSetting: hvacModeSetting + ) + ) + ); + } + + /// + /// Request parameters for Set a Temperature Threshold. + /// + [DataContract(Name = "setTemperatureThresholdRequest_request")] + public class SetTemperatureThresholdRequest + { + [JsonConstructorAttribute] + protected SetTemperatureThresholdRequest() { } + + public SetTemperatureThresholdRequest( + string deviceId = default, + float? lowerLimitCelsius = default, + float? lowerLimitFahrenheit = default, + float? upperLimitCelsius = default, + float? upperLimitFahrenheit = default + ) + { + DeviceId = deviceId; + LowerLimitCelsius = lowerLimitCelsius; + LowerLimitFahrenheit = lowerLimitFahrenheit; + UpperLimitCelsius = upperLimitCelsius; + UpperLimitFahrenheit = upperLimitFahrenheit; + } + + /// + /// ID of the thermostat device for which you want to set a temperature threshold. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Lower temperature limit in in °C. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. + /// + [DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? LowerLimitCelsius { get; set; } + + /// + /// Lower temperature limit in in °F. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. + /// + [DataMember( + Name = "lower_limit_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? LowerLimitFahrenheit { get; set; } + + /// + /// Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. + /// + [DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? UpperLimitCelsius { get; set; } + + /// + /// Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. + /// + [DataMember( + Name = "upper_limit_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? UpperLimitFahrenheit { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. + /// + public void SetTemperatureThreshold(SetTemperatureThresholdRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/thermostats/set_temperature_threshold", requestOptions); + } + + /// + /// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. + /// + public void SetTemperatureThreshold( + string deviceId = default, + float? lowerLimitCelsius = default, + float? lowerLimitFahrenheit = default, + float? upperLimitCelsius = default, + float? upperLimitFahrenheit = default + ) + { + SetTemperatureThreshold( + new SetTemperatureThresholdRequest( + deviceId: deviceId, + lowerLimitCelsius: lowerLimitCelsius, + lowerLimitFahrenheit: lowerLimitFahrenheit, + upperLimitCelsius: upperLimitCelsius, + upperLimitFahrenheit: upperLimitFahrenheit + ) + ); + } + + /// + /// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. + /// + public async Task SetTemperatureThresholdAsync(SetTemperatureThresholdRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync( + "/thermostats/set_temperature_threshold", + requestOptions + ); + } + + /// + /// Sets a [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. + /// + public async Task SetTemperatureThresholdAsync( + string deviceId = default, + float? lowerLimitCelsius = default, + float? lowerLimitFahrenheit = default, + float? upperLimitCelsius = default, + float? upperLimitFahrenheit = default + ) + { + await SetTemperatureThresholdAsync( + new SetTemperatureThresholdRequest( + deviceId: deviceId, + lowerLimitCelsius: lowerLimitCelsius, + lowerLimitFahrenheit: lowerLimitFahrenheit, + upperLimitCelsius: upperLimitCelsius, + upperLimitFahrenheit: upperLimitFahrenheit + ) + ); + } + + /// + /// Request parameters for Update a Climate Preset. + /// + [DataContract(Name = "updateClimatePresetRequest_request")] + public class UpdateClimatePresetRequest + { + [JsonConstructorAttribute] + protected UpdateClimatePresetRequest() { } + + public UpdateClimatePresetRequest( + string climatePresetKey = default, + UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, + UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, + bool? manualOverrideAllowed = default, + string? name = default + ) + { + ClimatePresetKey = climatePresetKey; + ClimatePresetMode = climatePresetMode; + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DeviceId = deviceId; + EcobeeMetadata = ecobeeMetadata; + FanModeSetting = fanModeSetting; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + HvacModeSetting = hvacModeSetting; + ManualOverrideAllowed = manualOverrideAllowed; + Name = name; + } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ClimatePresetModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "home")] + Home = 1, + + [EnumMember(Value = "away")] + Away = 2, + + [EnumMember(Value = "wake")] + Wake = 3, + + [EnumMember(Value = "sleep")] + Sleep = 4, + + [EnumMember(Value = "occupied")] + Occupied = 5, + + [EnumMember(Value = "unoccupied")] + Unoccupied = 6, + } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum HvacModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "heat")] + Heat = 2, + + [EnumMember(Value = "cool")] + Cool = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + + [EnumMember(Value = "eco")] + Eco = 5, + } + + /// + /// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "climate_preset_key", IsRequired = true, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] + public UpdateClimatePresetRequest.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// ID of the thermostat device for which you want to update a climate preset. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Metadata specific to the Ecobee climate, if applicable. + /// + [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] + public UpdateClimatePresetRequestEcobeeMetadata? EcobeeMetadata { get; set; } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public UpdateClimatePresetRequest.FanModeSettingEnum? FanModeSetting { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public UpdateClimatePresetRequest.HvacModeSettingEnum? HvacModeSetting { get; set; } + + /// + /// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] + [DataMember( + Name = "manual_override_allowed", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? ManualOverrideAllowed { get; set; } + + /// + /// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateClimatePresetRequestEcobeeMetadata_model")] + public class UpdateClimatePresetRequestEcobeeMetadata + { + [JsonConstructorAttribute] + protected UpdateClimatePresetRequestEcobeeMetadata() { } + + public UpdateClimatePresetRequestEcobeeMetadata( + string? climateRef = default, + bool? isOptimized = default, + UpdateClimatePresetRequestEcobeeMetadata.OwnerEnum? owner = default + ) + { + ClimateRef = climateRef; + IsOptimized = isOptimized; + Owner = owner; + } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum OwnerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "user")] + User = 1, + + [EnumMember(Value = "system")] + System = 2, + } + + /// + /// Reference to the Ecobee climate, if applicable. + /// + [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] + public string? ClimateRef { get; set; } + + /// + /// Indicates if the climate preset is optimized by Ecobee. + /// + [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOptimized { get; set; } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] + public UpdateClimatePresetRequestEcobeeMetadata.OwnerEnum? Owner { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void UpdateClimatePreset(UpdateClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/thermostats/update_climate_preset", requestOptions); + } + + /// + /// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public void UpdateClimatePreset( + string climatePresetKey = default, + UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, + UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, + bool? manualOverrideAllowed = default, + string? name = default + ) + { + UpdateClimatePreset( + new UpdateClimatePresetRequest( + climatePresetKey: climatePresetKey, + climatePresetMode: climatePresetMode, + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + ecobeeMetadata: ecobeeMetadata, + fanModeSetting: fanModeSetting, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit, + hvacModeSetting: hvacModeSetting, + manualOverrideAllowed: manualOverrideAllowed, + name: name + ) + ); + } + + /// + /// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task UpdateClimatePresetAsync(UpdateClimatePresetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/thermostats/update_climate_preset", requestOptions); + } + + /// + /// Updates a specified [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats). + /// + public async Task UpdateClimatePresetAsync( + string climatePresetKey = default, + UpdateClimatePresetRequest.ClimatePresetModeEnum? climatePresetMode = default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string deviceId = default, + UpdateClimatePresetRequestEcobeeMetadata? ecobeeMetadata = default, + UpdateClimatePresetRequest.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + UpdateClimatePresetRequest.HvacModeSettingEnum? hvacModeSetting = default, + bool? manualOverrideAllowed = default, + string? name = default + ) + { + await UpdateClimatePresetAsync( + new UpdateClimatePresetRequest( + climatePresetKey: climatePresetKey, + climatePresetMode: climatePresetMode, + coolingSetPointCelsius: coolingSetPointCelsius, + coolingSetPointFahrenheit: coolingSetPointFahrenheit, + deviceId: deviceId, + ecobeeMetadata: ecobeeMetadata, + fanModeSetting: fanModeSetting, + heatingSetPointCelsius: heatingSetPointCelsius, + heatingSetPointFahrenheit: heatingSetPointFahrenheit, + hvacModeSetting: hvacModeSetting, + manualOverrideAllowed: manualOverrideAllowed, + name: name + ) + ); + } + + /// + /// Request parameters for Update the Thermostat Weekly Program. + /// + [DataContract(Name = "updateWeeklyProgramRequest_request")] + public class UpdateWeeklyProgramRequest + { + [JsonConstructorAttribute] + protected UpdateWeeklyProgramRequest() { } + + public UpdateWeeklyProgramRequest( + string deviceId = default, + string? fridayProgramId = default, + string? mondayProgramId = default, + string? saturdayProgramId = default, + string? sundayProgramId = default, + string? thursdayProgramId = default, + string? tuesdayProgramId = default, + string? wednesdayProgramId = default + ) + { + DeviceId = deviceId; + FridayProgramId = fridayProgramId; + MondayProgramId = mondayProgramId; + SaturdayProgramId = saturdayProgramId; + SundayProgramId = sundayProgramId; + ThursdayProgramId = thursdayProgramId; + TuesdayProgramId = tuesdayProgramId; + WednesdayProgramId = wednesdayProgramId; + } + + /// + /// ID of the thermostat device for which you want to update the weekly program. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// ID of the thermostat daily program to run on Fridays. + /// + [DataMember(Name = "friday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? FridayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Mondays. + /// + [DataMember(Name = "monday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? MondayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Saturdays. + /// + [DataMember(Name = "saturday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? SaturdayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Sundays. + /// + [DataMember(Name = "sunday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? SundayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Thursdays. + /// + [DataMember(Name = "thursday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? ThursdayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Tuesdays. + /// + [DataMember(Name = "tuesday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? TuesdayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Wednesdays. + /// + [DataMember( + Name = "wednesday_program_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? WednesdayProgramId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateWeeklyProgramResponse_response")] + public class UpdateWeeklyProgramResponse + { + [JsonConstructorAttribute] + protected UpdateWeeklyProgramResponse() { } + + public UpdateWeeklyProgramResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. + /// + public ActionAttempt UpdateWeeklyProgram(UpdateWeeklyProgramRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/thermostats/update_weekly_program", + requestOptions + ) + .EnsureData("/thermostats/update_weekly_program") + .ActionAttempt; + } + + /// + /// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. + /// + public ActionAttempt UpdateWeeklyProgram( + string deviceId = default, + string? fridayProgramId = default, + string? mondayProgramId = default, + string? saturdayProgramId = default, + string? sundayProgramId = default, + string? thursdayProgramId = default, + string? tuesdayProgramId = default, + string? wednesdayProgramId = default + ) + { + return UpdateWeeklyProgram( + new UpdateWeeklyProgramRequest( + deviceId: deviceId, + fridayProgramId: fridayProgramId, + mondayProgramId: mondayProgramId, + saturdayProgramId: saturdayProgramId, + sundayProgramId: sundayProgramId, + thursdayProgramId: thursdayProgramId, + tuesdayProgramId: tuesdayProgramId, + wednesdayProgramId: wednesdayProgramId + ) + ); + } + + /// + /// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. + /// + public async Task UpdateWeeklyProgramAsync( + UpdateWeeklyProgramRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/thermostats/update_weekly_program", + requestOptions + ) + ) + .EnsureData("/thermostats/update_weekly_program") + .ActionAttempt; + } + + /// + /// Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. + /// + public async Task UpdateWeeklyProgramAsync( + string deviceId = default, + string? fridayProgramId = default, + string? mondayProgramId = default, + string? saturdayProgramId = default, + string? sundayProgramId = default, + string? thursdayProgramId = default, + string? tuesdayProgramId = default, + string? wednesdayProgramId = default + ) + { + return ( + await UpdateWeeklyProgramAsync( + new UpdateWeeklyProgramRequest( + deviceId: deviceId, + fridayProgramId: fridayProgramId, + mondayProgramId: mondayProgramId, + saturdayProgramId: saturdayProgramId, + sundayProgramId: sundayProgramId, + thursdayProgramId: thursdayProgramId, + tuesdayProgramId: tuesdayProgramId, + wednesdayProgramId: wednesdayProgramId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Thermostats Thermostats => new(this); -} + public partial class SeamClient + { + public Api.Thermostats Thermostats => new(this); + } -public partial interface ISeamClient -{ -public Api.Thermostats Thermostats { get; } -} + public partial interface ISeamClient + { + public Api.Thermostats Thermostats { get; } + } } diff --git a/src/Seam/Api/UnmanagedAccessCodes.cs b/src/Seam/Api/UnmanagedAccessCodes.cs index f98871cb..1bc991d6 100644 --- a/src/Seam/Api/UnmanagedAccessCodes.cs +++ b/src/Seam/Api/UnmanagedAccessCodes.cs @@ -9,592 +9,740 @@ namespace Seam.Api { -public class UnmanagedAccessCodes -{ -private ISeamClient _seam; - -public UnmanagedAccessCodes(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Convert an Unmanaged Access Code. -/// -[DataContract(Name = "convertToManagedRequest_request")] -public class ConvertToManagedRequest -{ -[JsonConstructorAttribute] -protected ConvertToManagedRequest() { } - -public ConvertToManagedRequest(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default) -{ -AccessCodeId = accessCodeId; -AllowExternalModification = allowExternalModification; -Force = force; -IsExternalModificationAllowed = isExternalModificationAllowed; -} - -/// -/// ID of the unmanaged access code that you want to convert to a managed access code. -/// -[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. -/// -[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] -public bool? AllowExternalModification { get; set; } - -/// -/// Indicates whether to force the access code conversion. To switch management of an access code from one Seam workspace to another, set `force` to `true`. -/// -[DataMember(Name = "force", IsRequired = false, EmitDefaultValue = false)] -public bool? Force { get; set; } - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. -/// -[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsExternalModificationAllowed { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. -/// -/// Note that not all device providers support converting an unmanaged access code to a managed access code. -/// -public void ConvertToManaged(ConvertToManagedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/access_codes/unmanaged/convert_to_managed", requestOptions); -} - -/// -/// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. -/// -/// Note that not all device providers support converting an unmanaged access code to a managed access code. -/// -public void ConvertToManaged(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default) -{ -ConvertToManaged(new ConvertToManagedRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, force: force, isExternalModificationAllowed: isExternalModificationAllowed)); -} - -/// -/// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. -/// -/// Note that not all device providers support converting an unmanaged access code to a managed access code. -/// -public async Task ConvertToManagedAsync(ConvertToManagedRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/access_codes/unmanaged/convert_to_managed", requestOptions); -} - -/// -/// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. -/// -/// Note that not all device providers support converting an unmanaged access code to a managed access code. -/// -public async Task ConvertToManagedAsync(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default) -{ -await ConvertToManagedAsync(new ConvertToManagedRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, force: force, isExternalModificationAllowed: isExternalModificationAllowed)); -} - -/// -/// Request parameters for Delete an Unmanaged Access Code. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string accessCodeId = default) -{ -AccessCodeId = accessCodeId; -} - -/// -/// ID of the unmanaged access code that you want to delete. -/// -[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/access_codes/unmanaged/delete", requestOptions); -} - -/// -/// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public void Delete(string accessCodeId = default) -{ -Delete(new DeleteRequest(accessCodeId: accessCodeId)); -} - -/// -/// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/access_codes/unmanaged/delete", requestOptions); -} - -/// -/// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public async Task DeleteAsync(string accessCodeId = default) -{ -await DeleteAsync(new DeleteRequest(accessCodeId: accessCodeId)); -} - -/// -/// Request parameters for Get an Unmanaged Access Code. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? accessCodeId = default, string? code = default, string? deviceId = default) -{ -AccessCodeId = accessCodeId; -Code = code; -DeviceId = deviceId; -} - -/// -/// ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessCodeId { get; set; } - -/// -/// Code of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// ID of the device containing the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(UnmanagedAccessCode accessCode = default) -{ -AccessCode = accessCode; -} - -/// -/// OK -/// -[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessCode AccessCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -/// You must specify either `access_code_id` or both `device_id` and `code`. -/// -public UnmanagedAccessCode Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_codes/unmanaged/get", requestOptions).EnsureData("/access_codes/unmanaged/get").AccessCode; -} - -/// -/// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -/// You must specify either `access_code_id` or both `device_id` and `code`. -/// -public UnmanagedAccessCode Get(string? accessCodeId = default, string? code = default, string? deviceId = default) -{ -return Get(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId)); -} - -/// -/// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -/// You must specify either `access_code_id` or both `device_id` and `code`. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_codes/unmanaged/get", requestOptions)).EnsureData("/access_codes/unmanaged/get").AccessCode; -} - -/// -/// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -/// You must specify either `access_code_id` or both `device_id` and `code`. -/// -public async Task GetAsync(string? accessCodeId = default, string? code = default, string? deviceId = default) -{ -return (await GetAsync(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId))); -} - -/// -/// Request parameters for List Unmanaged Access Codes. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -DeviceId = deviceId; -Limit = limit; -PageCursor = pageCursor; -Search = search; -UserIdentifierKey = userIdentifierKey; -} - -/// -/// ID of the device for which you want to list unmanaged access codes. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Numerical limit on the number of unmanaged access codes to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// Your user ID for the user by which to filter unmanaged access codes. -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List accessCodes = default) -{ -AccessCodes = accessCodes; -} - -/// -/// OK -/// -[DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodes { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_codes/unmanaged/list", requestOptions).EnsureData("/access_codes/unmanaged/list").AccessCodes; -} - -/// -/// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public List List(string deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -return List(new ListRequest(deviceId: deviceId, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey)); -} - -/// -/// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_codes/unmanaged/list", requestOptions)).EnsureData("/access_codes/unmanaged/list").AccessCodes; -} - -/// -/// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public async Task> ListAsync(string deviceId = default, float? limit = default, string? pageCursor = default, string? search = default, string? userIdentifierKey = default) -{ -return (await ListAsync(new ListRequest(deviceId: deviceId, limit: limit, pageCursor: pageCursor, search: search, userIdentifierKey: userIdentifierKey))); -} - -/// -/// Request parameters for Update an Unmanaged Access Code. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default, bool isManaged = default) -{ -AccessCodeId = accessCodeId; -AllowExternalModification = allowExternalModification; -Force = force; -IsExternalModificationAllowed = isExternalModificationAllowed; -IsManaged = isManaged; -} - -/// -/// ID of the unmanaged access code that you want to update. -/// -[DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. -/// -[DataMember(Name = "allow_external_modification", IsRequired = false, EmitDefaultValue = false)] -public bool? AllowExternalModification { get; set; } - -/// -/// Indicates whether to force the unmanaged access code update. -/// -[DataMember(Name = "force", IsRequired = false, EmitDefaultValue = false)] -public bool? Force { get; set; } - -/// -/// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. -/// -[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsExternalModificationAllowed { get; set; } - -[DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/access_codes/unmanaged/update", requestOptions); -} - -/// -/// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public void Update(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default, bool isManaged = default) -{ -Update(new UpdateRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, force: force, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged)); -} - -/// -/// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/access_codes/unmanaged/update", requestOptions); -} - -/// -/// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -public async Task UpdateAsync(string accessCodeId = default, bool? allowExternalModification = default, bool? force = default, bool? isExternalModificationAllowed = default, bool isManaged = default) -{ -await UpdateAsync(new UpdateRequest(accessCodeId: accessCodeId, allowExternalModification: allowExternalModification, force: force, isExternalModificationAllowed: isExternalModificationAllowed, isManaged: isManaged)); -} -} + public class UnmanagedAccessCodes + { + private ISeamClient _seam; + + public UnmanagedAccessCodes(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Convert an Unmanaged Access Code. + /// + [DataContract(Name = "convertToManagedRequest_request")] + public class ConvertToManagedRequest + { + [JsonConstructorAttribute] + protected ConvertToManagedRequest() { } + + public ConvertToManagedRequest( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? force = default, + bool? isExternalModificationAllowed = default + ) + { + AccessCodeId = accessCodeId; + AllowExternalModification = allowExternalModification; + Force = force; + IsExternalModificationAllowed = isExternalModificationAllowed; + } + + /// + /// ID of the unmanaged access code that you want to convert to a managed access code. + /// + [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. + /// + [DataMember( + Name = "allow_external_modification", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AllowExternalModification { get; set; } + + /// + /// Indicates whether to force the access code conversion. To switch management of an access code from one Seam workspace to another, set `force` to `true`. + /// + [DataMember(Name = "force", IsRequired = false, EmitDefaultValue = false)] + public bool? Force { get; set; } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. + /// + [DataMember( + Name = "is_external_modification_allowed", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsExternalModificationAllowed { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. + /// + /// Note that not all device providers support converting an unmanaged access code to a managed access code. + /// + public void ConvertToManaged(ConvertToManagedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/access_codes/unmanaged/convert_to_managed", requestOptions); + } + + /// + /// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. + /// + /// Note that not all device providers support converting an unmanaged access code to a managed access code. + /// + public void ConvertToManaged( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? force = default, + bool? isExternalModificationAllowed = default + ) + { + ConvertToManaged( + new ConvertToManagedRequest( + accessCodeId: accessCodeId, + allowExternalModification: allowExternalModification, + force: force, + isExternalModificationAllowed: isExternalModificationAllowed + ) + ); + } + + /// + /// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. + /// + /// Note that not all device providers support converting an unmanaged access code to a managed access code. + /// + public async Task ConvertToManagedAsync(ConvertToManagedRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync( + "/access_codes/unmanaged/convert_to_managed", + requestOptions + ); + } + + /// + /// Converts an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. + /// + /// Note that not all device providers support converting an unmanaged access code to a managed access code. + /// + public async Task ConvertToManagedAsync( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? force = default, + bool? isExternalModificationAllowed = default + ) + { + await ConvertToManagedAsync( + new ConvertToManagedRequest( + accessCodeId: accessCodeId, + allowExternalModification: allowExternalModification, + force: force, + isExternalModificationAllowed: isExternalModificationAllowed + ) + ); + } + + /// + /// Request parameters for Delete an Unmanaged Access Code. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string accessCodeId = default) + { + AccessCodeId = accessCodeId; + } + + /// + /// ID of the unmanaged access code that you want to delete. + /// + [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/access_codes/unmanaged/delete", requestOptions); + } + + /// + /// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public void Delete(string accessCodeId = default) + { + Delete(new DeleteRequest(accessCodeId: accessCodeId)); + } + + /// + /// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/access_codes/unmanaged/delete", requestOptions); + } + + /// + /// Deletes an [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public async Task DeleteAsync(string accessCodeId = default) + { + await DeleteAsync(new DeleteRequest(accessCodeId: accessCodeId)); + } + + /// + /// Request parameters for Get an Unmanaged Access Code. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest( + string? accessCodeId = default, + string? code = default, + string? deviceId = default + ) + { + AccessCodeId = accessCodeId; + Code = code; + DeviceId = deviceId; + } + + /// + /// ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessCodeId { get; set; } + + /// + /// Code of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// ID of the device containing the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(UnmanagedAccessCode accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// OK + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessCode AccessCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + /// You must specify either `access_code_id` or both `device_id` and `code`. + /// + public UnmanagedAccessCode Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_codes/unmanaged/get", requestOptions) + .EnsureData("/access_codes/unmanaged/get") + .AccessCode; + } + + /// + /// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + /// You must specify either `access_code_id` or both `device_id` and `code`. + /// + public UnmanagedAccessCode Get( + string? accessCodeId = default, + string? code = default, + string? deviceId = default + ) + { + return Get(new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId)); + } + + /// + /// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + /// You must specify either `access_code_id` or both `device_id` and `code`. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync("/access_codes/unmanaged/get", requestOptions) + ) + .EnsureData("/access_codes/unmanaged/get") + .AccessCode; + } + + /// + /// Returns a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + /// You must specify either `access_code_id` or both `device_id` and `code`. + /// + public async Task GetAsync( + string? accessCodeId = default, + string? code = default, + string? deviceId = default + ) + { + return ( + await GetAsync( + new GetRequest(accessCodeId: accessCodeId, code: code, deviceId: deviceId) + ) + ); + } + + /// + /// Request parameters for List Unmanaged Access Codes. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string deviceId = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + DeviceId = deviceId; + Limit = limit; + PageCursor = pageCursor; + Search = search; + UserIdentifierKey = userIdentifierKey; + } + + /// + /// ID of the device for which you want to list unmanaged access codes. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Numerical limit on the number of unmanaged access codes to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// Your user ID for the user by which to filter unmanaged access codes. + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List accessCodes = default) + { + AccessCodes = accessCodes; + } + + /// + /// OK + /// + [DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodes { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_codes/unmanaged/list", requestOptions) + .EnsureData("/access_codes/unmanaged/list") + .AccessCodes; + } + + /// + /// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public List List( + string deviceId = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + return List( + new ListRequest( + deviceId: deviceId, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentifierKey: userIdentifierKey + ) + ); + } + + /// + /// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync("/access_codes/unmanaged/list", requestOptions) + ) + .EnsureData("/access_codes/unmanaged/list") + .AccessCodes; + } + + /// + /// Returns a list of all [unmanaged access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public async Task> ListAsync( + string deviceId = default, + float? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentifierKey = default + ) + { + return ( + await ListAsync( + new ListRequest( + deviceId: deviceId, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentifierKey: userIdentifierKey + ) + ) + ); + } + + /// + /// Request parameters for Update an Unmanaged Access Code. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? force = default, + bool? isExternalModificationAllowed = default, + bool isManaged = default + ) + { + AccessCodeId = accessCodeId; + AllowExternalModification = allowExternalModification; + Force = force; + IsExternalModificationAllowed = isExternalModificationAllowed; + IsManaged = isManaged; + } + + /// + /// ID of the unmanaged access code that you want to update. + /// + [DataMember(Name = "access_code_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. + /// + [DataMember( + Name = "allow_external_modification", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AllowExternalModification { get; set; } + + /// + /// Indicates whether to force the unmanaged access code update. + /// + [DataMember(Name = "force", IsRequired = false, EmitDefaultValue = false)] + public bool? Force { get; set; } + + /// + /// Indicates whether [external modification](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. + /// + [DataMember( + Name = "is_external_modification_allowed", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsExternalModificationAllowed { get; set; } + + [DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/access_codes/unmanaged/update", requestOptions); + } + + /// + /// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public void Update( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? force = default, + bool? isExternalModificationAllowed = default, + bool isManaged = default + ) + { + Update( + new UpdateRequest( + accessCodeId: accessCodeId, + allowExternalModification: allowExternalModification, + force: force, + isExternalModificationAllowed: isExternalModificationAllowed, + isManaged: isManaged + ) + ); + } + + /// + /// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/access_codes/unmanaged/update", requestOptions); + } + + /// + /// Updates a specified [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + public async Task UpdateAsync( + string accessCodeId = default, + bool? allowExternalModification = default, + bool? force = default, + bool? isExternalModificationAllowed = default, + bool isManaged = default + ) + { + await UpdateAsync( + new UpdateRequest( + accessCodeId: accessCodeId, + allowExternalModification: allowExternalModification, + force: force, + isExternalModificationAllowed: isExternalModificationAllowed, + isManaged: isManaged + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.UnmanagedAccessCodes UnmanagedAccessCodes => new(this); -} + public partial class SeamClient + { + public Api.UnmanagedAccessCodes UnmanagedAccessCodes => new(this); + } -public partial interface ISeamClient -{ -public Api.UnmanagedAccessCodes UnmanagedAccessCodes { get; } -} + public partial interface ISeamClient + { + public Api.UnmanagedAccessCodes UnmanagedAccessCodes { get; } + } } diff --git a/src/Seam/Api/UnmanagedAccessGrants.cs b/src/Seam/Api/UnmanagedAccessGrants.cs index 91988838..7a679ee8 100644 --- a/src/Seam/Api/UnmanagedAccessGrants.cs +++ b/src/Seam/Api/UnmanagedAccessGrants.cs @@ -9,393 +9,472 @@ namespace Seam.Api { -public class UnmanagedAccessGrants -{ -private ISeamClient _seam; - -public UnmanagedAccessGrants(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get an Unmanaged Access Grant. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string accessGrantId = default) -{ -AccessGrantId = accessGrantId; -} - -/// -/// ID of unmanaged Access Grant to get. -/// -[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(UnmanagedAccessGrant accessGrant = default) -{ -AccessGrant = accessGrant; -} - -/// -/// OK -/// -[DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessGrant AccessGrant { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Get an unmanaged Access Grant (where is_managed = false). -/// -public UnmanagedAccessGrant Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_grants/unmanaged/get", requestOptions).EnsureData("/access_grants/unmanaged/get").AccessGrant; -} - -/// -/// Get an unmanaged Access Grant (where is_managed = false). -/// -public UnmanagedAccessGrant Get(string accessGrantId = default) -{ -return Get(new GetRequest(accessGrantId: accessGrantId)); -} - -/// -/// Get an unmanaged Access Grant (where is_managed = false). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_grants/unmanaged/get", requestOptions)).EnsureData("/access_grants/unmanaged/get").AccessGrant; -} - -/// -/// Get an unmanaged Access Grant (where is_managed = false). -/// -public async Task GetAsync(string accessGrantId = default) -{ -return (await GetAsync(new GetRequest(accessGrantId: accessGrantId))); -} - -/// -/// Request parameters for List Unmanaged Access Grants. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? acsEntranceId = default, string? acsSystemId = default, float? limit = default, string? pageCursor = default, string? reservationKey = default, string? userIdentityId = default) -{ -AcsEntranceId = acsEntranceId; -AcsSystemId = acsSystemId; -Limit = limit; -PageCursor = pageCursor; -ReservationKey = reservationKey; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the entrance by which you want to filter the list of unmanaged Access Grants. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsEntranceId { get; set; } - -/// -/// ID of the access system by which you want to filter the list of unmanaged Access Grants. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// Numerical limit on the number of unmanaged access grants to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// Filter unmanaged Access Grants by reservation_key. -/// -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -/// -/// ID of user identity by which you want to filter the list of unmanaged Access Grants. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List accessGrants = default) -{ -AccessGrants = accessGrants; -} - -/// -/// OK -/// -[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrants { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets unmanaged Access Grants (where is_managed = false). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_grants/unmanaged/list", requestOptions).EnsureData("/access_grants/unmanaged/list").AccessGrants; -} - -/// -/// Gets unmanaged Access Grants (where is_managed = false). -/// -public List List(string? acsEntranceId = default, string? acsSystemId = default, float? limit = default, string? pageCursor = default, string? reservationKey = default, string? userIdentityId = default) -{ -return List(new ListRequest(acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, limit: limit, pageCursor: pageCursor, reservationKey: reservationKey, userIdentityId: userIdentityId)); -} - -/// -/// Gets unmanaged Access Grants (where is_managed = false). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_grants/unmanaged/list", requestOptions)).EnsureData("/access_grants/unmanaged/list").AccessGrants; -} - -/// -/// Gets unmanaged Access Grants (where is_managed = false). -/// -public async Task> ListAsync(string? acsEntranceId = default, string? acsSystemId = default, float? limit = default, string? pageCursor = default, string? reservationKey = default, string? userIdentityId = default) -{ -return (await ListAsync(new ListRequest(acsEntranceId: acsEntranceId, acsSystemId: acsSystemId, limit: limit, pageCursor: pageCursor, reservationKey: reservationKey, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for Update an Unmanaged Access Grant. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string accessGrantId = default, string? accessGrantKey = default, bool isManaged = default) -{ -AccessGrantId = accessGrantId; -AccessGrantKey = accessGrantKey; -IsManaged = isManaged; -} - -/// -/// ID of the unmanaged Access Grant to update. -/// -[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// Unique key for the access grant. If not provided, the existing key will be preserved. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// Must be set to true to convert the unmanaged access grant to managed. -/// -[DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates an unmanaged Access Grant to make it managed. -/// -/// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. -/// -/// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/access_grants/unmanaged/update", requestOptions); -} - -/// -/// Updates an unmanaged Access Grant to make it managed. -/// -/// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. -/// -/// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. -/// -public void Update(string accessGrantId = default, string? accessGrantKey = default, bool isManaged = default) -{ -Update(new UpdateRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, isManaged: isManaged)); -} - -/// -/// Updates an unmanaged Access Grant to make it managed. -/// -/// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. -/// -/// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/access_grants/unmanaged/update", requestOptions); -} - -/// -/// Updates an unmanaged Access Grant to make it managed. -/// -/// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. -/// -/// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. -/// -public async Task UpdateAsync(string accessGrantId = default, string? accessGrantKey = default, bool isManaged = default) -{ -await UpdateAsync(new UpdateRequest(accessGrantId: accessGrantId, accessGrantKey: accessGrantKey, isManaged: isManaged)); -} -} + public class UnmanagedAccessGrants + { + private ISeamClient _seam; + + public UnmanagedAccessGrants(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get an Unmanaged Access Grant. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string accessGrantId = default) + { + AccessGrantId = accessGrantId; + } + + /// + /// ID of unmanaged Access Grant to get. + /// + [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(UnmanagedAccessGrant accessGrant = default) + { + AccessGrant = accessGrant; + } + + /// + /// OK + /// + [DataMember(Name = "access_grant", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrant AccessGrant { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Get an unmanaged Access Grant (where is_managed = false). + /// + public UnmanagedAccessGrant Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_grants/unmanaged/get", requestOptions) + .EnsureData("/access_grants/unmanaged/get") + .AccessGrant; + } + + /// + /// Get an unmanaged Access Grant (where is_managed = false). + /// + public UnmanagedAccessGrant Get(string accessGrantId = default) + { + return Get(new GetRequest(accessGrantId: accessGrantId)); + } + + /// + /// Get an unmanaged Access Grant (where is_managed = false). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync("/access_grants/unmanaged/get", requestOptions) + ) + .EnsureData("/access_grants/unmanaged/get") + .AccessGrant; + } + + /// + /// Get an unmanaged Access Grant (where is_managed = false). + /// + public async Task GetAsync(string accessGrantId = default) + { + return (await GetAsync(new GetRequest(accessGrantId: accessGrantId))); + } + + /// + /// Request parameters for List Unmanaged Access Grants. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? acsEntranceId = default, + string? acsSystemId = default, + float? limit = default, + string? pageCursor = default, + string? reservationKey = default, + string? userIdentityId = default + ) + { + AcsEntranceId = acsEntranceId; + AcsSystemId = acsSystemId; + Limit = limit; + PageCursor = pageCursor; + ReservationKey = reservationKey; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the entrance by which you want to filter the list of unmanaged Access Grants. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsEntranceId { get; set; } + + /// + /// ID of the access system by which you want to filter the list of unmanaged Access Grants. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// Numerical limit on the number of unmanaged access grants to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// Filter unmanaged Access Grants by reservation_key. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + /// + /// ID of user identity by which you want to filter the list of unmanaged Access Grants. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List accessGrants = default) + { + AccessGrants = accessGrants; + } + + /// + /// OK + /// + [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrants { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets unmanaged Access Grants (where is_managed = false). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_grants/unmanaged/list", requestOptions) + .EnsureData("/access_grants/unmanaged/list") + .AccessGrants; + } + + /// + /// Gets unmanaged Access Grants (where is_managed = false). + /// + public List List( + string? acsEntranceId = default, + string? acsSystemId = default, + float? limit = default, + string? pageCursor = default, + string? reservationKey = default, + string? userIdentityId = default + ) + { + return List( + new ListRequest( + acsEntranceId: acsEntranceId, + acsSystemId: acsSystemId, + limit: limit, + pageCursor: pageCursor, + reservationKey: reservationKey, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Gets unmanaged Access Grants (where is_managed = false). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync("/access_grants/unmanaged/list", requestOptions) + ) + .EnsureData("/access_grants/unmanaged/list") + .AccessGrants; + } + + /// + /// Gets unmanaged Access Grants (where is_managed = false). + /// + public async Task> ListAsync( + string? acsEntranceId = default, + string? acsSystemId = default, + float? limit = default, + string? pageCursor = default, + string? reservationKey = default, + string? userIdentityId = default + ) + { + return ( + await ListAsync( + new ListRequest( + acsEntranceId: acsEntranceId, + acsSystemId: acsSystemId, + limit: limit, + pageCursor: pageCursor, + reservationKey: reservationKey, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for Update an Unmanaged Access Grant. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string accessGrantId = default, + string? accessGrantKey = default, + bool isManaged = default + ) + { + AccessGrantId = accessGrantId; + AccessGrantKey = accessGrantKey; + IsManaged = isManaged; + } + + /// + /// ID of the unmanaged Access Grant to update. + /// + [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// Unique key for the access grant. If not provided, the existing key will be preserved. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// Must be set to true to convert the unmanaged access grant to managed. + /// + [DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates an unmanaged Access Grant to make it managed. + /// + /// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. + /// + /// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/access_grants/unmanaged/update", requestOptions); + } + + /// + /// Updates an unmanaged Access Grant to make it managed. + /// + /// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. + /// + /// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. + /// + public void Update( + string accessGrantId = default, + string? accessGrantKey = default, + bool isManaged = default + ) + { + Update( + new UpdateRequest( + accessGrantId: accessGrantId, + accessGrantKey: accessGrantKey, + isManaged: isManaged + ) + ); + } + + /// + /// Updates an unmanaged Access Grant to make it managed. + /// + /// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. + /// + /// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/access_grants/unmanaged/update", requestOptions); + } + + /// + /// Updates an unmanaged Access Grant to make it managed. + /// + /// This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. + /// + /// When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. + /// + public async Task UpdateAsync( + string accessGrantId = default, + string? accessGrantKey = default, + bool isManaged = default + ) + { + await UpdateAsync( + new UpdateRequest( + accessGrantId: accessGrantId, + accessGrantKey: accessGrantKey, + isManaged: isManaged + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.UnmanagedAccessGrants UnmanagedAccessGrants => new(this); -} + public partial class SeamClient + { + public Api.UnmanagedAccessGrants UnmanagedAccessGrants => new(this); + } -public partial interface ISeamClient -{ -public Api.UnmanagedAccessGrants UnmanagedAccessGrants { get; } -} + public partial interface ISeamClient + { + public Api.UnmanagedAccessGrants UnmanagedAccessGrants { get; } + } } diff --git a/src/Seam/Api/UnmanagedAccessMethods.cs b/src/Seam/Api/UnmanagedAccessMethods.cs index c4d1bd21..df4a90c4 100644 --- a/src/Seam/Api/UnmanagedAccessMethods.cs +++ b/src/Seam/Api/UnmanagedAccessMethods.cs @@ -9,273 +9,318 @@ namespace Seam.Api { -public class UnmanagedAccessMethods -{ -private ISeamClient _seam; - -public UnmanagedAccessMethods(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get an Unmanaged Access Method. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string accessMethodId = default) -{ -AccessMethodId = accessMethodId; -} - -/// -/// ID of unmanaged access method to get. -/// -[DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(UnmanagedAccessMethod accessMethod = default) -{ -AccessMethod = accessMethod; -} - -/// -/// OK -/// -[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessMethod AccessMethod { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets an unmanaged access method (where is_managed = false). -/// -public UnmanagedAccessMethod Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_methods/unmanaged/get", requestOptions).EnsureData("/access_methods/unmanaged/get").AccessMethod; -} - -/// -/// Gets an unmanaged access method (where is_managed = false). -/// -public UnmanagedAccessMethod Get(string accessMethodId = default) -{ -return Get(new GetRequest(accessMethodId: accessMethodId)); -} - -/// -/// Gets an unmanaged access method (where is_managed = false). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_methods/unmanaged/get", requestOptions)).EnsureData("/access_methods/unmanaged/get").AccessMethod; -} - -/// -/// Gets an unmanaged access method (where is_managed = false). -/// -public async Task GetAsync(string accessMethodId = default) -{ -return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); -} - -/// -/// Request parameters for List Unmanaged Access Methods. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string accessGrantId = default, string? acsEntranceId = default, string? deviceId = default, string? spaceId = default) -{ -AccessGrantId = accessGrantId; -AcsEntranceId = acsEntranceId; -DeviceId = deviceId; -SpaceId = spaceId; -} - -/// -/// ID of Access Grant to list unmanaged access methods for. -/// -[DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// ID of the entrance for which you want to retrieve all unmanaged access methods. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsEntranceId { get; set; } - -/// -/// ID of the device for which you want to retrieve all unmanaged access methods. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// ID of the space for which you want to retrieve all unmanaged access methods. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List accessMethods = default) -{ -AccessMethods = accessMethods; -} - -/// -/// OK -/// -[DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] -public List AccessMethods { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/access_methods/unmanaged/list", requestOptions).EnsureData("/access_methods/unmanaged/list").AccessMethods; -} - -/// -/// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. -/// -public List List(string accessGrantId = default, string? acsEntranceId = default, string? deviceId = default, string? spaceId = default) -{ -return List(new ListRequest(accessGrantId: accessGrantId, acsEntranceId: acsEntranceId, deviceId: deviceId, spaceId: spaceId)); -} - -/// -/// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/access_methods/unmanaged/list", requestOptions)).EnsureData("/access_methods/unmanaged/list").AccessMethods; -} - -/// -/// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. -/// -public async Task> ListAsync(string accessGrantId = default, string? acsEntranceId = default, string? deviceId = default, string? spaceId = default) -{ -return (await ListAsync(new ListRequest(accessGrantId: accessGrantId, acsEntranceId: acsEntranceId, deviceId: deviceId, spaceId: spaceId))); -} -} + public class UnmanagedAccessMethods + { + private ISeamClient _seam; + + public UnmanagedAccessMethods(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get an Unmanaged Access Method. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string accessMethodId = default) + { + AccessMethodId = accessMethodId; + } + + /// + /// ID of unmanaged access method to get. + /// + [DataMember(Name = "access_method_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(UnmanagedAccessMethod accessMethod = default) + { + AccessMethod = accessMethod; + } + + /// + /// OK + /// + [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethod AccessMethod { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets an unmanaged access method (where is_managed = false). + /// + public UnmanagedAccessMethod Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_methods/unmanaged/get", requestOptions) + .EnsureData("/access_methods/unmanaged/get") + .AccessMethod; + } + + /// + /// Gets an unmanaged access method (where is_managed = false). + /// + public UnmanagedAccessMethod Get(string accessMethodId = default) + { + return Get(new GetRequest(accessMethodId: accessMethodId)); + } + + /// + /// Gets an unmanaged access method (where is_managed = false). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync("/access_methods/unmanaged/get", requestOptions) + ) + .EnsureData("/access_methods/unmanaged/get") + .AccessMethod; + } + + /// + /// Gets an unmanaged access method (where is_managed = false). + /// + public async Task GetAsync(string accessMethodId = default) + { + return (await GetAsync(new GetRequest(accessMethodId: accessMethodId))); + } + + /// + /// Request parameters for List Unmanaged Access Methods. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string accessGrantId = default, + string? acsEntranceId = default, + string? deviceId = default, + string? spaceId = default + ) + { + AccessGrantId = accessGrantId; + AcsEntranceId = acsEntranceId; + DeviceId = deviceId; + SpaceId = spaceId; + } + + /// + /// ID of Access Grant to list unmanaged access methods for. + /// + [DataMember(Name = "access_grant_id", IsRequired = true, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// ID of the entrance for which you want to retrieve all unmanaged access methods. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsEntranceId { get; set; } + + /// + /// ID of the device for which you want to retrieve all unmanaged access methods. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// ID of the space for which you want to retrieve all unmanaged access methods. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List accessMethods = default) + { + AccessMethods = accessMethods; + } + + /// + /// OK + /// + [DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethods { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/access_methods/unmanaged/list", requestOptions) + .EnsureData("/access_methods/unmanaged/list") + .AccessMethods; + } + + /// + /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. + /// + public List List( + string accessGrantId = default, + string? acsEntranceId = default, + string? deviceId = default, + string? spaceId = default + ) + { + return List( + new ListRequest( + accessGrantId: accessGrantId, + acsEntranceId: acsEntranceId, + deviceId: deviceId, + spaceId: spaceId + ) + ); + } + + /// + /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync("/access_methods/unmanaged/list", requestOptions) + ) + .EnsureData("/access_methods/unmanaged/list") + .AccessMethods; + } + + /// + /// Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. + /// + public async Task> ListAsync( + string accessGrantId = default, + string? acsEntranceId = default, + string? deviceId = default, + string? spaceId = default + ) + { + return ( + await ListAsync( + new ListRequest( + accessGrantId: accessGrantId, + acsEntranceId: acsEntranceId, + deviceId: deviceId, + spaceId: spaceId + ) + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.UnmanagedAccessMethods UnmanagedAccessMethods => new(this); -} - -public partial interface ISeamClient -{ -public Api.UnmanagedAccessMethods UnmanagedAccessMethods { get; } -} + public partial class SeamClient + { + public Api.UnmanagedAccessMethods UnmanagedAccessMethods => new(this); + } + + public partial interface ISeamClient + { + public Api.UnmanagedAccessMethods UnmanagedAccessMethods { get; } + } } diff --git a/src/Seam/Api/UnmanagedDevices.cs b/src/Seam/Api/UnmanagedDevices.cs index 13784f32..c7cd8632 100644 --- a/src/Seam/Api/UnmanagedDevices.cs +++ b/src/Seam/Api/UnmanagedDevices.cs @@ -9,935 +9,1051 @@ namespace Seam.Api { -public class UnmanagedDevices -{ -private ISeamClient _seam; - -public UnmanagedDevices(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get an Unmanaged Device. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? deviceId = default, string? name = default) -{ -DeviceId = deviceId; -Name = name; -} - -/// -/// ID of the unmanaged device that you want to get. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Name of the unmanaged device that you want to get. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(UnmanagedDevice device = default) -{ -Device = device; -} - -/// -/// OK -/// -[DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDevice Device { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -/// You must specify either `device_id` or `name`. -/// -public UnmanagedDevice Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/devices/unmanaged/get", requestOptions).EnsureData("/devices/unmanaged/get").Device; -} - -/// -/// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -/// You must specify either `device_id` or `name`. -/// -public UnmanagedDevice Get(string? deviceId = default, string? name = default) -{ -return Get(new GetRequest(deviceId: deviceId, name: name)); -} - -/// -/// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -/// You must specify either `device_id` or `name`. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/devices/unmanaged/get", requestOptions)).EnsureData("/devices/unmanaged/get").Device; -} - -/// -/// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -/// You must specify either `device_id` or `name`. -/// -public async Task GetAsync(string? deviceId = default, string? name = default) -{ -return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); -} - -/// -/// Request parameters for List Unmanaged Devices. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountId = connectedAccountId; -ConnectedAccountIds = connectedAccountIds; -CreatedBefore = createdBefore; -CustomerKey = customerKey; -DeviceIds = deviceIds; -DeviceType = deviceType; -DeviceTypes = deviceTypes; -Limit = limit; -Manufacturer = manufacturer; -PageCursor = pageCursor; -Search = search; -} - -/// -/// Device type for which you want to list devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "akuvox_lock")] -AkuvoxLock = 1, - -[EnumMember(Value = "august_lock")] -AugustLock = 2, - -[EnumMember(Value = "brivo_access_point")] -BrivoAccessPoint = 3, - -[EnumMember(Value = "butterflymx_panel")] -ButterflymxPanel = 4, - -[EnumMember(Value = "avigilon_alta_entry")] -AvigilonAltaEntry = 5, - -[EnumMember(Value = "doorking_lock")] -DoorkingLock = 6, - -[EnumMember(Value = "genie_door")] -GenieDoor = 7, - -[EnumMember(Value = "igloo_lock")] -IglooLock = 8, - -[EnumMember(Value = "linear_lock")] -LinearLock = 9, - -[EnumMember(Value = "lockly_lock")] -LocklyLock = 10, - -[EnumMember(Value = "kwikset_lock")] -KwiksetLock = 11, - -[EnumMember(Value = "nuki_lock")] -NukiLock = 12, - -[EnumMember(Value = "salto_lock")] -SaltoLock = 13, - -[EnumMember(Value = "schlage_lock")] -SchlageLock = 14, - -[EnumMember(Value = "smartthings_lock")] -SmartthingsLock = 15, - -[EnumMember(Value = "wyze_lock")] -WyzeLock = 16, + public class UnmanagedDevices + { + private ISeamClient _seam; + + public UnmanagedDevices(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get an Unmanaged Device. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string? deviceId = default, string? name = default) + { + DeviceId = deviceId; + Name = name; + } + + /// + /// ID of the unmanaged device that you want to get. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Name of the unmanaged device that you want to get. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(UnmanagedDevice device = default) + { + Device = device; + } + + /// + /// OK + /// + [DataMember(Name = "device", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDevice Device { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + /// You must specify either `device_id` or `name`. + /// + public UnmanagedDevice Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/devices/unmanaged/get", requestOptions) + .EnsureData("/devices/unmanaged/get") + .Device; + } + + /// + /// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + /// You must specify either `device_id` or `name`. + /// + public UnmanagedDevice Get(string? deviceId = default, string? name = default) + { + return Get(new GetRequest(deviceId: deviceId, name: name)); + } + + /// + /// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + /// You must specify either `device_id` or `name`. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/devices/unmanaged/get", requestOptions)) + .EnsureData("/devices/unmanaged/get") + .Device; + } + + /// + /// Returns a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + /// You must specify either `device_id` or `name`. + /// + public async Task GetAsync( + string? deviceId = default, + string? name = default + ) + { + return (await GetAsync(new GetRequest(deviceId: deviceId, name: name))); + } + + /// + /// Request parameters for List Unmanaged Devices. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? connectWebviewId = default, + string? connectedAccountId = default, + List? connectedAccountIds = default, + string? createdBefore = default, + string? customerKey = default, + List? deviceIds = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + float? limit = default, + ListRequest.ManufacturerEnum? manufacturer = default, + string? pageCursor = default, + string? search = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountId = connectedAccountId; + ConnectedAccountIds = connectedAccountIds; + CreatedBefore = createdBefore; + CustomerKey = customerKey; + DeviceIds = deviceIds; + DeviceType = deviceType; + DeviceTypes = deviceTypes; + Limit = limit; + Manufacturer = manufacturer; + PageCursor = pageCursor; + Search = search; + } + + /// + /// Device type for which you want to list devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "akuvox_lock")] + AkuvoxLock = 1, + + [EnumMember(Value = "august_lock")] + AugustLock = 2, + + [EnumMember(Value = "brivo_access_point")] + BrivoAccessPoint = 3, + + [EnumMember(Value = "butterflymx_panel")] + ButterflymxPanel = 4, + + [EnumMember(Value = "avigilon_alta_entry")] + AvigilonAltaEntry = 5, + + [EnumMember(Value = "doorking_lock")] + DoorkingLock = 6, + + [EnumMember(Value = "genie_door")] + GenieDoor = 7, + + [EnumMember(Value = "igloo_lock")] + IglooLock = 8, + + [EnumMember(Value = "linear_lock")] + LinearLock = 9, + + [EnumMember(Value = "lockly_lock")] + LocklyLock = 10, + + [EnumMember(Value = "kwikset_lock")] + KwiksetLock = 11, + + [EnumMember(Value = "nuki_lock")] + NukiLock = 12, -[EnumMember(Value = "yale_lock")] -YaleLock = 17, + [EnumMember(Value = "salto_lock")] + SaltoLock = 13, -[EnumMember(Value = "two_n_intercom")] -TwoNIntercom = 18, + [EnumMember(Value = "schlage_lock")] + SchlageLock = 14, -[EnumMember(Value = "controlbyweb_device")] -ControlbywebDevice = 19, + [EnumMember(Value = "smartthings_lock")] + SmartthingsLock = 15, -[EnumMember(Value = "ttlock_lock")] -TtlockLock = 20, + [EnumMember(Value = "wyze_lock")] + WyzeLock = 16, -[EnumMember(Value = "igloohome_lock")] -IgloohomeLock = 21, + [EnumMember(Value = "yale_lock")] + YaleLock = 17, -[EnumMember(Value = "four_suites_door")] -FourSuitesDoor = 22, + [EnumMember(Value = "two_n_intercom")] + TwoNIntercom = 18, -[EnumMember(Value = "dormakaba_oracode_door")] -DormakabaOracodeDoor = 23, + [EnumMember(Value = "controlbyweb_device")] + ControlbywebDevice = 19, -[EnumMember(Value = "tedee_lock")] -TedeeLock = 24, + [EnumMember(Value = "ttlock_lock")] + TtlockLock = 20, -[EnumMember(Value = "akiles_lock")] -AkilesLock = 25, + [EnumMember(Value = "igloohome_lock")] + IgloohomeLock = 21, -[EnumMember(Value = "ultraloq_lock")] -UltraloqLock = 26, + [EnumMember(Value = "four_suites_door")] + FourSuitesDoor = 22, -[EnumMember(Value = "yacan_lock")] -YacanLock = 27, + [EnumMember(Value = "dormakaba_oracode_door")] + DormakabaOracodeDoor = 23, -[EnumMember(Value = "keyincode_lock")] -KeyincodeLock = 28, + [EnumMember(Value = "tedee_lock")] + TedeeLock = 24, -[EnumMember(Value = "omnitec_lock")] -OmnitecLock = 29, + [EnumMember(Value = "akiles_lock")] + AkilesLock = 25, -[EnumMember(Value = "kisi_lock")] -KisiLock = 30, + [EnumMember(Value = "ultraloq_lock")] + UltraloqLock = 26, -[EnumMember(Value = "aqara_lock")] -AqaraLock = 31, + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, -[EnumMember(Value = "keynest_key")] -KeynestKey = 32, + [EnumMember(Value = "keyincode_lock")] + KeyincodeLock = 28, -[EnumMember(Value = "noiseaware_activity_zone")] -NoiseawareActivityZone = 33, + [EnumMember(Value = "omnitec_lock")] + OmnitecLock = 29, -[EnumMember(Value = "minut_sensor")] -MinutSensor = 34, + [EnumMember(Value = "kisi_lock")] + KisiLock = 30, -[EnumMember(Value = "ecobee_thermostat")] -EcobeeThermostat = 35, + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, -[EnumMember(Value = "nest_thermostat")] -NestThermostat = 36, + [EnumMember(Value = "keynest_key")] + KeynestKey = 32, -[EnumMember(Value = "honeywell_resideo_thermostat")] -HoneywellResideoThermostat = 37, + [EnumMember(Value = "noiseaware_activity_zone")] + NoiseawareActivityZone = 33, -[EnumMember(Value = "tado_thermostat")] -TadoThermostat = 38, + [EnumMember(Value = "minut_sensor")] + MinutSensor = 34, -[EnumMember(Value = "sensi_thermostat")] -SensiThermostat = 39, + [EnumMember(Value = "ecobee_thermostat")] + EcobeeThermostat = 35, -[EnumMember(Value = "smartthings_thermostat")] -SmartthingsThermostat = 40, + [EnumMember(Value = "nest_thermostat")] + NestThermostat = 36, -[EnumMember(Value = "ios_phone")] -IosPhone = 41, + [EnumMember(Value = "honeywell_resideo_thermostat")] + HoneywellResideoThermostat = 37, -[EnumMember(Value = "android_phone")] -AndroidPhone = 42, + [EnumMember(Value = "tado_thermostat")] + TadoThermostat = 38, -[EnumMember(Value = "ring_camera")] -RingCamera = 43, + [EnumMember(Value = "sensi_thermostat")] + SensiThermostat = 39, -[EnumMember(Value = "tapo_camera")] -TapoCamera = 44, + [EnumMember(Value = "smartthings_thermostat")] + SmartthingsThermostat = 40, -[EnumMember(Value = "arlo_camera")] -ArloCamera = 45, + [EnumMember(Value = "ios_phone")] + IosPhone = 41, -[EnumMember(Value = "reolink_camera")] -ReolinkCamera = 46, -} - -/// -/// Array of device types for which you want to list devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "akuvox_lock")] -AkuvoxLock = 1, - -[EnumMember(Value = "august_lock")] -AugustLock = 2, - -[EnumMember(Value = "brivo_access_point")] -BrivoAccessPoint = 3, - -[EnumMember(Value = "butterflymx_panel")] -ButterflymxPanel = 4, - -[EnumMember(Value = "avigilon_alta_entry")] -AvigilonAltaEntry = 5, - -[EnumMember(Value = "doorking_lock")] -DoorkingLock = 6, - -[EnumMember(Value = "genie_door")] -GenieDoor = 7, - -[EnumMember(Value = "igloo_lock")] -IglooLock = 8, - -[EnumMember(Value = "linear_lock")] -LinearLock = 9, - -[EnumMember(Value = "lockly_lock")] -LocklyLock = 10, - -[EnumMember(Value = "kwikset_lock")] -KwiksetLock = 11, - -[EnumMember(Value = "nuki_lock")] -NukiLock = 12, - -[EnumMember(Value = "salto_lock")] -SaltoLock = 13, - -[EnumMember(Value = "schlage_lock")] -SchlageLock = 14, + [EnumMember(Value = "android_phone")] + AndroidPhone = 42, -[EnumMember(Value = "smartthings_lock")] -SmartthingsLock = 15, + [EnumMember(Value = "ring_camera")] + RingCamera = 43, -[EnumMember(Value = "wyze_lock")] -WyzeLock = 16, + [EnumMember(Value = "tapo_camera")] + TapoCamera = 44, -[EnumMember(Value = "yale_lock")] -YaleLock = 17, + [EnumMember(Value = "arlo_camera")] + ArloCamera = 45, -[EnumMember(Value = "two_n_intercom")] -TwoNIntercom = 18, + [EnumMember(Value = "reolink_camera")] + ReolinkCamera = 46, + } -[EnumMember(Value = "controlbyweb_device")] -ControlbywebDevice = 19, + /// + /// Array of device types for which you want to list devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "ttlock_lock")] -TtlockLock = 20, + [EnumMember(Value = "akuvox_lock")] + AkuvoxLock = 1, -[EnumMember(Value = "igloohome_lock")] -IgloohomeLock = 21, + [EnumMember(Value = "august_lock")] + AugustLock = 2, -[EnumMember(Value = "four_suites_door")] -FourSuitesDoor = 22, + [EnumMember(Value = "brivo_access_point")] + BrivoAccessPoint = 3, -[EnumMember(Value = "dormakaba_oracode_door")] -DormakabaOracodeDoor = 23, + [EnumMember(Value = "butterflymx_panel")] + ButterflymxPanel = 4, -[EnumMember(Value = "tedee_lock")] -TedeeLock = 24, + [EnumMember(Value = "avigilon_alta_entry")] + AvigilonAltaEntry = 5, -[EnumMember(Value = "akiles_lock")] -AkilesLock = 25, + [EnumMember(Value = "doorking_lock")] + DoorkingLock = 6, -[EnumMember(Value = "ultraloq_lock")] -UltraloqLock = 26, + [EnumMember(Value = "genie_door")] + GenieDoor = 7, -[EnumMember(Value = "yacan_lock")] -YacanLock = 27, + [EnumMember(Value = "igloo_lock")] + IglooLock = 8, -[EnumMember(Value = "keyincode_lock")] -KeyincodeLock = 28, + [EnumMember(Value = "linear_lock")] + LinearLock = 9, -[EnumMember(Value = "omnitec_lock")] -OmnitecLock = 29, + [EnumMember(Value = "lockly_lock")] + LocklyLock = 10, -[EnumMember(Value = "kisi_lock")] -KisiLock = 30, + [EnumMember(Value = "kwikset_lock")] + KwiksetLock = 11, -[EnumMember(Value = "aqara_lock")] -AqaraLock = 31, + [EnumMember(Value = "nuki_lock")] + NukiLock = 12, -[EnumMember(Value = "keynest_key")] -KeynestKey = 32, + [EnumMember(Value = "salto_lock")] + SaltoLock = 13, -[EnumMember(Value = "noiseaware_activity_zone")] -NoiseawareActivityZone = 33, + [EnumMember(Value = "schlage_lock")] + SchlageLock = 14, -[EnumMember(Value = "minut_sensor")] -MinutSensor = 34, + [EnumMember(Value = "smartthings_lock")] + SmartthingsLock = 15, -[EnumMember(Value = "ecobee_thermostat")] -EcobeeThermostat = 35, + [EnumMember(Value = "wyze_lock")] + WyzeLock = 16, -[EnumMember(Value = "nest_thermostat")] -NestThermostat = 36, + [EnumMember(Value = "yale_lock")] + YaleLock = 17, -[EnumMember(Value = "honeywell_resideo_thermostat")] -HoneywellResideoThermostat = 37, + [EnumMember(Value = "two_n_intercom")] + TwoNIntercom = 18, -[EnumMember(Value = "tado_thermostat")] -TadoThermostat = 38, + [EnumMember(Value = "controlbyweb_device")] + ControlbywebDevice = 19, -[EnumMember(Value = "sensi_thermostat")] -SensiThermostat = 39, + [EnumMember(Value = "ttlock_lock")] + TtlockLock = 20, -[EnumMember(Value = "smartthings_thermostat")] -SmartthingsThermostat = 40, + [EnumMember(Value = "igloohome_lock")] + IgloohomeLock = 21, -[EnumMember(Value = "ios_phone")] -IosPhone = 41, + [EnumMember(Value = "four_suites_door")] + FourSuitesDoor = 22, -[EnumMember(Value = "android_phone")] -AndroidPhone = 42, + [EnumMember(Value = "dormakaba_oracode_door")] + DormakabaOracodeDoor = 23, -[EnumMember(Value = "ring_camera")] -RingCamera = 43, + [EnumMember(Value = "tedee_lock")] + TedeeLock = 24, -[EnumMember(Value = "tapo_camera")] -TapoCamera = 44, + [EnumMember(Value = "akiles_lock")] + AkilesLock = 25, -[EnumMember(Value = "arlo_camera")] -ArloCamera = 45, + [EnumMember(Value = "ultraloq_lock")] + UltraloqLock = 26, -[EnumMember(Value = "reolink_camera")] -ReolinkCamera = 46, -} + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, -/// -/// Manufacturer for which you want to list devices. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ManufacturerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "keyincode_lock")] + KeyincodeLock = 28, -[EnumMember(Value = "akuvox")] -Akuvox = 1, + [EnumMember(Value = "omnitec_lock")] + OmnitecLock = 29, -[EnumMember(Value = "august")] -August = 2, + [EnumMember(Value = "kisi_lock")] + KisiLock = 30, -[EnumMember(Value = "avigilon_alta")] -AvigilonAlta = 3, + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, -[EnumMember(Value = "brivo")] -Brivo = 4, + [EnumMember(Value = "keynest_key")] + KeynestKey = 32, -[EnumMember(Value = "butterflymx")] -Butterflymx = 5, + [EnumMember(Value = "noiseaware_activity_zone")] + NoiseawareActivityZone = 33, -[EnumMember(Value = "doorking")] -Doorking = 6, + [EnumMember(Value = "minut_sensor")] + MinutSensor = 34, -[EnumMember(Value = "four_suites")] -FourSuites = 7, + [EnumMember(Value = "ecobee_thermostat")] + EcobeeThermostat = 35, -[EnumMember(Value = "genie")] -Genie = 8, + [EnumMember(Value = "nest_thermostat")] + NestThermostat = 36, -[EnumMember(Value = "igloo")] -Igloo = 9, + [EnumMember(Value = "honeywell_resideo_thermostat")] + HoneywellResideoThermostat = 37, -[EnumMember(Value = "keywe")] -Keywe = 10, + [EnumMember(Value = "tado_thermostat")] + TadoThermostat = 38, -[EnumMember(Value = "kwikset")] -Kwikset = 11, + [EnumMember(Value = "sensi_thermostat")] + SensiThermostat = 39, -[EnumMember(Value = "linear")] -Linear = 12, + [EnumMember(Value = "smartthings_thermostat")] + SmartthingsThermostat = 40, -[EnumMember(Value = "nuki")] -Nuki = 13, + [EnumMember(Value = "ios_phone")] + IosPhone = 41, -[EnumMember(Value = "philia")] -Philia = 14, + [EnumMember(Value = "android_phone")] + AndroidPhone = 42, -[EnumMember(Value = "salto")] -Salto = 15, + [EnumMember(Value = "ring_camera")] + RingCamera = 43, -[EnumMember(Value = "samsung")] -Samsung = 16, + [EnumMember(Value = "tapo_camera")] + TapoCamera = 44, -[EnumMember(Value = "schlage")] -Schlage = 17, + [EnumMember(Value = "arlo_camera")] + ArloCamera = 45, -[EnumMember(Value = "seam")] -Seam = 18, + [EnumMember(Value = "reolink_camera")] + ReolinkCamera = 46, + } -[EnumMember(Value = "unknown")] -Unknown = 19, + /// + /// Manufacturer for which you want to list devices. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ManufacturerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, -[EnumMember(Value = "wyze")] -Wyze = 20, + [EnumMember(Value = "akuvox")] + Akuvox = 1, -[EnumMember(Value = "yale")] -Yale = 21, + [EnumMember(Value = "august")] + August = 2, -[EnumMember(Value = "two_n")] -TwoN = 22, + [EnumMember(Value = "avigilon_alta")] + AvigilonAlta = 3, -[EnumMember(Value = "ttlock")] -Ttlock = 23, + [EnumMember(Value = "brivo")] + Brivo = 4, -[EnumMember(Value = "igloohome")] -Igloohome = 24, + [EnumMember(Value = "butterflymx")] + Butterflymx = 5, -[EnumMember(Value = "controlbyweb")] -Controlbyweb = 25, + [EnumMember(Value = "doorking")] + Doorking = 6, -[EnumMember(Value = "tedee")] -Tedee = 26, + [EnumMember(Value = "four_suites")] + FourSuites = 7, -[EnumMember(Value = "keyincode")] -Keyincode = 27, + [EnumMember(Value = "genie")] + Genie = 8, -[EnumMember(Value = "akiles")] -Akiles = 28, + [EnumMember(Value = "igloo")] + Igloo = 9, -[EnumMember(Value = "aqara")] -Aqara = 29, + [EnumMember(Value = "keywe")] + Keywe = 10, -[EnumMember(Value = "ecobee")] -Ecobee = 30, + [EnumMember(Value = "kwikset")] + Kwikset = 11, -[EnumMember(Value = "eufy")] -Eufy = 31, + [EnumMember(Value = "linear")] + Linear = 12, -[EnumMember(Value = "dormakaba_oracode")] -DormakabaOracode = 32, + [EnumMember(Value = "nuki")] + Nuki = 13, -[EnumMember(Value = "dormakaba_oracode_iho")] -DormakabaOracodeIho = 33, + [EnumMember(Value = "philia")] + Philia = 14, -[EnumMember(Value = "honeywell_resideo")] -HoneywellResideo = 34, + [EnumMember(Value = "salto")] + Salto = 15, -[EnumMember(Value = "keynest")] -Keynest = 35, + [EnumMember(Value = "samsung")] + Samsung = 16, -[EnumMember(Value = "korelock")] -Korelock = 36, + [EnumMember(Value = "schlage")] + Schlage = 17, -[EnumMember(Value = "lockly")] -Lockly = 37, + [EnumMember(Value = "seam")] + Seam = 18, -[EnumMember(Value = "minut")] -Minut = 38, + [EnumMember(Value = "unknown")] + Unknown = 19, -[EnumMember(Value = "nest")] -Nest = 39, + [EnumMember(Value = "wyze")] + Wyze = 20, -[EnumMember(Value = "noiseaware")] -Noiseaware = 40, + [EnumMember(Value = "yale")] + Yale = 21, -[EnumMember(Value = "sensi")] -Sensi = 41, + [EnumMember(Value = "two_n")] + TwoN = 22, -[EnumMember(Value = "smartthings")] -Smartthings = 42, + [EnumMember(Value = "ttlock")] + Ttlock = 23, -[EnumMember(Value = "tado")] -Tado = 43, + [EnumMember(Value = "igloohome")] + Igloohome = 24, -[EnumMember(Value = "ultraloq")] -Ultraloq = 44, + [EnumMember(Value = "controlbyweb")] + Controlbyweb = 25, -[EnumMember(Value = "ring")] -Ring = 45, + [EnumMember(Value = "tedee")] + Tedee = 26, -[EnumMember(Value = "tapo")] -Tapo = 46, + [EnumMember(Value = "keyincode")] + Keyincode = 27, -[EnumMember(Value = "arlo")] -Arlo = 47, + [EnumMember(Value = "akiles")] + Akiles = 28, -[EnumMember(Value = "reolink")] -Reolink = 48, + [EnumMember(Value = "aqara")] + Aqara = 29, -[EnumMember(Value = "ical")] -Ical = 49, + [EnumMember(Value = "ecobee")] + Ecobee = 30, -[EnumMember(Value = "lodgify")] -Lodgify = 50, + [EnumMember(Value = "eufy")] + Eufy = 31, -[EnumMember(Value = "hostaway")] -Hostaway = 51, + [EnumMember(Value = "dormakaba_oracode")] + DormakabaOracode = 32, -[EnumMember(Value = "guesty")] -Guesty = 52, + [EnumMember(Value = "dormakaba_oracode_iho")] + DormakabaOracodeIho = 33, -[EnumMember(Value = "acuity_scheduling")] -AcuityScheduling = 53, + [EnumMember(Value = "honeywell_resideo")] + HoneywellResideo = 34, -[EnumMember(Value = "omnitec")] -Omnitec = 54, + [EnumMember(Value = "keynest")] + Keynest = 35, -[EnumMember(Value = "kisi")] -Kisi = 55, + [EnumMember(Value = "korelock")] + Korelock = 36, -[EnumMember(Value = "slack")] -Slack = 56, + [EnumMember(Value = "lockly")] + Lockly = 37, -[EnumMember(Value = "yacan")] -Yacan = 57, -} + [EnumMember(Value = "minut")] + Minut = 38, -/// -/// ID of the Connect Webview for which you want to list devices. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectWebviewId { get; set; } - -/// -/// ID of the connected account for which you want to list devices. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Array of IDs of the connected accounts for which you want to list devices. -/// -[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] -public List? ConnectedAccountIds { get; set; } - -/// -/// Timestamp by which to limit returned devices. Returns devices created before this timestamp. -/// -[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedBefore { get; set; } - -/// -/// Customer key for which you want to list devices. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Array of device IDs for which you want to list devices. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceIds { get; set; } - -/// -/// Device type for which you want to list devices. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.DeviceTypeEnum? DeviceType { get; set; } - -/// -/// Array of device types for which you want to list devices. -/// -[DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] -public List? DeviceTypes { get; set; } - -/// -/// Numerical limit on the number of devices to return. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public float? Limit { get; set; } - -/// -/// Manufacturer for which you want to list devices. -/// -[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] -public ListRequest.ManufacturerEnum? Manufacturer { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "nest")] + Nest = 39, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List devices = default) -{ -Devices = devices; -} - -/// -/// OK -/// -[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] -public List Devices { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "noiseaware")] + Noiseaware = 40, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "sensi")] + Sensi = 41, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "smartthings")] + Smartthings = 42, -/// -/// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/devices/unmanaged/list", requestOptions).EnsureData("/devices/unmanaged/list").Devices; -} + [EnumMember(Value = "tado")] + Tado = 43, -/// -/// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -public List List(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default) -{ -return List(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, search: search)); -} + [EnumMember(Value = "ultraloq")] + Ultraloq = 44, -/// -/// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/devices/unmanaged/list", requestOptions)).EnsureData("/devices/unmanaged/list").Devices; -} + [EnumMember(Value = "ring")] + Ring = 45, -/// -/// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -public async Task> ListAsync(string? connectWebviewId = default, string? connectedAccountId = default, List? connectedAccountIds = default, string? createdBefore = default, string? customerKey = default, List? deviceIds = default, ListRequest.DeviceTypeEnum? deviceType = default, List? deviceTypes = default, float? limit = default, ListRequest.ManufacturerEnum? manufacturer = default, string? pageCursor = default, string? search = default) -{ -return (await ListAsync(new ListRequest(connectWebviewId: connectWebviewId, connectedAccountId: connectedAccountId, connectedAccountIds: connectedAccountIds, createdBefore: createdBefore, customerKey: customerKey, deviceIds: deviceIds, deviceType: deviceType, deviceTypes: deviceTypes, limit: limit, manufacturer: manufacturer, pageCursor: pageCursor, search: search))); -} + [EnumMember(Value = "tapo")] + Tapo = 46, -/// -/// Request parameters for Update an Unmanaged Device. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } + [EnumMember(Value = "arlo")] + Arlo = 47, -public UpdateRequest(object? customMetadata = default, string deviceId = default, bool? isManaged = default) -{ -CustomMetadata = customMetadata; -DeviceId = deviceId; -IsManaged = isManaged; -} + [EnumMember(Value = "reolink")] + Reolink = 48, -/// -/// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Set a key to `null` or to an empty string to remove that key from the custom metadata. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? CustomMetadata { get; set; } - -/// -/// ID of the unmanaged device that you want to update. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsManaged { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "ical")] + Ical = 49, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "lodgify")] + Lodgify = 50, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "hostaway")] + Hostaway = 51, -/// -/// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/devices/unmanaged/update", requestOptions); -} + [EnumMember(Value = "guesty")] + Guesty = 52, -/// -/// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -public void Update(object? customMetadata = default, string deviceId = default, bool? isManaged = default) -{ -Update(new UpdateRequest(customMetadata: customMetadata, deviceId: deviceId, isManaged: isManaged)); -} + [EnumMember(Value = "acuity_scheduling")] + AcuityScheduling = 53, -/// -/// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/devices/unmanaged/update", requestOptions); -} + [EnumMember(Value = "omnitec")] + Omnitec = 54, -/// -/// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. -/// -/// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -public async Task UpdateAsync(object? customMetadata = default, string deviceId = default, bool? isManaged = default) -{ -await UpdateAsync(new UpdateRequest(customMetadata: customMetadata, deviceId: deviceId, isManaged: isManaged)); -} -} + [EnumMember(Value = "kisi")] + Kisi = 55, + + [EnumMember(Value = "slack")] + Slack = 56, + + [EnumMember(Value = "yacan")] + Yacan = 57, + } + + /// + /// ID of the Connect Webview for which you want to list devices. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectWebviewId { get; set; } + + /// + /// ID of the connected account for which you want to list devices. + /// + [DataMember( + Name = "connected_account_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectedAccountId { get; set; } + + /// + /// Array of IDs of the connected accounts for which you want to list devices. + /// + [DataMember( + Name = "connected_account_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? ConnectedAccountIds { get; set; } + + /// + /// Timestamp by which to limit returned devices. Returns devices created before this timestamp. + /// + [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedBefore { get; set; } + + /// + /// Customer key for which you want to list devices. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Array of device IDs for which you want to list devices. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceIds { get; set; } + + /// + /// Device type for which you want to list devices. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.DeviceTypeEnum? DeviceType { get; set; } + + /// + /// Array of device types for which you want to list devices. + /// + [DataMember(Name = "device_types", IsRequired = false, EmitDefaultValue = false)] + public List? DeviceTypes { get; set; } + + /// + /// Numerical limit on the number of devices to return. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public float? Limit { get; set; } + + /// + /// Manufacturer for which you want to list devices. + /// + [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] + public ListRequest.ManufacturerEnum? Manufacturer { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List devices = default) + { + Devices = devices; + } + + /// + /// OK + /// + [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] + public List Devices { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/devices/unmanaged/list", requestOptions) + .EnsureData("/devices/unmanaged/list") + .Devices; + } + + /// + /// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + public List List( + string? connectWebviewId = default, + string? connectedAccountId = default, + List? connectedAccountIds = default, + string? createdBefore = default, + string? customerKey = default, + List? deviceIds = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + float? limit = default, + ListRequest.ManufacturerEnum? manufacturer = default, + string? pageCursor = default, + string? search = default + ) + { + return List( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + connectedAccountIds: connectedAccountIds, + createdBefore: createdBefore, + customerKey: customerKey, + deviceIds: deviceIds, + deviceType: deviceType, + deviceTypes: deviceTypes, + limit: limit, + manufacturer: manufacturer, + pageCursor: pageCursor, + search: search + ) + ); + } + + /// + /// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/devices/unmanaged/list", requestOptions)) + .EnsureData("/devices/unmanaged/list") + .Devices; + } + + /// + /// Returns a list of all [unmanaged devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + public async Task> ListAsync( + string? connectWebviewId = default, + string? connectedAccountId = default, + List? connectedAccountIds = default, + string? createdBefore = default, + string? customerKey = default, + List? deviceIds = default, + ListRequest.DeviceTypeEnum? deviceType = default, + List? deviceTypes = default, + float? limit = default, + ListRequest.ManufacturerEnum? manufacturer = default, + string? pageCursor = default, + string? search = default + ) + { + return ( + await ListAsync( + new ListRequest( + connectWebviewId: connectWebviewId, + connectedAccountId: connectedAccountId, + connectedAccountIds: connectedAccountIds, + createdBefore: createdBefore, + customerKey: customerKey, + deviceIds: deviceIds, + deviceType: deviceType, + deviceTypes: deviceTypes, + limit: limit, + manufacturer: manufacturer, + pageCursor: pageCursor, + search: search + ) + ) + ); + } + + /// + /// Request parameters for Update an Unmanaged Device. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + object? customMetadata = default, + string deviceId = default, + bool? isManaged = default + ) + { + CustomMetadata = customMetadata; + DeviceId = deviceId; + IsManaged = isManaged; + } + + /// + /// Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Set a key to `null` or to an empty string to remove that key from the custom metadata. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? CustomMetadata { get; set; } + + /// + /// ID of the unmanaged device that you want to update. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsManaged { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/devices/unmanaged/update", requestOptions); + } + + /// + /// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + public void Update( + object? customMetadata = default, + string deviceId = default, + bool? isManaged = default + ) + { + Update( + new UpdateRequest( + customMetadata: customMetadata, + deviceId: deviceId, + isManaged: isManaged + ) + ); + } + + /// + /// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/devices/unmanaged/update", requestOptions); + } + + /// + /// Updates a specified [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. + /// + /// An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + public async Task UpdateAsync( + object? customMetadata = default, + string deviceId = default, + bool? isManaged = default + ) + { + await UpdateAsync( + new UpdateRequest( + customMetadata: customMetadata, + deviceId: deviceId, + isManaged: isManaged + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.UnmanagedDevices UnmanagedDevices => new(this); -} - -public partial interface ISeamClient -{ -public Api.UnmanagedDevices UnmanagedDevices { get; } -} + public partial class SeamClient + { + public Api.UnmanagedDevices UnmanagedDevices => new(this); + } + + public partial interface ISeamClient + { + public Api.UnmanagedDevices UnmanagedDevices { get; } + } } diff --git a/src/Seam/Api/UnmanagedUserIdentities.cs b/src/Seam/Api/UnmanagedUserIdentities.cs index 6012a742..5c2eede5 100644 --- a/src/Seam/Api/UnmanagedUserIdentities.cs +++ b/src/Seam/Api/UnmanagedUserIdentities.cs @@ -9,371 +9,443 @@ namespace Seam.Api { -public class UnmanagedUserIdentities -{ -private ISeamClient _seam; - -public UnmanagedUserIdentities(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Get an Unmanaged User Identity. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string userIdentityId = default) -{ -UserIdentityId = userIdentityId; -} - -/// -/// ID of the unmanaged user identity that you want to get. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(UnmanagedUserIdentity userIdentity = default) -{ -UserIdentity = userIdentity; -} - -/// -/// OK -/// -[DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedUserIdentity UserIdentity { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). -/// -public UnmanagedUserIdentity Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/user_identities/unmanaged/get", requestOptions).EnsureData("/user_identities/unmanaged/get").UserIdentity; -} - -/// -/// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). -/// -public UnmanagedUserIdentity Get(string userIdentityId = default) -{ -return Get(new GetRequest(userIdentityId: userIdentityId)); -} - -/// -/// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/user_identities/unmanaged/get", requestOptions)).EnsureData("/user_identities/unmanaged/get").UserIdentity; -} - -/// -/// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). -/// -public async Task GetAsync(string userIdentityId = default) -{ -return (await GetAsync(new GetRequest(userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for List Unmanaged User Identities. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default) -{ -CreatedBefore = createdBefore; -Limit = limit; -PageCursor = pageCursor; -Search = search; -} - -/// -/// Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp. -/// -[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedBefore { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public int? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned unmanaged user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `user_identity_id` or `acs_system_id`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List userIdentities = default) -{ -UserIdentities = userIdentities; -} - -/// -/// OK -/// -[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] -public List UserIdentities { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/user_identities/unmanaged/list", requestOptions).EnsureData("/user_identities/unmanaged/list").UserIdentities; -} - -/// -/// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). -/// -public List List(string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default) -{ -return List(new ListRequest(createdBefore: createdBefore, limit: limit, pageCursor: pageCursor, search: search)); -} - -/// -/// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/user_identities/unmanaged/list", requestOptions)).EnsureData("/user_identities/unmanaged/list").UserIdentities; -} - -/// -/// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). -/// -public async Task> ListAsync(string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default) -{ -return (await ListAsync(new ListRequest(createdBefore: createdBefore, limit: limit, pageCursor: pageCursor, search: search))); -} - -/// -/// Request parameters for Update an Unmanaged User Identity. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(bool isManaged = default, string userIdentityId = default, string? userIdentityKey = default) -{ -IsManaged = isManaged; -UserIdentityId = userIdentityId; -UserIdentityKey = userIdentityKey; -} - -/// -/// Must be set to true to convert the unmanaged user identity to managed. -/// -[DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// ID of the unmanaged user identity that you want to update. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -/// -/// Unique key for the user identity. If not provided, the existing key will be preserved. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. -/// -/// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/user_identities/unmanaged/update", requestOptions); -} - -/// -/// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. -/// -/// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. -/// -public void Update(bool isManaged = default, string userIdentityId = default, string? userIdentityKey = default) -{ -Update(new UpdateRequest(isManaged: isManaged, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} - -/// -/// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. -/// -/// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/user_identities/unmanaged/update", requestOptions); -} - -/// -/// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. -/// -/// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. -/// -public async Task UpdateAsync(bool isManaged = default, string userIdentityId = default, string? userIdentityKey = default) -{ -await UpdateAsync(new UpdateRequest(isManaged: isManaged, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} -} + public class UnmanagedUserIdentities + { + private ISeamClient _seam; + + public UnmanagedUserIdentities(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Get an Unmanaged User Identity. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string userIdentityId = default) + { + UserIdentityId = userIdentityId; + } + + /// + /// ID of the unmanaged user identity that you want to get. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(UnmanagedUserIdentity userIdentity = default) + { + UserIdentity = userIdentity; + } + + /// + /// OK + /// + [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedUserIdentity UserIdentity { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + /// + public UnmanagedUserIdentity Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/user_identities/unmanaged/get", requestOptions) + .EnsureData("/user_identities/unmanaged/get") + .UserIdentity; + } + + /// + /// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + /// + public UnmanagedUserIdentity Get(string userIdentityId = default) + { + return Get(new GetRequest(userIdentityId: userIdentityId)); + } + + /// + /// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync("/user_identities/unmanaged/get", requestOptions) + ) + .EnsureData("/user_identities/unmanaged/get") + .UserIdentity; + } + + /// + /// Returns a specified unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + /// + public async Task GetAsync(string userIdentityId = default) + { + return (await GetAsync(new GetRequest(userIdentityId: userIdentityId))); + } + + /// + /// Request parameters for List Unmanaged User Identities. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? createdBefore = default, + int? limit = default, + string? pageCursor = default, + string? search = default + ) + { + CreatedBefore = createdBefore; + Limit = limit; + PageCursor = pageCursor; + Search = search; + } + + /// + /// Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp. + /// + [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedBefore { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public int? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned unmanaged user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `user_identity_id` or `acs_system_id`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List userIdentities = default) + { + UserIdentities = userIdentities; + } + + /// + /// OK + /// + [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] + public List UserIdentities { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/user_identities/unmanaged/list", requestOptions) + .EnsureData("/user_identities/unmanaged/list") + .UserIdentities; + } + + /// + /// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + /// + public List List( + string? createdBefore = default, + int? limit = default, + string? pageCursor = default, + string? search = default + ) + { + return List( + new ListRequest( + createdBefore: createdBefore, + limit: limit, + pageCursor: pageCursor, + search: search + ) + ); + } + + /// + /// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/user_identities/unmanaged/list", + requestOptions + ) + ) + .EnsureData("/user_identities/unmanaged/list") + .UserIdentities; + } + + /// + /// Returns a list of all unmanaged [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + /// + public async Task> ListAsync( + string? createdBefore = default, + int? limit = default, + string? pageCursor = default, + string? search = default + ) + { + return ( + await ListAsync( + new ListRequest( + createdBefore: createdBefore, + limit: limit, + pageCursor: pageCursor, + search: search + ) + ) + ); + } + + /// + /// Request parameters for Update an Unmanaged User Identity. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + bool isManaged = default, + string userIdentityId = default, + string? userIdentityKey = default + ) + { + IsManaged = isManaged; + UserIdentityId = userIdentityId; + UserIdentityKey = userIdentityKey; + } + + /// + /// Must be set to true to convert the unmanaged user identity to managed. + /// + [DataMember(Name = "is_managed", IsRequired = true, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// ID of the unmanaged user identity that you want to update. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + /// + /// Unique key for the user identity. If not provided, the existing key will be preserved. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. + /// + /// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/user_identities/unmanaged/update", requestOptions); + } + + /// + /// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. + /// + /// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. + /// + public void Update( + bool isManaged = default, + string userIdentityId = default, + string? userIdentityKey = default + ) + { + Update( + new UpdateRequest( + isManaged: isManaged, + userIdentityId: userIdentityId, + userIdentityKey: userIdentityKey + ) + ); + } + + /// + /// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. + /// + /// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/user_identities/unmanaged/update", requestOptions); + } + + /// + /// Updates an unmanaged [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. + /// + /// This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. + /// + public async Task UpdateAsync( + bool isManaged = default, + string userIdentityId = default, + string? userIdentityKey = default + ) + { + await UpdateAsync( + new UpdateRequest( + isManaged: isManaged, + userIdentityId: userIdentityId, + userIdentityKey: userIdentityKey + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.UnmanagedUserIdentities UnmanagedUserIdentities => new(this); -} + public partial class SeamClient + { + public Api.UnmanagedUserIdentities UnmanagedUserIdentities => new(this); + } -public partial interface ISeamClient -{ -public Api.UnmanagedUserIdentities UnmanagedUserIdentities { get; } -} + public partial interface ISeamClient + { + public Api.UnmanagedUserIdentities UnmanagedUserIdentities { get; } + } } diff --git a/src/Seam/Api/UserIdentities.cs b/src/Seam/Api/UserIdentities.cs index 1c7a2cf2..80f9e8c9 100644 --- a/src/Seam/Api/UserIdentities.cs +++ b/src/Seam/Api/UserIdentities.cs @@ -9,1664 +9,2007 @@ namespace Seam.Api { -public class UserIdentities -{ -private ISeamClient _seam; - -public UserIdentities(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Add an ACS User to a User Identity. -/// -[DataContract(Name = "addAcsUserRequest_request")] -public class AddAcsUserRequest -{ -[JsonConstructorAttribute] -protected AddAcsUserRequest() { } - -public AddAcsUserRequest(string acsUserId = default, string? userIdentityId = default, string? userIdentityKey = default) -{ -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -UserIdentityKey = userIdentityKey; -} - -/// -/// ID of the access system user that you want to add to the user identity. -/// -[DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsUserId { get; set; } - -/// -/// ID of the user identity to which you want to add an access system user. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Key of the user identity to which you want to add an access system user. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -/// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. -/// -/// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. -/// -public void AddAcsUser(AddAcsUserRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Put("/user_identities/add_acs_user", requestOptions); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -/// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. -/// -/// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. -/// -public void AddAcsUser(string acsUserId = default, string? userIdentityId = default, string? userIdentityKey = default) -{ -AddAcsUser(new AddAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -/// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. -/// -/// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. -/// -public async Task AddAcsUserAsync(AddAcsUserRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PutAsync("/user_identities/add_acs_user", requestOptions); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -/// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. -/// -/// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. -/// -public async Task AddAcsUserAsync(string acsUserId = default, string? userIdentityId = default, string? userIdentityKey = default) -{ -await AddAcsUserAsync(new AddAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} - -/// -/// Request parameters for Create a User Identity. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(List? acsSystemIds = default, string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string? userIdentityKey = default) -{ -AcsSystemIds = acsSystemIds; -EmailAddress = emailAddress; -FullName = fullName; -PhoneNumber = phoneNumber; -UserIdentityKey = userIdentityKey; -} - -/// -/// List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. -/// -[DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsSystemIds { get; set; } - -/// -/// Unique email address for the new user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Full name of the user associated with the new user identity. -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// Unique phone number for the new user identity in E.164 format (for example, +15555550100). -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Unique key for the new user identity. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(UserIdentity userIdentity = default) -{ -UserIdentity = userIdentity; -} - -/// -/// OK -/// -[DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] -public UserIdentity UserIdentity { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public UserIdentity Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/user_identities/create", requestOptions).EnsureData("/user_identities/create").UserIdentity; -} - -/// -/// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public UserIdentity Create(List? acsSystemIds = default, string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string? userIdentityKey = default) -{ -return Create(new CreateRequest(acsSystemIds: acsSystemIds, emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityKey: userIdentityKey)); -} - -/// -/// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/user_identities/create", requestOptions)).EnsureData("/user_identities/create").UserIdentity; -} - -/// -/// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task CreateAsync(List? acsSystemIds = default, string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string? userIdentityKey = default) -{ -return (await CreateAsync(new CreateRequest(acsSystemIds: acsSystemIds, emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityKey: userIdentityKey))); -} - -/// -/// Request parameters for Delete a User Identity. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string userIdentityId = default) -{ -UserIdentityId = userIdentityId; -} - -/// -/// ID of the user identity that you want to delete. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/user_identities/delete", requestOptions); -} - -/// -/// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). -/// -public void Delete(string userIdentityId = default) -{ -Delete(new DeleteRequest(userIdentityId: userIdentityId)); -} - -/// -/// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/user_identities/delete", requestOptions); -} - -/// -/// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). -/// -public async Task DeleteAsync(string userIdentityId = default) -{ -await DeleteAsync(new DeleteRequest(userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Generate an Instant Key. -/// -[DataContract(Name = "generateInstantKeyRequest_request")] -public class GenerateInstantKeyRequest -{ -[JsonConstructorAttribute] -protected GenerateInstantKeyRequest() { } - -public GenerateInstantKeyRequest(string? customizationProfileId = default, float? maxUseCount = default, string userIdentityId = default) -{ -CustomizationProfileId = customizationProfileId; -MaxUseCount = maxUseCount; -UserIdentityId = userIdentityId; -} - -[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomizationProfileId { get; set; } - -/// -/// Maximum number of times the instant key can be used. Default: 1. -/// -[DataMember(Name = "max_use_count", IsRequired = false, EmitDefaultValue = false)] -public float? MaxUseCount { get; set; } - -/// -/// ID of the user identity for which you want to generate an instant key. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "generateInstantKeyResponse_response")] -public class GenerateInstantKeyResponse -{ -[JsonConstructorAttribute] -protected GenerateInstantKeyResponse() { } - -public GenerateInstantKeyResponse(InstantKey instantKey = default) -{ -InstantKey = instantKey; -} - -/// -/// OK -/// -[DataMember(Name = "instant_key", IsRequired = false, EmitDefaultValue = false)] -public InstantKey InstantKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public InstantKey GenerateInstantKey(GenerateInstantKeyRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/user_identities/generate_instant_key", requestOptions).EnsureData("/user_identities/generate_instant_key").InstantKey; -} - -/// -/// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public InstantKey GenerateInstantKey(string? customizationProfileId = default, float? maxUseCount = default, string userIdentityId = default) -{ -return GenerateInstantKey(new GenerateInstantKeyRequest(customizationProfileId: customizationProfileId, maxUseCount: maxUseCount, userIdentityId: userIdentityId)); -} - -/// -/// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task GenerateInstantKeyAsync(GenerateInstantKeyRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/user_identities/generate_instant_key", requestOptions)).EnsureData("/user_identities/generate_instant_key").InstantKey; -} - -/// -/// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task GenerateInstantKeyAsync(string? customizationProfileId = default, float? maxUseCount = default, string userIdentityId = default) -{ -return (await GenerateInstantKeyAsync(new GenerateInstantKeyRequest(customizationProfileId: customizationProfileId, maxUseCount: maxUseCount, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for Get a User Identity. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? userIdentityId = default, string? userIdentityKey = default) -{ -UserIdentityId = userIdentityId; -UserIdentityKey = userIdentityKey; -} - -/// -/// ID of the user identity that you want to get. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(UserIdentity userIdentity = default) -{ -UserIdentity = userIdentity; -} - -/// -/// OK -/// -[DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] -public UserIdentity UserIdentity { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public UserIdentity Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/user_identities/get", requestOptions).EnsureData("/user_identities/get").UserIdentity; -} - -/// -/// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public UserIdentity Get(string? userIdentityId = default, string? userIdentityKey = default) -{ -return Get(new GetRequest(userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} - -/// -/// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/user_identities/get", requestOptions)).EnsureData("/user_identities/get").UserIdentity; -} - -/// -/// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task GetAsync(string? userIdentityId = default, string? userIdentityKey = default) -{ -return (await GetAsync(new GetRequest(userIdentityId: userIdentityId, userIdentityKey: userIdentityKey))); -} - -/// -/// Request parameters for Grant a User Identity Access to a Device. -/// -[DataContract(Name = "grantAccessToDeviceRequest_request")] -public class GrantAccessToDeviceRequest -{ -[JsonConstructorAttribute] -protected GrantAccessToDeviceRequest() { } - -public GrantAccessToDeviceRequest(string deviceId = default, string userIdentityId = default) -{ -DeviceId = deviceId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the managed device to which you want to grant access to the user identity. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// ID of the user identity that you want to grant access to a device. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -public void GrantAccessToDevice(GrantAccessToDeviceRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Put("/user_identities/grant_access_to_device", requestOptions); -} - -/// -/// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -public void GrantAccessToDevice(string deviceId = default, string userIdentityId = default) -{ -GrantAccessToDevice(new GrantAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId)); -} - -/// -/// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -public async Task GrantAccessToDeviceAsync(GrantAccessToDeviceRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PutAsync("/user_identities/grant_access_to_device", requestOptions); -} - -/// -/// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). -/// -public async Task GrantAccessToDeviceAsync(string deviceId = default, string userIdentityId = default) -{ -await GrantAccessToDeviceAsync(new GrantAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for List User Identities. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? createdBefore = default, string? credentialManagerAcsSystemId = default, int? limit = default, string? pageCursor = default, string? search = default, List? userIdentityIds = default) -{ -CreatedBefore = createdBefore; -CredentialManagerAcsSystemId = credentialManagerAcsSystemId; -Limit = limit; -PageCursor = pageCursor; -Search = search; -UserIdentityIds = userIdentityIds; -} - -/// -/// Timestamp by which to limit returned user identities. Returns user identities created before this timestamp. -/// -[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedBefore { get; set; } - -/// -/// `acs_system_id` of the credential manager by which you want to filter the list of user identities. -/// -[DataMember(Name = "credential_manager_acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? CredentialManagerAcsSystemId { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public int? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address` or `user_identity_id`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// Array of user identity IDs by which to filter the list of user identities. -/// -[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] -public List? UserIdentityIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List userIdentities = default) -{ -UserIdentities = userIdentities; -} - -/// -/// OK -/// -[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] -public List UserIdentities { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/user_identities/list", requestOptions).EnsureData("/user_identities/list").UserIdentities; -} - -/// -/// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public List List(string? createdBefore = default, string? credentialManagerAcsSystemId = default, int? limit = default, string? pageCursor = default, string? search = default, List? userIdentityIds = default) -{ -return List(new ListRequest(createdBefore: createdBefore, credentialManagerAcsSystemId: credentialManagerAcsSystemId, limit: limit, pageCursor: pageCursor, search: search, userIdentityIds: userIdentityIds)); -} - -/// -/// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/user_identities/list", requestOptions)).EnsureData("/user_identities/list").UserIdentities; -} - -/// -/// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task> ListAsync(string? createdBefore = default, string? credentialManagerAcsSystemId = default, int? limit = default, string? pageCursor = default, string? search = default, List? userIdentityIds = default) -{ -return (await ListAsync(new ListRequest(createdBefore: createdBefore, credentialManagerAcsSystemId: credentialManagerAcsSystemId, limit: limit, pageCursor: pageCursor, search: search, userIdentityIds: userIdentityIds))); -} - -/// -/// Request parameters for List Accessible Devices for a User Identity. -/// -[DataContract(Name = "listAccessibleDevicesRequest_request")] -public class ListAccessibleDevicesRequest -{ -[JsonConstructorAttribute] -protected ListAccessibleDevicesRequest() { } - -public ListAccessibleDevicesRequest(string userIdentityId = default) -{ -UserIdentityId = userIdentityId; -} - -/// -/// ID of the user identity for which you want to retrieve all accessible devices. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listAccessibleDevicesResponse_response")] -public class ListAccessibleDevicesResponse -{ -[JsonConstructorAttribute] -protected ListAccessibleDevicesResponse() { } - -public ListAccessibleDevicesResponse(List devices = default) -{ -Devices = devices; -} - -/// -/// OK -/// -[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] -public List Devices { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. -/// -public List ListAccessibleDevices(ListAccessibleDevicesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/user_identities/list_accessible_devices", requestOptions).EnsureData("/user_identities/list_accessible_devices").Devices; -} - -/// -/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. -/// -public List ListAccessibleDevices(string userIdentityId = default) -{ -return ListAccessibleDevices(new ListAccessibleDevicesRequest(userIdentityId: userIdentityId)); -} - -/// -/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. -/// -public async Task> ListAccessibleDevicesAsync(ListAccessibleDevicesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/user_identities/list_accessible_devices", requestOptions)).EnsureData("/user_identities/list_accessible_devices").Devices; -} - -/// -/// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. -/// -public async Task> ListAccessibleDevicesAsync(string userIdentityId = default) -{ -return (await ListAccessibleDevicesAsync(new ListAccessibleDevicesRequest(userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for List Accessible Entrances for a User Identity. -/// -[DataContract(Name = "listAccessibleEntrancesRequest_request")] -public class ListAccessibleEntrancesRequest -{ -[JsonConstructorAttribute] -protected ListAccessibleEntrancesRequest() { } - -public ListAccessibleEntrancesRequest(string userIdentityId = default) -{ -UserIdentityId = userIdentityId; -} - -/// -/// ID of the user identity for which you want to retrieve all accessible entrances. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listAccessibleEntrancesResponse_response")] -public class ListAccessibleEntrancesResponse -{ -[JsonConstructorAttribute] -protected ListAccessibleEntrancesResponse() { } - -public ListAccessibleEntrancesResponse(List acsEntrances = default) -{ -AcsEntrances = acsEntrances; -} - -/// -/// OK -/// -[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public List AcsEntrances { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. -/// -public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/user_identities/list_accessible_entrances", requestOptions).EnsureData("/user_identities/list_accessible_entrances").AcsEntrances; -} - -/// -/// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. -/// -public List ListAccessibleEntrances(string userIdentityId = default) -{ -return ListAccessibleEntrances(new ListAccessibleEntrancesRequest(userIdentityId: userIdentityId)); -} - -/// -/// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. -/// -public async Task> ListAccessibleEntrancesAsync(ListAccessibleEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/user_identities/list_accessible_entrances", requestOptions)).EnsureData("/user_identities/list_accessible_entrances").AcsEntrances; -} - -/// -/// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. -/// -public async Task> ListAccessibleEntrancesAsync(string userIdentityId = default) -{ -return (await ListAccessibleEntrancesAsync(new ListAccessibleEntrancesRequest(userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for List ACS Systems Associated with a User Identity. -/// -[DataContract(Name = "listAcsSystemsRequest_request")] -public class ListAcsSystemsRequest -{ -[JsonConstructorAttribute] -protected ListAcsSystemsRequest() { } - -public ListAcsSystemsRequest(string userIdentityId = default) -{ -UserIdentityId = userIdentityId; -} - -/// -/// ID of the user identity for which you want to retrieve all access systems. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listAcsSystemsResponse_response")] -public class ListAcsSystemsResponse -{ -[JsonConstructorAttribute] -protected ListAcsSystemsResponse() { } - -public ListAcsSystemsResponse(List acsSystems = default) -{ -AcsSystems = acsSystems; -} - -/// -/// OK -/// -[DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] -public List AcsSystems { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public List ListAcsSystems(ListAcsSystemsRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/user_identities/list_acs_systems", requestOptions).EnsureData("/user_identities/list_acs_systems").AcsSystems; -} - -/// -/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public List ListAcsSystems(string userIdentityId = default) -{ -return ListAcsSystems(new ListAcsSystemsRequest(userIdentityId: userIdentityId)); -} - -/// -/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task> ListAcsSystemsAsync(ListAcsSystemsRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/user_identities/list_acs_systems", requestOptions)).EnsureData("/user_identities/list_acs_systems").AcsSystems; -} - -/// -/// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task> ListAcsSystemsAsync(string userIdentityId = default) -{ -return (await ListAcsSystemsAsync(new ListAcsSystemsRequest(userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for List ACS Users Associated with a User Identity. -/// -[DataContract(Name = "listAcsUsersRequest_request")] -public class ListAcsUsersRequest -{ -[JsonConstructorAttribute] -protected ListAcsUsersRequest() { } - -public ListAcsUsersRequest(string userIdentityId = default) -{ -UserIdentityId = userIdentityId; -} - -/// -/// ID of the user identity for which you want to retrieve all access system users. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listAcsUsersResponse_response")] -public class ListAcsUsersResponse -{ -[JsonConstructorAttribute] -protected ListAcsUsersResponse() { } - -public ListAcsUsersResponse(List acsUsers = default) -{ -AcsUsers = acsUsers; -} - -/// -/// OK -/// -[DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] -public List AcsUsers { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public List ListAcsUsers(ListAcsUsersRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/user_identities/list_acs_users", requestOptions).EnsureData("/user_identities/list_acs_users").AcsUsers; -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public List ListAcsUsers(string userIdentityId = default) -{ -return ListAcsUsers(new ListAcsUsersRequest(userIdentityId: userIdentityId)); -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task> ListAcsUsersAsync(ListAcsUsersRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/user_identities/list_acs_users", requestOptions)).EnsureData("/user_identities/list_acs_users").AcsUsers; -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task> ListAcsUsersAsync(string userIdentityId = default) -{ -return (await ListAcsUsersAsync(new ListAcsUsersRequest(userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for Merge User Identities. -/// -[DataContract(Name = "mergeRequest_request")] -public class MergeRequest -{ -[JsonConstructorAttribute] -protected MergeRequest() { } - -public MergeRequest(List? mergedUserIdentityIds = default, List? mergedUserIdentityKeys = default, string? userIdentityId = default, string? userIdentityKey = default) -{ -MergedUserIdentityIds = mergedUserIdentityIds; -MergedUserIdentityKeys = mergedUserIdentityKeys; -UserIdentityId = userIdentityId; -UserIdentityKey = userIdentityKey; -} - -/// -/// IDs of the user identities to merge into the primary user identity. These user identities are deleted. -/// -[DataMember(Name = "merged_user_identity_ids", IsRequired = false, EmitDefaultValue = false)] -public List? MergedUserIdentityIds { get; set; } - -/// -/// Keys of the user identities to merge into the primary user identity. These user identities are deleted. -/// -[DataMember(Name = "merged_user_identity_keys", IsRequired = false, EmitDefaultValue = false)] -public List? MergedUserIdentityKeys { get; set; } - -/// -/// ID of the primary user identity to keep. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Key of the primary user identity to keep. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. -/// -/// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. -/// -/// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. -/// -/// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. -/// -public void Merge(MergeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/user_identities/merge", requestOptions); -} - -/// -/// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. -/// -/// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. -/// -/// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. -/// -/// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. -/// -public void Merge(List? mergedUserIdentityIds = default, List? mergedUserIdentityKeys = default, string? userIdentityId = default, string? userIdentityKey = default) -{ -Merge(new MergeRequest(mergedUserIdentityIds: mergedUserIdentityIds, mergedUserIdentityKeys: mergedUserIdentityKeys, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} - -/// -/// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. -/// -/// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. -/// -/// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. -/// -/// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. -/// -public async Task MergeAsync(MergeRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/user_identities/merge", requestOptions); -} - -/// -/// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. -/// -/// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. -/// -/// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. -/// -/// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. -/// -public async Task MergeAsync(List? mergedUserIdentityIds = default, List? mergedUserIdentityKeys = default, string? userIdentityId = default, string? userIdentityKey = default) -{ -await MergeAsync(new MergeRequest(mergedUserIdentityIds: mergedUserIdentityIds, mergedUserIdentityKeys: mergedUserIdentityKeys, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} - -/// -/// Request parameters for Remove an ACS User from a User Identity. -/// -[DataContract(Name = "removeAcsUserRequest_request")] -public class RemoveAcsUserRequest -{ -[JsonConstructorAttribute] -protected RemoveAcsUserRequest() { } - -public RemoveAcsUserRequest(string acsUserId = default, string userIdentityId = default) -{ -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system user that you want to remove from the user identity.. -/// -[DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsUserId { get; set; } - -/// -/// ID of the user identity from which you want to remove an access system user. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public void RemoveAcsUser(RemoveAcsUserRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/user_identities/remove_acs_user", requestOptions); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public void RemoveAcsUser(string acsUserId = default, string userIdentityId = default) -{ -RemoveAcsUser(new RemoveAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task RemoveAcsUserAsync(RemoveAcsUserRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/user_identities/remove_acs_user", requestOptions); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task RemoveAcsUserAsync(string acsUserId = default, string userIdentityId = default) -{ -await RemoveAcsUserAsync(new RemoveAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Revoke Access to a Device from a User Identity. -/// -[DataContract(Name = "revokeAccessToDeviceRequest_request")] -public class RevokeAccessToDeviceRequest -{ -[JsonConstructorAttribute] -protected RevokeAccessToDeviceRequest() { } - -public RevokeAccessToDeviceRequest(string deviceId = default, string userIdentityId = default) -{ -DeviceId = deviceId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the managed device to which you want to revoke access from the user identity. -/// -[DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// ID of the user identity from which you want to revoke access to a device. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public void RevokeAccessToDevice(RevokeAccessToDeviceRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/user_identities/revoke_access_to_device", requestOptions); -} - -/// -/// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public void RevokeAccessToDevice(string deviceId = default, string userIdentityId = default) -{ -RevokeAccessToDevice(new RevokeAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId)); -} - -/// -/// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task RevokeAccessToDeviceAsync(RevokeAccessToDeviceRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/user_identities/revoke_access_to_device", requestOptions); -} - -/// -/// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task RevokeAccessToDeviceAsync(string deviceId = default, string userIdentityId = default) -{ -await RevokeAccessToDeviceAsync(new RevokeAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Update a User Identity. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default) -{ -EmailAddress = emailAddress; -FullName = fullName; -PhoneNumber = phoneNumber; -UserIdentityId = userIdentityId; -UserIdentityKey = userIdentityKey; -} - -/// -/// Unique email address for the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Full name of the user associated with the user identity. -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// Unique phone number for the user identity. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// ID of the user identity that you want to update. -/// -[DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -/// -/// Unique key for the user identity. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/user_identities/update", requestOptions); -} - -/// -/// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public void Update(string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default) -{ -Update(new UpdateRequest(emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} - -/// -/// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/user_identities/update", requestOptions); -} - -/// -/// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). -/// -public async Task UpdateAsync(string? emailAddress = default, string? fullName = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default) -{ -await UpdateAsync(new UpdateRequest(emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityId: userIdentityId, userIdentityKey: userIdentityKey)); -} -} + public class UserIdentities + { + private ISeamClient _seam; + + public UserIdentities(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Add an ACS User to a User Identity. + /// + [DataContract(Name = "addAcsUserRequest_request")] + public class AddAcsUserRequest + { + [JsonConstructorAttribute] + protected AddAcsUserRequest() { } + + public AddAcsUserRequest( + string acsUserId = default, + string? userIdentityId = default, + string? userIdentityKey = default + ) + { + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + UserIdentityKey = userIdentityKey; + } + + /// + /// ID of the access system user that you want to add to the user identity. + /// + [DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsUserId { get; set; } + + /// + /// ID of the user identity to which you want to add an access system user. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Key of the user identity to which you want to add an access system user. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + /// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. + /// + /// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. + /// + public void AddAcsUser(AddAcsUserRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Put("/user_identities/add_acs_user", requestOptions); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + /// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. + /// + /// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. + /// + public void AddAcsUser( + string acsUserId = default, + string? userIdentityId = default, + string? userIdentityKey = default + ) + { + AddAcsUser( + new AddAcsUserRequest( + acsUserId: acsUserId, + userIdentityId: userIdentityId, + userIdentityKey: userIdentityKey + ) + ); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + /// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. + /// + /// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. + /// + public async Task AddAcsUserAsync(AddAcsUserRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PutAsync("/user_identities/add_acs_user", requestOptions); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + /// You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. + /// + /// If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. + /// + public async Task AddAcsUserAsync( + string acsUserId = default, + string? userIdentityId = default, + string? userIdentityKey = default + ) + { + await AddAcsUserAsync( + new AddAcsUserRequest( + acsUserId: acsUserId, + userIdentityId: userIdentityId, + userIdentityKey: userIdentityKey + ) + ); + } + + /// + /// Request parameters for Create a User Identity. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + List? acsSystemIds = default, + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default, + string? userIdentityKey = default + ) + { + AcsSystemIds = acsSystemIds; + EmailAddress = emailAddress; + FullName = fullName; + PhoneNumber = phoneNumber; + UserIdentityKey = userIdentityKey; + } + + /// + /// List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. + /// + [DataMember(Name = "acs_system_ids", IsRequired = false, EmitDefaultValue = false)] + public List? AcsSystemIds { get; set; } + + /// + /// Unique email address for the new user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Full name of the user associated with the new user identity. + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// Unique phone number for the new user identity in E.164 format (for example, +15555550100). + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Unique key for the new user identity. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(UserIdentity userIdentity = default) + { + UserIdentity = userIdentity; + } + + /// + /// OK + /// + [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] + public UserIdentity UserIdentity { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public UserIdentity Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/user_identities/create", requestOptions) + .EnsureData("/user_identities/create") + .UserIdentity; + } + + /// + /// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public UserIdentity Create( + List? acsSystemIds = default, + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default, + string? userIdentityKey = default + ) + { + return Create( + new CreateRequest( + acsSystemIds: acsSystemIds, + emailAddress: emailAddress, + fullName: fullName, + phoneNumber: phoneNumber, + userIdentityKey: userIdentityKey + ) + ); + } + + /// + /// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync("/user_identities/create", requestOptions) + ) + .EnsureData("/user_identities/create") + .UserIdentity; + } + + /// + /// Creates a new [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task CreateAsync( + List? acsSystemIds = default, + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default, + string? userIdentityKey = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + acsSystemIds: acsSystemIds, + emailAddress: emailAddress, + fullName: fullName, + phoneNumber: phoneNumber, + userIdentityKey: userIdentityKey + ) + ) + ); + } + + /// + /// Request parameters for Delete a User Identity. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string userIdentityId = default) + { + UserIdentityId = userIdentityId; + } + + /// + /// ID of the user identity that you want to delete. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/user_identities/delete", requestOptions); + } + + /// + /// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). + /// + public void Delete(string userIdentityId = default) + { + Delete(new DeleteRequest(userIdentityId: userIdentityId)); + } + + /// + /// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/user_identities/delete", requestOptions); + } + + /// + /// Deletes a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://www.seam.co/docs/api/acs/credentials/object), [acs users](https://www.seam.co/docs/api/acs/users/object) and [client sessions](https://www.seam.co/docs/api/client_sessions/object). + /// + public async Task DeleteAsync(string userIdentityId = default) + { + await DeleteAsync(new DeleteRequest(userIdentityId: userIdentityId)); + } + + /// + /// Request parameters for Generate an Instant Key. + /// + [DataContract(Name = "generateInstantKeyRequest_request")] + public class GenerateInstantKeyRequest + { + [JsonConstructorAttribute] + protected GenerateInstantKeyRequest() { } + + public GenerateInstantKeyRequest( + string? customizationProfileId = default, + float? maxUseCount = default, + string userIdentityId = default + ) + { + CustomizationProfileId = customizationProfileId; + MaxUseCount = maxUseCount; + UserIdentityId = userIdentityId; + } + + [DataMember( + Name = "customization_profile_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomizationProfileId { get; set; } + + /// + /// Maximum number of times the instant key can be used. Default: 1. + /// + [DataMember(Name = "max_use_count", IsRequired = false, EmitDefaultValue = false)] + public float? MaxUseCount { get; set; } + + /// + /// ID of the user identity for which you want to generate an instant key. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "generateInstantKeyResponse_response")] + public class GenerateInstantKeyResponse + { + [JsonConstructorAttribute] + protected GenerateInstantKeyResponse() { } + + public GenerateInstantKeyResponse(InstantKey instantKey = default) + { + InstantKey = instantKey; + } + + /// + /// OK + /// + [DataMember(Name = "instant_key", IsRequired = false, EmitDefaultValue = false)] + public InstantKey InstantKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public InstantKey GenerateInstantKey(GenerateInstantKeyRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post( + "/user_identities/generate_instant_key", + requestOptions + ) + .EnsureData("/user_identities/generate_instant_key") + .InstantKey; + } + + /// + /// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public InstantKey GenerateInstantKey( + string? customizationProfileId = default, + float? maxUseCount = default, + string userIdentityId = default + ) + { + return GenerateInstantKey( + new GenerateInstantKeyRequest( + customizationProfileId: customizationProfileId, + maxUseCount: maxUseCount, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task GenerateInstantKeyAsync(GenerateInstantKeyRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/user_identities/generate_instant_key", + requestOptions + ) + ) + .EnsureData("/user_identities/generate_instant_key") + .InstantKey; + } + + /// + /// Generates a new [instant key](https://www.seam.co/docs/use-cases/granting-access/using-instant-keys) for a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task GenerateInstantKeyAsync( + string? customizationProfileId = default, + float? maxUseCount = default, + string userIdentityId = default + ) + { + return ( + await GenerateInstantKeyAsync( + new GenerateInstantKeyRequest( + customizationProfileId: customizationProfileId, + maxUseCount: maxUseCount, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for Get a User Identity. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string? userIdentityId = default, string? userIdentityKey = default) + { + UserIdentityId = userIdentityId; + UserIdentityKey = userIdentityKey; + } + + /// + /// ID of the user identity that you want to get. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(UserIdentity userIdentity = default) + { + UserIdentity = userIdentity; + } + + /// + /// OK + /// + [DataMember(Name = "user_identity", IsRequired = false, EmitDefaultValue = false)] + public UserIdentity UserIdentity { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public UserIdentity Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/user_identities/get", requestOptions) + .EnsureData("/user_identities/get") + .UserIdentity; + } + + /// + /// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public UserIdentity Get(string? userIdentityId = default, string? userIdentityKey = default) + { + return Get( + new GetRequest(userIdentityId: userIdentityId, userIdentityKey: userIdentityKey) + ); + } + + /// + /// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/user_identities/get", requestOptions)) + .EnsureData("/user_identities/get") + .UserIdentity; + } + + /// + /// Returns a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task GetAsync( + string? userIdentityId = default, + string? userIdentityKey = default + ) + { + return ( + await GetAsync( + new GetRequest(userIdentityId: userIdentityId, userIdentityKey: userIdentityKey) + ) + ); + } + + /// + /// Request parameters for Grant a User Identity Access to a Device. + /// + [DataContract(Name = "grantAccessToDeviceRequest_request")] + public class GrantAccessToDeviceRequest + { + [JsonConstructorAttribute] + protected GrantAccessToDeviceRequest() { } + + public GrantAccessToDeviceRequest( + string deviceId = default, + string userIdentityId = default + ) + { + DeviceId = deviceId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the managed device to which you want to grant access to the user identity. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// ID of the user identity that you want to grant access to a device. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + public void GrantAccessToDevice(GrantAccessToDeviceRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Put("/user_identities/grant_access_to_device", requestOptions); + } + + /// + /// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + public void GrantAccessToDevice(string deviceId = default, string userIdentityId = default) + { + GrantAccessToDevice( + new GrantAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId) + ); + } + + /// + /// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + public async Task GrantAccessToDeviceAsync(GrantAccessToDeviceRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PutAsync("/user_identities/grant_access_to_device", requestOptions); + } + + /// + /// Grants a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://www.seam.co/docs/core-concepts/devices). + /// + public async Task GrantAccessToDeviceAsync( + string deviceId = default, + string userIdentityId = default + ) + { + await GrantAccessToDeviceAsync( + new GrantAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId) + ); + } + + /// + /// Request parameters for List User Identities. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? createdBefore = default, + string? credentialManagerAcsSystemId = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + List? userIdentityIds = default + ) + { + CreatedBefore = createdBefore; + CredentialManagerAcsSystemId = credentialManagerAcsSystemId; + Limit = limit; + PageCursor = pageCursor; + Search = search; + UserIdentityIds = userIdentityIds; + } + + /// + /// Timestamp by which to limit returned user identities. Returns user identities created before this timestamp. + /// + [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedBefore { get; set; } + + /// + /// `acs_system_id` of the credential manager by which you want to filter the list of user identities. + /// + [DataMember( + Name = "credential_manager_acs_system_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CredentialManagerAcsSystemId { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public int? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address` or `user_identity_id`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// Array of user identity IDs by which to filter the list of user identities. + /// + [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] + public List? UserIdentityIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List userIdentities = default) + { + UserIdentities = userIdentities; + } + + /// + /// OK + /// + [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] + public List UserIdentities { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/user_identities/list", requestOptions) + .EnsureData("/user_identities/list") + .UserIdentities; + } + + /// + /// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public List List( + string? createdBefore = default, + string? credentialManagerAcsSystemId = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + List? userIdentityIds = default + ) + { + return List( + new ListRequest( + createdBefore: createdBefore, + credentialManagerAcsSystemId: credentialManagerAcsSystemId, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentityIds: userIdentityIds + ) + ); + } + + /// + /// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/user_identities/list", requestOptions)) + .EnsureData("/user_identities/list") + .UserIdentities; + } + + /// + /// Returns a list of all [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task> ListAsync( + string? createdBefore = default, + string? credentialManagerAcsSystemId = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + List? userIdentityIds = default + ) + { + return ( + await ListAsync( + new ListRequest( + createdBefore: createdBefore, + credentialManagerAcsSystemId: credentialManagerAcsSystemId, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentityIds: userIdentityIds + ) + ) + ); + } + + /// + /// Request parameters for List Accessible Devices for a User Identity. + /// + [DataContract(Name = "listAccessibleDevicesRequest_request")] + public class ListAccessibleDevicesRequest + { + [JsonConstructorAttribute] + protected ListAccessibleDevicesRequest() { } + + public ListAccessibleDevicesRequest(string userIdentityId = default) + { + UserIdentityId = userIdentityId; + } + + /// + /// ID of the user identity for which you want to retrieve all accessible devices. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listAccessibleDevicesResponse_response")] + public class ListAccessibleDevicesResponse + { + [JsonConstructorAttribute] + protected ListAccessibleDevicesResponse() { } + + public ListAccessibleDevicesResponse(List devices = default) + { + Devices = devices; + } + + /// + /// OK + /// + [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] + public List Devices { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. + /// + public List ListAccessibleDevices(ListAccessibleDevicesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get( + "/user_identities/list_accessible_devices", + requestOptions + ) + .EnsureData("/user_identities/list_accessible_devices") + .Devices; + } + + /// + /// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. + /// + public List ListAccessibleDevices(string userIdentityId = default) + { + return ListAccessibleDevices( + new ListAccessibleDevicesRequest(userIdentityId: userIdentityId) + ); + } + + /// + /// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. + /// + public async Task> ListAccessibleDevicesAsync( + ListAccessibleDevicesRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/user_identities/list_accessible_devices", + requestOptions + ) + ) + .EnsureData("/user_identities/list_accessible_devices") + .Devices; + } + + /// + /// Returns a list of all [devices](https://www.seam.co/docs/core-concepts/devices) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. + /// + public async Task> ListAccessibleDevicesAsync(string userIdentityId = default) + { + return ( + await ListAccessibleDevicesAsync( + new ListAccessibleDevicesRequest(userIdentityId: userIdentityId) + ) + ); + } + + /// + /// Request parameters for List Accessible Entrances for a User Identity. + /// + [DataContract(Name = "listAccessibleEntrancesRequest_request")] + public class ListAccessibleEntrancesRequest + { + [JsonConstructorAttribute] + protected ListAccessibleEntrancesRequest() { } + + public ListAccessibleEntrancesRequest(string userIdentityId = default) + { + UserIdentityId = userIdentityId; + } + + /// + /// ID of the user identity for which you want to retrieve all accessible entrances. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listAccessibleEntrancesResponse_response")] + public class ListAccessibleEntrancesResponse + { + [JsonConstructorAttribute] + protected ListAccessibleEntrancesResponse() { } + + public ListAccessibleEntrancesResponse(List acsEntrances = default) + { + AcsEntrances = acsEntrances; + } + + /// + /// OK + /// + [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] + public List AcsEntrances { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. + /// + public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get( + "/user_identities/list_accessible_entrances", + requestOptions + ) + .EnsureData("/user_identities/list_accessible_entrances") + .AcsEntrances; + } + + /// + /// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. + /// + public List ListAccessibleEntrances(string userIdentityId = default) + { + return ListAccessibleEntrances( + new ListAccessibleEntrancesRequest(userIdentityId: userIdentityId) + ); + } + + /// + /// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. + /// + public async Task> ListAccessibleEntrancesAsync( + ListAccessibleEntrancesRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/user_identities/list_accessible_entrances", + requestOptions + ) + ) + .EnsureData("/user_identities/list_accessible_entrances") + .AcsEntrances; + } + + /// + /// Returns a list of all [ACS entrances](https://www.seam.co/docs/api/acs/entrances/object) accessible to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. + /// + public async Task> ListAccessibleEntrancesAsync( + string userIdentityId = default + ) + { + return ( + await ListAccessibleEntrancesAsync( + new ListAccessibleEntrancesRequest(userIdentityId: userIdentityId) + ) + ); + } + + /// + /// Request parameters for List ACS Systems Associated with a User Identity. + /// + [DataContract(Name = "listAcsSystemsRequest_request")] + public class ListAcsSystemsRequest + { + [JsonConstructorAttribute] + protected ListAcsSystemsRequest() { } + + public ListAcsSystemsRequest(string userIdentityId = default) + { + UserIdentityId = userIdentityId; + } + + /// + /// ID of the user identity for which you want to retrieve all access systems. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listAcsSystemsResponse_response")] + public class ListAcsSystemsResponse + { + [JsonConstructorAttribute] + protected ListAcsSystemsResponse() { } + + public ListAcsSystemsResponse(List acsSystems = default) + { + AcsSystems = acsSystems; + } + + /// + /// OK + /// + [DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] + public List AcsSystems { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public List ListAcsSystems(ListAcsSystemsRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/user_identities/list_acs_systems", requestOptions) + .EnsureData("/user_identities/list_acs_systems") + .AcsSystems; + } + + /// + /// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public List ListAcsSystems(string userIdentityId = default) + { + return ListAcsSystems(new ListAcsSystemsRequest(userIdentityId: userIdentityId)); + } + + /// + /// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task> ListAcsSystemsAsync(ListAcsSystemsRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/user_identities/list_acs_systems", + requestOptions + ) + ) + .EnsureData("/user_identities/list_acs_systems") + .AcsSystems; + } + + /// + /// Returns a list of all [access systems](https://www.seam.co/docs/low-level-apis/access-systems) associated with a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task> ListAcsSystemsAsync(string userIdentityId = default) + { + return ( + await ListAcsSystemsAsync(new ListAcsSystemsRequest(userIdentityId: userIdentityId)) + ); + } + + /// + /// Request parameters for List ACS Users Associated with a User Identity. + /// + [DataContract(Name = "listAcsUsersRequest_request")] + public class ListAcsUsersRequest + { + [JsonConstructorAttribute] + protected ListAcsUsersRequest() { } + + public ListAcsUsersRequest(string userIdentityId = default) + { + UserIdentityId = userIdentityId; + } + + /// + /// ID of the user identity for which you want to retrieve all access system users. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listAcsUsersResponse_response")] + public class ListAcsUsersResponse + { + [JsonConstructorAttribute] + protected ListAcsUsersResponse() { } + + public ListAcsUsersResponse(List acsUsers = default) + { + AcsUsers = acsUsers; + } + + /// + /// OK + /// + [DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] + public List AcsUsers { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public List ListAcsUsers(ListAcsUsersRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/user_identities/list_acs_users", requestOptions) + .EnsureData("/user_identities/list_acs_users") + .AcsUsers; + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public List ListAcsUsers(string userIdentityId = default) + { + return ListAcsUsers(new ListAcsUsersRequest(userIdentityId: userIdentityId)); + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task> ListAcsUsersAsync(ListAcsUsersRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/user_identities/list_acs_users", + requestOptions + ) + ) + .EnsureData("/user_identities/list_acs_users") + .AcsUsers; + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task> ListAcsUsersAsync(string userIdentityId = default) + { + return ( + await ListAcsUsersAsync(new ListAcsUsersRequest(userIdentityId: userIdentityId)) + ); + } + + /// + /// Request parameters for Merge User Identities. + /// + [DataContract(Name = "mergeRequest_request")] + public class MergeRequest + { + [JsonConstructorAttribute] + protected MergeRequest() { } + + public MergeRequest( + List? mergedUserIdentityIds = default, + List? mergedUserIdentityKeys = default, + string? userIdentityId = default, + string? userIdentityKey = default + ) + { + MergedUserIdentityIds = mergedUserIdentityIds; + MergedUserIdentityKeys = mergedUserIdentityKeys; + UserIdentityId = userIdentityId; + UserIdentityKey = userIdentityKey; + } + + /// + /// IDs of the user identities to merge into the primary user identity. These user identities are deleted. + /// + [DataMember( + Name = "merged_user_identity_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? MergedUserIdentityIds { get; set; } + + /// + /// Keys of the user identities to merge into the primary user identity. These user identities are deleted. + /// + [DataMember( + Name = "merged_user_identity_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List? MergedUserIdentityKeys { get; set; } + + /// + /// ID of the primary user identity to keep. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Key of the primary user identity to keep. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. + /// + /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. + /// + /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. + /// + /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. + /// + public void Merge(MergeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/user_identities/merge", requestOptions); + } + + /// + /// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. + /// + /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. + /// + /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. + /// + /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. + /// + public void Merge( + List? mergedUserIdentityIds = default, + List? mergedUserIdentityKeys = default, + string? userIdentityId = default, + string? userIdentityKey = default + ) + { + Merge( + new MergeRequest( + mergedUserIdentityIds: mergedUserIdentityIds, + mergedUserIdentityKeys: mergedUserIdentityKeys, + userIdentityId: userIdentityId, + userIdentityKey: userIdentityKey + ) + ); + } + + /// + /// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. + /// + /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. + /// + /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. + /// + /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. + /// + public async Task MergeAsync(MergeRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/user_identities/merge", requestOptions); + } + + /// + /// Merges one or more [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity. + /// + /// The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`. + /// + /// Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity. + /// + /// Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes. + /// + public async Task MergeAsync( + List? mergedUserIdentityIds = default, + List? mergedUserIdentityKeys = default, + string? userIdentityId = default, + string? userIdentityKey = default + ) + { + await MergeAsync( + new MergeRequest( + mergedUserIdentityIds: mergedUserIdentityIds, + mergedUserIdentityKeys: mergedUserIdentityKeys, + userIdentityId: userIdentityId, + userIdentityKey: userIdentityKey + ) + ); + } + + /// + /// Request parameters for Remove an ACS User from a User Identity. + /// + [DataContract(Name = "removeAcsUserRequest_request")] + public class RemoveAcsUserRequest + { + [JsonConstructorAttribute] + protected RemoveAcsUserRequest() { } + + public RemoveAcsUserRequest(string acsUserId = default, string userIdentityId = default) + { + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system user that you want to remove from the user identity.. + /// + [DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsUserId { get; set; } + + /// + /// ID of the user identity from which you want to remove an access system user. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public void RemoveAcsUser(RemoveAcsUserRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/user_identities/remove_acs_user", requestOptions); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public void RemoveAcsUser(string acsUserId = default, string userIdentityId = default) + { + RemoveAcsUser( + new RemoveAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId) + ); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task RemoveAcsUserAsync(RemoveAcsUserRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/user_identities/remove_acs_user", requestOptions); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task RemoveAcsUserAsync( + string acsUserId = default, + string userIdentityId = default + ) + { + await RemoveAcsUserAsync( + new RemoveAcsUserRequest(acsUserId: acsUserId, userIdentityId: userIdentityId) + ); + } + + /// + /// Request parameters for Revoke Access to a Device from a User Identity. + /// + [DataContract(Name = "revokeAccessToDeviceRequest_request")] + public class RevokeAccessToDeviceRequest + { + [JsonConstructorAttribute] + protected RevokeAccessToDeviceRequest() { } + + public RevokeAccessToDeviceRequest( + string deviceId = default, + string userIdentityId = default + ) + { + DeviceId = deviceId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the managed device to which you want to revoke access from the user identity. + /// + [DataMember(Name = "device_id", IsRequired = true, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// ID of the user identity from which you want to revoke access to a device. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public void RevokeAccessToDevice(RevokeAccessToDeviceRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/user_identities/revoke_access_to_device", requestOptions); + } + + /// + /// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public void RevokeAccessToDevice(string deviceId = default, string userIdentityId = default) + { + RevokeAccessToDevice( + new RevokeAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId) + ); + } + + /// + /// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task RevokeAccessToDeviceAsync(RevokeAccessToDeviceRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync( + "/user_identities/revoke_access_to_device", + requestOptions + ); + } + + /// + /// Revokes access to a specified [device](https://www.seam.co/docs/core-concepts/devices) from a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task RevokeAccessToDeviceAsync( + string deviceId = default, + string userIdentityId = default + ) + { + await RevokeAccessToDeviceAsync( + new RevokeAccessToDeviceRequest(deviceId: deviceId, userIdentityId: userIdentityId) + ); + } + + /// + /// Request parameters for Update a User Identity. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default, + string userIdentityId = default, + string? userIdentityKey = default + ) + { + EmailAddress = emailAddress; + FullName = fullName; + PhoneNumber = phoneNumber; + UserIdentityId = userIdentityId; + UserIdentityKey = userIdentityKey; + } + + /// + /// Unique email address for the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Full name of the user associated with the user identity. + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// Unique phone number for the user identity. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// ID of the user identity that you want to update. + /// + [DataMember(Name = "user_identity_id", IsRequired = true, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + /// + /// Unique key for the user identity. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/user_identities/update", requestOptions); + } + + /// + /// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public void Update( + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default, + string userIdentityId = default, + string? userIdentityKey = default + ) + { + Update( + new UpdateRequest( + emailAddress: emailAddress, + fullName: fullName, + phoneNumber: phoneNumber, + userIdentityId: userIdentityId, + userIdentityKey: userIdentityKey + ) + ); + } + + /// + /// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/user_identities/update", requestOptions); + } + + /// + /// Updates a specified [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + /// + public async Task UpdateAsync( + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default, + string userIdentityId = default, + string? userIdentityKey = default + ) + { + await UpdateAsync( + new UpdateRequest( + emailAddress: emailAddress, + fullName: fullName, + phoneNumber: phoneNumber, + userIdentityId: userIdentityId, + userIdentityKey: userIdentityKey + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.UserIdentities UserIdentities => new(this); -} + public partial class SeamClient + { + public Api.UserIdentities UserIdentities => new(this); + } -public partial interface ISeamClient -{ -public Api.UserIdentities UserIdentities { get; } -} + public partial interface ISeamClient + { + public Api.UserIdentities UserIdentities { get; } + } } diff --git a/src/Seam/Api/UsersAcs.cs b/src/Seam/Api/UsersAcs.cs index 441357c2..8d2033a3 100644 --- a/src/Seam/Api/UsersAcs.cs +++ b/src/Seam/Api/UsersAcs.cs @@ -9,1353 +9,1742 @@ namespace Seam.Api { -public class UsersAcs -{ -private ISeamClient _seam; - -public UsersAcs(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Add an ACS User to an Access Group. -/// -[DataContract(Name = "addToAccessGroupRequest_request")] -public class AddToAccessGroupRequest -{ -[JsonConstructorAttribute] -protected AddToAccessGroupRequest() { } - -public AddToAccessGroupRequest(string acsAccessGroupId = default, string acsUserId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -AcsUserId = acsUserId; -} - -/// -/// ID of the access group to which you want to add an access system user. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -/// -/// ID of the access system user that you want to add to an access group. -/// -[DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsUserId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void AddToAccessGroup(AddToAccessGroupRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Put("/acs/users/add_to_access_group", requestOptions); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void AddToAccessGroup(string acsAccessGroupId = default, string acsUserId = default) -{ -AddToAccessGroup(new AddToAccessGroupRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId)); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task AddToAccessGroupAsync(AddToAccessGroupRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PutAsync("/acs/users/add_to_access_group", requestOptions); -} - -/// -/// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task AddToAccessGroupAsync(string acsAccessGroupId = default, string acsUserId = default) -{ -await AddToAccessGroupAsync(new AddToAccessGroupRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId)); -} - -/// -/// Request parameters for Create an ACS User. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(CreateRequestAccessSchedule? accessSchedule = default, List? acsAccessGroupIds = default, string acsSystemId = default, string? email = default, string? emailAddress = default, string fullName = default, string? phoneNumber = default, string? userIdentityId = default) -{ -AccessSchedule = accessSchedule; -AcsAccessGroupIds = acsAccessGroupIds; -AcsSystemId = acsSystemId; -Email = email; -EmailAddress = emailAddress; -FullName = fullName; -PhoneNumber = phoneNumber; -UserIdentityId = userIdentityId; -} - -/// -/// `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestAccessSchedule? AccessSchedule { get; set; } - -/// -/// Array of access group IDs to indicate the access groups to which you want to add the new access system user. -/// -[DataMember(Name = "acs_access_group_ids", IsRequired = false, EmitDefaultValue = false)] -public List? AcsAccessGroupIds { get; set; } - -/// -/// ID of the access system to which you want to add the new access system user. -/// -[DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -[Obsolete("use email_address.")] -[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] -public string? Email { get; set; } - -/// -/// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Full name of the new access system user. -/// -[DataMember(Name = "full_name", IsRequired = true, EmitDefaultValue = false)] -public string FullName { get; set; } - -/// -/// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// ID of the user identity with which you want to associate the new access system user. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestAccessSchedule_model")] -public class CreateRequestAccessSchedule -{ -[JsonConstructorAttribute] -protected CreateRequestAccessSchedule() { } - -public CreateRequestAccessSchedule(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Ending timestamp for the new access system user's access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Starting timestamp for the new access system user's access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(AcsUser acsUser = default) -{ -AcsUser = acsUser; -} - -/// -/// OK -/// -[DataMember(Name = "acs_user", IsRequired = false, EmitDefaultValue = false)] -public AcsUser AcsUser { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public AcsUser Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/acs/users/create", requestOptions).EnsureData("/acs/users/create").AcsUser; -} - -/// -/// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public AcsUser Create(CreateRequestAccessSchedule? accessSchedule = default, List? acsAccessGroupIds = default, string acsSystemId = default, string? email = default, string? emailAddress = default, string fullName = default, string? phoneNumber = default, string? userIdentityId = default) -{ -return Create(new CreateRequest(accessSchedule: accessSchedule, acsAccessGroupIds: acsAccessGroupIds, acsSystemId: acsSystemId, email: email, emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityId: userIdentityId)); -} - -/// -/// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/acs/users/create", requestOptions)).EnsureData("/acs/users/create").AcsUser; -} - -/// -/// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task CreateAsync(CreateRequestAccessSchedule? accessSchedule = default, List? acsAccessGroupIds = default, string acsSystemId = default, string? email = default, string? emailAddress = default, string fullName = default, string? phoneNumber = default, string? userIdentityId = default) -{ -return (await CreateAsync(new CreateRequest(accessSchedule: accessSchedule, acsAccessGroupIds: acsAccessGroupIds, acsSystemId: acsSystemId, email: email, emailAddress: emailAddress, fullName: fullName, phoneNumber: phoneNumber, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for Delete an ACS User. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user that you want to delete. You must provide either acs_user_id or user_identity_id -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity that you want to delete. You must provide either acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/acs/users/delete", requestOptions); -} - -/// -/// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public void Delete(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -Delete(new DeleteRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/acs/users/delete", requestOptions); -} - -/// -/// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -public async Task DeleteAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await DeleteAsync(new DeleteRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Get an ACS User. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user that you want to get. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity that you want to get. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(AcsUser acsUser = default) -{ -AcsUser = acsUser; -} - -/// -/// OK -/// -[DataMember(Name = "acs_user", IsRequired = false, EmitDefaultValue = false)] -public AcsUser AcsUser { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public AcsUser Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/users/get", requestOptions).EnsureData("/acs/users/get").AcsUser; -} - -/// -/// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public AcsUser Get(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -return Get(new GetRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/users/get", requestOptions)).EnsureData("/acs/users/get").AcsUser; -} - -/// -/// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task GetAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -return (await GetAsync(new GetRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for List ACS Users. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -protected ListRequest() { } - -public ListRequest(string? acsSystemId = default, string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default, string? userIdentityEmailAddress = default, string? userIdentityId = default, string? userIdentityPhoneNumber = default) -{ -AcsSystemId = acsSystemId; -CreatedBefore = createdBefore; -Limit = limit; -PageCursor = pageCursor; -Search = search; -UserIdentityEmailAddress = userIdentityEmailAddress; -UserIdentityId = userIdentityId; -UserIdentityPhoneNumber = userIdentityPhoneNumber; -} - -/// -/// ID of the `acs_system` for which you want to retrieve all access system users. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// Timestamp by which to limit returned access system users. Returns users created before this timestamp. -/// -[DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedBefore { get; set; } - -/// -/// Maximum number of records to return per page. -/// -[DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] -public int? Limit { get; set; } - -/// -/// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. -/// -[DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] -public string? PageCursor { get; set; } - -/// -/// String for which to search. Filters returned access system users to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `acs_user_id`, `user_identity_id`, `user_identity_full_name` or `user_identity_phone_number`. -/// -[DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] -public string? Search { get; set; } - -/// -/// Email address of the user identity for which you want to retrieve all access system users. Specify `null` to retrieve access system users whose user identity has no email address. -/// -[DataMember(Name = "user_identity_email_address", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityEmailAddress { get; set; } - -/// -/// ID of the user identity for which you want to retrieve all access system users. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`). Specify `null` to retrieve access system users whose user identity has no phone number. -/// -[DataMember(Name = "user_identity_phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityPhoneNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List acsUsers = default) -{ -AcsUsers = acsUsers; -} - -/// -/// OK -/// -[DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] -public List AcsUsers { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/users/list", requestOptions).EnsureData("/acs/users/list").AcsUsers; -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public List List(string? acsSystemId = default, string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default, string? userIdentityEmailAddress = default, string? userIdentityId = default, string? userIdentityPhoneNumber = default) -{ -return List(new ListRequest(acsSystemId: acsSystemId, createdBefore: createdBefore, limit: limit, pageCursor: pageCursor, search: search, userIdentityEmailAddress: userIdentityEmailAddress, userIdentityId: userIdentityId, userIdentityPhoneNumber: userIdentityPhoneNumber)); -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/users/list", requestOptions)).EnsureData("/acs/users/list").AcsUsers; -} - -/// -/// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task> ListAsync(string? acsSystemId = default, string? createdBefore = default, int? limit = default, string? pageCursor = default, string? search = default, string? userIdentityEmailAddress = default, string? userIdentityId = default, string? userIdentityPhoneNumber = default) -{ -return (await ListAsync(new ListRequest(acsSystemId: acsSystemId, createdBefore: createdBefore, limit: limit, pageCursor: pageCursor, search: search, userIdentityEmailAddress: userIdentityEmailAddress, userIdentityId: userIdentityId, userIdentityPhoneNumber: userIdentityPhoneNumber))); -} - -/// -/// Request parameters for List ACS User-Accessible Entrances. -/// -[DataContract(Name = "listAccessibleEntrancesRequest_request")] -public class ListAccessibleEntrancesRequest -{ -[JsonConstructorAttribute] -protected ListAccessibleEntrancesRequest() { } - -public ListAccessibleEntrancesRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listAccessibleEntrancesResponse_response")] -public class ListAccessibleEntrancesResponse -{ -[JsonConstructorAttribute] -protected ListAccessibleEntrancesResponse() { } - -public ListAccessibleEntrancesResponse(List acsEntrances = default) -{ -AcsEntrances = acsEntrances; -} - -/// -/// OK -/// -[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public List AcsEntrances { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. -/// -public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/acs/users/list_accessible_entrances", requestOptions).EnsureData("/acs/users/list_accessible_entrances").AcsEntrances; -} - -/// -/// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. -/// -public List ListAccessibleEntrances(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -return ListAccessibleEntrances(new ListAccessibleEntrancesRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. -/// -public async Task> ListAccessibleEntrancesAsync(ListAccessibleEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/acs/users/list_accessible_entrances", requestOptions)).EnsureData("/acs/users/list_accessible_entrances").AcsEntrances; -} - -/// -/// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. -/// -public async Task> ListAccessibleEntrancesAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -return (await ListAccessibleEntrancesAsync(new ListAccessibleEntrancesRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId))); -} - -/// -/// Request parameters for Remove an ACS User from an Access Group. -/// -[DataContract(Name = "removeFromAccessGroupRequest_request")] -public class RemoveFromAccessGroupRequest -{ -[JsonConstructorAttribute] -protected RemoveFromAccessGroupRequest() { } - -public RemoveFromAccessGroupRequest(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access group from which you want to remove an access system user. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -/// -/// ID of the access system user that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void RemoveFromAccessGroup(RemoveFromAccessGroupRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/acs/users/remove_from_access_group", requestOptions); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public void RemoveFromAccessGroup(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -RemoveFromAccessGroup(new RemoveFromAccessGroupRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task RemoveFromAccessGroupAsync(RemoveFromAccessGroupRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/acs/users/remove_from_access_group", requestOptions); -} - -/// -/// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). -/// -public async Task RemoveFromAccessGroupAsync(string acsAccessGroupId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await RemoveFromAccessGroupAsync(new RemoveFromAccessGroupRequest(acsAccessGroupId: acsAccessGroupId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Revoke ACS User Access to All Entrances. -/// -[DataContract(Name = "revokeAccessToAllEntrancesRequest_request")] -public class RevokeAccessToAllEntrancesRequest -{ -[JsonConstructorAttribute] -protected RevokeAccessToAllEntrancesRequest() { } - -public RevokeAccessToAllEntrancesRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public void RevokeAccessToAllEntrances(RevokeAccessToAllEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/users/revoke_access_to_all_entrances", requestOptions); -} - -/// -/// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public void RevokeAccessToAllEntrances(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -RevokeAccessToAllEntrances(new RevokeAccessToAllEntrancesRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task RevokeAccessToAllEntrancesAsync(RevokeAccessToAllEntrancesRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/users/revoke_access_to_all_entrances", requestOptions); -} - -/// -/// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task RevokeAccessToAllEntrancesAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await RevokeAccessToAllEntrancesAsync(new RevokeAccessToAllEntrancesRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Suspend an ACS User. -/// -[DataContract(Name = "suspendRequest_request")] -public class SuspendRequest -{ -[JsonConstructorAttribute] -protected SuspendRequest() { } - -public SuspendRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. -/// -public void Suspend(SuspendRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/users/suspend", requestOptions); -} - -/// -/// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. -/// -public void Suspend(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -Suspend(new SuspendRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. -/// -public async Task SuspendAsync(SuspendRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/users/suspend", requestOptions); -} - -/// -/// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. -/// -public async Task SuspendAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await SuspendAsync(new SuspendRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Unsuspend an ACS User. -/// -[DataContract(Name = "unsuspendRequest_request")] -public class UnsuspendRequest -{ -[JsonConstructorAttribute] -protected UnsuspendRequest() { } - -public UnsuspendRequest(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -UserIdentityId = userIdentityId; -} - -/// -/// ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// ID of the user identity that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. -/// -public void Unsuspend(UnsuspendRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Post("/acs/users/unsuspend", requestOptions); -} - -/// -/// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. -/// -public void Unsuspend(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -Unsuspend(new UnsuspendRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. -/// -public async Task UnsuspendAsync(UnsuspendRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PostAsync("/acs/users/unsuspend", requestOptions); -} - -/// -/// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. -/// -public async Task UnsuspendAsync(string? acsSystemId = default, string? acsUserId = default, string? userIdentityId = default) -{ -await UnsuspendAsync(new UnsuspendRequest(acsSystemId: acsSystemId, acsUserId: acsUserId, userIdentityId: userIdentityId)); -} - -/// -/// Request parameters for Update an ACS User. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(UpdateRequestAccessSchedule? accessSchedule = default, string? acsSystemId = default, string? acsUserId = default, string? email = default, string? emailAddress = default, string? fullName = default, string? hidAcsSystemId = default, string? phoneNumber = default, string? userIdentityId = default) -{ -AccessSchedule = accessSchedule; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -Email = email; -EmailAddress = emailAddress; -FullName = fullName; -HidAcsSystemId = hidAcsSystemId; -PhoneNumber = phoneNumber; -UserIdentityId = userIdentityId; -} - -/// -/// `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] -public UpdateRequestAccessSchedule? AccessSchedule { get; set; } - -/// -/// ID of the access system that you want to update. You can only provide acs_system_id with user_identity_id. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsSystemId { get; set; } - -/// -/// ID of the access system user that you want to update. You can only provide acs_user_id or user_identity_id. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -[Obsolete("use email_address.")] -[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] -public string? Email { get; set; } - -/// -/// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Full name of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// ID of the HID access control system associated with the user. -/// -[DataMember(Name = "hid_acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? HidAcsSystemId { get; set; } - -/// -/// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// ID of the user identity that you want to update. You can only provide acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateRequestAccessSchedule_model")] -public class UpdateRequestAccessSchedule -{ -[JsonConstructorAttribute] -protected UpdateRequestAccessSchedule() { } - -public UpdateRequestAccessSchedule(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Ending timestamp for the access system user's access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Starting timestamp for the access system user's access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/acs/users/update", requestOptions); -} - -/// -/// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public void Update(UpdateRequestAccessSchedule? accessSchedule = default, string? acsSystemId = default, string? acsUserId = default, string? email = default, string? emailAddress = default, string? fullName = default, string? hidAcsSystemId = default, string? phoneNumber = default, string? userIdentityId = default) -{ -Update(new UpdateRequest(accessSchedule: accessSchedule, acsSystemId: acsSystemId, acsUserId: acsUserId, email: email, emailAddress: emailAddress, fullName: fullName, hidAcsSystemId: hidAcsSystemId, phoneNumber: phoneNumber, userIdentityId: userIdentityId)); -} - -/// -/// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/acs/users/update", requestOptions); -} - -/// -/// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -public async Task UpdateAsync(UpdateRequestAccessSchedule? accessSchedule = default, string? acsSystemId = default, string? acsUserId = default, string? email = default, string? emailAddress = default, string? fullName = default, string? hidAcsSystemId = default, string? phoneNumber = default, string? userIdentityId = default) -{ -await UpdateAsync(new UpdateRequest(accessSchedule: accessSchedule, acsSystemId: acsSystemId, acsUserId: acsUserId, email: email, emailAddress: emailAddress, fullName: fullName, hidAcsSystemId: hidAcsSystemId, phoneNumber: phoneNumber, userIdentityId: userIdentityId)); -} -} + public class UsersAcs + { + private ISeamClient _seam; + + public UsersAcs(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Add an ACS User to an Access Group. + /// + [DataContract(Name = "addToAccessGroupRequest_request")] + public class AddToAccessGroupRequest + { + [JsonConstructorAttribute] + protected AddToAccessGroupRequest() { } + + public AddToAccessGroupRequest( + string acsAccessGroupId = default, + string acsUserId = default + ) + { + AcsAccessGroupId = acsAccessGroupId; + AcsUserId = acsUserId; + } + + /// + /// ID of the access group to which you want to add an access system user. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + /// + /// ID of the access system user that you want to add to an access group. + /// + [DataMember(Name = "acs_user_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsUserId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void AddToAccessGroup(AddToAccessGroupRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Put("/acs/users/add_to_access_group", requestOptions); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void AddToAccessGroup(string acsAccessGroupId = default, string acsUserId = default) + { + AddToAccessGroup( + new AddToAccessGroupRequest( + acsAccessGroupId: acsAccessGroupId, + acsUserId: acsUserId + ) + ); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task AddToAccessGroupAsync(AddToAccessGroupRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PutAsync("/acs/users/add_to_access_group", requestOptions); + } + + /// + /// Adds a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task AddToAccessGroupAsync( + string acsAccessGroupId = default, + string acsUserId = default + ) + { + await AddToAccessGroupAsync( + new AddToAccessGroupRequest( + acsAccessGroupId: acsAccessGroupId, + acsUserId: acsUserId + ) + ); + } + + /// + /// Request parameters for Create an ACS User. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + CreateRequestAccessSchedule? accessSchedule = default, + List? acsAccessGroupIds = default, + string acsSystemId = default, + string? email = default, + string? emailAddress = default, + string fullName = default, + string? phoneNumber = default, + string? userIdentityId = default + ) + { + AccessSchedule = accessSchedule; + AcsAccessGroupIds = acsAccessGroupIds; + AcsSystemId = acsSystemId; + Email = email; + EmailAddress = emailAddress; + FullName = fullName; + PhoneNumber = phoneNumber; + UserIdentityId = userIdentityId; + } + + /// + /// `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestAccessSchedule? AccessSchedule { get; set; } + + /// + /// Array of access group IDs to indicate the access groups to which you want to add the new access system user. + /// + [DataMember( + Name = "acs_access_group_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? AcsAccessGroupIds { get; set; } + + /// + /// ID of the access system to which you want to add the new access system user. + /// + [DataMember(Name = "acs_system_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + [Obsolete("use email_address.")] + [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] + public string? Email { get; set; } + + /// + /// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Full name of the new access system user. + /// + [DataMember(Name = "full_name", IsRequired = true, EmitDefaultValue = false)] + public string FullName { get; set; } + + /// + /// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// ID of the user identity with which you want to associate the new access system user. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestAccessSchedule_model")] + public class CreateRequestAccessSchedule + { + [JsonConstructorAttribute] + protected CreateRequestAccessSchedule() { } + + public CreateRequestAccessSchedule(string? endsAt = default, string? startsAt = default) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Ending timestamp for the new access system user's access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Starting timestamp for the new access system user's access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(AcsUser acsUser = default) + { + AcsUser = acsUser; + } + + /// + /// OK + /// + [DataMember(Name = "acs_user", IsRequired = false, EmitDefaultValue = false)] + public AcsUser AcsUser { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public AcsUser Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/acs/users/create", requestOptions) + .EnsureData("/acs/users/create") + .AcsUser; + } + + /// + /// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public AcsUser Create( + CreateRequestAccessSchedule? accessSchedule = default, + List? acsAccessGroupIds = default, + string acsSystemId = default, + string? email = default, + string? emailAddress = default, + string fullName = default, + string? phoneNumber = default, + string? userIdentityId = default + ) + { + return Create( + new CreateRequest( + accessSchedule: accessSchedule, + acsAccessGroupIds: acsAccessGroupIds, + acsSystemId: acsSystemId, + email: email, + emailAddress: emailAddress, + fullName: fullName, + phoneNumber: phoneNumber, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/acs/users/create", requestOptions)) + .EnsureData("/acs/users/create") + .AcsUser; + } + + /// + /// Creates a new [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task CreateAsync( + CreateRequestAccessSchedule? accessSchedule = default, + List? acsAccessGroupIds = default, + string acsSystemId = default, + string? email = default, + string? emailAddress = default, + string fullName = default, + string? phoneNumber = default, + string? userIdentityId = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + accessSchedule: accessSchedule, + acsAccessGroupIds: acsAccessGroupIds, + acsSystemId: acsSystemId, + email: email, + emailAddress: emailAddress, + fullName: fullName, + phoneNumber: phoneNumber, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for Delete an ACS User. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user that you want to delete. You must provide either acs_user_id or user_identity_id + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity that you want to delete. You must provide either acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/acs/users/delete", requestOptions); + } + + /// + /// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public void Delete( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + Delete( + new DeleteRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/acs/users/delete", requestOptions); + } + + /// + /// Deletes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + public async Task DeleteAsync( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await DeleteAsync( + new DeleteRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for Get an ACS User. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user that you want to get. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity that you want to get. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(AcsUser acsUser = default) + { + AcsUser = acsUser; + } + + /// + /// OK + /// + [DataMember(Name = "acs_user", IsRequired = false, EmitDefaultValue = false)] + public AcsUser AcsUser { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public AcsUser Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/users/get", requestOptions) + .EnsureData("/acs/users/get") + .AcsUser; + } + + /// + /// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public AcsUser Get( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + return Get( + new GetRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/users/get", requestOptions)) + .EnsureData("/acs/users/get") + .AcsUser; + } + + /// + /// Returns a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task GetAsync( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + return ( + await GetAsync( + new GetRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for List ACS Users. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + protected ListRequest() { } + + public ListRequest( + string? acsSystemId = default, + string? createdBefore = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentityEmailAddress = default, + string? userIdentityId = default, + string? userIdentityPhoneNumber = default + ) + { + AcsSystemId = acsSystemId; + CreatedBefore = createdBefore; + Limit = limit; + PageCursor = pageCursor; + Search = search; + UserIdentityEmailAddress = userIdentityEmailAddress; + UserIdentityId = userIdentityId; + UserIdentityPhoneNumber = userIdentityPhoneNumber; + } + + /// + /// ID of the `acs_system` for which you want to retrieve all access system users. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// Timestamp by which to limit returned access system users. Returns users created before this timestamp. + /// + [DataMember(Name = "created_before", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedBefore { get; set; } + + /// + /// Maximum number of records to return per page. + /// + [DataMember(Name = "limit", IsRequired = false, EmitDefaultValue = false)] + public int? Limit { get; set; } + + /// + /// Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + /// + [DataMember(Name = "page_cursor", IsRequired = false, EmitDefaultValue = false)] + public string? PageCursor { get; set; } + + /// + /// String for which to search. Filters returned access system users to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `acs_user_id`, `user_identity_id`, `user_identity_full_name` or `user_identity_phone_number`. + /// + [DataMember(Name = "search", IsRequired = false, EmitDefaultValue = false)] + public string? Search { get; set; } + + /// + /// Email address of the user identity for which you want to retrieve all access system users. Specify `null` to retrieve access system users whose user identity has no email address. + /// + [DataMember( + Name = "user_identity_email_address", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UserIdentityEmailAddress { get; set; } + + /// + /// ID of the user identity for which you want to retrieve all access system users. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`). Specify `null` to retrieve access system users whose user identity has no phone number. + /// + [DataMember( + Name = "user_identity_phone_number", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UserIdentityPhoneNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List acsUsers = default) + { + AcsUsers = acsUsers; + } + + /// + /// OK + /// + [DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] + public List AcsUsers { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/acs/users/list", requestOptions) + .EnsureData("/acs/users/list") + .AcsUsers; + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public List List( + string? acsSystemId = default, + string? createdBefore = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentityEmailAddress = default, + string? userIdentityId = default, + string? userIdentityPhoneNumber = default + ) + { + return List( + new ListRequest( + acsSystemId: acsSystemId, + createdBefore: createdBefore, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentityEmailAddress: userIdentityEmailAddress, + userIdentityId: userIdentityId, + userIdentityPhoneNumber: userIdentityPhoneNumber + ) + ); + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/acs/users/list", requestOptions)) + .EnsureData("/acs/users/list") + .AcsUsers; + } + + /// + /// Returns a list of all [access system users](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task> ListAsync( + string? acsSystemId = default, + string? createdBefore = default, + int? limit = default, + string? pageCursor = default, + string? search = default, + string? userIdentityEmailAddress = default, + string? userIdentityId = default, + string? userIdentityPhoneNumber = default + ) + { + return ( + await ListAsync( + new ListRequest( + acsSystemId: acsSystemId, + createdBefore: createdBefore, + limit: limit, + pageCursor: pageCursor, + search: search, + userIdentityEmailAddress: userIdentityEmailAddress, + userIdentityId: userIdentityId, + userIdentityPhoneNumber: userIdentityPhoneNumber + ) + ) + ); + } + + /// + /// Request parameters for List ACS User-Accessible Entrances. + /// + [DataContract(Name = "listAccessibleEntrancesRequest_request")] + public class ListAccessibleEntrancesRequest + { + [JsonConstructorAttribute] + protected ListAccessibleEntrancesRequest() { } + + public ListAccessibleEntrancesRequest( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listAccessibleEntrancesResponse_response")] + public class ListAccessibleEntrancesResponse + { + [JsonConstructorAttribute] + protected ListAccessibleEntrancesResponse() { } + + public ListAccessibleEntrancesResponse(List acsEntrances = default) + { + AcsEntrances = acsEntrances; + } + + /// + /// OK + /// + [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] + public List AcsEntrances { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. + /// + public List ListAccessibleEntrances(ListAccessibleEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get( + "/acs/users/list_accessible_entrances", + requestOptions + ) + .EnsureData("/acs/users/list_accessible_entrances") + .AcsEntrances; + } + + /// + /// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. + /// + public List ListAccessibleEntrances( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + return ListAccessibleEntrances( + new ListAccessibleEntrancesRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. + /// + public async Task> ListAccessibleEntrancesAsync( + ListAccessibleEntrancesRequest request + ) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.GetAsync( + "/acs/users/list_accessible_entrances", + requestOptions + ) + ) + .EnsureData("/acs/users/list_accessible_entrances") + .AcsEntrances; + } + + /// + /// Lists the [entrances](https://www.seam.co/docs/api/acs/entrances/object) to which a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) has access. + /// + public async Task> ListAccessibleEntrancesAsync( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + return ( + await ListAccessibleEntrancesAsync( + new ListAccessibleEntrancesRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ) + ); + } + + /// + /// Request parameters for Remove an ACS User from an Access Group. + /// + [DataContract(Name = "removeFromAccessGroupRequest_request")] + public class RemoveFromAccessGroupRequest + { + [JsonConstructorAttribute] + protected RemoveFromAccessGroupRequest() { } + + public RemoveFromAccessGroupRequest( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsAccessGroupId = acsAccessGroupId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access group from which you want to remove an access system user. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = true, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + /// + /// ID of the access system user that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void RemoveFromAccessGroup(RemoveFromAccessGroupRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/acs/users/remove_from_access_group", requestOptions); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public void RemoveFromAccessGroup( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + RemoveFromAccessGroup( + new RemoveFromAccessGroupRequest( + acsAccessGroupId: acsAccessGroupId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task RemoveFromAccessGroupAsync(RemoveFromAccessGroupRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/acs/users/remove_from_access_group", requestOptions); + } + + /// + /// Removes a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) from a specified [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + /// + public async Task RemoveFromAccessGroupAsync( + string acsAccessGroupId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await RemoveFromAccessGroupAsync( + new RemoveFromAccessGroupRequest( + acsAccessGroupId: acsAccessGroupId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for Revoke ACS User Access to All Entrances. + /// + [DataContract(Name = "revokeAccessToAllEntrancesRequest_request")] + public class RevokeAccessToAllEntrancesRequest + { + [JsonConstructorAttribute] + protected RevokeAccessToAllEntrancesRequest() { } + + public RevokeAccessToAllEntrancesRequest( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public void RevokeAccessToAllEntrances(RevokeAccessToAllEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/acs/users/revoke_access_to_all_entrances", requestOptions); + } + + /// + /// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public void RevokeAccessToAllEntrances( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + RevokeAccessToAllEntrances( + new RevokeAccessToAllEntrancesRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task RevokeAccessToAllEntrancesAsync(RevokeAccessToAllEntrancesRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync( + "/acs/users/revoke_access_to_all_entrances", + requestOptions + ); + } + + /// + /// Revokes access to all [entrances](https://www.seam.co/docs/api/acs/entrances/object) for a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task RevokeAccessToAllEntrancesAsync( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await RevokeAccessToAllEntrancesAsync( + new RevokeAccessToAllEntrancesRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for Suspend an ACS User. + /// + [DataContract(Name = "suspendRequest_request")] + public class SuspendRequest + { + [JsonConstructorAttribute] + protected SuspendRequest() { } + + public SuspendRequest( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. + /// + public void Suspend(SuspendRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/acs/users/suspend", requestOptions); + } + + /// + /// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. + /// + public void Suspend( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + Suspend( + new SuspendRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. + /// + public async Task SuspendAsync(SuspendRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/acs/users/suspend", requestOptions); + } + + /// + /// [Suspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://www.seam.co/docs/api/acs/users/unsuspend) them. + /// + public async Task SuspendAsync( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await SuspendAsync( + new SuspendRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for Unsuspend an ACS User. + /// + [DataContract(Name = "unsuspendRequest_request")] + public class UnsuspendRequest + { + [JsonConstructorAttribute] + protected UnsuspendRequest() { } + + public UnsuspendRequest( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + UserIdentityId = userIdentityId; + } + + /// + /// ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// ID of the user identity that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. + /// + public void Unsuspend(UnsuspendRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Post("/acs/users/unsuspend", requestOptions); + } + + /// + /// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. + /// + public void Unsuspend( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + Unsuspend( + new UnsuspendRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. + /// + public async Task UnsuspendAsync(UnsuspendRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PostAsync("/acs/users/unsuspend", requestOptions); + } + + /// + /// [Unsuspends](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). While [suspending an access system user](https://www.seam.co/docs/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. + /// + public async Task UnsuspendAsync( + string? acsSystemId = default, + string? acsUserId = default, + string? userIdentityId = default + ) + { + await UnsuspendAsync( + new UnsuspendRequest( + acsSystemId: acsSystemId, + acsUserId: acsUserId, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Request parameters for Update an ACS User. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + UpdateRequestAccessSchedule? accessSchedule = default, + string? acsSystemId = default, + string? acsUserId = default, + string? email = default, + string? emailAddress = default, + string? fullName = default, + string? hidAcsSystemId = default, + string? phoneNumber = default, + string? userIdentityId = default + ) + { + AccessSchedule = accessSchedule; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + Email = email; + EmailAddress = emailAddress; + FullName = fullName; + HidAcsSystemId = hidAcsSystemId; + PhoneNumber = phoneNumber; + UserIdentityId = userIdentityId; + } + + /// + /// `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] + public UpdateRequestAccessSchedule? AccessSchedule { get; set; } + + /// + /// ID of the access system that you want to update. You can only provide acs_system_id with user_identity_id. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsSystemId { get; set; } + + /// + /// ID of the access system user that you want to update. You can only provide acs_user_id or user_identity_id. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + [Obsolete("use email_address.")] + [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] + public string? Email { get; set; } + + /// + /// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Full name of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// ID of the HID access control system associated with the user. + /// + [DataMember(Name = "hid_acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? HidAcsSystemId { get; set; } + + /// + /// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// ID of the user identity that you want to update. You can only provide acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateRequestAccessSchedule_model")] + public class UpdateRequestAccessSchedule + { + [JsonConstructorAttribute] + protected UpdateRequestAccessSchedule() { } + + public UpdateRequestAccessSchedule(string? endsAt = default, string? startsAt = default) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Ending timestamp for the access system user's access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Starting timestamp for the access system user's access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/acs/users/update", requestOptions); + } + + /// + /// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public void Update( + UpdateRequestAccessSchedule? accessSchedule = default, + string? acsSystemId = default, + string? acsUserId = default, + string? email = default, + string? emailAddress = default, + string? fullName = default, + string? hidAcsSystemId = default, + string? phoneNumber = default, + string? userIdentityId = default + ) + { + Update( + new UpdateRequest( + accessSchedule: accessSchedule, + acsSystemId: acsSystemId, + acsUserId: acsUserId, + email: email, + emailAddress: emailAddress, + fullName: fullName, + hidAcsSystemId: hidAcsSystemId, + phoneNumber: phoneNumber, + userIdentityId: userIdentityId + ) + ); + } + + /// + /// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/acs/users/update", requestOptions); + } + + /// + /// Updates the properties of a specified [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + public async Task UpdateAsync( + UpdateRequestAccessSchedule? accessSchedule = default, + string? acsSystemId = default, + string? acsUserId = default, + string? email = default, + string? emailAddress = default, + string? fullName = default, + string? hidAcsSystemId = default, + string? phoneNumber = default, + string? userIdentityId = default + ) + { + await UpdateAsync( + new UpdateRequest( + accessSchedule: accessSchedule, + acsSystemId: acsSystemId, + acsUserId: acsUserId, + email: email, + emailAddress: emailAddress, + fullName: fullName, + hidAcsSystemId: hidAcsSystemId, + phoneNumber: phoneNumber, + userIdentityId: userIdentityId + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.UsersAcs UsersAcs => new(this); -} + public partial class SeamClient + { + public Api.UsersAcs UsersAcs => new(this); + } -public partial interface ISeamClient -{ -public Api.UsersAcs UsersAcs { get; } -} + public partial interface ISeamClient + { + public Api.UsersAcs UsersAcs { get; } + } } diff --git a/src/Seam/Api/Webhooks.cs b/src/Seam/Api/Webhooks.cs index 8adc606a..ec7eb480 100644 --- a/src/Seam/Api/Webhooks.cs +++ b/src/Seam/Api/Webhooks.cs @@ -9,520 +9,538 @@ namespace Seam.Api { -public class Webhooks -{ -private ISeamClient _seam; - -public Webhooks(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Webhook. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(List? eventTypes = default, string url = default) -{ -EventTypes = eventTypes; -Url = url; -} - -/// -/// Types of events that you want the new webhook to receive. -/// -[DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] -public List? EventTypes { get; set; } - -/// -/// URL for the new webhook. -/// -[DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] -public string Url { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(Webhook webhook = default) -{ -Webhook = webhook; -} - -/// -/// OK -/// -[DataMember(Name = "webhook", IsRequired = false, EmitDefaultValue = false)] -public Webhook Webhook { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public Webhook Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/webhooks/create", requestOptions).EnsureData("/webhooks/create").Webhook; -} - -/// -/// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public Webhook Create(List? eventTypes = default, string url = default) -{ -return Create(new CreateRequest(eventTypes: eventTypes, url: url)); -} - -/// -/// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/webhooks/create", requestOptions)).EnsureData("/webhooks/create").Webhook; -} - -/// -/// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task CreateAsync(List? eventTypes = default, string url = default) -{ -return (await CreateAsync(new CreateRequest(eventTypes: eventTypes, url: url))); -} - -/// -/// Request parameters for Delete a Webhook. -/// -[DataContract(Name = "deleteRequest_request")] -public class DeleteRequest -{ -[JsonConstructorAttribute] -protected DeleteRequest() { } - -public DeleteRequest(string webhookId = default) -{ -WebhookId = webhookId; -} - -/// -/// ID of the webhook that you want to delete. -/// -[DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] -public string WebhookId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public void Delete(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Delete("/webhooks/delete", requestOptions); -} - -/// -/// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public void Delete(string webhookId = default) -{ -Delete(new DeleteRequest(webhookId: webhookId)); -} - -/// -/// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task DeleteAsync(DeleteRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.DeleteAsync("/webhooks/delete", requestOptions); -} - -/// -/// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task DeleteAsync(string webhookId = default) -{ -await DeleteAsync(new DeleteRequest(webhookId: webhookId)); -} - -/// -/// Request parameters for Get a Webhook. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -protected GetRequest() { } - -public GetRequest(string webhookId = default) -{ -WebhookId = webhookId; -} - -/// -/// ID of the webhook that you want to get. -/// -[DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] -public string WebhookId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(Webhook webhook = default) -{ -Webhook = webhook; -} - -/// -/// OK -/// -[DataMember(Name = "webhook", IsRequired = false, EmitDefaultValue = false)] -public Webhook Webhook { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public Webhook Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/webhooks/get", requestOptions).EnsureData("/webhooks/get").Webhook; -} - -/// -/// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public Webhook Get(string webhookId = default) -{ -return Get(new GetRequest(webhookId: webhookId)); -} - -/// -/// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/webhooks/get", requestOptions)).EnsureData("/webhooks/get").Webhook; -} - -/// -/// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task GetAsync(string webhookId = default) -{ -return (await GetAsync(new GetRequest(webhookId: webhookId))); -} - -/// -/// Request parameters for List Webhooks. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -public ListRequest() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List webhooks = default) -{ -Webhooks = webhooks; -} - -/// -/// OK -/// -[DataMember(Name = "webhooks", IsRequired = false, EmitDefaultValue = false)] -public List Webhooks { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/webhooks/list", requestOptions).EnsureData("/webhooks/list").Webhooks; -} - -/// -/// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). -/// -public List List() -{ -return List(new ListRequest()); -} - -/// -/// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/webhooks/list", requestOptions)).EnsureData("/webhooks/list").Webhooks; -} - -/// -/// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task> ListAsync() -{ -return (await ListAsync(new ListRequest())); -} - -/// -/// Request parameters for Update a Webhook. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(List eventTypes = default, string webhookId = default) -{ -EventTypes = eventTypes; -WebhookId = webhookId; -} - -/// -/// Types of events that you want the webhook to receive. -/// -[DataMember(Name = "event_types", IsRequired = true, EmitDefaultValue = false)] -public List EventTypes { get; set; } - -/// -/// ID of the webhook that you want to update. -/// -[DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] -public string WebhookId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Put("/webhooks/update", requestOptions); -} - -/// -/// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public void Update(List eventTypes = default, string webhookId = default) -{ -Update(new UpdateRequest(eventTypes: eventTypes, webhookId: webhookId)); -} - -/// -/// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PutAsync("/webhooks/update", requestOptions); -} - -/// -/// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -public async Task UpdateAsync(List eventTypes = default, string webhookId = default) -{ -await UpdateAsync(new UpdateRequest(eventTypes: eventTypes, webhookId: webhookId)); -} -} + public class Webhooks + { + private ISeamClient _seam; + + public Webhooks(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Webhook. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest(List? eventTypes = default, string url = default) + { + EventTypes = eventTypes; + Url = url; + } + + /// + /// Types of events that you want the new webhook to receive. + /// + [DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] + public List? EventTypes { get; set; } + + /// + /// URL for the new webhook. + /// + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = false)] + public string Url { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(Webhook webhook = default) + { + Webhook = webhook; + } + + /// + /// OK + /// + [DataMember(Name = "webhook", IsRequired = false, EmitDefaultValue = false)] + public Webhook Webhook { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public Webhook Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/webhooks/create", requestOptions) + .EnsureData("/webhooks/create") + .Webhook; + } + + /// + /// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public Webhook Create(List? eventTypes = default, string url = default) + { + return Create(new CreateRequest(eventTypes: eventTypes, url: url)); + } + + /// + /// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/webhooks/create", requestOptions)) + .EnsureData("/webhooks/create") + .Webhook; + } + + /// + /// Creates a new [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task CreateAsync( + List? eventTypes = default, + string url = default + ) + { + return (await CreateAsync(new CreateRequest(eventTypes: eventTypes, url: url))); + } + + /// + /// Request parameters for Delete a Webhook. + /// + [DataContract(Name = "deleteRequest_request")] + public class DeleteRequest + { + [JsonConstructorAttribute] + protected DeleteRequest() { } + + public DeleteRequest(string webhookId = default) + { + WebhookId = webhookId; + } + + /// + /// ID of the webhook that you want to delete. + /// + [DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] + public string WebhookId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public void Delete(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Delete("/webhooks/delete", requestOptions); + } + + /// + /// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public void Delete(string webhookId = default) + { + Delete(new DeleteRequest(webhookId: webhookId)); + } + + /// + /// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task DeleteAsync(DeleteRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.DeleteAsync("/webhooks/delete", requestOptions); + } + + /// + /// Deletes a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task DeleteAsync(string webhookId = default) + { + await DeleteAsync(new DeleteRequest(webhookId: webhookId)); + } + + /// + /// Request parameters for Get a Webhook. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + protected GetRequest() { } + + public GetRequest(string webhookId = default) + { + WebhookId = webhookId; + } + + /// + /// ID of the webhook that you want to get. + /// + [DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] + public string WebhookId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Webhook webhook = default) + { + Webhook = webhook; + } + + /// + /// OK + /// + [DataMember(Name = "webhook", IsRequired = false, EmitDefaultValue = false)] + public Webhook Webhook { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public Webhook Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/webhooks/get", requestOptions) + .EnsureData("/webhooks/get") + .Webhook; + } + + /// + /// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public Webhook Get(string webhookId = default) + { + return Get(new GetRequest(webhookId: webhookId)); + } + + /// + /// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/webhooks/get", requestOptions)) + .EnsureData("/webhooks/get") + .Webhook; + } + + /// + /// Gets a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task GetAsync(string webhookId = default) + { + return (await GetAsync(new GetRequest(webhookId: webhookId))); + } + + /// + /// Request parameters for List Webhooks. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + public ListRequest() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List webhooks = default) + { + Webhooks = webhooks; + } + + /// + /// OK + /// + [DataMember(Name = "webhooks", IsRequired = false, EmitDefaultValue = false)] + public List Webhooks { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/webhooks/list", requestOptions) + .EnsureData("/webhooks/list") + .Webhooks; + } + + /// + /// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). + /// + public List List() + { + return List(new ListRequest()); + } + + /// + /// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/webhooks/list", requestOptions)) + .EnsureData("/webhooks/list") + .Webhooks; + } + + /// + /// Returns a list of all [webhooks](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task> ListAsync() + { + return (await ListAsync(new ListRequest())); + } + + /// + /// Request parameters for Update a Webhook. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest(List eventTypes = default, string webhookId = default) + { + EventTypes = eventTypes; + WebhookId = webhookId; + } + + /// + /// Types of events that you want the webhook to receive. + /// + [DataMember(Name = "event_types", IsRequired = true, EmitDefaultValue = false)] + public List EventTypes { get; set; } + + /// + /// ID of the webhook that you want to update. + /// + [DataMember(Name = "webhook_id", IsRequired = true, EmitDefaultValue = false)] + public string WebhookId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Put("/webhooks/update", requestOptions); + } + + /// + /// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public void Update(List eventTypes = default, string webhookId = default) + { + Update(new UpdateRequest(eventTypes: eventTypes, webhookId: webhookId)); + } + + /// + /// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PutAsync("/webhooks/update", requestOptions); + } + + /// + /// Updates a specified [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + public async Task UpdateAsync(List eventTypes = default, string webhookId = default) + { + await UpdateAsync(new UpdateRequest(eventTypes: eventTypes, webhookId: webhookId)); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Webhooks Webhooks => new(this); -} + public partial class SeamClient + { + public Api.Webhooks Webhooks => new(this); + } -public partial interface ISeamClient -{ -public Api.Webhooks Webhooks { get; } -} + public partial interface ISeamClient + { + public Api.Webhooks Webhooks { get; } + } } diff --git a/src/Seam/Api/Workspaces.cs b/src/Seam/Api/Workspaces.cs index 4247fb3e..eb4350b9 100644 --- a/src/Seam/Api/Workspaces.cs +++ b/src/Seam/Api/Workspaces.cs @@ -9,773 +9,958 @@ namespace Seam.Api { -public class Workspaces -{ -private ISeamClient _seam; - -public Workspaces(ISeamClient seam) -{ -_seam = seam; -} - -/// -/// Request parameters for Create a Workspace. -/// -[DataContract(Name = "createRequest_request")] -public class CreateRequest -{ -[JsonConstructorAttribute] -protected CreateRequest() { } - -public CreateRequest(string? companyName = default, string? connectPartnerName = default, CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, string? organizationId = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, string? webviewPrimaryButtonColor = default, string? webviewPrimaryButtonTextColor = default, string? webviewSuccessMessage = default) -{ -CompanyName = companyName; -ConnectPartnerName = connectPartnerName; -ConnectWebviewCustomization = connectWebviewCustomization; -IsSandbox = isSandbox; -Name = name; -OrganizationId = organizationId; -WebviewLogoShape = webviewLogoShape; -WebviewPrimaryButtonColor = webviewPrimaryButtonColor; -WebviewPrimaryButtonTextColor = webviewPrimaryButtonTextColor; -WebviewSuccessMessage = webviewSuccessMessage; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum WebviewLogoShapeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "circle")] -Circle = 1, - -[EnumMember(Value = "square")] -Square = 2, -} - -/// -/// Company name for the new workspace. -/// -[Obsolete("Use `connect_partner_name` instead.")] -[DataMember(Name = "company_name", IsRequired = false, EmitDefaultValue = false)] -public string? CompanyName { get; set; } - -/// -/// Connect partner name for the new workspace. -/// -[DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectPartnerName { get; set; } - -/// -/// [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) customizations for the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "connect_webview_customization", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } - -/// -/// Indicates whether the new workspace is a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -[DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] -public bool? IsSandbox { get; set; } - -/// -/// Name of the new workspace. -/// -[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// ID of the organization to associate with the new workspace. If omitted, the new workspace is associated with the organization that you administer, if you administer exactly one. If you administer no organization, Seam creates one for you and associates the new workspace with it. -/// -[DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] -public string? OrganizationId { get; set; } - -[Obsolete("Use `connect_webview_customization.webview_logo_shape` instead.")] -[DataMember(Name = "webview_logo_shape", IsRequired = false, EmitDefaultValue = false)] -public CreateRequest.WebviewLogoShapeEnum? WebviewLogoShape { get; set; } - -[Obsolete("Use `connect_webview_customization.webview_primary_button_color` instead.")] -[DataMember(Name = "webview_primary_button_color", IsRequired = false, EmitDefaultValue = false)] -public string? WebviewPrimaryButtonColor { get; set; } - -[Obsolete("Use `connect_webview_customization.webview_primary_button_text_color` instead.")] -[DataMember(Name = "webview_primary_button_text_color", IsRequired = false, EmitDefaultValue = false)] -public string? WebviewPrimaryButtonTextColor { get; set; } - -[Obsolete("Use `connect_webview_customization.webview_success_message` instead.")] -[DataMember(Name = "webview_success_message", IsRequired = false, EmitDefaultValue = false)] -public string? WebviewSuccessMessage { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createRequestConnectWebviewCustomization_model")] -public class CreateRequestConnectWebviewCustomization -{ -[JsonConstructorAttribute] -protected CreateRequestConnectWebviewCustomization() { } - -public CreateRequestConnectWebviewCustomization(CreateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, string? primaryButtonColor = default, string? primaryButtonTextColor = default, string? successMessage = default) -{ -LogoShape = logoShape; -PrimaryButtonColor = primaryButtonColor; -PrimaryButtonTextColor = primaryButtonTextColor; -SuccessMessage = successMessage; -} - -/// -/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum LogoShapeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "circle")] -Circle = 1, - -[EnumMember(Value = "square")] -Square = 2, -} - -/// -/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] -public CreateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } - -/// -/// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] -public string? PrimaryButtonColor { get; set; } - -/// -/// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "primary_button_text_color", IsRequired = false, EmitDefaultValue = false)] -public string? PrimaryButtonTextColor { get; set; } - -/// -/// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] -public string? SuccessMessage { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "createResponse_response")] -public class CreateResponse -{ -[JsonConstructorAttribute] -protected CreateResponse() { } - -public CreateResponse(Workspace workspace = default) -{ -Workspace = workspace; -} - -/// -/// OK -/// -[DataMember(Name = "workspace", IsRequired = false, EmitDefaultValue = false)] -public Workspace Workspace { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). -/// -public Workspace Create(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/workspaces/create", requestOptions).EnsureData("/workspaces/create").Workspace; -} - -/// -/// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). -/// -public Workspace Create(string? companyName = default, string? connectPartnerName = default, CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, string? organizationId = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, string? webviewPrimaryButtonColor = default, string? webviewPrimaryButtonTextColor = default, string? webviewSuccessMessage = default) -{ -return Create(new CreateRequest(companyName: companyName, connectPartnerName: connectPartnerName, connectWebviewCustomization: connectWebviewCustomization, isSandbox: isSandbox, name: name, organizationId: organizationId, webviewLogoShape: webviewLogoShape, webviewPrimaryButtonColor: webviewPrimaryButtonColor, webviewPrimaryButtonTextColor: webviewPrimaryButtonTextColor, webviewSuccessMessage: webviewSuccessMessage)); -} - -/// -/// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). -/// -public async Task CreateAsync(CreateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/workspaces/create", requestOptions)).EnsureData("/workspaces/create").Workspace; -} - -/// -/// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). -/// -public async Task CreateAsync(string? companyName = default, string? connectPartnerName = default, CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isSandbox = default, string name = default, string? organizationId = default, CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, string? webviewPrimaryButtonColor = default, string? webviewPrimaryButtonTextColor = default, string? webviewSuccessMessage = default) -{ -return (await CreateAsync(new CreateRequest(companyName: companyName, connectPartnerName: connectPartnerName, connectWebviewCustomization: connectWebviewCustomization, isSandbox: isSandbox, name: name, organizationId: organizationId, webviewLogoShape: webviewLogoShape, webviewPrimaryButtonColor: webviewPrimaryButtonColor, webviewPrimaryButtonTextColor: webviewPrimaryButtonTextColor, webviewSuccessMessage: webviewSuccessMessage))); -} - -/// -/// Request parameters for Get a Workspace. -/// -[DataContract(Name = "getRequest_request")] -public class GetRequest -{ -[JsonConstructorAttribute] -public GetRequest() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "getResponse_response")] -public class GetResponse -{ -[JsonConstructorAttribute] -protected GetResponse() { } - -public GetResponse(Workspace workspace = default) -{ -Workspace = workspace; -} - -/// -/// OK -/// -[DataMember(Name = "workspace", IsRequired = false, EmitDefaultValue = false)] -public Workspace Workspace { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public Workspace Get(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/workspaces/get", requestOptions).EnsureData("/workspaces/get").Workspace; -} - -/// -/// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public Workspace Get() -{ -return Get(new GetRequest()); -} - -/// -/// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public async Task GetAsync(GetRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/workspaces/get", requestOptions)).EnsureData("/workspaces/get").Workspace; -} - -/// -/// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public async Task GetAsync() -{ -return (await GetAsync(new GetRequest())); -} - -/// -/// Request parameters for List Workspaces. -/// -[DataContract(Name = "listRequest_request")] -public class ListRequest -{ -[JsonConstructorAttribute] -public ListRequest() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "listResponse_response")] -public class ListResponse -{ -[JsonConstructorAttribute] -protected ListResponse() { } - -public ListResponse(List workspaces = default) -{ -Workspaces = workspaces; -} - -/// -/// OK -/// -[DataMember(Name = "workspaces", IsRequired = false, EmitDefaultValue = false)] -public List Workspaces { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public List List(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Get("/workspaces/list", requestOptions).EnsureData("/workspaces/list").Workspaces; -} - -/// -/// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public List List() -{ -return List(new ListRequest()); -} - -/// -/// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public async Task> ListAsync(ListRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.GetAsync("/workspaces/list", requestOptions)).EnsureData("/workspaces/list").Workspaces; -} - -/// -/// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public async Task> ListAsync() -{ -return (await ListAsync(new ListRequest())); -} - -/// -/// Request parameters for Reset a Sandbox Workspace. -/// -[DataContract(Name = "resetSandboxRequest_request")] -public class ResetSandboxRequest -{ -[JsonConstructorAttribute] -public ResetSandboxRequest() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "resetSandboxResponse_response")] -public class ResetSandboxResponse -{ -[JsonConstructorAttribute] -protected ResetSandboxResponse() { } - -public ResetSandboxResponse(ActionAttempt actionAttempt = default) -{ -ActionAttempt = actionAttempt; -} - -/// -/// OK -/// -[DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] -public ActionAttempt ActionAttempt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. -/// -public ActionAttempt ResetSandbox(ResetSandboxRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return _seam.Post("/workspaces/reset_sandbox", requestOptions).EnsureData("/workspaces/reset_sandbox").ActionAttempt; -} - -/// -/// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. -/// -public ActionAttempt ResetSandbox() -{ -return ResetSandbox(new ResetSandboxRequest()); -} - -/// -/// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. -/// -public async Task ResetSandboxAsync(ResetSandboxRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -return (await _seam.PostAsync("/workspaces/reset_sandbox", requestOptions)).EnsureData("/workspaces/reset_sandbox").ActionAttempt; -} - -/// -/// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. -/// -public async Task ResetSandboxAsync() -{ -return (await ResetSandboxAsync(new ResetSandboxRequest())); -} - -/// -/// Request parameters for Update a Workspace. -/// -[DataContract(Name = "updateRequest_request")] -public class UpdateRequest -{ -[JsonConstructorAttribute] -protected UpdateRequest() { } - -public UpdateRequest(string? connectPartnerName = default, UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isPublishableKeyAuthEnabled = default, bool? isSuspended = default, string? name = default, string? organizationId = default) -{ -ConnectPartnerName = connectPartnerName; -ConnectWebviewCustomization = connectWebviewCustomization; -IsPublishableKeyAuthEnabled = isPublishableKeyAuthEnabled; -IsSuspended = isSuspended; -Name = name; -OrganizationId = organizationId; -} - -/// -/// Connect partner name for the workspace. -/// -[DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectPartnerName { get; set; } - -/// -/// [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) customizations for the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "connect_webview_customization", IsRequired = false, EmitDefaultValue = false)] -public UpdateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } - -/// -/// Indicates whether publishable key authentication is enabled for this workspace. -/// -[DataMember(Name = "is_publishable_key_auth_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? IsPublishableKeyAuthEnabled { get; set; } - -/// -/// Indicates whether the workspace is suspended. -/// -[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] -public bool? IsSuspended { get; set; } - -/// -/// Name of the workspace. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// ID of the organization to assign the workspace to. The authenticated user must be the owner of the workspace and an admin of the target organization. -/// -[DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] -public string? OrganizationId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "updateRequestConnectWebviewCustomization_model")] -public class UpdateRequestConnectWebviewCustomization -{ -[JsonConstructorAttribute] -protected UpdateRequestConnectWebviewCustomization() { } - -public UpdateRequestConnectWebviewCustomization(UpdateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, string? primaryButtonColor = default, string? primaryButtonTextColor = default, string? successMessage = default) -{ -LogoShape = logoShape; -PrimaryButtonColor = primaryButtonColor; -PrimaryButtonTextColor = primaryButtonTextColor; -SuccessMessage = successMessage; -} - -/// -/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum LogoShapeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "circle")] -Circle = 1, - -[EnumMember(Value = "square")] -Square = 2, -} - -/// -/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] -public UpdateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } - -/// -/// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] -public string? PrimaryButtonColor { get; set; } - -/// -/// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "primary_button_text_color", IsRequired = false, EmitDefaultValue = false)] -public string? PrimaryButtonTextColor { get; set; } - -/// -/// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] -public string? SuccessMessage { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public void Update(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -_seam.Patch("/workspaces/update", requestOptions); -} - -/// -/// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public void Update(string? connectPartnerName = default, UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isPublishableKeyAuthEnabled = default, bool? isSuspended = default, string? name = default, string? organizationId = default) -{ -Update(new UpdateRequest(connectPartnerName: connectPartnerName, connectWebviewCustomization: connectWebviewCustomization, isPublishableKeyAuthEnabled: isPublishableKeyAuthEnabled, isSuspended: isSuspended, name: name, organizationId: organizationId)); -} - -/// -/// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public async Task UpdateAsync(UpdateRequest request) -{ -var requestOptions = new RequestOptions(); -requestOptions.Data = request; -await _seam.PatchAsync("/workspaces/update", requestOptions); -} - -/// -/// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. -/// -public async Task UpdateAsync(string? connectPartnerName = default, UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, bool? isPublishableKeyAuthEnabled = default, bool? isSuspended = default, string? name = default, string? organizationId = default) -{ -await UpdateAsync(new UpdateRequest(connectPartnerName: connectPartnerName, connectWebviewCustomization: connectWebviewCustomization, isPublishableKeyAuthEnabled: isPublishableKeyAuthEnabled, isSuspended: isSuspended, name: name, organizationId: organizationId)); -} -} + public class Workspaces + { + private ISeamClient _seam; + + public Workspaces(ISeamClient seam) + { + _seam = seam; + } + + /// + /// Request parameters for Create a Workspace. + /// + [DataContract(Name = "createRequest_request")] + public class CreateRequest + { + [JsonConstructorAttribute] + protected CreateRequest() { } + + public CreateRequest( + string? companyName = default, + string? connectPartnerName = default, + CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, + bool? isSandbox = default, + string name = default, + string? organizationId = default, + CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, + string? webviewPrimaryButtonColor = default, + string? webviewPrimaryButtonTextColor = default, + string? webviewSuccessMessage = default + ) + { + CompanyName = companyName; + ConnectPartnerName = connectPartnerName; + ConnectWebviewCustomization = connectWebviewCustomization; + IsSandbox = isSandbox; + Name = name; + OrganizationId = organizationId; + WebviewLogoShape = webviewLogoShape; + WebviewPrimaryButtonColor = webviewPrimaryButtonColor; + WebviewPrimaryButtonTextColor = webviewPrimaryButtonTextColor; + WebviewSuccessMessage = webviewSuccessMessage; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum WebviewLogoShapeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "circle")] + Circle = 1, + + [EnumMember(Value = "square")] + Square = 2, + } + + /// + /// Company name for the new workspace. + /// + [Obsolete("Use `connect_partner_name` instead.")] + [DataMember(Name = "company_name", IsRequired = false, EmitDefaultValue = false)] + public string? CompanyName { get; set; } + + /// + /// Connect partner name for the new workspace. + /// + [DataMember( + Name = "connect_partner_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectPartnerName { get; set; } + + /// + /// [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) customizations for the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember( + Name = "connect_webview_customization", + IsRequired = false, + EmitDefaultValue = false + )] + public CreateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } + + /// + /// Indicates whether the new workspace is a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + [DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] + public bool? IsSandbox { get; set; } + + /// + /// Name of the new workspace. + /// + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// ID of the organization to associate with the new workspace. If omitted, the new workspace is associated with the organization that you administer, if you administer exactly one. If you administer no organization, Seam creates one for you and associates the new workspace with it. + /// + [DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] + public string? OrganizationId { get; set; } + + [Obsolete("Use `connect_webview_customization.webview_logo_shape` instead.")] + [DataMember(Name = "webview_logo_shape", IsRequired = false, EmitDefaultValue = false)] + public CreateRequest.WebviewLogoShapeEnum? WebviewLogoShape { get; set; } + + [Obsolete("Use `connect_webview_customization.webview_primary_button_color` instead.")] + [DataMember( + Name = "webview_primary_button_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? WebviewPrimaryButtonColor { get; set; } + + [Obsolete( + "Use `connect_webview_customization.webview_primary_button_text_color` instead." + )] + [DataMember( + Name = "webview_primary_button_text_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? WebviewPrimaryButtonTextColor { get; set; } + + [Obsolete("Use `connect_webview_customization.webview_success_message` instead.")] + [DataMember( + Name = "webview_success_message", + IsRequired = false, + EmitDefaultValue = false + )] + public string? WebviewSuccessMessage { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createRequestConnectWebviewCustomization_model")] + public class CreateRequestConnectWebviewCustomization + { + [JsonConstructorAttribute] + protected CreateRequestConnectWebviewCustomization() { } + + public CreateRequestConnectWebviewCustomization( + CreateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, + string? primaryButtonColor = default, + string? primaryButtonTextColor = default, + string? successMessage = default + ) + { + LogoShape = logoShape; + PrimaryButtonColor = primaryButtonColor; + PrimaryButtonTextColor = primaryButtonTextColor; + SuccessMessage = successMessage; + } + + /// + /// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum LogoShapeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "circle")] + Circle = 1, + + [EnumMember(Value = "square")] + Square = 2, + } + + /// + /// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] + public CreateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } + + /// + /// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember( + Name = "primary_button_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PrimaryButtonColor { get; set; } + + /// + /// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember( + Name = "primary_button_text_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PrimaryButtonTextColor { get; set; } + + /// + /// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] + public string? SuccessMessage { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "createResponse_response")] + public class CreateResponse + { + [JsonConstructorAttribute] + protected CreateResponse() { } + + public CreateResponse(Workspace workspace = default) + { + Workspace = workspace; + } + + /// + /// OK + /// + [DataMember(Name = "workspace", IsRequired = false, EmitDefaultValue = false)] + public Workspace Workspace { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). + /// + public Workspace Create(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/workspaces/create", requestOptions) + .EnsureData("/workspaces/create") + .Workspace; + } + + /// + /// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). + /// + public Workspace Create( + string? companyName = default, + string? connectPartnerName = default, + CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, + bool? isSandbox = default, + string name = default, + string? organizationId = default, + CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, + string? webviewPrimaryButtonColor = default, + string? webviewPrimaryButtonTextColor = default, + string? webviewSuccessMessage = default + ) + { + return Create( + new CreateRequest( + companyName: companyName, + connectPartnerName: connectPartnerName, + connectWebviewCustomization: connectWebviewCustomization, + isSandbox: isSandbox, + name: name, + organizationId: organizationId, + webviewLogoShape: webviewLogoShape, + webviewPrimaryButtonColor: webviewPrimaryButtonColor, + webviewPrimaryButtonTextColor: webviewPrimaryButtonTextColor, + webviewSuccessMessage: webviewSuccessMessage + ) + ); + } + + /// + /// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). + /// + public async Task CreateAsync(CreateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.PostAsync("/workspaces/create", requestOptions)) + .EnsureData("/workspaces/create") + .Workspace; + } + + /// + /// Creates a new [workspace](https://www.seam.co/docs/core-concepts/workspaces). + /// + public async Task CreateAsync( + string? companyName = default, + string? connectPartnerName = default, + CreateRequestConnectWebviewCustomization? connectWebviewCustomization = default, + bool? isSandbox = default, + string name = default, + string? organizationId = default, + CreateRequest.WebviewLogoShapeEnum? webviewLogoShape = default, + string? webviewPrimaryButtonColor = default, + string? webviewPrimaryButtonTextColor = default, + string? webviewSuccessMessage = default + ) + { + return ( + await CreateAsync( + new CreateRequest( + companyName: companyName, + connectPartnerName: connectPartnerName, + connectWebviewCustomization: connectWebviewCustomization, + isSandbox: isSandbox, + name: name, + organizationId: organizationId, + webviewLogoShape: webviewLogoShape, + webviewPrimaryButtonColor: webviewPrimaryButtonColor, + webviewPrimaryButtonTextColor: webviewPrimaryButtonTextColor, + webviewSuccessMessage: webviewSuccessMessage + ) + ) + ); + } + + /// + /// Request parameters for Get a Workspace. + /// + [DataContract(Name = "getRequest_request")] + public class GetRequest + { + [JsonConstructorAttribute] + public GetRequest() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "getResponse_response")] + public class GetResponse + { + [JsonConstructorAttribute] + protected GetResponse() { } + + public GetResponse(Workspace workspace = default) + { + Workspace = workspace; + } + + /// + /// OK + /// + [DataMember(Name = "workspace", IsRequired = false, EmitDefaultValue = false)] + public Workspace Workspace { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public Workspace Get(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/workspaces/get", requestOptions) + .EnsureData("/workspaces/get") + .Workspace; + } + + /// + /// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public Workspace Get() + { + return Get(new GetRequest()); + } + + /// + /// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public async Task GetAsync(GetRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/workspaces/get", requestOptions)) + .EnsureData("/workspaces/get") + .Workspace; + } + + /// + /// Returns the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public async Task GetAsync() + { + return (await GetAsync(new GetRequest())); + } + + /// + /// Request parameters for List Workspaces. + /// + [DataContract(Name = "listRequest_request")] + public class ListRequest + { + [JsonConstructorAttribute] + public ListRequest() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "listResponse_response")] + public class ListResponse + { + [JsonConstructorAttribute] + protected ListResponse() { } + + public ListResponse(List workspaces = default) + { + Workspaces = workspaces; + } + + /// + /// OK + /// + [DataMember(Name = "workspaces", IsRequired = false, EmitDefaultValue = false)] + public List Workspaces { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public List List(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Get("/workspaces/list", requestOptions) + .EnsureData("/workspaces/list") + .Workspaces; + } + + /// + /// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public List List() + { + return List(new ListRequest()); + } + + /// + /// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public async Task> ListAsync(ListRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return (await _seam.GetAsync("/workspaces/list", requestOptions)) + .EnsureData("/workspaces/list") + .Workspaces; + } + + /// + /// Returns a list of [workspaces](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public async Task> ListAsync() + { + return (await ListAsync(new ListRequest())); + } + + /// + /// Request parameters for Reset a Sandbox Workspace. + /// + [DataContract(Name = "resetSandboxRequest_request")] + public class ResetSandboxRequest + { + [JsonConstructorAttribute] + public ResetSandboxRequest() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "resetSandboxResponse_response")] + public class ResetSandboxResponse + { + [JsonConstructorAttribute] + protected ResetSandboxResponse() { } + + public ResetSandboxResponse(ActionAttempt actionAttempt = default) + { + ActionAttempt = actionAttempt; + } + + /// + /// OK + /// + [DataMember(Name = "action_attempt", IsRequired = false, EmitDefaultValue = false)] + public ActionAttempt ActionAttempt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. + /// + public ActionAttempt ResetSandbox(ResetSandboxRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return _seam + .Post("/workspaces/reset_sandbox", requestOptions) + .EnsureData("/workspaces/reset_sandbox") + .ActionAttempt; + } + + /// + /// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. + /// + public ActionAttempt ResetSandbox() + { + return ResetSandbox(new ResetSandboxRequest()); + } + + /// + /// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. + /// + public async Task ResetSandboxAsync(ResetSandboxRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + return ( + await _seam.PostAsync( + "/workspaces/reset_sandbox", + requestOptions + ) + ) + .EnsureData("/workspaces/reset_sandbox") + .ActionAttempt; + } + + /// + /// Resets the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. + /// + public async Task ResetSandboxAsync() + { + return (await ResetSandboxAsync(new ResetSandboxRequest())); + } + + /// + /// Request parameters for Update a Workspace. + /// + [DataContract(Name = "updateRequest_request")] + public class UpdateRequest + { + [JsonConstructorAttribute] + protected UpdateRequest() { } + + public UpdateRequest( + string? connectPartnerName = default, + UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, + bool? isPublishableKeyAuthEnabled = default, + bool? isSuspended = default, + string? name = default, + string? organizationId = default + ) + { + ConnectPartnerName = connectPartnerName; + ConnectWebviewCustomization = connectWebviewCustomization; + IsPublishableKeyAuthEnabled = isPublishableKeyAuthEnabled; + IsSuspended = isSuspended; + Name = name; + OrganizationId = organizationId; + } + + /// + /// Connect partner name for the workspace. + /// + [DataMember( + Name = "connect_partner_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ConnectPartnerName { get; set; } + + /// + /// [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews) customizations for the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember( + Name = "connect_webview_customization", + IsRequired = false, + EmitDefaultValue = false + )] + public UpdateRequestConnectWebviewCustomization? ConnectWebviewCustomization { get; set; } + + /// + /// Indicates whether publishable key authentication is enabled for this workspace. + /// + [DataMember( + Name = "is_publishable_key_auth_enabled", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsPublishableKeyAuthEnabled { get; set; } + + /// + /// Indicates whether the workspace is suspended. + /// + [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] + public bool? IsSuspended { get; set; } + + /// + /// Name of the workspace. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// ID of the organization to assign the workspace to. The authenticated user must be the owner of the workspace and an admin of the target organization. + /// + [DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] + public string? OrganizationId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "updateRequestConnectWebviewCustomization_model")] + public class UpdateRequestConnectWebviewCustomization + { + [JsonConstructorAttribute] + protected UpdateRequestConnectWebviewCustomization() { } + + public UpdateRequestConnectWebviewCustomization( + UpdateRequestConnectWebviewCustomization.LogoShapeEnum? logoShape = default, + string? primaryButtonColor = default, + string? primaryButtonTextColor = default, + string? successMessage = default + ) + { + LogoShape = logoShape; + PrimaryButtonColor = primaryButtonColor; + PrimaryButtonTextColor = primaryButtonTextColor; + SuccessMessage = successMessage; + } + + /// + /// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum LogoShapeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "circle")] + Circle = 1, + + [EnumMember(Value = "square")] + Square = 2, + } + + /// + /// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] + public UpdateRequestConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } + + /// + /// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember( + Name = "primary_button_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PrimaryButtonColor { get; set; } + + /// + /// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember( + Name = "primary_button_text_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PrimaryButtonTextColor { get; set; } + + /// + /// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] + public string? SuccessMessage { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public void Update(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + _seam.Patch("/workspaces/update", requestOptions); + } + + /// + /// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public void Update( + string? connectPartnerName = default, + UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, + bool? isPublishableKeyAuthEnabled = default, + bool? isSuspended = default, + string? name = default, + string? organizationId = default + ) + { + Update( + new UpdateRequest( + connectPartnerName: connectPartnerName, + connectWebviewCustomization: connectWebviewCustomization, + isPublishableKeyAuthEnabled: isPublishableKeyAuthEnabled, + isSuspended: isSuspended, + name: name, + organizationId: organizationId + ) + ); + } + + /// + /// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public async Task UpdateAsync(UpdateRequest request) + { + var requestOptions = new RequestOptions(); + requestOptions.Data = request; + await _seam.PatchAsync("/workspaces/update", requestOptions); + } + + /// + /// Updates the [workspace](https://www.seam.co/docs/core-concepts/workspaces) associated with the authentication value. + /// + public async Task UpdateAsync( + string? connectPartnerName = default, + UpdateRequestConnectWebviewCustomization? connectWebviewCustomization = default, + bool? isPublishableKeyAuthEnabled = default, + bool? isSuspended = default, + string? name = default, + string? organizationId = default + ) + { + await UpdateAsync( + new UpdateRequest( + connectPartnerName: connectPartnerName, + connectWebviewCustomization: connectWebviewCustomization, + isPublishableKeyAuthEnabled: isPublishableKeyAuthEnabled, + isSuspended: isSuspended, + name: name, + organizationId: organizationId + ) + ); + } + } } namespace Seam.Client { -public partial class SeamClient -{ -public Api.Workspaces Workspaces => new(this); -} + public partial class SeamClient + { + public Api.Workspaces Workspaces => new(this); + } -public partial interface ISeamClient -{ -public Api.Workspaces Workspaces { get; } -} + public partial interface ISeamClient + { + public Api.Workspaces Workspaces { get; } + } } diff --git a/src/Seam/Model/AccessCode.cs b/src/Seam/Model/AccessCode.cs index 8e167878..8b12561a 100644 --- a/src/Seam/Model/AccessCode.cs +++ b/src/Seam/Model/AccessCode.cs @@ -8,3300 +8,3771 @@ namespace Seam.Model { -/// -/// Represents a smart lock [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. -/// -/// Seam supports programming two types of access codes: [ongoing](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. -/// -/// In addition, for certain devices, Seam also supports [offline access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. -/// -/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. -/// -[DataContract(Name = "seamModel_accessCode_model")] -public class AccessCode -{ -[JsonConstructorAttribute] -protected AccessCode() { } - -public AccessCode(string accessCodeId = default, string? code = default, string? commonCodeKey = default, string createdAt = default, string deviceId = default, string displayStatus = default, AccessCodeDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, string? endsAt = default, List errors = default, bool? isBackup = default, bool isBackupAccessCodeAvailable = default, bool isExternalModificationAllowed = default, bool isManaged = default, bool isOfflineAccessCode = default, bool isOneTimeUse = default, bool? isScheduledOnDevice = default, bool? isWaitingForCodeAssignment = default, string? name = default, List pendingMutations = default, string? pulledBackupAccessCodeId = default, string? startsAt = default, AccessCode.StatusEnum status = default, AccessCode.TypeEnum type = default, List warnings = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -Code = code; -CommonCodeKey = commonCodeKey; -CreatedAt = createdAt; -DeviceId = deviceId; -DisplayStatus = displayStatus; -DormakabaOracodeMetadata = dormakabaOracodeMetadata; -EndsAt = endsAt; -Errors = errors; -IsBackup = isBackup; -IsBackupAccessCodeAvailable = isBackupAccessCodeAvailable; -IsExternalModificationAllowed = isExternalModificationAllowed; -IsManaged = isManaged; -IsOfflineAccessCode = isOfflineAccessCode; -IsOneTimeUse = isOneTimeUse; -IsScheduledOnDevice = isScheduledOnDevice; -IsWaitingForCodeAssignment = isWaitingForCodeAssignment; -Name = name; -PendingMutations = pendingMutations; -PulledBackupAccessCodeId = pulledBackupAccessCodeId; -StartsAt = startsAt; -Status = status; -Type = type; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessCodeErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsBridgeDisconnected), "bridge_disconnected")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsSubscriptionRequired), "subscription_required")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsAuxiliaryHeatRunning), "auxiliary_heat_running")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsMissingDeviceCredentials), "missing_device_credentials")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsAugustLockNotAuthorized), "august_lock_not_authorized")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsEmptyBackupAccessCodePool), "empty_backup_access_code_pool")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceDisconnected), "device_disconnected")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsHubDisconnected), "hub_disconnected")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceRemoved), "device_removed")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceOffline), "device_offline")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsInsufficientPermissions), "insufficient_permissions")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsAccountDisconnected), "account_disconnected")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToDelete), "failed_to_delete")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToUpdate), "failed_to_update")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToIssue), "failed_to_issue")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsCodeConstraintsViolated), "code_constraints_violated")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsAccessCodeInactive), "access_code_inactive")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsConflictingExternalModification), "conflicting_external_modification")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsNoSpaceForAccessCodeOnDevice), "no_space_for_access_code_on_device")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDuplicateCodeOnDevice), "duplicate_code_on_device")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToRemoveFromDevice), "failed_to_remove_from_device")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToSetOnDevice), "failed_to_set_on_device")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsProviderIssue), "provider_issue")] -public abstract class AccessCodeErrors -{ -public abstract string ErrorCode { get; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessCodeErrorsProviderIssue_model")] -public class AccessCodeErrorsProviderIssue : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsProviderIssue() { } - -public AccessCodeErrorsProviderIssue(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "provider_issue"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsFailedToSetOnDevice_model")] -public class AccessCodeErrorsFailedToSetOnDevice : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsFailedToSetOnDevice() { } - -public AccessCodeErrorsFailedToSetOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_set_on_device"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsFailedToRemoveFromDevice_model")] -public class AccessCodeErrorsFailedToRemoveFromDevice : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsFailedToRemoveFromDevice() { } - -public AccessCodeErrorsFailedToRemoveFromDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_remove_from_device"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsDuplicateCodeOnDevice_model")] -public class AccessCodeErrorsDuplicateCodeOnDevice : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsDuplicateCodeOnDevice() { } - -public AccessCodeErrorsDuplicateCodeOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string? managedAccessCodeId = default, string message = default, string? unmanagedAccessCodeId = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -ManagedAccessCodeId = managedAccessCodeId; -Message = message; -UnmanagedAccessCodeId = unmanagedAccessCodeId; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "duplicate_code_on_device"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// ID of the managed access code that conflicts with this managed access code, when Seam can identify it. -/// -[DataMember(Name = "managed_access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? ManagedAccessCodeId { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. -/// -[DataMember(Name = "unmanaged_access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? UnmanagedAccessCodeId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsNoSpaceForAccessCodeOnDevice_model")] -public class AccessCodeErrorsNoSpaceForAccessCodeOnDevice : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsNoSpaceForAccessCodeOnDevice() { } - -public AccessCodeErrorsNoSpaceForAccessCodeOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "no_space_for_access_code_on_device"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsConflictingExternalModification_model")] -public class AccessCodeErrorsConflictingExternalModification : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsConflictingExternalModification() { } - -public AccessCodeErrorsConflictingExternalModification(AccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? changeType = default, string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default, List? modifiedFields = default) -{ -ChangeType = changeType; -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -ModifiedFields = modifiedFields; -} - -/// -/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ChangeTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "modified")] -Modified = 1, - -[EnumMember(Value = "removed")] -Removed = 2, -} - -/// -/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. -/// -[DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] -public AccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? ChangeType { get; set; } - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "conflicting_external_modification"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// List of fields that were changed externally, with their previous and new values. -/// -[DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] -public List? ModifiedFields { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsConflictingExternalModificationModifiedFields_model")] -public class AccessCodeErrorsConflictingExternalModificationModifiedFields -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsConflictingExternalModificationModifiedFields() { } - -public AccessCodeErrorsConflictingExternalModificationModifiedFields(string field = default, string? from = default, string? to = default) -{ -Field = field; -From = from; -To = to; -} - -/// -/// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). -/// -[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] -public string Field { get; set; } - -/// -/// The previous value of the field. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public string? From { get; set; } - -/// -/// The new value of the field. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public string? To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsAccessCodeInactive_model")] -public class AccessCodeErrorsAccessCodeInactive : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsAccessCodeInactive() { } - -public AccessCodeErrorsAccessCodeInactive(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "access_code_inactive"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsCodeConstraintsViolated_model")] -public class AccessCodeErrorsCodeConstraintsViolated : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsCodeConstraintsViolated() { } - -public AccessCodeErrorsCodeConstraintsViolated(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "code_constraints_violated"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsFailedToIssue_model")] -public class AccessCodeErrorsFailedToIssue : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsFailedToIssue() { } - -public AccessCodeErrorsFailedToIssue(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_issue"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsFailedToUpdate_model")] -public class AccessCodeErrorsFailedToUpdate : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsFailedToUpdate() { } - -public AccessCodeErrorsFailedToUpdate(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_update"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsFailedToDelete_model")] -public class AccessCodeErrorsFailedToDelete : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsFailedToDelete() { } - -public AccessCodeErrorsFailedToDelete(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_delete"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsAccountDisconnected_model")] -public class AccessCodeErrorsAccountDisconnected : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsAccountDisconnected() { } - -public AccessCodeErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "account_disconnected"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsSaltoKsSubscriptionLimitExceeded_model")] -public class AccessCodeErrorsSaltoKsSubscriptionLimitExceeded : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsSaltoKsSubscriptionLimitExceeded() { } - -public AccessCodeErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsInsufficientPermissions_model")] -public class AccessCodeErrorsInsufficientPermissions : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsInsufficientPermissions() { } - -public AccessCodeErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "insufficient_permissions"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsDormakabaSitesDisconnected_model")] -public class AccessCodeErrorsDormakabaSitesDisconnected : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsDormakabaSitesDisconnected() { } - -public AccessCodeErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsDeviceOffline_model")] -public class AccessCodeErrorsDeviceOffline : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsDeviceOffline() { } - -public AccessCodeErrorsDeviceOffline(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_offline"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsDeviceRemoved_model")] -public class AccessCodeErrorsDeviceRemoved : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsDeviceRemoved() { } - -public AccessCodeErrorsDeviceRemoved(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_removed"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsHubDisconnected_model")] -public class AccessCodeErrorsHubDisconnected : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsHubDisconnected() { } - -public AccessCodeErrorsHubDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "hub_disconnected"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsDeviceDisconnected_model")] -public class AccessCodeErrorsDeviceDisconnected : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsDeviceDisconnected() { } - -public AccessCodeErrorsDeviceDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_disconnected"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsEmptyBackupAccessCodePool_model")] -public class AccessCodeErrorsEmptyBackupAccessCodePool : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsEmptyBackupAccessCodePool() { } - -public AccessCodeErrorsEmptyBackupAccessCodePool(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "empty_backup_access_code_pool"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsAugustLockNotAuthorized_model")] -public class AccessCodeErrorsAugustLockNotAuthorized : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsAugustLockNotAuthorized() { } - -public AccessCodeErrorsAugustLockNotAuthorized(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "august_lock_not_authorized"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsMissingDeviceCredentials_model")] -public class AccessCodeErrorsMissingDeviceCredentials : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsMissingDeviceCredentials() { } - -public AccessCodeErrorsMissingDeviceCredentials(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "missing_device_credentials"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsAuxiliaryHeatRunning_model")] -public class AccessCodeErrorsAuxiliaryHeatRunning : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsAuxiliaryHeatRunning() { } - -public AccessCodeErrorsAuxiliaryHeatRunning(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "auxiliary_heat_running"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsSubscriptionRequired_model")] -public class AccessCodeErrorsSubscriptionRequired : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsSubscriptionRequired() { } - -public AccessCodeErrorsSubscriptionRequired(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "subscription_required"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsBridgeDisconnected_model")] -public class AccessCodeErrorsBridgeDisconnected : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsBridgeDisconnected() { } - -public AccessCodeErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "bridge_disconnected"; - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeErrorsUnrecognized_model")] -public class AccessCodeErrorsUnrecognized : AccessCodeErrors -{ -[JsonConstructorAttribute] -protected AccessCodeErrorsUnrecognized() { } - -public AccessCodeErrorsUnrecognized(string errorCode = default, string message = default) -{ -ErrorCode = errorCode; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "mutation_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessCodePendingMutationsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingTimeFrame), "updating_time_frame")] -[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingName), "updating_name")] -[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingCode), "updating_code")] -[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsDeleting), "deleting")] -[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsDeferringCreation), "deferring_creation")] -[JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsCreating), "creating")] -public abstract class AccessCodePendingMutations -{ -public abstract string MutationCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsCreating_model")] -public class AccessCodePendingMutationsCreating : AccessCodePendingMutations -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsCreating() { } - -public AccessCodePendingMutationsCreating(string createdAt = default, string message = default, string mutationCode = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "creating"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsDeferringCreation_model")] -public class AccessCodePendingMutationsDeferringCreation : AccessCodePendingMutations -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsDeferringCreation() { } - -public AccessCodePendingMutationsDeferringCreation(string createdAt = default, string message = default, string mutationCode = default, string scheduledAt = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -ScheduledAt = scheduledAt; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "deferring_creation"; - -/// -/// Date and time at which Seam will attempt to program this access code on the device. -/// -[DataMember(Name = "scheduled_at", IsRequired = false, EmitDefaultValue = false)] -public string ScheduledAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsDeleting_model")] -public class AccessCodePendingMutationsDeleting : AccessCodePendingMutations -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsDeleting() { } - -public AccessCodePendingMutationsDeleting(string createdAt = default, string message = default, string mutationCode = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "deleting"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCode_model")] -public class AccessCodePendingMutationsUpdatingCode : AccessCodePendingMutations -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingCode() { } - -public AccessCodePendingMutationsUpdatingCode(string createdAt = default, AccessCodePendingMutationsUpdatingCodeFrom from = default, string message = default, string mutationCode = default, AccessCodePendingMutationsUpdatingCodeTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous code configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AccessCodePendingMutationsUpdatingCodeFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_code"; - -/// -/// New code configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AccessCodePendingMutationsUpdatingCodeTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCodeFrom_model")] -public class AccessCodePendingMutationsUpdatingCodeFrom -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingCodeFrom() { } - -public AccessCodePendingMutationsUpdatingCodeFrom(string? code = default) -{ -Code = code; -} - -/// -/// Previous PIN code. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCodeTo_model")] -public class AccessCodePendingMutationsUpdatingCodeTo -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingCodeTo() { } - -public AccessCodePendingMutationsUpdatingCodeTo(string? code = default) -{ -Code = code; -} - -/// -/// New PIN code. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingName_model")] -public class AccessCodePendingMutationsUpdatingName : AccessCodePendingMutations -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingName() { } - -public AccessCodePendingMutationsUpdatingName(string createdAt = default, AccessCodePendingMutationsUpdatingNameFrom from = default, string message = default, string mutationCode = default, AccessCodePendingMutationsUpdatingNameTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous name configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AccessCodePendingMutationsUpdatingNameFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_name"; - -/// -/// New name configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AccessCodePendingMutationsUpdatingNameTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingNameFrom_model")] -public class AccessCodePendingMutationsUpdatingNameFrom -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingNameFrom() { } - -public AccessCodePendingMutationsUpdatingNameFrom(string? name = default) -{ -Name = name; -} - -/// -/// Previous access code name. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingNameTo_model")] -public class AccessCodePendingMutationsUpdatingNameTo -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingNameTo() { } - -public AccessCodePendingMutationsUpdatingNameTo(string? name = default) -{ -Name = name; -} - -/// -/// New access code name. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrame_model")] -public class AccessCodePendingMutationsUpdatingTimeFrame : AccessCodePendingMutations -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingTimeFrame() { } - -public AccessCodePendingMutationsUpdatingTimeFrame(string createdAt = default, AccessCodePendingMutationsUpdatingTimeFrameFrom from = default, string message = default, string mutationCode = default, AccessCodePendingMutationsUpdatingTimeFrameTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous time frame configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AccessCodePendingMutationsUpdatingTimeFrameFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_time_frame"; - -/// -/// New time frame configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AccessCodePendingMutationsUpdatingTimeFrameTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrameFrom_model")] -public class AccessCodePendingMutationsUpdatingTimeFrameFrom -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingTimeFrameFrom() { } - -public AccessCodePendingMutationsUpdatingTimeFrameFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Previous end time for the access code. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Previous start time for the access code. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrameTo_model")] -public class AccessCodePendingMutationsUpdatingTimeFrameTo -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUpdatingTimeFrameTo() { } - -public AccessCodePendingMutationsUpdatingTimeFrameTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// New end time for the access code. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// New start time for the access code. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodePendingMutationsUnrecognized_model")] -public class AccessCodePendingMutationsUnrecognized : AccessCodePendingMutations -{ -[JsonConstructorAttribute] -protected AccessCodePendingMutationsUnrecognized() { } - -public AccessCodePendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) -{ -MutationCode = mutationCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "unrecognized"; - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "setting")] -Setting = 1, - -[EnumMember(Value = "set")] -Set = 2, - -[EnumMember(Value = "unset")] -Unset = 3, - -[EnumMember(Value = "removing")] -Removing = 4, - -[EnumMember(Value = "unknown")] -Unknown = 5, -} - -/// -/// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "time_bound")] -TimeBound = 1, - -[EnumMember(Value = "ongoing")] -Ongoing = 2, -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessCodeWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsUnknownIssueWithAccessCode), "unknown_issue_with_access_code")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsBeingDeleted), "being_deleted")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsUsingBackupAccessCode), "using_backup_access_code")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsManagementTransferred), "management_transferred")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours), "igloo_algopin_must_be_used_within_24_hours")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsThirdPartyIntegrationDetected), "third_party_integration_detected")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsDelayInIssuing), "delay_in_issuing")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsDelayInRemovingFromDevice), "delay_in_removing_from_device")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsDelayInSettingOnDevice), "delay_in_setting_on_device")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsExternalModificationInEffect), "external_modification_in_effect")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone), "time_frame_adjusted_for_unknown_time_zone")] -[JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsCodeRotatesPeriodically), "code_rotates_periodically")] -public abstract class AccessCodeWarnings -{ -public abstract string WarningCode { get; } - -public abstract string? CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessCodeWarningsCodeRotatesPeriodically_model")] -public class AccessCodeWarningsCodeRotatesPeriodically : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsCodeRotatesPeriodically() { } - -public AccessCodeWarningsCodeRotatesPeriodically(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "code_rotates_periodically"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsTimeFrameAdjustedForUnknownTimeZone_model")] -public class AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone() { } - -public AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "time_frame_adjusted_for_unknown_time_zone"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsExternalModificationInEffect_model")] -public class AccessCodeWarningsExternalModificationInEffect : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsExternalModificationInEffect() { } - -public AccessCodeWarningsExternalModificationInEffect(AccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? changeType = default, string? createdAt = default, string message = default, List? modifiedFields = default, string warningCode = default) -{ -ChangeType = changeType; -CreatedAt = createdAt; -Message = message; -ModifiedFields = modifiedFields; -WarningCode = warningCode; -} - -/// -/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ChangeTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "modified")] -Modified = 1, - -[EnumMember(Value = "removed")] -Removed = 2, -} - -/// -/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. -/// -[DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] -public AccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? ChangeType { get; set; } - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// List of fields that were changed externally, with their previous and new values. -/// -[DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] -public List? ModifiedFields { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "external_modification_in_effect"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsExternalModificationInEffectModifiedFields_model")] -public class AccessCodeWarningsExternalModificationInEffectModifiedFields -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsExternalModificationInEffectModifiedFields() { } - -public AccessCodeWarningsExternalModificationInEffectModifiedFields(string field = default, string? from = default, string? to = default) -{ -Field = field; -From = from; -To = to; -} - -/// -/// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). -/// -[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] -public string Field { get; set; } - -/// -/// The previous value of the field. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public string? From { get; set; } - -/// -/// The new value of the field. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public string? To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsDelayInSettingOnDevice_model")] -public class AccessCodeWarningsDelayInSettingOnDevice : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsDelayInSettingOnDevice() { } - -public AccessCodeWarningsDelayInSettingOnDevice(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "delay_in_setting_on_device"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsDelayInRemovingFromDevice_model")] -public class AccessCodeWarningsDelayInRemovingFromDevice : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsDelayInRemovingFromDevice() { } - -public AccessCodeWarningsDelayInRemovingFromDevice(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "delay_in_removing_from_device"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsDelayInIssuing_model")] -public class AccessCodeWarningsDelayInIssuing : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsDelayInIssuing() { } - -public AccessCodeWarningsDelayInIssuing(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "delay_in_issuing"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsThirdPartyIntegrationDetected_model")] -public class AccessCodeWarningsThirdPartyIntegrationDetected : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsThirdPartyIntegrationDetected() { } - -public AccessCodeWarningsThirdPartyIntegrationDetected(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "third_party_integration_detected"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours_model")] -public class AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours() { } - -public AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "igloo_algopin_must_be_used_within_24_hours"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsManagementTransferred_model")] -public class AccessCodeWarningsManagementTransferred : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsManagementTransferred() { } - -public AccessCodeWarningsManagementTransferred(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "management_transferred"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsUsingBackupAccessCode_model")] -public class AccessCodeWarningsUsingBackupAccessCode : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsUsingBackupAccessCode() { } - -public AccessCodeWarningsUsingBackupAccessCode(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "using_backup_access_code"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsBeingDeleted_model")] -public class AccessCodeWarningsBeingDeleted : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsBeingDeleted() { } - -public AccessCodeWarningsBeingDeleted(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsUnknownIssueWithAccessCode_model")] -public class AccessCodeWarningsUnknownIssueWithAccessCode : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsUnknownIssueWithAccessCode() { } - -public AccessCodeWarningsUnknownIssueWithAccessCode(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unknown_issue_with_access_code"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeWarningsUnrecognized_model")] -public class AccessCodeWarningsUnrecognized : AccessCodeWarnings -{ -[JsonConstructorAttribute] -protected AccessCodeWarningsUnrecognized() { } - -public AccessCodeWarningsUnrecognized(string warningCode = default, string? createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Unique identifier for the access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Code used for access. Typically, a numeric or alphanumeric string. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Unique identifier for a group of access codes that share the same code. -/// -[DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] -public string? CommonCodeKey { get; set; } - -/// -/// Date and time at which the access code was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier for the device associated with the access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable label for where this access code sits in its lifecycle, for example `Active`, `Issuing`, or `Expired`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`. -/// -[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] -public string DisplayStatus { get; set; } - -/// -/// Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices. -/// -[DataMember(Name = "dormakaba_oracode_metadata", IsRequired = false, EmitDefaultValue = false)] -public AccessCodeDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } - -/// -/// Date and time after which the time-bound access code becomes inactive. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Errors associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Indicates whether the access code is a backup code. -/// -[DataMember(Name = "is_backup", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBackup { get; set; } - -/// -/// Indicates whether a backup access code is available for use if the primary access code is lost or compromised. -/// -[DataMember(Name = "is_backup_access_code_available", IsRequired = false, EmitDefaultValue = false)] -public bool IsBackupAccessCodeAvailable { get; set; } - -/// -/// Indicates whether changes to the access code from external sources are permitted. -/// -[DataMember(Name = "is_external_modification_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool IsExternalModificationAllowed { get; set; } - -/// -/// Indicates whether Seam manages the access code. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection. -/// -[DataMember(Name = "is_offline_access_code", IsRequired = false, EmitDefaultValue = false)] -public bool IsOfflineAccessCode { get; set; } - -/// -/// Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use. -/// -[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] -public bool IsOneTimeUse { get; set; } - -/// -/// Indicates whether the code is set on the device according to a preconfigured schedule. -/// -[DataMember(Name = "is_scheduled_on_device", IsRequired = false, EmitDefaultValue = false)] -public bool? IsScheduledOnDevice { get; set; } - -/// -/// Indicates whether the access code is waiting for a code assignment. -/// -[DataMember(Name = "is_waiting_for_code_assignment", IsRequired = false, EmitDefaultValue = false)] -public bool? IsWaitingForCodeAssignment { get; set; } - -/// -/// Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device. -/// -[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] -public List PendingMutations { get; set; } - -/// -/// Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. -/// -[DataMember(Name = "pulled_backup_access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? PulledBackupAccessCodeId { get; set; } - -/// -/// Date and time at which the time-bound access code becomes active. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). -/// -[Obsolete("Use `display_status` to show a person the code's state. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`.")] -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public AccessCode.StatusEnum Status { get; set; } - -/// -/// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public AccessCode.TypeEnum Type { get; set; } - -/// -/// Warnings associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// Unique identifier for the Seam workspace associated with the access code. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessCodeDormakabaOracodeMetadata_model")] -public class AccessCodeDormakabaOracodeMetadata -{ -[JsonConstructorAttribute] -protected AccessCodeDormakabaOracodeMetadata() { } - -public AccessCodeDormakabaOracodeMetadata(bool? isCancellable = default, bool? isEarlyCheckinAble = default, bool? isExtendable = default, bool? isOverridable = default, string? siteName = default, float? stayId = default, string? userLevelId = default, string? userLevelName = default) -{ -IsCancellable = isCancellable; -IsEarlyCheckinAble = isEarlyCheckinAble; -IsExtendable = isExtendable; -IsOverridable = isOverridable; -SiteName = siteName; -StayId = stayId; -UserLevelId = userLevelId; -UserLevelName = userLevelName; -} - -/// -/// Indicates whether the stay can be cancelled via the Dormakaba Oracode API. -/// -[DataMember(Name = "is_cancellable", IsRequired = false, EmitDefaultValue = false)] -public bool? IsCancellable { get; set; } - -/// -/// Indicates whether early check-in is available for this stay. -/// -[DataMember(Name = "is_early_checkin_able", IsRequired = false, EmitDefaultValue = false)] -public bool? IsEarlyCheckinAble { get; set; } - -/// -/// Indicates whether the stay can be extended via the Dormakaba Oracode API. -/// -[DataMember(Name = "is_extendable", IsRequired = false, EmitDefaultValue = false)] -public bool? IsExtendable { get; set; } - -/// -/// Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. -/// -[DataMember(Name = "is_overridable", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOverridable { get; set; } - -/// -/// Dormakaba Oracode site name associated with this access code. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -/// -/// Dormakaba Oracode stay ID associated with this access code. -/// -[DataMember(Name = "stay_id", IsRequired = false, EmitDefaultValue = false)] -public float? StayId { get; set; } - -/// -/// Dormakaba Oracode user level ID associated with this access code. -/// -[DataMember(Name = "user_level_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserLevelId { get; set; } - -/// -/// Dormakaba Oracode user level name associated with this access code. -/// -[DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] -public string? UserLevelName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a smart lock [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. + /// + /// Seam supports programming two types of access codes: [ongoing](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. + /// + /// In addition, for certain devices, Seam also supports [offline access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. + /// + /// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + /// + [DataContract(Name = "seamModel_accessCode_model")] + public class AccessCode + { + [JsonConstructorAttribute] + protected AccessCode() { } + + public AccessCode( + string accessCodeId = default, + string? code = default, + string? commonCodeKey = default, + string createdAt = default, + string deviceId = default, + string displayStatus = default, + AccessCodeDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, + string? endsAt = default, + List errors = default, + bool? isBackup = default, + bool isBackupAccessCodeAvailable = default, + bool isExternalModificationAllowed = default, + bool isManaged = default, + bool isOfflineAccessCode = default, + bool isOneTimeUse = default, + bool? isScheduledOnDevice = default, + bool? isWaitingForCodeAssignment = default, + string? name = default, + List pendingMutations = default, + string? pulledBackupAccessCodeId = default, + string? startsAt = default, + AccessCode.StatusEnum status = default, + AccessCode.TypeEnum type = default, + List warnings = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + Code = code; + CommonCodeKey = commonCodeKey; + CreatedAt = createdAt; + DeviceId = deviceId; + DisplayStatus = displayStatus; + DormakabaOracodeMetadata = dormakabaOracodeMetadata; + EndsAt = endsAt; + Errors = errors; + IsBackup = isBackup; + IsBackupAccessCodeAvailable = isBackupAccessCodeAvailable; + IsExternalModificationAllowed = isExternalModificationAllowed; + IsManaged = isManaged; + IsOfflineAccessCode = isOfflineAccessCode; + IsOneTimeUse = isOneTimeUse; + IsScheduledOnDevice = isScheduledOnDevice; + IsWaitingForCodeAssignment = isWaitingForCodeAssignment; + Name = name; + PendingMutations = pendingMutations; + PulledBackupAccessCodeId = pulledBackupAccessCodeId; + StartsAt = startsAt; + Status = status; + Type = type; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessCodeErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsBridgeDisconnected), + "bridge_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsSubscriptionRequired), + "subscription_required" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsAuxiliaryHeatRunning), + "auxiliary_heat_running" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsMissingDeviceCredentials), + "missing_device_credentials" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsAugustLockNotAuthorized), + "august_lock_not_authorized" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsEmptyBackupAccessCodePool), + "empty_backup_access_code_pool" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsDeviceDisconnected), + "device_disconnected" + )] + [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsHubDisconnected), "hub_disconnected")] + [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceRemoved), "device_removed")] + [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsDeviceOffline), "device_offline")] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsDormakabaSitesDisconnected), + "dormakaba_sites_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsInsufficientPermissions), + "insufficient_permissions" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsSaltoKsSubscriptionLimitExceeded), + "salto_ks_subscription_limit_exceeded" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsAccountDisconnected), + "account_disconnected" + )] + [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToDelete), "failed_to_delete")] + [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToUpdate), "failed_to_update")] + [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsFailedToIssue), "failed_to_issue")] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsCodeConstraintsViolated), + "code_constraints_violated" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsAccessCodeInactive), + "access_code_inactive" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsConflictingExternalModification), + "conflicting_external_modification" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsNoSpaceForAccessCodeOnDevice), + "no_space_for_access_code_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsDuplicateCodeOnDevice), + "duplicate_code_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsFailedToRemoveFromDevice), + "failed_to_remove_from_device" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeErrorsFailedToSetOnDevice), + "failed_to_set_on_device" + )] + [JsonSubtypes.KnownSubType(typeof(AccessCodeErrorsProviderIssue), "provider_issue")] + public abstract class AccessCodeErrors + { + public abstract string ErrorCode { get; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessCodeErrorsProviderIssue_model")] + public class AccessCodeErrorsProviderIssue : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsProviderIssue() { } + + public AccessCodeErrorsProviderIssue( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "provider_issue"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsFailedToSetOnDevice_model")] + public class AccessCodeErrorsFailedToSetOnDevice : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsFailedToSetOnDevice() { } + + public AccessCodeErrorsFailedToSetOnDevice( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_set_on_device"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsFailedToRemoveFromDevice_model")] + public class AccessCodeErrorsFailedToRemoveFromDevice : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsFailedToRemoveFromDevice() { } + + public AccessCodeErrorsFailedToRemoveFromDevice( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_remove_from_device"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsDuplicateCodeOnDevice_model")] + public class AccessCodeErrorsDuplicateCodeOnDevice : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsDuplicateCodeOnDevice() { } + + public AccessCodeErrorsDuplicateCodeOnDevice( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string? managedAccessCodeId = default, + string message = default, + string? unmanagedAccessCodeId = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + ManagedAccessCodeId = managedAccessCodeId; + Message = message; + UnmanagedAccessCodeId = unmanagedAccessCodeId; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "duplicate_code_on_device"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// ID of the managed access code that conflicts with this managed access code, when Seam can identify it. + /// + [DataMember( + Name = "managed_access_code_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ManagedAccessCodeId { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. + /// + [DataMember( + Name = "unmanaged_access_code_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UnmanagedAccessCodeId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsNoSpaceForAccessCodeOnDevice_model")] + public class AccessCodeErrorsNoSpaceForAccessCodeOnDevice : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsNoSpaceForAccessCodeOnDevice() { } + + public AccessCodeErrorsNoSpaceForAccessCodeOnDevice( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "no_space_for_access_code_on_device"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsConflictingExternalModification_model")] + public class AccessCodeErrorsConflictingExternalModification : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsConflictingExternalModification() { } + + public AccessCodeErrorsConflictingExternalModification( + AccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? changeType = + default, + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default, + List? modifiedFields = + default + ) + { + ChangeType = changeType; + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + ModifiedFields = modifiedFields; + } + + /// + /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ChangeTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "modified")] + Modified = 1, + + [EnumMember(Value = "removed")] + Removed = 2, + } + + /// + /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + /// + [DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] + public AccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? ChangeType { get; set; } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "conflicting_external_modification"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// List of fields that were changed externally, with their previous and new values. + /// + [DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] + public List? ModifiedFields { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_accessCodeErrorsConflictingExternalModificationModifiedFields_model" + )] + public class AccessCodeErrorsConflictingExternalModificationModifiedFields + { + [JsonConstructorAttribute] + protected AccessCodeErrorsConflictingExternalModificationModifiedFields() { } + + public AccessCodeErrorsConflictingExternalModificationModifiedFields( + string field = default, + string? from = default, + string? to = default + ) + { + Field = field; + From = from; + To = to; + } + + /// + /// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). + /// + [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] + public string Field { get; set; } + + /// + /// The previous value of the field. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public string? From { get; set; } + + /// + /// The new value of the field. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public string? To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsAccessCodeInactive_model")] + public class AccessCodeErrorsAccessCodeInactive : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsAccessCodeInactive() { } + + public AccessCodeErrorsAccessCodeInactive( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "access_code_inactive"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsCodeConstraintsViolated_model")] + public class AccessCodeErrorsCodeConstraintsViolated : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsCodeConstraintsViolated() { } + + public AccessCodeErrorsCodeConstraintsViolated( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "code_constraints_violated"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsFailedToIssue_model")] + public class AccessCodeErrorsFailedToIssue : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsFailedToIssue() { } + + public AccessCodeErrorsFailedToIssue( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_issue"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsFailedToUpdate_model")] + public class AccessCodeErrorsFailedToUpdate : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsFailedToUpdate() { } + + public AccessCodeErrorsFailedToUpdate( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_update"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsFailedToDelete_model")] + public class AccessCodeErrorsFailedToDelete : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsFailedToDelete() { } + + public AccessCodeErrorsFailedToDelete( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_delete"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsAccountDisconnected_model")] + public class AccessCodeErrorsAccountDisconnected : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsAccountDisconnected() { } + + public AccessCodeErrorsAccountDisconnected( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "account_disconnected"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsSaltoKsSubscriptionLimitExceeded_model")] + public class AccessCodeErrorsSaltoKsSubscriptionLimitExceeded : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsSaltoKsSubscriptionLimitExceeded() { } + + public AccessCodeErrorsSaltoKsSubscriptionLimitExceeded( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsInsufficientPermissions_model")] + public class AccessCodeErrorsInsufficientPermissions : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsInsufficientPermissions() { } + + public AccessCodeErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsDormakabaSitesDisconnected_model")] + public class AccessCodeErrorsDormakabaSitesDisconnected : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsDormakabaSitesDisconnected() { } + + public AccessCodeErrorsDormakabaSitesDisconnected( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsDeviceOffline_model")] + public class AccessCodeErrorsDeviceOffline : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsDeviceOffline() { } + + public AccessCodeErrorsDeviceOffline( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_offline"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsDeviceRemoved_model")] + public class AccessCodeErrorsDeviceRemoved : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsDeviceRemoved() { } + + public AccessCodeErrorsDeviceRemoved( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_removed"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsHubDisconnected_model")] + public class AccessCodeErrorsHubDisconnected : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsHubDisconnected() { } + + public AccessCodeErrorsHubDisconnected( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "hub_disconnected"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsDeviceDisconnected_model")] + public class AccessCodeErrorsDeviceDisconnected : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsDeviceDisconnected() { } + + public AccessCodeErrorsDeviceDisconnected( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_disconnected"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsEmptyBackupAccessCodePool_model")] + public class AccessCodeErrorsEmptyBackupAccessCodePool : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsEmptyBackupAccessCodePool() { } + + public AccessCodeErrorsEmptyBackupAccessCodePool( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "empty_backup_access_code_pool"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsAugustLockNotAuthorized_model")] + public class AccessCodeErrorsAugustLockNotAuthorized : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsAugustLockNotAuthorized() { } + + public AccessCodeErrorsAugustLockNotAuthorized( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "august_lock_not_authorized"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsMissingDeviceCredentials_model")] + public class AccessCodeErrorsMissingDeviceCredentials : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsMissingDeviceCredentials() { } + + public AccessCodeErrorsMissingDeviceCredentials( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "missing_device_credentials"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsAuxiliaryHeatRunning_model")] + public class AccessCodeErrorsAuxiliaryHeatRunning : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsAuxiliaryHeatRunning() { } + + public AccessCodeErrorsAuxiliaryHeatRunning( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "auxiliary_heat_running"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsSubscriptionRequired_model")] + public class AccessCodeErrorsSubscriptionRequired : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsSubscriptionRequired() { } + + public AccessCodeErrorsSubscriptionRequired( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "subscription_required"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsBridgeDisconnected_model")] + public class AccessCodeErrorsBridgeDisconnected : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsBridgeDisconnected() { } + + public AccessCodeErrorsBridgeDisconnected( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "bridge_disconnected"; + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeErrorsUnrecognized_model")] + public class AccessCodeErrorsUnrecognized : AccessCodeErrors + { + [JsonConstructorAttribute] + protected AccessCodeErrorsUnrecognized() { } + + public AccessCodeErrorsUnrecognized( + string errorCode = default, + string message = default + ) + { + ErrorCode = errorCode; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessCodePendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AccessCodePendingMutationsUpdatingTimeFrame), + "updating_time_frame" + )] + [JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingName), "updating_name")] + [JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsUpdatingCode), "updating_code")] + [JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsDeleting), "deleting")] + [JsonSubtypes.KnownSubType( + typeof(AccessCodePendingMutationsDeferringCreation), + "deferring_creation" + )] + [JsonSubtypes.KnownSubType(typeof(AccessCodePendingMutationsCreating), "creating")] + public abstract class AccessCodePendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsCreating_model")] + public class AccessCodePendingMutationsCreating : AccessCodePendingMutations + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsCreating() { } + + public AccessCodePendingMutationsCreating( + string createdAt = default, + string message = default, + string mutationCode = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "creating"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsDeferringCreation_model")] + public class AccessCodePendingMutationsDeferringCreation : AccessCodePendingMutations + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsDeferringCreation() { } + + public AccessCodePendingMutationsDeferringCreation( + string createdAt = default, + string message = default, + string mutationCode = default, + string scheduledAt = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + ScheduledAt = scheduledAt; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "deferring_creation"; + + /// + /// Date and time at which Seam will attempt to program this access code on the device. + /// + [DataMember(Name = "scheduled_at", IsRequired = false, EmitDefaultValue = false)] + public string ScheduledAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsDeleting_model")] + public class AccessCodePendingMutationsDeleting : AccessCodePendingMutations + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsDeleting() { } + + public AccessCodePendingMutationsDeleting( + string createdAt = default, + string message = default, + string mutationCode = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "deleting"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCode_model")] + public class AccessCodePendingMutationsUpdatingCode : AccessCodePendingMutations + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingCode() { } + + public AccessCodePendingMutationsUpdatingCode( + string createdAt = default, + AccessCodePendingMutationsUpdatingCodeFrom from = default, + string message = default, + string mutationCode = default, + AccessCodePendingMutationsUpdatingCodeTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous code configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AccessCodePendingMutationsUpdatingCodeFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_code"; + + /// + /// New code configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AccessCodePendingMutationsUpdatingCodeTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCodeFrom_model")] + public class AccessCodePendingMutationsUpdatingCodeFrom + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingCodeFrom() { } + + public AccessCodePendingMutationsUpdatingCodeFrom(string? code = default) + { + Code = code; + } + + /// + /// Previous PIN code. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingCodeTo_model")] + public class AccessCodePendingMutationsUpdatingCodeTo + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingCodeTo() { } + + public AccessCodePendingMutationsUpdatingCodeTo(string? code = default) + { + Code = code; + } + + /// + /// New PIN code. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingName_model")] + public class AccessCodePendingMutationsUpdatingName : AccessCodePendingMutations + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingName() { } + + public AccessCodePendingMutationsUpdatingName( + string createdAt = default, + AccessCodePendingMutationsUpdatingNameFrom from = default, + string message = default, + string mutationCode = default, + AccessCodePendingMutationsUpdatingNameTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous name configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AccessCodePendingMutationsUpdatingNameFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_name"; + + /// + /// New name configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AccessCodePendingMutationsUpdatingNameTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingNameFrom_model")] + public class AccessCodePendingMutationsUpdatingNameFrom + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingNameFrom() { } + + public AccessCodePendingMutationsUpdatingNameFrom(string? name = default) + { + Name = name; + } + + /// + /// Previous access code name. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingNameTo_model")] + public class AccessCodePendingMutationsUpdatingNameTo + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingNameTo() { } + + public AccessCodePendingMutationsUpdatingNameTo(string? name = default) + { + Name = name; + } + + /// + /// New access code name. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrame_model")] + public class AccessCodePendingMutationsUpdatingTimeFrame : AccessCodePendingMutations + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingTimeFrame() { } + + public AccessCodePendingMutationsUpdatingTimeFrame( + string createdAt = default, + AccessCodePendingMutationsUpdatingTimeFrameFrom from = default, + string message = default, + string mutationCode = default, + AccessCodePendingMutationsUpdatingTimeFrameTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous time frame configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AccessCodePendingMutationsUpdatingTimeFrameFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_time_frame"; + + /// + /// New time frame configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AccessCodePendingMutationsUpdatingTimeFrameTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrameFrom_model")] + public class AccessCodePendingMutationsUpdatingTimeFrameFrom + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingTimeFrameFrom() { } + + public AccessCodePendingMutationsUpdatingTimeFrameFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time for the access code. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time for the access code. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUpdatingTimeFrameTo_model")] + public class AccessCodePendingMutationsUpdatingTimeFrameTo + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUpdatingTimeFrameTo() { } + + public AccessCodePendingMutationsUpdatingTimeFrameTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time for the access code. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time for the access code. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodePendingMutationsUnrecognized_model")] + public class AccessCodePendingMutationsUnrecognized : AccessCodePendingMutations + { + [JsonConstructorAttribute] + protected AccessCodePendingMutationsUnrecognized() { } + + public AccessCodePendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "setting")] + Setting = 1, + + [EnumMember(Value = "set")] + Set = 2, + + [EnumMember(Value = "unset")] + Unset = 3, + + [EnumMember(Value = "removing")] + Removing = 4, + + [EnumMember(Value = "unknown")] + Unknown = 5, + } + + /// + /// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "time_bound")] + TimeBound = 1, + + [EnumMember(Value = "ongoing")] + Ongoing = 2, + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessCodeWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsUnknownIssueWithAccessCode), + "unknown_issue_with_access_code" + )] + [JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsBeingDeleted), "being_deleted")] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsUsingBackupAccessCode), + "using_backup_access_code" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsManagementTransferred), + "management_transferred" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours), + "igloo_algopin_must_be_used_within_24_hours" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsThirdPartyIntegrationDetected), + "third_party_integration_detected" + )] + [JsonSubtypes.KnownSubType(typeof(AccessCodeWarningsDelayInIssuing), "delay_in_issuing")] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsDelayInRemovingFromDevice), + "delay_in_removing_from_device" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsDelayInSettingOnDevice), + "delay_in_setting_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsExternalModificationInEffect), + "external_modification_in_effect" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone), + "time_frame_adjusted_for_unknown_time_zone" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessCodeWarningsCodeRotatesPeriodically), + "code_rotates_periodically" + )] + public abstract class AccessCodeWarnings + { + public abstract string WarningCode { get; } + + public abstract string? CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessCodeWarningsCodeRotatesPeriodically_model")] + public class AccessCodeWarningsCodeRotatesPeriodically : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsCodeRotatesPeriodically() { } + + public AccessCodeWarningsCodeRotatesPeriodically( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "code_rotates_periodically"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_accessCodeWarningsTimeFrameAdjustedForUnknownTimeZone_model" + )] + public class AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone() { } + + public AccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "time_frame_adjusted_for_unknown_time_zone"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsExternalModificationInEffect_model")] + public class AccessCodeWarningsExternalModificationInEffect : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsExternalModificationInEffect() { } + + public AccessCodeWarningsExternalModificationInEffect( + AccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? changeType = default, + string? createdAt = default, + string message = default, + List? modifiedFields = + default, + string warningCode = default + ) + { + ChangeType = changeType; + CreatedAt = createdAt; + Message = message; + ModifiedFields = modifiedFields; + WarningCode = warningCode; + } + + /// + /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ChangeTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "modified")] + Modified = 1, + + [EnumMember(Value = "removed")] + Removed = 2, + } + + /// + /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + /// + [DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] + public AccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? ChangeType { get; set; } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// List of fields that were changed externally, with their previous and new values. + /// + [DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] + public List? ModifiedFields { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "external_modification_in_effect"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_accessCodeWarningsExternalModificationInEffectModifiedFields_model" + )] + public class AccessCodeWarningsExternalModificationInEffectModifiedFields + { + [JsonConstructorAttribute] + protected AccessCodeWarningsExternalModificationInEffectModifiedFields() { } + + public AccessCodeWarningsExternalModificationInEffectModifiedFields( + string field = default, + string? from = default, + string? to = default + ) + { + Field = field; + From = from; + To = to; + } + + /// + /// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). + /// + [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] + public string Field { get; set; } + + /// + /// The previous value of the field. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public string? From { get; set; } + + /// + /// The new value of the field. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public string? To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsDelayInSettingOnDevice_model")] + public class AccessCodeWarningsDelayInSettingOnDevice : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsDelayInSettingOnDevice() { } + + public AccessCodeWarningsDelayInSettingOnDevice( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_setting_on_device"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsDelayInRemovingFromDevice_model")] + public class AccessCodeWarningsDelayInRemovingFromDevice : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsDelayInRemovingFromDevice() { } + + public AccessCodeWarningsDelayInRemovingFromDevice( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_removing_from_device"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsDelayInIssuing_model")] + public class AccessCodeWarningsDelayInIssuing : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsDelayInIssuing() { } + + public AccessCodeWarningsDelayInIssuing( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_issuing"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsThirdPartyIntegrationDetected_model")] + public class AccessCodeWarningsThirdPartyIntegrationDetected : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsThirdPartyIntegrationDetected() { } + + public AccessCodeWarningsThirdPartyIntegrationDetected( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "third_party_integration_detected"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_accessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours_model" + )] + public class AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours() { } + + public AccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "igloo_algopin_must_be_used_within_24_hours"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsManagementTransferred_model")] + public class AccessCodeWarningsManagementTransferred : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsManagementTransferred() { } + + public AccessCodeWarningsManagementTransferred( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "management_transferred"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsUsingBackupAccessCode_model")] + public class AccessCodeWarningsUsingBackupAccessCode : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsUsingBackupAccessCode() { } + + public AccessCodeWarningsUsingBackupAccessCode( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "using_backup_access_code"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsBeingDeleted_model")] + public class AccessCodeWarningsBeingDeleted : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsBeingDeleted() { } + + public AccessCodeWarningsBeingDeleted( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsUnknownIssueWithAccessCode_model")] + public class AccessCodeWarningsUnknownIssueWithAccessCode : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsUnknownIssueWithAccessCode() { } + + public AccessCodeWarningsUnknownIssueWithAccessCode( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_access_code"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeWarningsUnrecognized_model")] + public class AccessCodeWarningsUnrecognized : AccessCodeWarnings + { + [JsonConstructorAttribute] + protected AccessCodeWarningsUnrecognized() { } + + public AccessCodeWarningsUnrecognized( + string warningCode = default, + string? createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Unique identifier for the access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Code used for access. Typically, a numeric or alphanumeric string. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Unique identifier for a group of access codes that share the same code. + /// + [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] + public string? CommonCodeKey { get; set; } + + /// + /// Date and time at which the access code was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier for the device associated with the access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable label for where this access code sits in its lifecycle, for example `Active`, `Issuing`, or `Expired`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + + /// + /// Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices. + /// + [DataMember( + Name = "dormakaba_oracode_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public AccessCodeDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } + + /// + /// Date and time after which the time-bound access code becomes inactive. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Indicates whether the access code is a backup code. + /// + [DataMember(Name = "is_backup", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBackup { get; set; } + + /// + /// Indicates whether a backup access code is available for use if the primary access code is lost or compromised. + /// + [DataMember( + Name = "is_backup_access_code_available", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsBackupAccessCodeAvailable { get; set; } + + /// + /// Indicates whether changes to the access code from external sources are permitted. + /// + [DataMember( + Name = "is_external_modification_allowed", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsExternalModificationAllowed { get; set; } + + /// + /// Indicates whether Seam manages the access code. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection. + /// + [DataMember(Name = "is_offline_access_code", IsRequired = false, EmitDefaultValue = false)] + public bool IsOfflineAccessCode { get; set; } + + /// + /// Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use. + /// + [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] + public bool IsOneTimeUse { get; set; } + + /// + /// Indicates whether the code is set on the device according to a preconfigured schedule. + /// + [DataMember(Name = "is_scheduled_on_device", IsRequired = false, EmitDefaultValue = false)] + public bool? IsScheduledOnDevice { get; set; } + + /// + /// Indicates whether the access code is waiting for a code assignment. + /// + [DataMember( + Name = "is_waiting_for_code_assignment", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsWaitingForCodeAssignment { get; set; } + + /// + /// Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. + /// + [DataMember( + Name = "pulled_backup_access_code_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PulledBackupAccessCodeId { get; set; } + + /// + /// Date and time at which the time-bound access code becomes active. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). + /// + [Obsolete( + "Use `display_status` to show a person the code's state. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`." + )] + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public AccessCode.StatusEnum Status { get; set; } + + /// + /// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public AccessCode.TypeEnum Type { get; set; } + + /// + /// Warnings associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// Unique identifier for the Seam workspace associated with the access code. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessCodeDormakabaOracodeMetadata_model")] + public class AccessCodeDormakabaOracodeMetadata + { + [JsonConstructorAttribute] + protected AccessCodeDormakabaOracodeMetadata() { } + + public AccessCodeDormakabaOracodeMetadata( + bool? isCancellable = default, + bool? isEarlyCheckinAble = default, + bool? isExtendable = default, + bool? isOverridable = default, + string? siteName = default, + float? stayId = default, + string? userLevelId = default, + string? userLevelName = default + ) + { + IsCancellable = isCancellable; + IsEarlyCheckinAble = isEarlyCheckinAble; + IsExtendable = isExtendable; + IsOverridable = isOverridable; + SiteName = siteName; + StayId = stayId; + UserLevelId = userLevelId; + UserLevelName = userLevelName; + } + + /// + /// Indicates whether the stay can be cancelled via the Dormakaba Oracode API. + /// + [DataMember(Name = "is_cancellable", IsRequired = false, EmitDefaultValue = false)] + public bool? IsCancellable { get; set; } + + /// + /// Indicates whether early check-in is available for this stay. + /// + [DataMember(Name = "is_early_checkin_able", IsRequired = false, EmitDefaultValue = false)] + public bool? IsEarlyCheckinAble { get; set; } + + /// + /// Indicates whether the stay can be extended via the Dormakaba Oracode API. + /// + [DataMember(Name = "is_extendable", IsRequired = false, EmitDefaultValue = false)] + public bool? IsExtendable { get; set; } + + /// + /// Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. + /// + [DataMember(Name = "is_overridable", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOverridable { get; set; } + + /// + /// Dormakaba Oracode site name associated with this access code. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + /// + /// Dormakaba Oracode stay ID associated with this access code. + /// + [DataMember(Name = "stay_id", IsRequired = false, EmitDefaultValue = false)] + public float? StayId { get; set; } + + /// + /// Dormakaba Oracode user level ID associated with this access code. + /// + [DataMember(Name = "user_level_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserLevelId { get; set; } + + /// + /// Dormakaba Oracode user level name associated with this access code. + /// + [DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] + public string? UserLevelName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/AccessGrant.cs b/src/Seam/Model/AccessGrant.cs index 27e56b2b..12f7c71b 100644 --- a/src/Seam/Model/AccessGrant.cs +++ b/src/Seam/Model/AccessGrant.cs @@ -8,1286 +8,1439 @@ namespace Seam.Model { -/// -/// Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. -/// -[DataContract(Name = "seamModel_accessGrant_model")] -public class AccessGrant -{ -[JsonConstructorAttribute] -protected AccessGrant() { } - -public AccessGrant(string accessGrantId = default, string? accessGrantKey = default, List accessMethodIds = default, string? clientSessionToken = default, string createdAt = default, string? customizationProfileId = default, string displayName = default, string displayStatus = default, string? endsAt = default, List errors = default, string? instantKeyUrl = default, List locationIds = default, string? name = default, List pendingMutations = default, List requestedAccessMethods = default, string? reservationKey = default, List spaceIds = default, string startsAt = default, string userIdentityId = default, List warnings = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -AccessGrantKey = accessGrantKey; -AccessMethodIds = accessMethodIds; -ClientSessionToken = clientSessionToken; -CreatedAt = createdAt; -CustomizationProfileId = customizationProfileId; -DisplayName = displayName; -DisplayStatus = displayStatus; -EndsAt = endsAt; -Errors = errors; -InstantKeyUrl = instantKeyUrl; -LocationIds = locationIds; -Name = name; -PendingMutations = pendingMutations; -RequestedAccessMethods = requestedAccessMethods; -ReservationKey = reservationKey; -SpaceIds = spaceIds; -StartsAt = startsAt; -UserIdentityId = userIdentityId; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessGrantErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessGrantErrorsCannotCreateRequestedAccessMethods), "cannot_create_requested_access_methods")] -public abstract class AccessGrantErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessGrantErrorsCannotCreateRequestedAccessMethods_model")] -public class AccessGrantErrorsCannotCreateRequestedAccessMethods : AccessGrantErrors -{ -[JsonConstructorAttribute] -protected AccessGrantErrorsCannotCreateRequestedAccessMethods() { } - -public AccessGrantErrorsCannotCreateRequestedAccessMethods(string createdAt = default, string errorCode = default, string message = default, List? missingDeviceIds = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -MissingDeviceIds = missingDeviceIds; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. -/// -[DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? MissingDeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantErrorsUnrecognized_model")] -public class AccessGrantErrorsUnrecognized : AccessGrantErrors -{ -[JsonConstructorAttribute] -protected AccessGrantErrorsUnrecognized() { } - -public AccessGrantErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "mutation_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessGrantPendingMutationsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessGrantPendingMutationsUpdatingAccessTimes), "updating_access_times")] -[JsonSubtypes.KnownSubType(typeof(AccessGrantPendingMutationsUpdatingSpaces), "updating_spaces")] -public abstract class AccessGrantPendingMutations -{ -public abstract string MutationCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpaces_model")] -public class AccessGrantPendingMutationsUpdatingSpaces : AccessGrantPendingMutations -{ -[JsonConstructorAttribute] -protected AccessGrantPendingMutationsUpdatingSpaces() { } - -public AccessGrantPendingMutationsUpdatingSpaces(string createdAt = default, AccessGrantPendingMutationsUpdatingSpacesFrom from = default, string message = default, string mutationCode = default, AccessGrantPendingMutationsUpdatingSpacesTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous location configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_spaces"; - -/// -/// New location configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AccessGrantPendingMutationsUpdatingSpacesTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpacesFrom_model")] -public class AccessGrantPendingMutationsUpdatingSpacesFrom -{ -[JsonConstructorAttribute] -protected AccessGrantPendingMutationsUpdatingSpacesFrom() { } - -public AccessGrantPendingMutationsUpdatingSpacesFrom(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// Previous device IDs where access codes existed. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpacesTo_model")] -public class AccessGrantPendingMutationsUpdatingSpacesTo -{ -[JsonConstructorAttribute] -protected AccessGrantPendingMutationsUpdatingSpacesTo() { } - -public AccessGrantPendingMutationsUpdatingSpacesTo(string? commonCodeKey = default, List deviceIds = default) -{ -CommonCodeKey = commonCodeKey; -DeviceIds = deviceIds; -} - -/// -/// Common code key to ensure PIN code reuse across devices. -/// -[DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] -public string? CommonCodeKey { get; set; } - -/// -/// New device IDs where access codes should be created. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimes_model")] -public class AccessGrantPendingMutationsUpdatingAccessTimes : AccessGrantPendingMutations -{ -[JsonConstructorAttribute] -protected AccessGrantPendingMutationsUpdatingAccessTimes() { } - -public AccessGrantPendingMutationsUpdatingAccessTimes(List accessMethodIds = default, string createdAt = default, AccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, string message = default, string mutationCode = default, AccessGrantPendingMutationsUpdatingAccessTimesTo to = default) -{ -AccessMethodIds = accessMethodIds; -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// IDs of the access methods being updated. -/// -[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessMethodIds { get; set; } - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous access time configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_access_times"; - -/// -/// New access time configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AccessGrantPendingMutationsUpdatingAccessTimesTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimesFrom_model")] -public class AccessGrantPendingMutationsUpdatingAccessTimesFrom -{ -[JsonConstructorAttribute] -protected AccessGrantPendingMutationsUpdatingAccessTimesFrom() { } - -public AccessGrantPendingMutationsUpdatingAccessTimesFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Previous end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Previous start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimesTo_model")] -public class AccessGrantPendingMutationsUpdatingAccessTimesTo -{ -[JsonConstructorAttribute] -protected AccessGrantPendingMutationsUpdatingAccessTimesTo() { } - -public AccessGrantPendingMutationsUpdatingAccessTimesTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// New end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// New start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantPendingMutationsUnrecognized_model")] -public class AccessGrantPendingMutationsUnrecognized : AccessGrantPendingMutations -{ -[JsonConstructorAttribute] -protected AccessGrantPendingMutationsUnrecognized() { } - -public AccessGrantPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) -{ -MutationCode = mutationCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "unrecognized"; - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessGrantWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsDeviceTimeConstraintsViolated), "device_time_constraints_violated")] -[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsDeviceDoesNotSupportAccessCodes), "device_does_not_support_access_codes")] -[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsRequestedCodeUnavailable), "requested_code_unavailable")] -[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsUpdatingAccessTimes), "updating_access_times")] -[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsOverprovisionedAccess), "overprovisioned_access")] -[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsUnderprovisionedAccess), "underprovisioned_access")] -[JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsBeingDeleted), "being_deleted")] -public abstract class AccessGrantWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessGrantWarningsBeingDeleted_model")] -public class AccessGrantWarningsBeingDeleted : AccessGrantWarnings -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsBeingDeleted() { } - -public AccessGrantWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantWarningsUnderprovisionedAccess_model")] -public class AccessGrantWarningsUnderprovisionedAccess : AccessGrantWarnings -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsUnderprovisionedAccess() { } - -public AccessGrantWarningsUnderprovisionedAccess(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "underprovisioned_access"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantWarningsOverprovisionedAccess_model")] -public class AccessGrantWarningsOverprovisionedAccess : AccessGrantWarnings -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsOverprovisionedAccess() { } - -public AccessGrantWarningsOverprovisionedAccess(string createdAt = default, List? failedDevices = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -FailedDevices = failedDevices; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). -/// -[DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] -public List? FailedDevices { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "overprovisioned_access"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantWarningsOverprovisionedAccessFailedDevices_model")] -public class AccessGrantWarningsOverprovisionedAccessFailedDevices -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsOverprovisionedAccessFailedDevices() { } - -public AccessGrantWarningsOverprovisionedAccessFailedDevices(string deviceId = default, string errorCode = default, string message = default) -{ -DeviceId = deviceId; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Device whose access code could not be revoked. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Human-readable description of why revocation failed. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantWarningsUpdatingAccessTimes_model")] -public class AccessGrantWarningsUpdatingAccessTimes : AccessGrantWarnings -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsUpdatingAccessTimes() { } - -public AccessGrantWarningsUpdatingAccessTimes(List accessMethodIds = default, string createdAt = default, string message = default, string warningCode = default) -{ -AccessMethodIds = accessMethodIds; -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// IDs of the access methods being updated. -/// -[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessMethodIds { get; set; } - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "updating_access_times"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantWarningsRequestedCodeUnavailable_model")] -public class AccessGrantWarningsRequestedCodeUnavailable : AccessGrantWarnings -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsRequestedCodeUnavailable() { } - -public AccessGrantWarningsRequestedCodeUnavailable(string createdAt = default, string deviceId = default, string message = default, string newCode = default, string originalCode = default, string warningCode = default) -{ -CreatedAt = createdAt; -DeviceId = deviceId; -Message = message; -NewCode = newCode; -OriginalCode = originalCode; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device where the requested code was unavailable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// The new PIN code that was assigned instead. -/// -[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] -public string NewCode { get; set; } - -/// -/// The originally requested PIN code that was unavailable. -/// -[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] -public string OriginalCode { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "requested_code_unavailable"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantWarningsDeviceDoesNotSupportAccessCodes_model")] -public class AccessGrantWarningsDeviceDoesNotSupportAccessCodes : AccessGrantWarnings -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } - -public AccessGrantWarningsDeviceDoesNotSupportAccessCodes(string createdAt = default, string deviceId = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -DeviceId = deviceId; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device that does not support access codes. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "device_does_not_support_access_codes"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantWarningsDeviceTimeConstraintsViolated_model")] -public class AccessGrantWarningsDeviceTimeConstraintsViolated : AccessGrantWarnings -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsDeviceTimeConstraintsViolated() { } - -public AccessGrantWarningsDeviceTimeConstraintsViolated(string createdAt = default, string deviceId = default, string message = default, AccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = default, string warningCode = default) -{ -CreatedAt = createdAt; -DeviceId = deviceId; -Message = message; -Reason = reason; -WarningCode = warningCode; -} - -/// -/// Specific reason why the grant's times are not programmable on the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ReasonEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "duration_exceeds_max")] -DurationExceedsMax = 1, - -[EnumMember(Value = "times_do_not_match_slots")] -TimesDoNotMatchSlots = 2, - -[EnumMember(Value = "ongoing_not_supported")] -OngoingNotSupported = 3, -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device whose time constraints the access grant violates. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// Specific reason why the grant's times are not programmable on the device. -/// -[DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] -public AccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "device_time_constraints_violated"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantWarningsUnrecognized_model")] -public class AccessGrantWarningsUnrecognized : AccessGrantWarnings -{ -[JsonConstructorAttribute] -protected AccessGrantWarningsUnrecognized() { } - -public AccessGrantWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// ID of the Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// Unique key for the access grant within the workspace. -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// IDs of the access methods created for the Access Grant. -/// -[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessMethodIds { get; set; } - -/// -/// Client Session Token. Only returned if the Access Grant has a mobile_key access method. -/// -[DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] -public string? ClientSessionToken { get; set; } - -/// -/// Date and time at which the Access Grant was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the customization profile associated with the Access Grant. -/// -[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomizationProfileId { get; set; } - -/// -/// Display name of the Access Grant. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Human-readable sentence answering whether the user can currently get in, for example `Active`, `Awaiting issuance`, or `Upcoming`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `starts_at`, `ends_at`, `errors`, and the access methods' own fields. -/// -[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] -public string DisplayStatus { get; set; } - -/// -/// Date and time at which the Access Grant ends. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Errors associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method. -/// -[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] -public string? InstantKeyUrl { get; set; } - -[Obsolete("Use `space_ids`.")] -[DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] -public List LocationIds { get; set; } - -/// -/// Name of the Access Grant. If not provided, the display name will be computed. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// List of pending mutations for the access grant. This shows updates that are in progress. -/// -[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] -public List PendingMutations { get; set; } - -/// -/// Access methods that the user requested for the Access Grant. -/// -[DataMember(Name = "requested_access_methods", IsRequired = false, EmitDefaultValue = false)] -public List RequestedAccessMethods { get; set; } - -/// -/// Reservation key for the access grant. -/// -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -/// -/// IDs of the spaces to which the Access Grant gives access. -/// -[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] -public List SpaceIds { get; set; } - -/// -/// Date and time at which the Access Grant starts. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string StartsAt { get; set; } - -/// -/// ID of user identity to which the Access Grant gives access. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -/// -/// Warnings associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the Seam workspace associated with the Access Grant. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessGrantRequestedAccessMethods_model")] -public class AccessGrantRequestedAccessMethods -{ -[JsonConstructorAttribute] -protected AccessGrantRequestedAccessMethods() { } - -public AccessGrantRequestedAccessMethods(string? code = default, List createdAccessMethodIds = default, string createdAt = default, string displayName = default, int? instantKeyMaxUseCount = default, AccessGrantRequestedAccessMethods.ModeEnum mode = default) -{ -Code = code; -CreatedAccessMethodIds = createdAccessMethodIds; -CreatedAt = createdAt; -DisplayName = displayName; -InstantKeyMaxUseCount = instantKeyMaxUseCount; -Mode = mode; -} - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Specific PIN code to use for this access method. Only applicable when mode is 'code'. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// IDs of the access methods created for the requested access method. -/// -[DataMember(Name = "created_access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List CreatedAccessMethodIds { get; set; } - -/// -/// Date and time at which the requested access method was added to the Access Grant. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name of the access method. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. -/// -[DataMember(Name = "instant_key_max_use_count", IsRequired = false, EmitDefaultValue = false)] -public int? InstantKeyMaxUseCount { get; set; } - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] -public AccessGrantRequestedAccessMethods.ModeEnum Mode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. + /// + [DataContract(Name = "seamModel_accessGrant_model")] + public class AccessGrant + { + [JsonConstructorAttribute] + protected AccessGrant() { } + + public AccessGrant( + string accessGrantId = default, + string? accessGrantKey = default, + List accessMethodIds = default, + string? clientSessionToken = default, + string createdAt = default, + string? customizationProfileId = default, + string displayName = default, + string displayStatus = default, + string? endsAt = default, + List errors = default, + string? instantKeyUrl = default, + List locationIds = default, + string? name = default, + List pendingMutations = default, + List requestedAccessMethods = default, + string? reservationKey = default, + List spaceIds = default, + string startsAt = default, + string userIdentityId = default, + List warnings = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + AccessGrantKey = accessGrantKey; + AccessMethodIds = accessMethodIds; + ClientSessionToken = clientSessionToken; + CreatedAt = createdAt; + CustomizationProfileId = customizationProfileId; + DisplayName = displayName; + DisplayStatus = displayStatus; + EndsAt = endsAt; + Errors = errors; + InstantKeyUrl = instantKeyUrl; + LocationIds = locationIds; + Name = name; + PendingMutations = pendingMutations; + RequestedAccessMethods = requestedAccessMethods; + ReservationKey = reservationKey; + SpaceIds = spaceIds; + StartsAt = startsAt; + UserIdentityId = userIdentityId; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessGrantErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantErrorsCannotCreateRequestedAccessMethods), + "cannot_create_requested_access_methods" + )] + public abstract class AccessGrantErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessGrantErrorsCannotCreateRequestedAccessMethods_model")] + public class AccessGrantErrorsCannotCreateRequestedAccessMethods : AccessGrantErrors + { + [JsonConstructorAttribute] + protected AccessGrantErrorsCannotCreateRequestedAccessMethods() { } + + public AccessGrantErrorsCannotCreateRequestedAccessMethods( + string createdAt = default, + string errorCode = default, + string message = default, + List? missingDeviceIds = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + MissingDeviceIds = missingDeviceIds; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. + /// + [DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? MissingDeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantErrorsUnrecognized_model")] + public class AccessGrantErrorsUnrecognized : AccessGrantErrors + { + [JsonConstructorAttribute] + protected AccessGrantErrorsUnrecognized() { } + + public AccessGrantErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessGrantPendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantPendingMutationsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantPendingMutationsUpdatingSpaces), + "updating_spaces" + )] + public abstract class AccessGrantPendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpaces_model")] + public class AccessGrantPendingMutationsUpdatingSpaces : AccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected AccessGrantPendingMutationsUpdatingSpaces() { } + + public AccessGrantPendingMutationsUpdatingSpaces( + string createdAt = default, + AccessGrantPendingMutationsUpdatingSpacesFrom from = default, + string message = default, + string mutationCode = default, + AccessGrantPendingMutationsUpdatingSpacesTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous location configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_spaces"; + + /// + /// New location configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AccessGrantPendingMutationsUpdatingSpacesTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpacesFrom_model")] + public class AccessGrantPendingMutationsUpdatingSpacesFrom + { + [JsonConstructorAttribute] + protected AccessGrantPendingMutationsUpdatingSpacesFrom() { } + + public AccessGrantPendingMutationsUpdatingSpacesFrom(List deviceIds = default) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access codes existed. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingSpacesTo_model")] + public class AccessGrantPendingMutationsUpdatingSpacesTo + { + [JsonConstructorAttribute] + protected AccessGrantPendingMutationsUpdatingSpacesTo() { } + + public AccessGrantPendingMutationsUpdatingSpacesTo( + string? commonCodeKey = default, + List deviceIds = default + ) + { + CommonCodeKey = commonCodeKey; + DeviceIds = deviceIds; + } + + /// + /// Common code key to ensure PIN code reuse across devices. + /// + [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] + public string? CommonCodeKey { get; set; } + + /// + /// New device IDs where access codes should be created. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimes_model")] + public class AccessGrantPendingMutationsUpdatingAccessTimes : AccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected AccessGrantPendingMutationsUpdatingAccessTimes() { } + + public AccessGrantPendingMutationsUpdatingAccessTimes( + List accessMethodIds = default, + string createdAt = default, + AccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, + string message = default, + string mutationCode = default, + AccessGrantPendingMutationsUpdatingAccessTimesTo to = default + ) + { + AccessMethodIds = accessMethodIds; + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// IDs of the access methods being updated. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous access time configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_access_times"; + + /// + /// New access time configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AccessGrantPendingMutationsUpdatingAccessTimesTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimesFrom_model")] + public class AccessGrantPendingMutationsUpdatingAccessTimesFrom + { + [JsonConstructorAttribute] + protected AccessGrantPendingMutationsUpdatingAccessTimesFrom() { } + + public AccessGrantPendingMutationsUpdatingAccessTimesFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantPendingMutationsUpdatingAccessTimesTo_model")] + public class AccessGrantPendingMutationsUpdatingAccessTimesTo + { + [JsonConstructorAttribute] + protected AccessGrantPendingMutationsUpdatingAccessTimesTo() { } + + public AccessGrantPendingMutationsUpdatingAccessTimesTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantPendingMutationsUnrecognized_model")] + public class AccessGrantPendingMutationsUnrecognized : AccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected AccessGrantPendingMutationsUnrecognized() { } + + public AccessGrantPendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessGrantWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantWarningsDeviceTimeConstraintsViolated), + "device_time_constraints_violated" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantWarningsDeviceDoesNotSupportAccessCodes), + "device_does_not_support_access_codes" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantWarningsRequestedCodeUnavailable), + "requested_code_unavailable" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantWarningsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantWarningsOverprovisionedAccess), + "overprovisioned_access" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessGrantWarningsUnderprovisionedAccess), + "underprovisioned_access" + )] + [JsonSubtypes.KnownSubType(typeof(AccessGrantWarningsBeingDeleted), "being_deleted")] + public abstract class AccessGrantWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessGrantWarningsBeingDeleted_model")] + public class AccessGrantWarningsBeingDeleted : AccessGrantWarnings + { + [JsonConstructorAttribute] + protected AccessGrantWarningsBeingDeleted() { } + + public AccessGrantWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantWarningsUnderprovisionedAccess_model")] + public class AccessGrantWarningsUnderprovisionedAccess : AccessGrantWarnings + { + [JsonConstructorAttribute] + protected AccessGrantWarningsUnderprovisionedAccess() { } + + public AccessGrantWarningsUnderprovisionedAccess( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "underprovisioned_access"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantWarningsOverprovisionedAccess_model")] + public class AccessGrantWarningsOverprovisionedAccess : AccessGrantWarnings + { + [JsonConstructorAttribute] + protected AccessGrantWarningsOverprovisionedAccess() { } + + public AccessGrantWarningsOverprovisionedAccess( + string createdAt = default, + List? failedDevices = + default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + FailedDevices = failedDevices; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). + /// + [DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] + public List? FailedDevices { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "overprovisioned_access"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_accessGrantWarningsOverprovisionedAccessFailedDevices_model" + )] + public class AccessGrantWarningsOverprovisionedAccessFailedDevices + { + [JsonConstructorAttribute] + protected AccessGrantWarningsOverprovisionedAccessFailedDevices() { } + + public AccessGrantWarningsOverprovisionedAccessFailedDevices( + string deviceId = default, + string errorCode = default, + string message = default + ) + { + DeviceId = deviceId; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Device whose access code could not be revoked. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Human-readable description of why revocation failed. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantWarningsUpdatingAccessTimes_model")] + public class AccessGrantWarningsUpdatingAccessTimes : AccessGrantWarnings + { + [JsonConstructorAttribute] + protected AccessGrantWarningsUpdatingAccessTimes() { } + + public AccessGrantWarningsUpdatingAccessTimes( + List accessMethodIds = default, + string createdAt = default, + string message = default, + string warningCode = default + ) + { + AccessMethodIds = accessMethodIds; + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// IDs of the access methods being updated. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "updating_access_times"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantWarningsRequestedCodeUnavailable_model")] + public class AccessGrantWarningsRequestedCodeUnavailable : AccessGrantWarnings + { + [JsonConstructorAttribute] + protected AccessGrantWarningsRequestedCodeUnavailable() { } + + public AccessGrantWarningsRequestedCodeUnavailable( + string createdAt = default, + string deviceId = default, + string message = default, + string newCode = default, + string originalCode = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + NewCode = newCode; + OriginalCode = originalCode; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device where the requested code was unavailable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// The new PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string NewCode { get; set; } + + /// + /// The originally requested PIN code that was unavailable. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string OriginalCode { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "requested_code_unavailable"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantWarningsDeviceDoesNotSupportAccessCodes_model")] + public class AccessGrantWarningsDeviceDoesNotSupportAccessCodes : AccessGrantWarnings + { + [JsonConstructorAttribute] + protected AccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } + + public AccessGrantWarningsDeviceDoesNotSupportAccessCodes( + string createdAt = default, + string deviceId = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device that does not support access codes. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_does_not_support_access_codes"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantWarningsDeviceTimeConstraintsViolated_model")] + public class AccessGrantWarningsDeviceTimeConstraintsViolated : AccessGrantWarnings + { + [JsonConstructorAttribute] + protected AccessGrantWarningsDeviceTimeConstraintsViolated() { } + + public AccessGrantWarningsDeviceTimeConstraintsViolated( + string createdAt = default, + string deviceId = default, + string message = default, + AccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + Reason = reason; + WarningCode = warningCode; + } + + /// + /// Specific reason why the grant's times are not programmable on the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ReasonEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "duration_exceeds_max")] + DurationExceedsMax = 1, + + [EnumMember(Value = "times_do_not_match_slots")] + TimesDoNotMatchSlots = 2, + + [EnumMember(Value = "ongoing_not_supported")] + OngoingNotSupported = 3, + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device whose time constraints the access grant violates. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// Specific reason why the grant's times are not programmable on the device. + /// + [DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] + public AccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_time_constraints_violated"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantWarningsUnrecognized_model")] + public class AccessGrantWarningsUnrecognized : AccessGrantWarnings + { + [JsonConstructorAttribute] + protected AccessGrantWarningsUnrecognized() { } + + public AccessGrantWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// ID of the Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// Unique key for the access grant within the workspace. + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// IDs of the access methods created for the Access Grant. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Client Session Token. Only returned if the Access Grant has a mobile_key access method. + /// + [DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] + public string? ClientSessionToken { get; set; } + + /// + /// Date and time at which the Access Grant was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the customization profile associated with the Access Grant. + /// + [DataMember( + Name = "customization_profile_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomizationProfileId { get; set; } + + /// + /// Display name of the Access Grant. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Human-readable sentence answering whether the user can currently get in, for example `Active`, `Awaiting issuance`, or `Upcoming`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `starts_at`, `ends_at`, `errors`, and the access methods' own fields. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + + /// + /// Date and time at which the Access Grant ends. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method. + /// + [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] + public string? InstantKeyUrl { get; set; } + + [Obsolete("Use `space_ids`.")] + [DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] + public List LocationIds { get; set; } + + /// + /// Name of the Access Grant. If not provided, the display name will be computed. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// List of pending mutations for the access grant. This shows updates that are in progress. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Access methods that the user requested for the Access Grant. + /// + [DataMember( + Name = "requested_access_methods", + IsRequired = false, + EmitDefaultValue = false + )] + public List RequestedAccessMethods { get; set; } + + /// + /// Reservation key for the access grant. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + /// + /// IDs of the spaces to which the Access Grant gives access. + /// + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List SpaceIds { get; set; } + + /// + /// Date and time at which the Access Grant starts. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string StartsAt { get; set; } + + /// + /// ID of user identity to which the Access Grant gives access. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + /// + /// Warnings associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the Seam workspace associated with the Access Grant. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessGrantRequestedAccessMethods_model")] + public class AccessGrantRequestedAccessMethods + { + [JsonConstructorAttribute] + protected AccessGrantRequestedAccessMethods() { } + + public AccessGrantRequestedAccessMethods( + string? code = default, + List createdAccessMethodIds = default, + string createdAt = default, + string displayName = default, + int? instantKeyMaxUseCount = default, + AccessGrantRequestedAccessMethods.ModeEnum mode = default + ) + { + Code = code; + CreatedAccessMethodIds = createdAccessMethodIds; + CreatedAt = createdAt; + DisplayName = displayName; + InstantKeyMaxUseCount = instantKeyMaxUseCount; + Mode = mode; + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// IDs of the access methods created for the requested access method. + /// + [DataMember( + Name = "created_access_method_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List CreatedAccessMethodIds { get; set; } + + /// + /// Date and time at which the requested access method was added to the Access Grant. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name of the access method. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + /// + [DataMember( + Name = "instant_key_max_use_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int? InstantKeyMaxUseCount { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public AccessGrantRequestedAccessMethods.ModeEnum Mode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/AccessMethod.cs b/src/Seam/Model/AccessMethod.cs index b6ef2eba..84023914 100644 --- a/src/Seam/Model/AccessMethod.cs +++ b/src/Seam/Model/AccessMethod.cs @@ -8,1150 +8,1267 @@ namespace Seam.Model { -/// -/// Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. -/// -[DataContract(Name = "seamModel_accessMethod_model")] -public class AccessMethod -{ -[JsonConstructorAttribute] -protected AccessMethod() { } - -public AccessMethod(string accessMethodId = default, string? clientSessionToken = default, string? code = default, string createdAt = default, string? customizationProfileId = default, string displayName = default, string displayStatus = default, List errors = default, string? instantKeyUrl = default, bool? isAssignmentRequired = default, bool? isEncodingRequired = default, bool isIssued = default, bool? isReadyForAssignment = default, bool? isReadyForEncoding = default, string? issuedAt = default, AccessMethod.ModeEnum mode = default, List pendingMutations = default, List warnings = default, string workspaceId = default) -{ -AccessMethodId = accessMethodId; -ClientSessionToken = clientSessionToken; -Code = code; -CreatedAt = createdAt; -CustomizationProfileId = customizationProfileId; -DisplayName = displayName; -DisplayStatus = displayStatus; -Errors = errors; -InstantKeyUrl = instantKeyUrl; -IsAssignmentRequired = isAssignmentRequired; -IsEncodingRequired = isEncodingRequired; -IsIssued = isIssued; -IsReadyForAssignment = isReadyForAssignment; -IsReadyForEncoding = isReadyForEncoding; -IssuedAt = issuedAt; -Mode = mode; -PendingMutations = pendingMutations; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessMethodErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessMethodErrorsFailedToIssue), "failed_to_issue")] -public abstract class AccessMethodErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessMethodErrorsFailedToIssue_model")] -public class AccessMethodErrorsFailedToIssue : AccessMethodErrors -{ -[JsonConstructorAttribute] -protected AccessMethodErrorsFailedToIssue() { } - -public AccessMethodErrorsFailedToIssue(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_issue"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodErrorsUnrecognized_model")] -public class AccessMethodErrorsUnrecognized : AccessMethodErrors -{ -[JsonConstructorAttribute] -protected AccessMethodErrorsUnrecognized() { } - -public AccessMethodErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -[JsonConverter(typeof(JsonSubtypes), "mutation_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessMethodPendingMutationsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessMethodPendingMutationsUpdatingAccessTimes), "updating_access_times")] -[JsonSubtypes.KnownSubType(typeof(AccessMethodPendingMutationsRevokingAccess), "revoking_access")] -[JsonSubtypes.KnownSubType(typeof(AccessMethodPendingMutationsProvisioningAccess), "provisioning_access")] -public abstract class AccessMethodPendingMutations -{ -public abstract string MutationCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccess_model")] -public class AccessMethodPendingMutationsProvisioningAccess : AccessMethodPendingMutations -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsProvisioningAccess() { } - -public AccessMethodPendingMutationsProvisioningAccess(string createdAt = default, AccessMethodPendingMutationsProvisioningAccessFrom from = default, string message = default, string mutationCode = default, AccessMethodPendingMutationsProvisioningAccessTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous device configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "provisioning_access"; - -/// -/// New device configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AccessMethodPendingMutationsProvisioningAccessTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccessFrom_model")] -public class AccessMethodPendingMutationsProvisioningAccessFrom -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsProvisioningAccessFrom() { } - -public AccessMethodPendingMutationsProvisioningAccessFrom(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// Previous device IDs where access was provisioned. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccessTo_model")] -public class AccessMethodPendingMutationsProvisioningAccessTo -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsProvisioningAccessTo() { } - -public AccessMethodPendingMutationsProvisioningAccessTo(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// New device IDs where access is being provisioned. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccess_model")] -public class AccessMethodPendingMutationsRevokingAccess : AccessMethodPendingMutations -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsRevokingAccess() { } - -public AccessMethodPendingMutationsRevokingAccess(string createdAt = default, AccessMethodPendingMutationsRevokingAccessFrom from = default, string message = default, string mutationCode = default, AccessMethodPendingMutationsRevokingAccessTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous device configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AccessMethodPendingMutationsRevokingAccessFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "revoking_access"; - -/// -/// New device configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AccessMethodPendingMutationsRevokingAccessTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccessFrom_model")] -public class AccessMethodPendingMutationsRevokingAccessFrom -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsRevokingAccessFrom() { } - -public AccessMethodPendingMutationsRevokingAccessFrom(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// Previous device IDs where access existed. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccessTo_model")] -public class AccessMethodPendingMutationsRevokingAccessTo -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsRevokingAccessTo() { } - -public AccessMethodPendingMutationsRevokingAccessTo(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// New device IDs where access should remain. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimes_model")] -public class AccessMethodPendingMutationsUpdatingAccessTimes : AccessMethodPendingMutations -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsUpdatingAccessTimes() { } - -public AccessMethodPendingMutationsUpdatingAccessTimes(string createdAt = default, AccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, string message = default, string mutationCode = default, AccessMethodPendingMutationsUpdatingAccessTimesTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous access time configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_access_times"; - -/// -/// New access time configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AccessMethodPendingMutationsUpdatingAccessTimesTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimesFrom_model")] -public class AccessMethodPendingMutationsUpdatingAccessTimesFrom -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsUpdatingAccessTimesFrom() { } - -public AccessMethodPendingMutationsUpdatingAccessTimesFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Previous end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Previous start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimesTo_model")] -public class AccessMethodPendingMutationsUpdatingAccessTimesTo -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsUpdatingAccessTimesTo() { } - -public AccessMethodPendingMutationsUpdatingAccessTimesTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// New end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// New start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodPendingMutationsUnrecognized_model")] -public class AccessMethodPendingMutationsUnrecognized : AccessMethodPendingMutations -{ -[JsonConstructorAttribute] -protected AccessMethodPendingMutationsUnrecognized() { } - -public AccessMethodPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) -{ -MutationCode = mutationCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "unrecognized"; - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(AccessMethodWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsUserIdentityMissingPhoneNumber), "user_identity_missing_phone_number")] -[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsUserIdentityMissingEmailAddress), "user_identity_missing_email_address")] -[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsDelayInIssuing), "delay_in_issuing")] -[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsPulledBackupAccessCode), "pulled_backup_access_code")] -[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsUpdatingAccessTimes), "updating_access_times")] -[JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsBeingDeleted), "being_deleted")] -public abstract class AccessMethodWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_accessMethodWarningsBeingDeleted_model")] -public class AccessMethodWarningsBeingDeleted : AccessMethodWarnings -{ -[JsonConstructorAttribute] -protected AccessMethodWarningsBeingDeleted() { } - -public AccessMethodWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodWarningsUpdatingAccessTimes_model")] -public class AccessMethodWarningsUpdatingAccessTimes : AccessMethodWarnings -{ -[JsonConstructorAttribute] -protected AccessMethodWarningsUpdatingAccessTimes() { } - -public AccessMethodWarningsUpdatingAccessTimes(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "updating_access_times"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodWarningsPulledBackupAccessCode_model")] -public class AccessMethodWarningsPulledBackupAccessCode : AccessMethodWarnings -{ -[JsonConstructorAttribute] -protected AccessMethodWarningsPulledBackupAccessCode() { } - -public AccessMethodWarningsPulledBackupAccessCode(string createdAt = default, string message = default, string? originalAccessMethodId = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -OriginalAccessMethodId = originalAccessMethodId; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// ID of the original access method from which this backup access method was split, if applicable. -/// -[DataMember(Name = "original_access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string? OriginalAccessMethodId { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "pulled_backup_access_code"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodWarningsDelayInIssuing_model")] -public class AccessMethodWarningsDelayInIssuing : AccessMethodWarnings -{ -[JsonConstructorAttribute] -protected AccessMethodWarningsDelayInIssuing() { } - -public AccessMethodWarningsDelayInIssuing(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "delay_in_issuing"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodWarningsUserIdentityMissingEmailAddress_model")] -public class AccessMethodWarningsUserIdentityMissingEmailAddress : AccessMethodWarnings -{ -[JsonConstructorAttribute] -protected AccessMethodWarningsUserIdentityMissingEmailAddress() { } - -public AccessMethodWarningsUserIdentityMissingEmailAddress(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "user_identity_missing_email_address"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodWarningsUserIdentityMissingPhoneNumber_model")] -public class AccessMethodWarningsUserIdentityMissingPhoneNumber : AccessMethodWarnings -{ -[JsonConstructorAttribute] -protected AccessMethodWarningsUserIdentityMissingPhoneNumber() { } - -public AccessMethodWarningsUserIdentityMissingPhoneNumber(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "user_identity_missing_phone_number"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_accessMethodWarningsUnrecognized_model")] -public class AccessMethodWarningsUnrecognized : AccessMethodWarnings -{ -[JsonConstructorAttribute] -protected AccessMethodWarningsUnrecognized() { } - -public AccessMethodWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// ID of the access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Token of the client session associated with the access method. -/// -[DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] -public string? ClientSessionToken { get; set; } - -/// -/// The actual PIN code for code access methods. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Date and time at which the access method was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the customization profile associated with the access method. -/// -[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomizationProfileId { get; set; } - -/// -/// Display name of the access method. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. -/// -[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] -public string DisplayStatus { get; set; } - -/// -/// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// URL of the Instant Key for mobile key access methods. -/// -[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] -public string? InstantKeyUrl { get; set; } - -/// -/// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. -/// -[DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] -public bool? IsAssignmentRequired { get; set; } - -/// -/// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. -/// -[DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] -public bool? IsEncodingRequired { get; set; } - -/// -/// Indicates whether the access method has been issued. -/// -[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] -public bool IsIssued { get; set; } - -/// -/// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. -/// -[DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] -public bool? IsReadyForAssignment { get; set; } - -/// -/// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. -/// -[DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] -public bool? IsReadyForEncoding { get; set; } - -/// -/// Date and time at which the access method was issued. -/// -[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] -public string? IssuedAt { get; set; } - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] -public AccessMethod.ModeEnum Mode { get; set; } - -/// -/// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. -/// -[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] -public List PendingMutations { get; set; } - -/// -/// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the Seam workspace associated with the access method. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. + /// + [DataContract(Name = "seamModel_accessMethod_model")] + public class AccessMethod + { + [JsonConstructorAttribute] + protected AccessMethod() { } + + public AccessMethod( + string accessMethodId = default, + string? clientSessionToken = default, + string? code = default, + string createdAt = default, + string? customizationProfileId = default, + string displayName = default, + string displayStatus = default, + List errors = default, + string? instantKeyUrl = default, + bool? isAssignmentRequired = default, + bool? isEncodingRequired = default, + bool isIssued = default, + bool? isReadyForAssignment = default, + bool? isReadyForEncoding = default, + string? issuedAt = default, + AccessMethod.ModeEnum mode = default, + List pendingMutations = default, + List warnings = default, + string workspaceId = default + ) + { + AccessMethodId = accessMethodId; + ClientSessionToken = clientSessionToken; + Code = code; + CreatedAt = createdAt; + CustomizationProfileId = customizationProfileId; + DisplayName = displayName; + DisplayStatus = displayStatus; + Errors = errors; + InstantKeyUrl = instantKeyUrl; + IsAssignmentRequired = isAssignmentRequired; + IsEncodingRequired = isEncodingRequired; + IsIssued = isIssued; + IsReadyForAssignment = isReadyForAssignment; + IsReadyForEncoding = isReadyForEncoding; + IssuedAt = issuedAt; + Mode = mode; + PendingMutations = pendingMutations; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessMethodErrorsUnrecognized))] + [JsonSubtypes.KnownSubType(typeof(AccessMethodErrorsFailedToIssue), "failed_to_issue")] + public abstract class AccessMethodErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessMethodErrorsFailedToIssue_model")] + public class AccessMethodErrorsFailedToIssue : AccessMethodErrors + { + [JsonConstructorAttribute] + protected AccessMethodErrorsFailedToIssue() { } + + public AccessMethodErrorsFailedToIssue( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_issue"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodErrorsUnrecognized_model")] + public class AccessMethodErrorsUnrecognized : AccessMethodErrors + { + [JsonConstructorAttribute] + protected AccessMethodErrorsUnrecognized() { } + + public AccessMethodErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessMethodPendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AccessMethodPendingMutationsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessMethodPendingMutationsRevokingAccess), + "revoking_access" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessMethodPendingMutationsProvisioningAccess), + "provisioning_access" + )] + public abstract class AccessMethodPendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccess_model")] + public class AccessMethodPendingMutationsProvisioningAccess : AccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsProvisioningAccess() { } + + public AccessMethodPendingMutationsProvisioningAccess( + string createdAt = default, + AccessMethodPendingMutationsProvisioningAccessFrom from = default, + string message = default, + string mutationCode = default, + AccessMethodPendingMutationsProvisioningAccessTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous device configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "provisioning_access"; + + /// + /// New device configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AccessMethodPendingMutationsProvisioningAccessTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccessFrom_model")] + public class AccessMethodPendingMutationsProvisioningAccessFrom + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsProvisioningAccessFrom() { } + + public AccessMethodPendingMutationsProvisioningAccessFrom( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access was provisioned. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsProvisioningAccessTo_model")] + public class AccessMethodPendingMutationsProvisioningAccessTo + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsProvisioningAccessTo() { } + + public AccessMethodPendingMutationsProvisioningAccessTo( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// New device IDs where access is being provisioned. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccess_model")] + public class AccessMethodPendingMutationsRevokingAccess : AccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsRevokingAccess() { } + + public AccessMethodPendingMutationsRevokingAccess( + string createdAt = default, + AccessMethodPendingMutationsRevokingAccessFrom from = default, + string message = default, + string mutationCode = default, + AccessMethodPendingMutationsRevokingAccessTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous device configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AccessMethodPendingMutationsRevokingAccessFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "revoking_access"; + + /// + /// New device configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AccessMethodPendingMutationsRevokingAccessTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccessFrom_model")] + public class AccessMethodPendingMutationsRevokingAccessFrom + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsRevokingAccessFrom() { } + + public AccessMethodPendingMutationsRevokingAccessFrom(List deviceIds = default) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access existed. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsRevokingAccessTo_model")] + public class AccessMethodPendingMutationsRevokingAccessTo + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsRevokingAccessTo() { } + + public AccessMethodPendingMutationsRevokingAccessTo(List deviceIds = default) + { + DeviceIds = deviceIds; + } + + /// + /// New device IDs where access should remain. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimes_model")] + public class AccessMethodPendingMutationsUpdatingAccessTimes : AccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsUpdatingAccessTimes() { } + + public AccessMethodPendingMutationsUpdatingAccessTimes( + string createdAt = default, + AccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, + string message = default, + string mutationCode = default, + AccessMethodPendingMutationsUpdatingAccessTimesTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous access time configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_access_times"; + + /// + /// New access time configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AccessMethodPendingMutationsUpdatingAccessTimesTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimesFrom_model")] + public class AccessMethodPendingMutationsUpdatingAccessTimesFrom + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsUpdatingAccessTimesFrom() { } + + public AccessMethodPendingMutationsUpdatingAccessTimesFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsUpdatingAccessTimesTo_model")] + public class AccessMethodPendingMutationsUpdatingAccessTimesTo + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsUpdatingAccessTimesTo() { } + + public AccessMethodPendingMutationsUpdatingAccessTimesTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodPendingMutationsUnrecognized_model")] + public class AccessMethodPendingMutationsUnrecognized : AccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected AccessMethodPendingMutationsUnrecognized() { } + + public AccessMethodPendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(AccessMethodWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AccessMethodWarningsUserIdentityMissingPhoneNumber), + "user_identity_missing_phone_number" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessMethodWarningsUserIdentityMissingEmailAddress), + "user_identity_missing_email_address" + )] + [JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsDelayInIssuing), "delay_in_issuing")] + [JsonSubtypes.KnownSubType( + typeof(AccessMethodWarningsPulledBackupAccessCode), + "pulled_backup_access_code" + )] + [JsonSubtypes.KnownSubType( + typeof(AccessMethodWarningsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType(typeof(AccessMethodWarningsBeingDeleted), "being_deleted")] + public abstract class AccessMethodWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_accessMethodWarningsBeingDeleted_model")] + public class AccessMethodWarningsBeingDeleted : AccessMethodWarnings + { + [JsonConstructorAttribute] + protected AccessMethodWarningsBeingDeleted() { } + + public AccessMethodWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodWarningsUpdatingAccessTimes_model")] + public class AccessMethodWarningsUpdatingAccessTimes : AccessMethodWarnings + { + [JsonConstructorAttribute] + protected AccessMethodWarningsUpdatingAccessTimes() { } + + public AccessMethodWarningsUpdatingAccessTimes( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "updating_access_times"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodWarningsPulledBackupAccessCode_model")] + public class AccessMethodWarningsPulledBackupAccessCode : AccessMethodWarnings + { + [JsonConstructorAttribute] + protected AccessMethodWarningsPulledBackupAccessCode() { } + + public AccessMethodWarningsPulledBackupAccessCode( + string createdAt = default, + string message = default, + string? originalAccessMethodId = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + OriginalAccessMethodId = originalAccessMethodId; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// ID of the original access method from which this backup access method was split, if applicable. + /// + [DataMember( + Name = "original_access_method_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? OriginalAccessMethodId { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "pulled_backup_access_code"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodWarningsDelayInIssuing_model")] + public class AccessMethodWarningsDelayInIssuing : AccessMethodWarnings + { + [JsonConstructorAttribute] + protected AccessMethodWarningsDelayInIssuing() { } + + public AccessMethodWarningsDelayInIssuing( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_issuing"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodWarningsUserIdentityMissingEmailAddress_model")] + public class AccessMethodWarningsUserIdentityMissingEmailAddress : AccessMethodWarnings + { + [JsonConstructorAttribute] + protected AccessMethodWarningsUserIdentityMissingEmailAddress() { } + + public AccessMethodWarningsUserIdentityMissingEmailAddress( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "user_identity_missing_email_address"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodWarningsUserIdentityMissingPhoneNumber_model")] + public class AccessMethodWarningsUserIdentityMissingPhoneNumber : AccessMethodWarnings + { + [JsonConstructorAttribute] + protected AccessMethodWarningsUserIdentityMissingPhoneNumber() { } + + public AccessMethodWarningsUserIdentityMissingPhoneNumber( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "user_identity_missing_phone_number"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_accessMethodWarningsUnrecognized_model")] + public class AccessMethodWarningsUnrecognized : AccessMethodWarnings + { + [JsonConstructorAttribute] + protected AccessMethodWarningsUnrecognized() { } + + public AccessMethodWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// ID of the access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Token of the client session associated with the access method. + /// + [DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] + public string? ClientSessionToken { get; set; } + + /// + /// The actual PIN code for code access methods. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Date and time at which the access method was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the customization profile associated with the access method. + /// + [DataMember( + Name = "customization_profile_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomizationProfileId { get; set; } + + /// + /// Display name of the access method. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + + /// + /// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// URL of the Instant Key for mobile key access methods. + /// + [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] + public string? InstantKeyUrl { get; set; } + + /// + /// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + /// + [DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] + public bool? IsAssignmentRequired { get; set; } + + /// + /// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + /// + [DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] + public bool? IsEncodingRequired { get; set; } + + /// + /// Indicates whether the access method has been issued. + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool IsIssued { get; set; } + + /// + /// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + /// + [DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] + public bool? IsReadyForAssignment { get; set; } + + /// + /// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + /// + [DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] + public bool? IsReadyForEncoding { get; set; } + + /// + /// Date and time at which the access method was issued. + /// + [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] + public string? IssuedAt { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public AccessMethod.ModeEnum Mode { get; set; } + + /// + /// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the Seam workspace associated with the access method. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/AcsAccessGroup.cs b/src/Seam/Model/AcsAccessGroup.cs index d06f7602..4f932a09 100644 --- a/src/Seam/Model/AcsAccessGroup.cs +++ b/src/Seam/Model/AcsAccessGroup.cs @@ -8,1296 +8,1448 @@ namespace Seam.Model { -/// -/// Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. -/// -/// Some access control systems use [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. -/// -/// To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). -/// -[DataContract(Name = "seamModel_acsAccessGroup_model")] -public class AcsAccessGroup -{ -[JsonConstructorAttribute] -protected AcsAccessGroup() { } - -public AcsAccessGroup(AcsAccessGroup.AccessGroupTypeEnum accessGroupType = default, string accessGroupTypeDisplayName = default, AcsAccessGroupAccessSchedule? accessSchedule = default, string acsAccessGroupId = default, string acsSystemId = default, string connectedAccountId = default, string createdAt = default, string displayName = default, List errors = default, AcsAccessGroup.ExternalTypeEnum externalType = default, string externalTypeDisplayName = default, bool isManaged = default, string name = default, List pendingMutations = default, List warnings = default, string workspaceId = default) -{ -AccessGroupType = accessGroupType; -AccessGroupTypeDisplayName = accessGroupTypeDisplayName; -AccessSchedule = accessSchedule; -AcsAccessGroupId = acsAccessGroupId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DisplayName = displayName; -Errors = errors; -ExternalType = externalType; -ExternalTypeDisplayName = externalTypeDisplayName; -IsManaged = isManaged; -Name = name; -PendingMutations = pendingMutations; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AccessGroupTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_unit")] -PtiUnit = 1, - -[EnumMember(Value = "pti_access_level")] -PtiAccessLevel = 2, - -[EnumMember(Value = "salto_ks_access_group")] -SaltoKsAccessGroup = 3, - -[EnumMember(Value = "brivo_group")] -BrivoGroup = 4, - -[EnumMember(Value = "salto_space_group")] -SaltoSpaceGroup = 5, - -[EnumMember(Value = "dormakaba_community_access_group")] -DormakabaCommunityAccessGroup = 6, - -[EnumMember(Value = "dormakaba_ambiance_access_group")] -DormakabaAmbianceAccessGroup = 7, - -[EnumMember(Value = "avigilon_alta_group")] -AvigilonAltaGroup = 8, - -[EnumMember(Value = "kisi_access_group")] -KisiAccessGroup = 9, - -[EnumMember(Value = "akiles_member_group")] -AkilesMemberGroup = 10, -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsAccessGroupErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupErrorsFailedToCreateOnAcsSystem), "failed_to_create_on_acs_system")] -public abstract class AcsAccessGroupErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsAccessGroupErrorsFailedToCreateOnAcsSystem_model")] -public class AcsAccessGroupErrorsFailedToCreateOnAcsSystem : AcsAccessGroupErrors -{ -[JsonConstructorAttribute] -protected AcsAccessGroupErrorsFailedToCreateOnAcsSystem() { } - -public AcsAccessGroupErrorsFailedToCreateOnAcsSystem(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_create_on_acs_system"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupErrorsUnrecognized_model")] -public class AcsAccessGroupErrorsUnrecognized : AcsAccessGroupErrors -{ -[JsonConstructorAttribute] -protected AcsAccessGroupErrorsUnrecognized() { } - -public AcsAccessGroupErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Brand-specific terminology for the access group type. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExternalTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_unit")] -PtiUnit = 1, - -[EnumMember(Value = "pti_access_level")] -PtiAccessLevel = 2, - -[EnumMember(Value = "salto_ks_access_group")] -SaltoKsAccessGroup = 3, - -[EnumMember(Value = "brivo_group")] -BrivoGroup = 4, - -[EnumMember(Value = "salto_space_group")] -SaltoSpaceGroup = 5, - -[EnumMember(Value = "dormakaba_community_access_group")] -DormakabaCommunityAccessGroup = 6, - -[EnumMember(Value = "dormakaba_ambiance_access_group")] -DormakabaAmbianceAccessGroup = 7, - -[EnumMember(Value = "avigilon_alta_group")] -AvigilonAltaGroup = 8, - -[EnumMember(Value = "kisi_access_group")] -KisiAccessGroup = 9, - -[EnumMember(Value = "akiles_member_group")] -AkilesMemberGroup = 10, -} - -[JsonConverter(typeof(JsonSubtypes), "mutation_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsAccessGroupPendingMutationsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate), "deferring_user_membership_update")] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsUpdatingEntranceMembership), "updating_entrance_membership")] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsUpdatingUserMembership), "updating_user_membership")] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsUpdatingAccessSchedule), "updating_access_schedule")] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsUpdatingGroupInformation), "updating_group_information")] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsDeferringDeletion), "deferring_deletion")] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsDeleting), "deleting")] -[JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsCreating), "creating")] -public abstract class AcsAccessGroupPendingMutations -{ -public abstract string MutationCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsCreating_model")] -public class AcsAccessGroupPendingMutationsCreating : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsCreating() { } - -public AcsAccessGroupPendingMutationsCreating(string createdAt = default, string message = default, string mutationCode = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "creating"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeleting_model")] -public class AcsAccessGroupPendingMutationsDeleting : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsDeleting() { } - -public AcsAccessGroupPendingMutationsDeleting(string createdAt = default, string message = default, string mutationCode = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "deleting"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeferringDeletion_model")] -public class AcsAccessGroupPendingMutationsDeferringDeletion : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsDeferringDeletion() { } - -public AcsAccessGroupPendingMutationsDeferringDeletion(string createdAt = default, string message = default, string mutationCode = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "deferring_deletion"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformation_model")] -public class AcsAccessGroupPendingMutationsUpdatingGroupInformation : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingGroupInformation() { } - -public AcsAccessGroupPendingMutationsUpdatingGroupInformation(string createdAt = default, AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom from = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsUpdatingGroupInformationTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Old access group information. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_group_information"; - -/// -/// New access group information. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsUpdatingGroupInformationTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformationFrom_model")] -public class AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom() { } - -public AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom(string? name = default) -{ -Name = name; -} - -/// -/// Name of the access group. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformationTo_model")] -public class AcsAccessGroupPendingMutationsUpdatingGroupInformationTo -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingGroupInformationTo() { } - -public AcsAccessGroupPendingMutationsUpdatingGroupInformationTo(string? name = default) -{ -Name = name; -} - -/// -/// Name of the access group. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessSchedule_model")] -public class AcsAccessGroupPendingMutationsUpdatingAccessSchedule : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingAccessSchedule() { } - -public AcsAccessGroupPendingMutationsUpdatingAccessSchedule(string createdAt = default, AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom from = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Old access schedule information. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_access_schedule"; - -/// -/// New access schedule information. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessScheduleFrom_model")] -public class AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom() { } - -public AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Ending time for the access schedule. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Starting time for the access schedule. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessScheduleTo_model")] -public class AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo() { } - -public AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Ending time for the access schedule. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Starting time for the access schedule. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembership_model")] -public class AcsAccessGroupPendingMutationsUpdatingUserMembership : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingUserMembership() { } - -public AcsAccessGroupPendingMutationsUpdatingUserMembership(string createdAt = default, AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom from = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsUpdatingUserMembershipTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Old user membership. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_user_membership"; - -/// -/// New user membership. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsUpdatingUserMembershipTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembershipFrom_model")] -public class AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom() { } - -public AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom(string? acsUserId = default) -{ -AcsUserId = acsUserId; -} - -/// -/// Old user ID. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembershipTo_model")] -public class AcsAccessGroupPendingMutationsUpdatingUserMembershipTo -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingUserMembershipTo() { } - -public AcsAccessGroupPendingMutationsUpdatingUserMembershipTo(string? acsUserId = default) -{ -AcsUserId = acsUserId; -} - -/// -/// New user ID. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembership_model")] -public class AcsAccessGroupPendingMutationsUpdatingEntranceMembership : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingEntranceMembership() { } - -public AcsAccessGroupPendingMutationsUpdatingEntranceMembership(string createdAt = default, AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom from = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Old entrance membership. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_entrance_membership"; - -/// -/// New entrance membership. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom_model")] -public class AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom() { } - -public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom(string? acsEntranceId = default) -{ -AcsEntranceId = acsEntranceId; -} - -/// -/// Old entrance ID. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsEntranceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembershipTo_model")] -public class AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo() { } - -public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo(string? acsEntranceId = default) -{ -AcsEntranceId = acsEntranceId; -} - -/// -/// New entrance ID. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsEntranceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeferringUserMembershipUpdate_model")] -public class AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate() { } - -public AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate(string acsUserId = default, string createdAt = default, string message = default, string mutationCode = default, AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate.VariantEnum variant = default) -{ -AcsUserId = acsUserId; -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -Variant = variant; -} - -/// -/// Whether the user is scheduled to be added to or removed from this access group. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum VariantEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "adding")] -Adding = 1, - -[EnumMember(Value = "removing")] -Removing = 2, -} - -/// -/// ID of the user involved in the scheduled change. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsUserId { get; set; } - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "deferring_user_membership_update"; - -/// -/// Whether the user is scheduled to be added to or removed from this access group. -/// -[DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate.VariantEnum Variant { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUnrecognized_model")] -public class AcsAccessGroupPendingMutationsUnrecognized : AcsAccessGroupPendingMutations -{ -[JsonConstructorAttribute] -protected AcsAccessGroupPendingMutationsUnrecognized() { } - -public AcsAccessGroupPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) -{ -MutationCode = mutationCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "unrecognized"; - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[Obsolete("Use `external_type`.")] -[DataMember(Name = "access_group_type", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroup.AccessGroupTypeEnum AccessGroupType { get; set; } - -[Obsolete("Use `external_type_display_name`.")] -[DataMember(Name = "access_group_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string AccessGroupTypeDisplayName { get; set; } - -/// -/// `starts_at` and `ends_at` timestamps for the access group's access. -/// -[DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupAccessSchedule? AccessSchedule { get; set; } - -/// -/// ID of the access group. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -/// -/// ID of the access control system that contains the access group. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account that contains the access group. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the access group was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name for the access group. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Errors associated with the `acs_access_group`. -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Brand-specific terminology for the access group type. -/// -[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroup.ExternalTypeEnum ExternalType { get; set; } - -/// -/// Display name that corresponds to the brand-specific terminology for the access group type. -/// -[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string ExternalTypeDisplayName { get; set; } - -/// -/// Indicates whether Seam manages the access group. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Name of the access group. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// Collection of pending mutations for the access group. Represents operations that have been requested but not yet completed on the integrated access system. -/// -[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] -public List PendingMutations { get; set; } - -/// -/// Warnings associated with the `acs_access_group`. -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the access group. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupAccessSchedule_model")] -public class AcsAccessGroupAccessSchedule -{ -[JsonConstructorAttribute] -protected AcsAccessGroupAccessSchedule() { } - -public AcsAccessGroupAccessSchedule(string? endsAt = default, string startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsAccessGroupWarnings_model")] -public class AcsAccessGroupWarnings -{ -[JsonConstructorAttribute] -protected AcsAccessGroupWarnings() { } - -public AcsAccessGroupWarnings(string createdAt = default, string message = default, AcsAccessGroupWarnings.WarningCodeEnum warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum WarningCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "unknown_issue_with_acs_access_group")] -UnknownIssueWithAcsAccessGroup = 1, - -[EnumMember(Value = "being_deleted")] -BeingDeleted = 2, -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public AcsAccessGroupWarnings.WarningCodeEnum WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. + /// + /// Some access control systems use [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. + /// + /// To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). + /// + [DataContract(Name = "seamModel_acsAccessGroup_model")] + public class AcsAccessGroup + { + [JsonConstructorAttribute] + protected AcsAccessGroup() { } + + public AcsAccessGroup( + AcsAccessGroup.AccessGroupTypeEnum accessGroupType = default, + string accessGroupTypeDisplayName = default, + AcsAccessGroupAccessSchedule? accessSchedule = default, + string acsAccessGroupId = default, + string acsSystemId = default, + string connectedAccountId = default, + string createdAt = default, + string displayName = default, + List errors = default, + AcsAccessGroup.ExternalTypeEnum externalType = default, + string externalTypeDisplayName = default, + bool isManaged = default, + string name = default, + List pendingMutations = default, + List warnings = default, + string workspaceId = default + ) + { + AccessGroupType = accessGroupType; + AccessGroupTypeDisplayName = accessGroupTypeDisplayName; + AccessSchedule = accessSchedule; + AcsAccessGroupId = acsAccessGroupId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DisplayName = displayName; + Errors = errors; + ExternalType = externalType; + ExternalTypeDisplayName = externalTypeDisplayName; + IsManaged = isManaged; + Name = name; + PendingMutations = pendingMutations; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AccessGroupTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_unit")] + PtiUnit = 1, + + [EnumMember(Value = "pti_access_level")] + PtiAccessLevel = 2, + + [EnumMember(Value = "salto_ks_access_group")] + SaltoKsAccessGroup = 3, + + [EnumMember(Value = "brivo_group")] + BrivoGroup = 4, + + [EnumMember(Value = "salto_space_group")] + SaltoSpaceGroup = 5, + + [EnumMember(Value = "dormakaba_community_access_group")] + DormakabaCommunityAccessGroup = 6, + + [EnumMember(Value = "dormakaba_ambiance_access_group")] + DormakabaAmbianceAccessGroup = 7, + + [EnumMember(Value = "avigilon_alta_group")] + AvigilonAltaGroup = 8, + + [EnumMember(Value = "kisi_access_group")] + KisiAccessGroup = 9, + + [EnumMember(Value = "akiles_member_group")] + AkilesMemberGroup = 10, + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsAccessGroupErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsAccessGroupErrorsFailedToCreateOnAcsSystem), + "failed_to_create_on_acs_system" + )] + public abstract class AcsAccessGroupErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_acsAccessGroupErrorsFailedToCreateOnAcsSystem_model")] + public class AcsAccessGroupErrorsFailedToCreateOnAcsSystem : AcsAccessGroupErrors + { + [JsonConstructorAttribute] + protected AcsAccessGroupErrorsFailedToCreateOnAcsSystem() { } + + public AcsAccessGroupErrorsFailedToCreateOnAcsSystem( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_create_on_acs_system"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsAccessGroupErrorsUnrecognized_model")] + public class AcsAccessGroupErrorsUnrecognized : AcsAccessGroupErrors + { + [JsonConstructorAttribute] + protected AcsAccessGroupErrorsUnrecognized() { } + + public AcsAccessGroupErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Brand-specific terminology for the access group type. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExternalTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_unit")] + PtiUnit = 1, + + [EnumMember(Value = "pti_access_level")] + PtiAccessLevel = 2, + + [EnumMember(Value = "salto_ks_access_group")] + SaltoKsAccessGroup = 3, + + [EnumMember(Value = "brivo_group")] + BrivoGroup = 4, + + [EnumMember(Value = "salto_space_group")] + SaltoSpaceGroup = 5, + + [EnumMember(Value = "dormakaba_community_access_group")] + DormakabaCommunityAccessGroup = 6, + + [EnumMember(Value = "dormakaba_ambiance_access_group")] + DormakabaAmbianceAccessGroup = 7, + + [EnumMember(Value = "avigilon_alta_group")] + AvigilonAltaGroup = 8, + + [EnumMember(Value = "kisi_access_group")] + KisiAccessGroup = 9, + + [EnumMember(Value = "akiles_member_group")] + AkilesMemberGroup = 10, + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsAccessGroupPendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate), + "deferring_user_membership_update" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsAccessGroupPendingMutationsUpdatingEntranceMembership), + "updating_entrance_membership" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsAccessGroupPendingMutationsUpdatingUserMembership), + "updating_user_membership" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsAccessGroupPendingMutationsUpdatingAccessSchedule), + "updating_access_schedule" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsAccessGroupPendingMutationsUpdatingGroupInformation), + "updating_group_information" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsAccessGroupPendingMutationsDeferringDeletion), + "deferring_deletion" + )] + [JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsDeleting), "deleting")] + [JsonSubtypes.KnownSubType(typeof(AcsAccessGroupPendingMutationsCreating), "creating")] + public abstract class AcsAccessGroupPendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_acsAccessGroupPendingMutationsCreating_model")] + public class AcsAccessGroupPendingMutationsCreating : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsCreating() { } + + public AcsAccessGroupPendingMutationsCreating( + string createdAt = default, + string message = default, + string mutationCode = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "creating"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeleting_model")] + public class AcsAccessGroupPendingMutationsDeleting : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsDeleting() { } + + public AcsAccessGroupPendingMutationsDeleting( + string createdAt = default, + string message = default, + string mutationCode = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "deleting"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsAccessGroupPendingMutationsDeferringDeletion_model")] + public class AcsAccessGroupPendingMutationsDeferringDeletion + : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsDeferringDeletion() { } + + public AcsAccessGroupPendingMutationsDeferringDeletion( + string createdAt = default, + string message = default, + string mutationCode = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "deferring_deletion"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformation_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingGroupInformation + : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingGroupInformation() { } + + public AcsAccessGroupPendingMutationsUpdatingGroupInformation( + string createdAt = default, + AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom from = default, + string message = default, + string mutationCode = default, + AcsAccessGroupPendingMutationsUpdatingGroupInformationTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Old access group information. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_group_information"; + + /// + /// New access group information. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsUpdatingGroupInformationTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformationFrom_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom() { } + + public AcsAccessGroupPendingMutationsUpdatingGroupInformationFrom( + string? name = default + ) + { + Name = name; + } + + /// + /// Name of the access group. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingGroupInformationTo_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingGroupInformationTo + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingGroupInformationTo() { } + + public AcsAccessGroupPendingMutationsUpdatingGroupInformationTo(string? name = default) + { + Name = name; + } + + /// + /// Name of the access group. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessSchedule_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingAccessSchedule + : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingAccessSchedule() { } + + public AcsAccessGroupPendingMutationsUpdatingAccessSchedule( + string createdAt = default, + AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom from = default, + string message = default, + string mutationCode = default, + AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Old access schedule information. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_access_schedule"; + + /// + /// New access schedule information. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessScheduleFrom_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom() { } + + public AcsAccessGroupPendingMutationsUpdatingAccessScheduleFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Ending time for the access schedule. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Starting time for the access schedule. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingAccessScheduleTo_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo() { } + + public AcsAccessGroupPendingMutationsUpdatingAccessScheduleTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Ending time for the access schedule. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Starting time for the access schedule. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembership_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingUserMembership + : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingUserMembership() { } + + public AcsAccessGroupPendingMutationsUpdatingUserMembership( + string createdAt = default, + AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom from = default, + string message = default, + string mutationCode = default, + AcsAccessGroupPendingMutationsUpdatingUserMembershipTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Old user membership. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_user_membership"; + + /// + /// New user membership. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsUpdatingUserMembershipTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembershipFrom_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom() { } + + public AcsAccessGroupPendingMutationsUpdatingUserMembershipFrom( + string? acsUserId = default + ) + { + AcsUserId = acsUserId; + } + + /// + /// Old user ID. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingUserMembershipTo_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingUserMembershipTo + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingUserMembershipTo() { } + + public AcsAccessGroupPendingMutationsUpdatingUserMembershipTo( + string? acsUserId = default + ) + { + AcsUserId = acsUserId; + } + + /// + /// New user ID. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembership_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingEntranceMembership + : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingEntranceMembership() { } + + public AcsAccessGroupPendingMutationsUpdatingEntranceMembership( + string createdAt = default, + AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom from = default, + string message = default, + string mutationCode = default, + AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Old entrance membership. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_entrance_membership"; + + /// + /// New entrance membership. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom() { } + + public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipFrom( + string? acsEntranceId = default + ) + { + AcsEntranceId = acsEntranceId; + } + + /// + /// Old entrance ID. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsEntranceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsUpdatingEntranceMembershipTo_model" + )] + public class AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo() { } + + public AcsAccessGroupPendingMutationsUpdatingEntranceMembershipTo( + string? acsEntranceId = default + ) + { + AcsEntranceId = acsEntranceId; + } + + /// + /// New entrance ID. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsEntranceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsAccessGroupPendingMutationsDeferringUserMembershipUpdate_model" + )] + public class AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate + : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate() { } + + public AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate( + string acsUserId = default, + string createdAt = default, + string message = default, + string mutationCode = default, + AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate.VariantEnum variant = + default + ) + { + AcsUserId = acsUserId; + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + Variant = variant; + } + + /// + /// Whether the user is scheduled to be added to or removed from this access group. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum VariantEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "adding")] + Adding = 1, + + [EnumMember(Value = "removing")] + Removing = 2, + } + + /// + /// ID of the user involved in the scheduled change. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsUserId { get; set; } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "deferring_user_membership_update"; + + /// + /// Whether the user is scheduled to be added to or removed from this access group. + /// + [DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupPendingMutationsDeferringUserMembershipUpdate.VariantEnum Variant { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsAccessGroupPendingMutationsUnrecognized_model")] + public class AcsAccessGroupPendingMutationsUnrecognized : AcsAccessGroupPendingMutations + { + [JsonConstructorAttribute] + protected AcsAccessGroupPendingMutationsUnrecognized() { } + + public AcsAccessGroupPendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [Obsolete("Use `external_type`.")] + [DataMember(Name = "access_group_type", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroup.AccessGroupTypeEnum AccessGroupType { get; set; } + + [Obsolete("Use `external_type_display_name`.")] + [DataMember( + Name = "access_group_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string AccessGroupTypeDisplayName { get; set; } + + /// + /// `starts_at` and `ends_at` timestamps for the access group's access. + /// + [DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupAccessSchedule? AccessSchedule { get; set; } + + /// + /// ID of the access group. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + /// + /// ID of the access control system that contains the access group. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account that contains the access group. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the access group was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name for the access group. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Errors associated with the `acs_access_group`. + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Brand-specific terminology for the access group type. + /// + [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroup.ExternalTypeEnum ExternalType { get; set; } + + /// + /// Display name that corresponds to the brand-specific terminology for the access group type. + /// + [DataMember( + Name = "external_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string ExternalTypeDisplayName { get; set; } + + /// + /// Indicates whether Seam manages the access group. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Name of the access group. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Collection of pending mutations for the access group. Represents operations that have been requested but not yet completed on the integrated access system. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Warnings associated with the `acs_access_group`. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the access group. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsAccessGroupAccessSchedule_model")] + public class AcsAccessGroupAccessSchedule + { + [JsonConstructorAttribute] + protected AcsAccessGroupAccessSchedule() { } + + public AcsAccessGroupAccessSchedule(string? endsAt = default, string startsAt = default) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsAccessGroupWarnings_model")] + public class AcsAccessGroupWarnings + { + [JsonConstructorAttribute] + protected AcsAccessGroupWarnings() { } + + public AcsAccessGroupWarnings( + string createdAt = default, + string message = default, + AcsAccessGroupWarnings.WarningCodeEnum warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum WarningCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "unknown_issue_with_acs_access_group")] + UnknownIssueWithAcsAccessGroup = 1, + + [EnumMember(Value = "being_deleted")] + BeingDeleted = 2, + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public AcsAccessGroupWarnings.WarningCodeEnum WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/AcsCredential.cs b/src/Seam/Model/AcsCredential.cs index f8f4693a..79fb5210 100644 --- a/src/Seam/Model/AcsCredential.cs +++ b/src/Seam/Model/AcsCredential.cs @@ -8,994 +8,1127 @@ namespace Seam.Model { -/// -/// Means by which an [access control system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) gains access at an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. -/// -/// For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. -/// -/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. -/// -[DataContract(Name = "seamModel_acsCredential_model")] -public class AcsCredential -{ -[JsonConstructorAttribute] -protected AcsCredential() { } - -public AcsCredential(AcsCredential.AccessMethodEnum accessMethod = default, string acsCredentialId = default, string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, AcsCredentialAkilesMetadata? akilesMetadata = default, AcsCredentialAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, AcsCredential.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, bool? isIssued = default, bool? isLatestDesiredStateSyncedWithProvider = default, bool isManaged = default, bool? isMultiPhoneSyncCredential = default, bool? isOneTimeUse = default, string? issuedAt = default, string? latestDesiredStateSyncedWithProviderAt = default, string? parentAcsCredentialId = default, string? startsAt = default, string? userIdentityId = default, AcsCredentialVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) -{ -AccessMethod = accessMethod; -AcsCredentialId = acsCredentialId; -AcsCredentialPoolId = acsCredentialPoolId; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -AkilesMetadata = akilesMetadata; -AssaAbloyVostioMetadata = assaAbloyVostioMetadata; -CardNumber = cardNumber; -Code = code; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DisplayName = displayName; -EndsAt = endsAt; -Errors = errors; -ExternalType = externalType; -ExternalTypeDisplayName = externalTypeDisplayName; -IsIssued = isIssued; -IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; -IsManaged = isManaged; -IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; -IsOneTimeUse = isOneTimeUse; -IssuedAt = issuedAt; -LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; -ParentAcsCredentialId = parentAcsCredentialId; -StartsAt = startsAt; -UserIdentityId = userIdentityId; -VisionlineMetadata = visionlineMetadata; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -/// -/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AccessMethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExternalTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_card")] -PtiCard = 1, - -[EnumMember(Value = "brivo_credential")] -BrivoCredential = 2, - -[EnumMember(Value = "hid_credential")] -HidCredential = 3, - -[EnumMember(Value = "visionline_card")] -VisionlineCard = 4, - -[EnumMember(Value = "salto_ks_credential")] -SaltoKsCredential = 5, - -[EnumMember(Value = "assa_abloy_vostio_key")] -AssaAbloyVostioKey = 6, - -[EnumMember(Value = "salto_space_key")] -SaltoSpaceKey = 7, - -[EnumMember(Value = "latch_access")] -LatchAccess = 8, - -[EnumMember(Value = "dormakaba_ambiance_credential")] -DormakabaAmbianceCredential = 9, - -[EnumMember(Value = "hotek_card")] -HotekCard = 10, - -[EnumMember(Value = "salto_ks_tag")] -SaltoKsTag = 11, - -[EnumMember(Value = "avigilon_alta_credential")] -AvigilonAltaCredential = 12, - -[EnumMember(Value = "kisi_credential")] -KisiCredential = 13, - -[EnumMember(Value = "akiles_credential")] -AkilesCredential = 14, -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsCredentialWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsRequestedCodeUnavailable), "requested_code_unavailable")] -[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsNeedsToBeReissued), "needs_to_be_reissued")] -[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsUnknownIssueWithAcsCredential), "unknown_issue_with_acs_credential")] -[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsBeingDeleted), "being_deleted")] -[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsScheduleModified), "schedule_modified")] -[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsScheduleExternallyModified), "schedule_externally_modified")] -[JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsWaitingToBeIssued), "waiting_to_be_issued")] -public abstract class AcsCredentialWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsCredentialWarningsWaitingToBeIssued_model")] -public class AcsCredentialWarningsWaitingToBeIssued : AcsCredentialWarnings -{ -[JsonConstructorAttribute] -protected AcsCredentialWarningsWaitingToBeIssued() { } - -public AcsCredentialWarningsWaitingToBeIssued(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "waiting_to_be_issued"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialWarningsScheduleExternallyModified_model")] -public class AcsCredentialWarningsScheduleExternallyModified : AcsCredentialWarnings -{ -[JsonConstructorAttribute] -protected AcsCredentialWarningsScheduleExternallyModified() { } - -public AcsCredentialWarningsScheduleExternallyModified(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "schedule_externally_modified"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialWarningsScheduleModified_model")] -public class AcsCredentialWarningsScheduleModified : AcsCredentialWarnings -{ -[JsonConstructorAttribute] -protected AcsCredentialWarningsScheduleModified() { } - -public AcsCredentialWarningsScheduleModified(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "schedule_modified"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialWarningsBeingDeleted_model")] -public class AcsCredentialWarningsBeingDeleted : AcsCredentialWarnings -{ -[JsonConstructorAttribute] -protected AcsCredentialWarningsBeingDeleted() { } - -public AcsCredentialWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialWarningsUnknownIssueWithAcsCredential_model")] -public class AcsCredentialWarningsUnknownIssueWithAcsCredential : AcsCredentialWarnings -{ -[JsonConstructorAttribute] -protected AcsCredentialWarningsUnknownIssueWithAcsCredential() { } - -public AcsCredentialWarningsUnknownIssueWithAcsCredential(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unknown_issue_with_acs_credential"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialWarningsNeedsToBeReissued_model")] -public class AcsCredentialWarningsNeedsToBeReissued : AcsCredentialWarnings -{ -[JsonConstructorAttribute] -protected AcsCredentialWarningsNeedsToBeReissued() { } - -public AcsCredentialWarningsNeedsToBeReissued(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "needs_to_be_reissued"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialWarningsRequestedCodeUnavailable_model")] -public class AcsCredentialWarningsRequestedCodeUnavailable : AcsCredentialWarnings -{ -[JsonConstructorAttribute] -protected AcsCredentialWarningsRequestedCodeUnavailable() { } - -public AcsCredentialWarningsRequestedCodeUnavailable(string createdAt = default, string message = default, string newCode = default, string originalCode = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -NewCode = newCode; -OriginalCode = originalCode; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// The PIN code that was assigned instead. -/// -[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] -public string NewCode { get; set; } - -/// -/// The originally requested PIN code that could not be used. -/// -[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] -public string OriginalCode { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "requested_code_unavailable"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialWarningsUnrecognized_model")] -public class AcsCredentialWarningsUnrecognized : AcsCredentialWarnings -{ -[JsonConstructorAttribute] -protected AcsCredentialWarningsUnrecognized() { } - -public AcsCredentialWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] -public AcsCredential.AccessMethodEnum AccessMethod { get; set; } - -/// -/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the credential pool to which the credential belongs. -/// -[DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialPoolId { get; set; } - -/// -/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsCredentialAkilesMetadata? AkilesMetadata { get; set; } - -/// -/// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsCredentialAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - -/// -/// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] -public string? CardNumber { get; set; } - -/// -/// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. -/// -[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] -public AcsCredential.ExternalTypeEnum? ExternalType { get; set; } - -/// -/// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. -/// -[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string? ExternalTypeDisplayName { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. -/// -[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] -public bool? IsIssued { get; set; } - -/// -/// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. -/// -[DataMember(Name = "is_latest_desired_state_synced_with_provider", IsRequired = false, EmitDefaultValue = false)] -public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } - -/// -/// Indicates whether Seam manages the credential. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). -/// -[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] -public bool? IsMultiPhoneSyncCredential { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. -/// -[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOneTimeUse { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. -/// -[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] -public string? IssuedAt { get; set; } - -/// -/// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. -/// -[DataMember(Name = "latest_desired_state_synced_with_provider_at", IsRequired = false, EmitDefaultValue = false)] -public string? LatestDesiredStateSyncedWithProviderAt { get; set; } - -/// -/// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "parent_acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? ParentAcsCredentialId { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsCredentialVisionlineMetadata? VisionlineMetadata { get; set; } - -/// -/// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialAkilesMetadata_model")] -public class AcsCredentialAkilesMetadata -{ -[JsonConstructorAttribute] -protected AcsCredentialAkilesMetadata() { } - -public AcsCredentialAkilesMetadata(string? memberPinId = default) -{ -MemberPinId = memberPinId; -} - -/// -/// ID of the Akiles member PIN. -/// -[DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] -public string? MemberPinId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialAssaAbloyVostioMetadata_model")] -public class AcsCredentialAssaAbloyVostioMetadata -{ -[JsonConstructorAttribute] -protected AcsCredentialAssaAbloyVostioMetadata() { } - -public AcsCredentialAssaAbloyVostioMetadata(bool? autoJoin = default, List? doorNames = default, string? endpointId = default, string? keyId = default, string? keyIssuingRequestId = default, List? overrideGuestAcsEntranceIds = default) -{ -AutoJoin = autoJoin; -DoorNames = doorNames; -EndpointId = endpointId; -KeyId = keyId; -KeyIssuingRequestId = keyIssuingRequestId; -OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; -} - -/// -/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. -/// -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -/// -/// Names of the doors to which to grant access in the Vostio access system. -/// -[DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] -public List? DoorNames { get; set; } - -/// -/// Endpoint ID in the Vostio access system. -/// -[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] -public string? EndpointId { get; set; } - -/// -/// Key ID in the Vostio access system. -/// -[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyId { get; set; } - -/// -/// Key issuing request ID in the Vostio access system. -/// -[DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyIssuingRequestId { get; set; } - -/// -/// IDs of the guest entrances to override in the Vostio access system. -/// -[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? OverrideGuestAcsEntranceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialErrors_model")] -public class AcsCredentialErrors -{ -[JsonConstructorAttribute] -protected AcsCredentialErrors() { } - -public AcsCredentialErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsCredentialVisionlineMetadata_model")] -public class AcsCredentialVisionlineMetadata -{ -[JsonConstructorAttribute] -protected AcsCredentialVisionlineMetadata() { } - -public AcsCredentialVisionlineMetadata(bool? autoJoin = default, AcsCredentialVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, string? cardId = default, List? commonAcsEntranceIds = default, string? credentialId = default, List? guestAcsEntranceIds = default, bool? isValid = default, List? joinerAcsCredentialIds = default) -{ -AutoJoin = autoJoin; -CardFunctionType = cardFunctionType; -CardId = cardId; -CommonAcsEntranceIds = commonAcsEntranceIds; -CredentialId = credentialId; -GuestAcsEntranceIds = guestAcsEntranceIds; -IsValid = isValid; -JoinerAcsCredentialIds = joinerAcsCredentialIds; -} - -/// -/// Card function type in the Visionline access system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CardFunctionTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "guest")] -Guest = 1, - -[EnumMember(Value = "staff")] -Staff = 2, -} - -/// -/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. -/// -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -/// -/// Card function type in the Visionline access system. -/// -[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] -public AcsCredentialVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - -/// -/// ID of the card in the Visionline access system. -/// -[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] -public string? CardId { get; set; } - -/// -/// Common entrance IDs in the Visionline access system. -/// -[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAcsEntranceIds { get; set; } - -/// -/// ID of the credential in the Visionline access system. -/// -[DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? CredentialId { get; set; } - -/// -/// Guest entrance IDs in the Visionline access system. -/// -[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? GuestAcsEntranceIds { get; set; } - -/// -/// Indicates whether the credential is valid. -/// -[DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] -public bool? IsValid { get; set; } - -/// -/// IDs of the credentials to which you want to join. -/// -[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] -public List? JoinerAcsCredentialIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Means by which an [access control system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) gains access at an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. + /// + /// For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. + /// + /// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. + /// + [DataContract(Name = "seamModel_acsCredential_model")] + public class AcsCredential + { + [JsonConstructorAttribute] + protected AcsCredential() { } + + public AcsCredential( + AcsCredential.AccessMethodEnum accessMethod = default, + string acsCredentialId = default, + string? acsCredentialPoolId = default, + string acsSystemId = default, + string? acsUserId = default, + AcsCredentialAkilesMetadata? akilesMetadata = default, + AcsCredentialAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, + string? cardNumber = default, + string? code = default, + string connectedAccountId = default, + string createdAt = default, + string displayName = default, + string? endsAt = default, + List errors = default, + AcsCredential.ExternalTypeEnum? externalType = default, + string? externalTypeDisplayName = default, + bool? isIssued = default, + bool? isLatestDesiredStateSyncedWithProvider = default, + bool isManaged = default, + bool? isMultiPhoneSyncCredential = default, + bool? isOneTimeUse = default, + string? issuedAt = default, + string? latestDesiredStateSyncedWithProviderAt = default, + string? parentAcsCredentialId = default, + string? startsAt = default, + string? userIdentityId = default, + AcsCredentialVisionlineMetadata? visionlineMetadata = default, + List warnings = default, + string workspaceId = default + ) + { + AccessMethod = accessMethod; + AcsCredentialId = acsCredentialId; + AcsCredentialPoolId = acsCredentialPoolId; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + AkilesMetadata = akilesMetadata; + AssaAbloyVostioMetadata = assaAbloyVostioMetadata; + CardNumber = cardNumber; + Code = code; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DisplayName = displayName; + EndsAt = endsAt; + Errors = errors; + ExternalType = externalType; + ExternalTypeDisplayName = externalTypeDisplayName; + IsIssued = isIssued; + IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; + IsManaged = isManaged; + IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; + IsOneTimeUse = isOneTimeUse; + IssuedAt = issuedAt; + LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; + ParentAcsCredentialId = parentAcsCredentialId; + StartsAt = startsAt; + UserIdentityId = userIdentityId; + VisionlineMetadata = visionlineMetadata; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + /// + /// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AccessMethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExternalTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_card")] + PtiCard = 1, + + [EnumMember(Value = "brivo_credential")] + BrivoCredential = 2, + + [EnumMember(Value = "hid_credential")] + HidCredential = 3, + + [EnumMember(Value = "visionline_card")] + VisionlineCard = 4, + + [EnumMember(Value = "salto_ks_credential")] + SaltoKsCredential = 5, + + [EnumMember(Value = "assa_abloy_vostio_key")] + AssaAbloyVostioKey = 6, + + [EnumMember(Value = "salto_space_key")] + SaltoSpaceKey = 7, + + [EnumMember(Value = "latch_access")] + LatchAccess = 8, + + [EnumMember(Value = "dormakaba_ambiance_credential")] + DormakabaAmbianceCredential = 9, + + [EnumMember(Value = "hotek_card")] + HotekCard = 10, + + [EnumMember(Value = "salto_ks_tag")] + SaltoKsTag = 11, + + [EnumMember(Value = "avigilon_alta_credential")] + AvigilonAltaCredential = 12, + + [EnumMember(Value = "kisi_credential")] + KisiCredential = 13, + + [EnumMember(Value = "akiles_credential")] + AkilesCredential = 14, + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsCredentialWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsCredentialWarningsRequestedCodeUnavailable), + "requested_code_unavailable" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsCredentialWarningsNeedsToBeReissued), + "needs_to_be_reissued" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsCredentialWarningsUnknownIssueWithAcsCredential), + "unknown_issue_with_acs_credential" + )] + [JsonSubtypes.KnownSubType(typeof(AcsCredentialWarningsBeingDeleted), "being_deleted")] + [JsonSubtypes.KnownSubType( + typeof(AcsCredentialWarningsScheduleModified), + "schedule_modified" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsCredentialWarningsScheduleExternallyModified), + "schedule_externally_modified" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsCredentialWarningsWaitingToBeIssued), + "waiting_to_be_issued" + )] + public abstract class AcsCredentialWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_acsCredentialWarningsWaitingToBeIssued_model")] + public class AcsCredentialWarningsWaitingToBeIssued : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsWaitingToBeIssued() { } + + public AcsCredentialWarningsWaitingToBeIssued( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "waiting_to_be_issued"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialWarningsScheduleExternallyModified_model")] + public class AcsCredentialWarningsScheduleExternallyModified : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsScheduleExternallyModified() { } + + public AcsCredentialWarningsScheduleExternallyModified( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "schedule_externally_modified"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialWarningsScheduleModified_model")] + public class AcsCredentialWarningsScheduleModified : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsScheduleModified() { } + + public AcsCredentialWarningsScheduleModified( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "schedule_modified"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialWarningsBeingDeleted_model")] + public class AcsCredentialWarningsBeingDeleted : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsBeingDeleted() { } + + public AcsCredentialWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialWarningsUnknownIssueWithAcsCredential_model")] + public class AcsCredentialWarningsUnknownIssueWithAcsCredential : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsUnknownIssueWithAcsCredential() { } + + public AcsCredentialWarningsUnknownIssueWithAcsCredential( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_acs_credential"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialWarningsNeedsToBeReissued_model")] + public class AcsCredentialWarningsNeedsToBeReissued : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsNeedsToBeReissued() { } + + public AcsCredentialWarningsNeedsToBeReissued( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "needs_to_be_reissued"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialWarningsRequestedCodeUnavailable_model")] + public class AcsCredentialWarningsRequestedCodeUnavailable : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsRequestedCodeUnavailable() { } + + public AcsCredentialWarningsRequestedCodeUnavailable( + string createdAt = default, + string message = default, + string newCode = default, + string originalCode = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + NewCode = newCode; + OriginalCode = originalCode; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// The PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string NewCode { get; set; } + + /// + /// The originally requested PIN code that could not be used. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string OriginalCode { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "requested_code_unavailable"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialWarningsUnrecognized_model")] + public class AcsCredentialWarningsUnrecognized : AcsCredentialWarnings + { + [JsonConstructorAttribute] + protected AcsCredentialWarningsUnrecognized() { } + + public AcsCredentialWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] + public AcsCredential.AccessMethodEnum AccessMethod { get; set; } + + /// + /// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the credential pool to which the credential belongs. + /// + [DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialPoolId { get; set; } + + /// + /// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsCredentialAkilesMetadata? AkilesMetadata { get; set; } + + /// + /// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember( + Name = "assa_abloy_vostio_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public AcsCredentialAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + + /// + /// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] + public string? CardNumber { get; set; } + + /// + /// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + /// + [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] + public AcsCredential.ExternalTypeEnum? ExternalType { get; set; } + + /// + /// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. + /// + [DataMember( + Name = "external_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ExternalTypeDisplayName { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool? IsIssued { get; set; } + + /// + /// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. + /// + [DataMember( + Name = "is_latest_desired_state_synced_with_provider", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } + + /// + /// Indicates whether Seam manages the credential. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + /// + [DataMember( + Name = "is_multi_phone_sync_credential", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsMultiPhoneSyncCredential { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. + /// + [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOneTimeUse { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. + /// + [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] + public string? IssuedAt { get; set; } + + /// + /// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. + /// + [DataMember( + Name = "latest_desired_state_synced_with_provider_at", + IsRequired = false, + EmitDefaultValue = false + )] + public string? LatestDesiredStateSyncedWithProviderAt { get; set; } + + /// + /// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember( + Name = "parent_acs_credential_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ParentAcsCredentialId { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsCredentialVisionlineMetadata? VisionlineMetadata { get; set; } + + /// + /// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialAkilesMetadata_model")] + public class AcsCredentialAkilesMetadata + { + [JsonConstructorAttribute] + protected AcsCredentialAkilesMetadata() { } + + public AcsCredentialAkilesMetadata(string? memberPinId = default) + { + MemberPinId = memberPinId; + } + + /// + /// ID of the Akiles member PIN. + /// + [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] + public string? MemberPinId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialAssaAbloyVostioMetadata_model")] + public class AcsCredentialAssaAbloyVostioMetadata + { + [JsonConstructorAttribute] + protected AcsCredentialAssaAbloyVostioMetadata() { } + + public AcsCredentialAssaAbloyVostioMetadata( + bool? autoJoin = default, + List? doorNames = default, + string? endpointId = default, + string? keyId = default, + string? keyIssuingRequestId = default, + List? overrideGuestAcsEntranceIds = default + ) + { + AutoJoin = autoJoin; + DoorNames = doorNames; + EndpointId = endpointId; + KeyId = keyId; + KeyIssuingRequestId = keyIssuingRequestId; + OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; + } + + /// + /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + /// + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + /// + /// Names of the doors to which to grant access in the Vostio access system. + /// + [DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] + public List? DoorNames { get; set; } + + /// + /// Endpoint ID in the Vostio access system. + /// + [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] + public string? EndpointId { get; set; } + + /// + /// Key ID in the Vostio access system. + /// + [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyId { get; set; } + + /// + /// Key issuing request ID in the Vostio access system. + /// + [DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyIssuingRequestId { get; set; } + + /// + /// IDs of the guest entrances to override in the Vostio access system. + /// + [DataMember( + Name = "override_guest_acs_entrance_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? OverrideGuestAcsEntranceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialErrors_model")] + public class AcsCredentialErrors + { + [JsonConstructorAttribute] + protected AcsCredentialErrors() { } + + public AcsCredentialErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsCredentialVisionlineMetadata_model")] + public class AcsCredentialVisionlineMetadata + { + [JsonConstructorAttribute] + protected AcsCredentialVisionlineMetadata() { } + + public AcsCredentialVisionlineMetadata( + bool? autoJoin = default, + AcsCredentialVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, + string? cardId = default, + List? commonAcsEntranceIds = default, + string? credentialId = default, + List? guestAcsEntranceIds = default, + bool? isValid = default, + List? joinerAcsCredentialIds = default + ) + { + AutoJoin = autoJoin; + CardFunctionType = cardFunctionType; + CardId = cardId; + CommonAcsEntranceIds = commonAcsEntranceIds; + CredentialId = credentialId; + GuestAcsEntranceIds = guestAcsEntranceIds; + IsValid = isValid; + JoinerAcsCredentialIds = joinerAcsCredentialIds; + } + + /// + /// Card function type in the Visionline access system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CardFunctionTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "guest")] + Guest = 1, + + [EnumMember(Value = "staff")] + Staff = 2, + } + + /// + /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + /// + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + /// + /// Card function type in the Visionline access system. + /// + [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] + public AcsCredentialVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + + /// + /// ID of the card in the Visionline access system. + /// + [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] + public string? CardId { get; set; } + + /// + /// Common entrance IDs in the Visionline access system. + /// + [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAcsEntranceIds { get; set; } + + /// + /// ID of the credential in the Visionline access system. + /// + [DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? CredentialId { get; set; } + + /// + /// Guest entrance IDs in the Visionline access system. + /// + [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? GuestAcsEntranceIds { get; set; } + + /// + /// Indicates whether the credential is valid. + /// + [DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] + public bool? IsValid { get; set; } + + /// + /// IDs of the credentials to which you want to join. + /// + [DataMember( + Name = "joiner_acs_credential_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? JoinerAcsCredentialIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/AcsEncoder.cs b/src/Seam/Model/AcsEncoder.cs index 6d27e417..55bf4f0a 100644 --- a/src/Seam/Model/AcsEncoder.cs +++ b/src/Seam/Model/AcsEncoder.cs @@ -8,163 +8,174 @@ namespace Seam.Model { -/// -/// Represents a hardware device that encodes [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: -/// -/// 1. Credential creation -/// Configure the access parameters for the credential. -/// 2. Card encoding -/// Write the credential data onto the card using a compatible card encoder. -/// -/// Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. -/// -/// See [Working with Card Encoders and Scanners](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -/// To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). -/// -[DataContract(Name = "seamModel_acsEncoder_model")] -public class AcsEncoder -{ -[JsonConstructorAttribute] -protected AcsEncoder() { } - -public AcsEncoder(string acsEncoderId = default, string acsSystemId = default, string connectedAccountId = default, string createdAt = default, string displayName = default, List errors = default, string workspaceId = default) -{ -AcsEncoderId = acsEncoderId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DisplayName = displayName; -Errors = errors; -WorkspaceId = workspaceId; -} - -/// -/// ID of the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -[DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -/// -/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name for the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Errors associated with the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// ID of the workspace that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEncoderErrors_model")] -public class AcsEncoderErrors -{ -[JsonConstructorAttribute] -protected AcsEncoderErrors() { } - -public AcsEncoderErrors(string createdAt = default, AcsEncoderErrors.ErrorCodeEnum errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ErrorCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "acs_encoder_removed")] -AcsEncoderRemoved = 1, -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public AcsEncoderErrors.ErrorCodeEnum ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a hardware device that encodes [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: + /// + /// 1. Credential creation + /// Configure the access parameters for the credential. + /// 2. Card encoding + /// Write the credential data onto the card using a compatible card encoder. + /// + /// Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. + /// + /// See [Working with Card Encoders and Scanners](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + /// To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). + /// + [DataContract(Name = "seamModel_acsEncoder_model")] + public class AcsEncoder + { + [JsonConstructorAttribute] + protected AcsEncoder() { } + + public AcsEncoder( + string acsEncoderId = default, + string acsSystemId = default, + string connectedAccountId = default, + string createdAt = default, + string displayName = default, + List errors = default, + string workspaceId = default + ) + { + AcsEncoderId = acsEncoderId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DisplayName = displayName; + Errors = errors; + WorkspaceId = workspaceId; + } + + /// + /// ID of the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + [DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + /// + /// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name for the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Errors associated with the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// ID of the workspace that contains the [encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEncoderErrors_model")] + public class AcsEncoderErrors + { + [JsonConstructorAttribute] + protected AcsEncoderErrors() { } + + public AcsEncoderErrors( + string createdAt = default, + AcsEncoderErrors.ErrorCodeEnum errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ErrorCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "acs_encoder_removed")] + AcsEncoderRemoved = 1, + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public AcsEncoderErrors.ErrorCodeEnum ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/AcsEntrance.cs b/src/Seam/Model/AcsEntrance.cs index d754ab2c..c887da9b 100644 --- a/src/Seam/Model/AcsEntrance.cs +++ b/src/Seam/Model/AcsEntrance.cs @@ -8,1370 +8,1531 @@ namespace Seam.Model { -/// -/// Represents an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. -/// -[DataContract(Name = "seamModel_acsEntrance_model")] -public class AcsEntrance -{ -[JsonConstructorAttribute] -protected AcsEntrance() { } - -public AcsEntrance(string acsEntranceId = default, string acsSystemId = default, AcsEntranceAkilesMetadata? akilesMetadata = default, AcsEntranceAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, AcsEntranceAvigilonAltaMetadata? avigilonAltaMetadata = default, AcsEntranceBrivoMetadata? brivoMetadata = default, bool? canBelongToReservation = default, bool? canUnlockWithCard = default, bool? canUnlockWithCloudKey = default, bool? canUnlockWithCode = default, bool? canUnlockWithMobileKey = default, string connectedAccountId = default, string createdAt = default, string displayName = default, AcsEntranceDormakabaAmbianceMetadata? dormakabaAmbianceMetadata = default, AcsEntranceDormakabaCommunityMetadata? dormakabaCommunityMetadata = default, List errors = default, AcsEntranceHotekMetadata? hotekMetadata = default, bool? isLocked = default, AcsEntranceLatchMetadata? latchMetadata = default, AcsEntranceSaltoKsMetadata? saltoKsMetadata = default, AcsEntranceSaltoSpaceMetadata? saltoSpaceMetadata = default, List spaceIds = default, AcsEntranceVisionlineMetadata? visionlineMetadata = default, List warnings = default) -{ -AcsEntranceId = acsEntranceId; -AcsSystemId = acsSystemId; -AkilesMetadata = akilesMetadata; -AssaAbloyVostioMetadata = assaAbloyVostioMetadata; -AvigilonAltaMetadata = avigilonAltaMetadata; -BrivoMetadata = brivoMetadata; -CanBelongToReservation = canBelongToReservation; -CanUnlockWithCard = canUnlockWithCard; -CanUnlockWithCloudKey = canUnlockWithCloudKey; -CanUnlockWithCode = canUnlockWithCode; -CanUnlockWithMobileKey = canUnlockWithMobileKey; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DisplayName = displayName; -DormakabaAmbianceMetadata = dormakabaAmbianceMetadata; -DormakabaCommunityMetadata = dormakabaCommunityMetadata; -Errors = errors; -HotekMetadata = hotekMetadata; -IsLocked = isLocked; -LatchMetadata = latchMetadata; -SaltoKsMetadata = saltoKsMetadata; -SaltoSpaceMetadata = saltoSpaceMetadata; -SpaceIds = spaceIds; -VisionlineMetadata = visionlineMetadata; -Warnings = warnings; -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsEntranceWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsPrivacyMode), "privacy_mode")] -[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsSaltoKsPrivacyMode), "salto_ks_privacy_mode")] -[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsEntranceSetupRequired), "entrance_setup_required")] -[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsEntranceSharesZone), "entrance_shares_zone")] -[JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved), "salto_ks_entrance_access_code_support_removed")] -public abstract class AcsEntranceWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved_model")] -public class AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved : AcsEntranceWarnings -{ -[JsonConstructorAttribute] -protected AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved() { } - -public AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_entrance_access_code_support_removed"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceWarningsEntranceSharesZone_model")] -public class AcsEntranceWarningsEntranceSharesZone : AcsEntranceWarnings -{ -[JsonConstructorAttribute] -protected AcsEntranceWarningsEntranceSharesZone() { } - -public AcsEntranceWarningsEntranceSharesZone(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "entrance_shares_zone"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceWarningsEntranceSetupRequired_model")] -public class AcsEntranceWarningsEntranceSetupRequired : AcsEntranceWarnings -{ -[JsonConstructorAttribute] -protected AcsEntranceWarningsEntranceSetupRequired() { } - -public AcsEntranceWarningsEntranceSetupRequired(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "entrance_setup_required"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceWarningsSaltoKsPrivacyMode_model")] -public class AcsEntranceWarningsSaltoKsPrivacyMode : AcsEntranceWarnings -{ -[JsonConstructorAttribute] -protected AcsEntranceWarningsSaltoKsPrivacyMode() { } - -public AcsEntranceWarningsSaltoKsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_privacy_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceWarningsPrivacyMode_model")] -public class AcsEntranceWarningsPrivacyMode : AcsEntranceWarnings -{ -[JsonConstructorAttribute] -protected AcsEntranceWarningsPrivacyMode() { } - -public AcsEntranceWarningsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "privacy_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceWarningsUnrecognized_model")] -public class AcsEntranceWarningsUnrecognized : AcsEntranceWarnings -{ -[JsonConstructorAttribute] -protected AcsEntranceWarningsUnrecognized() { } - -public AcsEntranceWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// ID of the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -/// -/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// Akiles-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceAkilesMetadata? AkilesMetadata { get; set; } - -/// -/// ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - -/// -/// Avigilon Alta-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "avigilon_alta_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceAvigilonAltaMetadata? AvigilonAltaMetadata { get; set; } - -/// -/// Brivo-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "brivo_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceBrivoMetadata? BrivoMetadata { get; set; } - -/// -/// Indicates whether the ACS entrance can belong to a reservation via an access_grant.reservation_key. -/// -[DataMember(Name = "can_belong_to_reservation", IsRequired = false, EmitDefaultValue = false)] -public bool? CanBelongToReservation { get; set; } - -/// -/// Indicates whether the ACS entrance can be unlocked with card credentials. -/// -[DataMember(Name = "can_unlock_with_card", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUnlockWithCard { get; set; } - -/// -/// Indicates whether the ACS entrance can be unlocked with cloud key credentials. -/// -[DataMember(Name = "can_unlock_with_cloud_key", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUnlockWithCloudKey { get; set; } - -/// -/// Indicates whether the ACS entrance can be unlocked with pin codes. -/// -[DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUnlockWithCode { get; set; } - -/// -/// Indicates whether the ACS entrance can be unlocked with mobile key credentials. -/// -[DataMember(Name = "can_unlock_with_mobile_key", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUnlockWithMobileKey { get; set; } - -/// -/// ID of the [connected account](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name for the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// dormakaba Ambiance-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "dormakaba_ambiance_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceDormakabaAmbianceMetadata? DormakabaAmbianceMetadata { get; set; } - -/// -/// dormakaba Community-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "dormakaba_community_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceDormakabaCommunityMetadata? DormakabaCommunityMetadata { get; set; } - -/// -/// Errors associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Hotek-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceHotekMetadata? HotekMetadata { get; set; } - -/// -/// Indicates whether the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) is currently locked. -/// -[DataMember(Name = "is_locked", IsRequired = false, EmitDefaultValue = false)] -public bool? IsLocked { get; set; } - -/// -/// Latch-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "latch_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceLatchMetadata? LatchMetadata { get; set; } - -/// -/// Salto KS-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceSaltoKsMetadata? SaltoKsMetadata { get; set; } - -/// -/// Salto Space-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } - -/// -/// IDs of the spaces that the entrance is in. -/// -[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] -public List SpaceIds { get; set; } - -/// -/// Visionline-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceVisionlineMetadata? VisionlineMetadata { get; set; } - -/// -/// Warnings associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceAkilesMetadata_model")] -public class AcsEntranceAkilesMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceAkilesMetadata() { } - -public AcsEntranceAkilesMetadata(List? actions = default, string? gadgetId = default, string? siteId = default, string? siteName = default) -{ -Actions = actions; -GadgetId = gadgetId; -SiteId = siteId; -SiteName = siteName; -} - -/// -/// Actions the gadget exposes (for example, open). -/// -[DataMember(Name = "actions", IsRequired = false, EmitDefaultValue = false)] -public List? Actions { get; set; } - -/// -/// ID of the Akiles gadget. -/// -[DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] -public string? GadgetId { get; set; } - -/// -/// ID of the Akiles site the gadget belongs to. -/// -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public string? SiteId { get; set; } - -/// -/// Name of the Akiles site the gadget belongs to. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceAkilesMetadataActions_model")] -public class AcsEntranceAkilesMetadataActions -{ -[JsonConstructorAttribute] -protected AcsEntranceAkilesMetadataActions() { } - -public AcsEntranceAkilesMetadataActions(string? id = default, string? name = default) -{ -Id = id; -Name = name; -} - -/// -/// ID of the gadget action. -/// -[DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] -public string? Id { get; set; } - -/// -/// Name of the gadget action. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceAssaAbloyVostioMetadata_model")] -public class AcsEntranceAssaAbloyVostioMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceAssaAbloyVostioMetadata() { } - -public AcsEntranceAssaAbloyVostioMetadata(string? doorName = default, float? doorNumber = default, AcsEntranceAssaAbloyVostioMetadata.DoorTypeEnum? doorType = default, string? pmsId = default, bool? standOpen = default) -{ -DoorName = doorName; -DoorNumber = doorNumber; -DoorType = doorType; -PmsId = pmsId; -StandOpen = standOpen; -} - -/// -/// Type of the door in the Vostio access system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DoorTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "CommonDoor")] -CommonDoor = 1, - -[EnumMember(Value = "EntranceDoor")] -EntranceDoor = 2, - -[EnumMember(Value = "GuestDoor")] -GuestDoor = 3, - -[EnumMember(Value = "Elevator")] -Elevator = 4, -} - -/// -/// Name of the door in the Vostio access system. -/// -[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] -public string? DoorName { get; set; } - -/// -/// Number of the door in the Vostio access system. -/// -[DataMember(Name = "door_number", IsRequired = false, EmitDefaultValue = false)] -public float? DoorNumber { get; set; } - -/// -/// Type of the door in the Vostio access system. -/// -[DataMember(Name = "door_type", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceAssaAbloyVostioMetadata.DoorTypeEnum? DoorType { get; set; } - -/// -/// PMS ID of the door in the Vostio access system. -/// -[DataMember(Name = "pms_id", IsRequired = false, EmitDefaultValue = false)] -public string? PmsId { get; set; } - -/// -/// Indicates whether keys are allowed to set the door in stand open mode in the Vostio access system. -/// -[DataMember(Name = "stand_open", IsRequired = false, EmitDefaultValue = false)] -public bool? StandOpen { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceAvigilonAltaMetadata_model")] -public class AcsEntranceAvigilonAltaMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceAvigilonAltaMetadata() { } - -public AcsEntranceAvigilonAltaMetadata(string? entryName = default, float? entryRelaysTotalCount = default, string? orgName = default, float? siteId = default, string? siteName = default, float? zoneId = default, string? zoneName = default) -{ -EntryName = entryName; -EntryRelaysTotalCount = entryRelaysTotalCount; -OrgName = orgName; -SiteId = siteId; -SiteName = siteName; -ZoneId = zoneId; -ZoneName = zoneName; -} - -/// -/// Entry name for an Avigilon Alta system. -/// -[DataMember(Name = "entry_name", IsRequired = false, EmitDefaultValue = false)] -public string? EntryName { get; set; } - -/// -/// Total count of entry relays for an Avigilon Alta system. -/// -[DataMember(Name = "entry_relays_total_count", IsRequired = false, EmitDefaultValue = false)] -public float? EntryRelaysTotalCount { get; set; } - -/// -/// Organization name for an Avigilon Alta system. -/// -[DataMember(Name = "org_name", IsRequired = false, EmitDefaultValue = false)] -public string? OrgName { get; set; } - -/// -/// Site ID for an Avigilon Alta system. -/// -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public float? SiteId { get; set; } - -/// -/// Site name for an Avigilon Alta system. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -/// -/// Zone ID for an Avigilon Alta system. -/// -[DataMember(Name = "zone_id", IsRequired = false, EmitDefaultValue = false)] -public float? ZoneId { get; set; } - -/// -/// Zone name for an Avigilon Alta system. -/// -[DataMember(Name = "zone_name", IsRequired = false, EmitDefaultValue = false)] -public string? ZoneName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceBrivoMetadata_model")] -public class AcsEntranceBrivoMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceBrivoMetadata() { } - -public AcsEntranceBrivoMetadata(string? accessPointId = default, float? siteId = default, string? siteName = default) -{ -AccessPointId = accessPointId; -SiteId = siteId; -SiteName = siteName; -} - -/// -/// ID of the access point in the Brivo access system. -/// -[DataMember(Name = "access_point_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessPointId { get; set; } - -/// -/// ID of the site that the access point belongs to. -/// -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public float? SiteId { get; set; } - -/// -/// Name of the site that the access point belongs to. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceDormakabaAmbianceMetadata_model")] -public class AcsEntranceDormakabaAmbianceMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceDormakabaAmbianceMetadata() { } - -public AcsEntranceDormakabaAmbianceMetadata(string? accessPointName = default) -{ -AccessPointName = accessPointName; -} - -/// -/// Name of the access point in the dormakaba Ambiance access system. -/// -[DataMember(Name = "access_point_name", IsRequired = false, EmitDefaultValue = false)] -public string? AccessPointName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceDormakabaCommunityMetadata_model")] -public class AcsEntranceDormakabaCommunityMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceDormakabaCommunityMetadata() { } - -public AcsEntranceDormakabaCommunityMetadata(string? accessPointProfile = default) -{ -AccessPointProfile = accessPointProfile; -} - -/// -/// Type of access point profile in the dormakaba Community access system. -/// -[DataMember(Name = "access_point_profile", IsRequired = false, EmitDefaultValue = false)] -public string? AccessPointProfile { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceErrors_model")] -public class AcsEntranceErrors -{ -[JsonConstructorAttribute] -protected AcsEntranceErrors() { } - -public AcsEntranceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceHotekMetadata_model")] -public class AcsEntranceHotekMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceHotekMetadata() { } - -public AcsEntranceHotekMetadata(string? commonAreaName = default, string? commonAreaNumber = default, string? roomNumber = default) -{ -CommonAreaName = commonAreaName; -CommonAreaNumber = commonAreaNumber; -RoomNumber = roomNumber; -} - -/// -/// Display name of the entrance. -/// -[DataMember(Name = "common_area_name", IsRequired = false, EmitDefaultValue = false)] -public string? CommonAreaName { get; set; } - -/// -/// Display name of the entrance. -/// -[DataMember(Name = "common_area_number", IsRequired = false, EmitDefaultValue = false)] -public string? CommonAreaNumber { get; set; } - -/// -/// Room number of the entrance. -/// -[DataMember(Name = "room_number", IsRequired = false, EmitDefaultValue = false)] -public string? RoomNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceLatchMetadata_model")] -public class AcsEntranceLatchMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceLatchMetadata() { } - -public AcsEntranceLatchMetadata(string? accessibilityType = default, string? doorName = default, string? doorType = default, bool? isConnected = default) -{ -AccessibilityType = accessibilityType; -DoorName = doorName; -DoorType = doorType; -IsConnected = isConnected; -} - -/// -/// Accessibility type in the Latch access system. -/// -[DataMember(Name = "accessibility_type", IsRequired = false, EmitDefaultValue = false)] -public string? AccessibilityType { get; set; } - -/// -/// Name of the door in the Latch access system. -/// -[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] -public string? DoorName { get; set; } - -/// -/// Type of the door in the Latch access system. -/// -[DataMember(Name = "door_type", IsRequired = false, EmitDefaultValue = false)] -public string? DoorType { get; set; } - -/// -/// Indicates whether the entrance is connected. -/// -[DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] -public bool? IsConnected { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceSaltoKsMetadata_model")] -public class AcsEntranceSaltoKsMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceSaltoKsMetadata() { } - -public AcsEntranceSaltoKsMetadata(string? batteryLevel = default, string? doorName = default, bool? intrusionAlarm = default, bool? leftOpenAlarm = default, string? lockType = default, string? lockedState = default, bool? online = default, bool? privacyMode = default) -{ -BatteryLevel = batteryLevel; -DoorName = doorName; -IntrusionAlarm = intrusionAlarm; -LeftOpenAlarm = leftOpenAlarm; -LockType = lockType; -LockedState = lockedState; -Online = online; -PrivacyMode = privacyMode; -} - -/// -/// Battery level of the door access device. -/// -[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] -public string? BatteryLevel { get; set; } - -/// -/// Name of the door in the Salto KS access system. -/// -[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] -public string? DoorName { get; set; } - -/// -/// Indicates whether an intrusion alarm is active on the door. -/// -[DataMember(Name = "intrusion_alarm", IsRequired = false, EmitDefaultValue = false)] -public bool? IntrusionAlarm { get; set; } - -/// -/// Indicates whether the door is left open. -/// -[DataMember(Name = "left_open_alarm", IsRequired = false, EmitDefaultValue = false)] -public bool? LeftOpenAlarm { get; set; } - -/// -/// Type of the lock in the Salto KS access system. -/// -[DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] -public string? LockType { get; set; } - -/// -/// Locked state of the door in the Salto KS access system. -/// -[DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] -public string? LockedState { get; set; } - -/// -/// Indicates whether the door access device is online. -/// -[DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] -public bool? Online { get; set; } - -/// -/// Indicates whether privacy mode is enabled for the lock. -/// -[DataMember(Name = "privacy_mode", IsRequired = false, EmitDefaultValue = false)] -public bool? PrivacyMode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceSaltoSpaceMetadata_model")] -public class AcsEntranceSaltoSpaceMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceSaltoSpaceMetadata() { } - -public AcsEntranceSaltoSpaceMetadata(bool? auditOnKeys = default, string? doorDescription = default, string? doorId = default, string? doorName = default, string? roomDescription = default, string? roomName = default) -{ -AuditOnKeys = auditOnKeys; -DoorDescription = doorDescription; -DoorId = doorId; -DoorName = doorName; -RoomDescription = roomDescription; -RoomName = roomName; -} - -/// -/// Indicates whether AuditOnKeys is enabled for the door in the Salto Space access system. -/// -[DataMember(Name = "audit_on_keys", IsRequired = false, EmitDefaultValue = false)] -public bool? AuditOnKeys { get; set; } - -/// -/// Description of the door in the Salto Space access system. -/// -[DataMember(Name = "door_description", IsRequired = false, EmitDefaultValue = false)] -public string? DoorDescription { get; set; } - -/// -/// Door ID in the Salto Space access system. -/// -[DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] -public string? DoorId { get; set; } - -/// -/// Name of the door in the Salto Space access system. -/// -[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] -public string? DoorName { get; set; } - -/// -/// Description of the room in the Salto Space access system. -/// -[DataMember(Name = "room_description", IsRequired = false, EmitDefaultValue = false)] -public string? RoomDescription { get; set; } - -/// -/// Name of the room in the Salto Space access system. -/// -[DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] -public string? RoomName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceVisionlineMetadata_model")] -public class AcsEntranceVisionlineMetadata -{ -[JsonConstructorAttribute] -protected AcsEntranceVisionlineMetadata() { } - -public AcsEntranceVisionlineMetadata(AcsEntranceVisionlineMetadata.DoorCategoryEnum? doorCategory = default, string? doorName = default, List? profiles = default) -{ -DoorCategory = doorCategory; -DoorName = doorName; -Profiles = profiles; -} - -/// -/// Category of the door in the Visionline access system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DoorCategoryEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "entrance")] -Entrance = 1, - -[EnumMember(Value = "guest")] -Guest = 2, - -[EnumMember(Value = "elevator reader")] -ElevatorReader = 3, - -[EnumMember(Value = "common")] -Common = 4, - -[EnumMember(Value = "common (PMS)")] -CommonPms = 5, -} - -/// -/// Category of the door in the Visionline access system. -/// -[DataMember(Name = "door_category", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceVisionlineMetadata.DoorCategoryEnum? DoorCategory { get; set; } - -/// -/// Name of the door in the Visionline access system. -/// -[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] -public string? DoorName { get; set; } - -/// -/// Profile for the door in the Visionline access system. -/// -[DataMember(Name = "profiles", IsRequired = false, EmitDefaultValue = false)] -public List? Profiles { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsEntranceVisionlineMetadataProfiles_model")] -public class AcsEntranceVisionlineMetadataProfiles -{ -[JsonConstructorAttribute] -protected AcsEntranceVisionlineMetadataProfiles() { } - -public AcsEntranceVisionlineMetadataProfiles(string? visionlineDoorProfileId = default, AcsEntranceVisionlineMetadataProfiles.VisionlineDoorProfileTypeEnum? visionlineDoorProfileType = default) -{ -VisionlineDoorProfileId = visionlineDoorProfileId; -VisionlineDoorProfileType = visionlineDoorProfileType; -} - -/// -/// Door profile type in the Visionline access system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum VisionlineDoorProfileTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "BLE")] -Ble = 1, - -[EnumMember(Value = "commonDoor")] -CommonDoor = 2, - -[EnumMember(Value = "touch")] -Touch = 3, -} - -/// -/// Door profile ID in the Visionline access system. -/// -[DataMember(Name = "visionline_door_profile_id", IsRequired = false, EmitDefaultValue = false)] -public string? VisionlineDoorProfileId { get; set; } - -/// -/// Door profile type in the Visionline access system. -/// -[DataMember(Name = "visionline_door_profile_type", IsRequired = false, EmitDefaultValue = false)] -public AcsEntranceVisionlineMetadataProfiles.VisionlineDoorProfileTypeEnum? VisionlineDoorProfileType { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. + /// + [DataContract(Name = "seamModel_acsEntrance_model")] + public class AcsEntrance + { + [JsonConstructorAttribute] + protected AcsEntrance() { } + + public AcsEntrance( + string acsEntranceId = default, + string acsSystemId = default, + AcsEntranceAkilesMetadata? akilesMetadata = default, + AcsEntranceAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, + AcsEntranceAvigilonAltaMetadata? avigilonAltaMetadata = default, + AcsEntranceBrivoMetadata? brivoMetadata = default, + bool? canBelongToReservation = default, + bool? canUnlockWithCard = default, + bool? canUnlockWithCloudKey = default, + bool? canUnlockWithCode = default, + bool? canUnlockWithMobileKey = default, + string connectedAccountId = default, + string createdAt = default, + string displayName = default, + AcsEntranceDormakabaAmbianceMetadata? dormakabaAmbianceMetadata = default, + AcsEntranceDormakabaCommunityMetadata? dormakabaCommunityMetadata = default, + List errors = default, + AcsEntranceHotekMetadata? hotekMetadata = default, + bool? isLocked = default, + AcsEntranceLatchMetadata? latchMetadata = default, + AcsEntranceSaltoKsMetadata? saltoKsMetadata = default, + AcsEntranceSaltoSpaceMetadata? saltoSpaceMetadata = default, + List spaceIds = default, + AcsEntranceVisionlineMetadata? visionlineMetadata = default, + List warnings = default + ) + { + AcsEntranceId = acsEntranceId; + AcsSystemId = acsSystemId; + AkilesMetadata = akilesMetadata; + AssaAbloyVostioMetadata = assaAbloyVostioMetadata; + AvigilonAltaMetadata = avigilonAltaMetadata; + BrivoMetadata = brivoMetadata; + CanBelongToReservation = canBelongToReservation; + CanUnlockWithCard = canUnlockWithCard; + CanUnlockWithCloudKey = canUnlockWithCloudKey; + CanUnlockWithCode = canUnlockWithCode; + CanUnlockWithMobileKey = canUnlockWithMobileKey; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DisplayName = displayName; + DormakabaAmbianceMetadata = dormakabaAmbianceMetadata; + DormakabaCommunityMetadata = dormakabaCommunityMetadata; + Errors = errors; + HotekMetadata = hotekMetadata; + IsLocked = isLocked; + LatchMetadata = latchMetadata; + SaltoKsMetadata = saltoKsMetadata; + SaltoSpaceMetadata = saltoSpaceMetadata; + SpaceIds = spaceIds; + VisionlineMetadata = visionlineMetadata; + Warnings = warnings; + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsEntranceWarningsUnrecognized))] + [JsonSubtypes.KnownSubType(typeof(AcsEntranceWarningsPrivacyMode), "privacy_mode")] + [JsonSubtypes.KnownSubType( + typeof(AcsEntranceWarningsSaltoKsPrivacyMode), + "salto_ks_privacy_mode" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsEntranceWarningsEntranceSetupRequired), + "entrance_setup_required" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsEntranceWarningsEntranceSharesZone), + "entrance_shares_zone" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved), + "salto_ks_entrance_access_code_support_removed" + )] + public abstract class AcsEntranceWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract( + Name = "seamModel_acsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved_model" + )] + public class AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved + : AcsEntranceWarnings + { + [JsonConstructorAttribute] + protected AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved() { } + + public AcsEntranceWarningsSaltoKsEntranceAccessCodeSupportRemoved( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "salto_ks_entrance_access_code_support_removed"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceWarningsEntranceSharesZone_model")] + public class AcsEntranceWarningsEntranceSharesZone : AcsEntranceWarnings + { + [JsonConstructorAttribute] + protected AcsEntranceWarningsEntranceSharesZone() { } + + public AcsEntranceWarningsEntranceSharesZone( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "entrance_shares_zone"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceWarningsEntranceSetupRequired_model")] + public class AcsEntranceWarningsEntranceSetupRequired : AcsEntranceWarnings + { + [JsonConstructorAttribute] + protected AcsEntranceWarningsEntranceSetupRequired() { } + + public AcsEntranceWarningsEntranceSetupRequired( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "entrance_setup_required"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceWarningsSaltoKsPrivacyMode_model")] + public class AcsEntranceWarningsSaltoKsPrivacyMode : AcsEntranceWarnings + { + [JsonConstructorAttribute] + protected AcsEntranceWarningsSaltoKsPrivacyMode() { } + + public AcsEntranceWarningsSaltoKsPrivacyMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "salto_ks_privacy_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceWarningsPrivacyMode_model")] + public class AcsEntranceWarningsPrivacyMode : AcsEntranceWarnings + { + [JsonConstructorAttribute] + protected AcsEntranceWarningsPrivacyMode() { } + + public AcsEntranceWarningsPrivacyMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "privacy_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceWarningsUnrecognized_model")] + public class AcsEntranceWarningsUnrecognized : AcsEntranceWarnings + { + [JsonConstructorAttribute] + protected AcsEntranceWarningsUnrecognized() { } + + public AcsEntranceWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// ID of the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + /// + /// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// Akiles-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceAkilesMetadata? AkilesMetadata { get; set; } + + /// + /// ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember( + Name = "assa_abloy_vostio_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public AcsEntranceAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + + /// + /// Avigilon Alta-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "avigilon_alta_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceAvigilonAltaMetadata? AvigilonAltaMetadata { get; set; } + + /// + /// Brivo-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "brivo_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceBrivoMetadata? BrivoMetadata { get; set; } + + /// + /// Indicates whether the ACS entrance can belong to a reservation via an access_grant.reservation_key. + /// + [DataMember( + Name = "can_belong_to_reservation", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanBelongToReservation { get; set; } + + /// + /// Indicates whether the ACS entrance can be unlocked with card credentials. + /// + [DataMember(Name = "can_unlock_with_card", IsRequired = false, EmitDefaultValue = false)] + public bool? CanUnlockWithCard { get; set; } + + /// + /// Indicates whether the ACS entrance can be unlocked with cloud key credentials. + /// + [DataMember( + Name = "can_unlock_with_cloud_key", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanUnlockWithCloudKey { get; set; } + + /// + /// Indicates whether the ACS entrance can be unlocked with pin codes. + /// + [DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] + public bool? CanUnlockWithCode { get; set; } + + /// + /// Indicates whether the ACS entrance can be unlocked with mobile key credentials. + /// + [DataMember( + Name = "can_unlock_with_mobile_key", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanUnlockWithMobileKey { get; set; } + + /// + /// ID of the [connected account](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name for the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// dormakaba Ambiance-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember( + Name = "dormakaba_ambiance_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public AcsEntranceDormakabaAmbianceMetadata? DormakabaAmbianceMetadata { get; set; } + + /// + /// dormakaba Community-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember( + Name = "dormakaba_community_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public AcsEntranceDormakabaCommunityMetadata? DormakabaCommunityMetadata { get; set; } + + /// + /// Errors associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Hotek-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "hotek_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceHotekMetadata? HotekMetadata { get; set; } + + /// + /// Indicates whether the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) is currently locked. + /// + [DataMember(Name = "is_locked", IsRequired = false, EmitDefaultValue = false)] + public bool? IsLocked { get; set; } + + /// + /// Latch-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "latch_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceLatchMetadata? LatchMetadata { get; set; } + + /// + /// Salto KS-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceSaltoKsMetadata? SaltoKsMetadata { get; set; } + + /// + /// Salto Space-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } + + /// + /// IDs of the spaces that the entrance is in. + /// + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List SpaceIds { get; set; } + + /// + /// Visionline-specific metadata associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceVisionlineMetadata? VisionlineMetadata { get; set; } + + /// + /// Warnings associated with the [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceAkilesMetadata_model")] + public class AcsEntranceAkilesMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceAkilesMetadata() { } + + public AcsEntranceAkilesMetadata( + List? actions = default, + string? gadgetId = default, + string? siteId = default, + string? siteName = default + ) + { + Actions = actions; + GadgetId = gadgetId; + SiteId = siteId; + SiteName = siteName; + } + + /// + /// Actions the gadget exposes (for example, open). + /// + [DataMember(Name = "actions", IsRequired = false, EmitDefaultValue = false)] + public List? Actions { get; set; } + + /// + /// ID of the Akiles gadget. + /// + [DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] + public string? GadgetId { get; set; } + + /// + /// ID of the Akiles site the gadget belongs to. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public string? SiteId { get; set; } + + /// + /// Name of the Akiles site the gadget belongs to. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceAkilesMetadataActions_model")] + public class AcsEntranceAkilesMetadataActions + { + [JsonConstructorAttribute] + protected AcsEntranceAkilesMetadataActions() { } + + public AcsEntranceAkilesMetadataActions(string? id = default, string? name = default) + { + Id = id; + Name = name; + } + + /// + /// ID of the gadget action. + /// + [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] + public string? Id { get; set; } + + /// + /// Name of the gadget action. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceAssaAbloyVostioMetadata_model")] + public class AcsEntranceAssaAbloyVostioMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceAssaAbloyVostioMetadata() { } + + public AcsEntranceAssaAbloyVostioMetadata( + string? doorName = default, + float? doorNumber = default, + AcsEntranceAssaAbloyVostioMetadata.DoorTypeEnum? doorType = default, + string? pmsId = default, + bool? standOpen = default + ) + { + DoorName = doorName; + DoorNumber = doorNumber; + DoorType = doorType; + PmsId = pmsId; + StandOpen = standOpen; + } + + /// + /// Type of the door in the Vostio access system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DoorTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "CommonDoor")] + CommonDoor = 1, + + [EnumMember(Value = "EntranceDoor")] + EntranceDoor = 2, + + [EnumMember(Value = "GuestDoor")] + GuestDoor = 3, + + [EnumMember(Value = "Elevator")] + Elevator = 4, + } + + /// + /// Name of the door in the Vostio access system. + /// + [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] + public string? DoorName { get; set; } + + /// + /// Number of the door in the Vostio access system. + /// + [DataMember(Name = "door_number", IsRequired = false, EmitDefaultValue = false)] + public float? DoorNumber { get; set; } + + /// + /// Type of the door in the Vostio access system. + /// + [DataMember(Name = "door_type", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceAssaAbloyVostioMetadata.DoorTypeEnum? DoorType { get; set; } + + /// + /// PMS ID of the door in the Vostio access system. + /// + [DataMember(Name = "pms_id", IsRequired = false, EmitDefaultValue = false)] + public string? PmsId { get; set; } + + /// + /// Indicates whether keys are allowed to set the door in stand open mode in the Vostio access system. + /// + [DataMember(Name = "stand_open", IsRequired = false, EmitDefaultValue = false)] + public bool? StandOpen { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceAvigilonAltaMetadata_model")] + public class AcsEntranceAvigilonAltaMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceAvigilonAltaMetadata() { } + + public AcsEntranceAvigilonAltaMetadata( + string? entryName = default, + float? entryRelaysTotalCount = default, + string? orgName = default, + float? siteId = default, + string? siteName = default, + float? zoneId = default, + string? zoneName = default + ) + { + EntryName = entryName; + EntryRelaysTotalCount = entryRelaysTotalCount; + OrgName = orgName; + SiteId = siteId; + SiteName = siteName; + ZoneId = zoneId; + ZoneName = zoneName; + } + + /// + /// Entry name for an Avigilon Alta system. + /// + [DataMember(Name = "entry_name", IsRequired = false, EmitDefaultValue = false)] + public string? EntryName { get; set; } + + /// + /// Total count of entry relays for an Avigilon Alta system. + /// + [DataMember( + Name = "entry_relays_total_count", + IsRequired = false, + EmitDefaultValue = false + )] + public float? EntryRelaysTotalCount { get; set; } + + /// + /// Organization name for an Avigilon Alta system. + /// + [DataMember(Name = "org_name", IsRequired = false, EmitDefaultValue = false)] + public string? OrgName { get; set; } + + /// + /// Site ID for an Avigilon Alta system. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public float? SiteId { get; set; } + + /// + /// Site name for an Avigilon Alta system. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + /// + /// Zone ID for an Avigilon Alta system. + /// + [DataMember(Name = "zone_id", IsRequired = false, EmitDefaultValue = false)] + public float? ZoneId { get; set; } + + /// + /// Zone name for an Avigilon Alta system. + /// + [DataMember(Name = "zone_name", IsRequired = false, EmitDefaultValue = false)] + public string? ZoneName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceBrivoMetadata_model")] + public class AcsEntranceBrivoMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceBrivoMetadata() { } + + public AcsEntranceBrivoMetadata( + string? accessPointId = default, + float? siteId = default, + string? siteName = default + ) + { + AccessPointId = accessPointId; + SiteId = siteId; + SiteName = siteName; + } + + /// + /// ID of the access point in the Brivo access system. + /// + [DataMember(Name = "access_point_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessPointId { get; set; } + + /// + /// ID of the site that the access point belongs to. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public float? SiteId { get; set; } + + /// + /// Name of the site that the access point belongs to. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceDormakabaAmbianceMetadata_model")] + public class AcsEntranceDormakabaAmbianceMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceDormakabaAmbianceMetadata() { } + + public AcsEntranceDormakabaAmbianceMetadata(string? accessPointName = default) + { + AccessPointName = accessPointName; + } + + /// + /// Name of the access point in the dormakaba Ambiance access system. + /// + [DataMember(Name = "access_point_name", IsRequired = false, EmitDefaultValue = false)] + public string? AccessPointName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceDormakabaCommunityMetadata_model")] + public class AcsEntranceDormakabaCommunityMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceDormakabaCommunityMetadata() { } + + public AcsEntranceDormakabaCommunityMetadata(string? accessPointProfile = default) + { + AccessPointProfile = accessPointProfile; + } + + /// + /// Type of access point profile in the dormakaba Community access system. + /// + [DataMember(Name = "access_point_profile", IsRequired = false, EmitDefaultValue = false)] + public string? AccessPointProfile { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceErrors_model")] + public class AcsEntranceErrors + { + [JsonConstructorAttribute] + protected AcsEntranceErrors() { } + + public AcsEntranceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceHotekMetadata_model")] + public class AcsEntranceHotekMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceHotekMetadata() { } + + public AcsEntranceHotekMetadata( + string? commonAreaName = default, + string? commonAreaNumber = default, + string? roomNumber = default + ) + { + CommonAreaName = commonAreaName; + CommonAreaNumber = commonAreaNumber; + RoomNumber = roomNumber; + } + + /// + /// Display name of the entrance. + /// + [DataMember(Name = "common_area_name", IsRequired = false, EmitDefaultValue = false)] + public string? CommonAreaName { get; set; } + + /// + /// Display name of the entrance. + /// + [DataMember(Name = "common_area_number", IsRequired = false, EmitDefaultValue = false)] + public string? CommonAreaNumber { get; set; } + + /// + /// Room number of the entrance. + /// + [DataMember(Name = "room_number", IsRequired = false, EmitDefaultValue = false)] + public string? RoomNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceLatchMetadata_model")] + public class AcsEntranceLatchMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceLatchMetadata() { } + + public AcsEntranceLatchMetadata( + string? accessibilityType = default, + string? doorName = default, + string? doorType = default, + bool? isConnected = default + ) + { + AccessibilityType = accessibilityType; + DoorName = doorName; + DoorType = doorType; + IsConnected = isConnected; + } + + /// + /// Accessibility type in the Latch access system. + /// + [DataMember(Name = "accessibility_type", IsRequired = false, EmitDefaultValue = false)] + public string? AccessibilityType { get; set; } + + /// + /// Name of the door in the Latch access system. + /// + [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] + public string? DoorName { get; set; } + + /// + /// Type of the door in the Latch access system. + /// + [DataMember(Name = "door_type", IsRequired = false, EmitDefaultValue = false)] + public string? DoorType { get; set; } + + /// + /// Indicates whether the entrance is connected. + /// + [DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] + public bool? IsConnected { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceSaltoKsMetadata_model")] + public class AcsEntranceSaltoKsMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceSaltoKsMetadata() { } + + public AcsEntranceSaltoKsMetadata( + string? batteryLevel = default, + string? doorName = default, + bool? intrusionAlarm = default, + bool? leftOpenAlarm = default, + string? lockType = default, + string? lockedState = default, + bool? online = default, + bool? privacyMode = default + ) + { + BatteryLevel = batteryLevel; + DoorName = doorName; + IntrusionAlarm = intrusionAlarm; + LeftOpenAlarm = leftOpenAlarm; + LockType = lockType; + LockedState = lockedState; + Online = online; + PrivacyMode = privacyMode; + } + + /// + /// Battery level of the door access device. + /// + [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] + public string? BatteryLevel { get; set; } + + /// + /// Name of the door in the Salto KS access system. + /// + [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] + public string? DoorName { get; set; } + + /// + /// Indicates whether an intrusion alarm is active on the door. + /// + [DataMember(Name = "intrusion_alarm", IsRequired = false, EmitDefaultValue = false)] + public bool? IntrusionAlarm { get; set; } + + /// + /// Indicates whether the door is left open. + /// + [DataMember(Name = "left_open_alarm", IsRequired = false, EmitDefaultValue = false)] + public bool? LeftOpenAlarm { get; set; } + + /// + /// Type of the lock in the Salto KS access system. + /// + [DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] + public string? LockType { get; set; } + + /// + /// Locked state of the door in the Salto KS access system. + /// + [DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] + public string? LockedState { get; set; } + + /// + /// Indicates whether the door access device is online. + /// + [DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] + public bool? Online { get; set; } + + /// + /// Indicates whether privacy mode is enabled for the lock. + /// + [DataMember(Name = "privacy_mode", IsRequired = false, EmitDefaultValue = false)] + public bool? PrivacyMode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceSaltoSpaceMetadata_model")] + public class AcsEntranceSaltoSpaceMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceSaltoSpaceMetadata() { } + + public AcsEntranceSaltoSpaceMetadata( + bool? auditOnKeys = default, + string? doorDescription = default, + string? doorId = default, + string? doorName = default, + string? roomDescription = default, + string? roomName = default + ) + { + AuditOnKeys = auditOnKeys; + DoorDescription = doorDescription; + DoorId = doorId; + DoorName = doorName; + RoomDescription = roomDescription; + RoomName = roomName; + } + + /// + /// Indicates whether AuditOnKeys is enabled for the door in the Salto Space access system. + /// + [DataMember(Name = "audit_on_keys", IsRequired = false, EmitDefaultValue = false)] + public bool? AuditOnKeys { get; set; } + + /// + /// Description of the door in the Salto Space access system. + /// + [DataMember(Name = "door_description", IsRequired = false, EmitDefaultValue = false)] + public string? DoorDescription { get; set; } + + /// + /// Door ID in the Salto Space access system. + /// + [DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] + public string? DoorId { get; set; } + + /// + /// Name of the door in the Salto Space access system. + /// + [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] + public string? DoorName { get; set; } + + /// + /// Description of the room in the Salto Space access system. + /// + [DataMember(Name = "room_description", IsRequired = false, EmitDefaultValue = false)] + public string? RoomDescription { get; set; } + + /// + /// Name of the room in the Salto Space access system. + /// + [DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] + public string? RoomName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceVisionlineMetadata_model")] + public class AcsEntranceVisionlineMetadata + { + [JsonConstructorAttribute] + protected AcsEntranceVisionlineMetadata() { } + + public AcsEntranceVisionlineMetadata( + AcsEntranceVisionlineMetadata.DoorCategoryEnum? doorCategory = default, + string? doorName = default, + List? profiles = default + ) + { + DoorCategory = doorCategory; + DoorName = doorName; + Profiles = profiles; + } + + /// + /// Category of the door in the Visionline access system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DoorCategoryEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "entrance")] + Entrance = 1, + + [EnumMember(Value = "guest")] + Guest = 2, + + [EnumMember(Value = "elevator reader")] + ElevatorReader = 3, + + [EnumMember(Value = "common")] + Common = 4, + + [EnumMember(Value = "common (PMS)")] + CommonPms = 5, + } + + /// + /// Category of the door in the Visionline access system. + /// + [DataMember(Name = "door_category", IsRequired = false, EmitDefaultValue = false)] + public AcsEntranceVisionlineMetadata.DoorCategoryEnum? DoorCategory { get; set; } + + /// + /// Name of the door in the Visionline access system. + /// + [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] + public string? DoorName { get; set; } + + /// + /// Profile for the door in the Visionline access system. + /// + [DataMember(Name = "profiles", IsRequired = false, EmitDefaultValue = false)] + public List? Profiles { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsEntranceVisionlineMetadataProfiles_model")] + public class AcsEntranceVisionlineMetadataProfiles + { + [JsonConstructorAttribute] + protected AcsEntranceVisionlineMetadataProfiles() { } + + public AcsEntranceVisionlineMetadataProfiles( + string? visionlineDoorProfileId = default, + AcsEntranceVisionlineMetadataProfiles.VisionlineDoorProfileTypeEnum? visionlineDoorProfileType = + default + ) + { + VisionlineDoorProfileId = visionlineDoorProfileId; + VisionlineDoorProfileType = visionlineDoorProfileType; + } + + /// + /// Door profile type in the Visionline access system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum VisionlineDoorProfileTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "BLE")] + Ble = 1, + + [EnumMember(Value = "commonDoor")] + CommonDoor = 2, + + [EnumMember(Value = "touch")] + Touch = 3, + } + + /// + /// Door profile ID in the Visionline access system. + /// + [DataMember( + Name = "visionline_door_profile_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? VisionlineDoorProfileId { get; set; } + + /// + /// Door profile type in the Visionline access system. + /// + [DataMember( + Name = "visionline_door_profile_type", + IsRequired = false, + EmitDefaultValue = false + )] + public AcsEntranceVisionlineMetadataProfiles.VisionlineDoorProfileTypeEnum? VisionlineDoorProfileType { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/AcsSystem.cs b/src/Seam/Model/AcsSystem.cs index 970f03fd..3b976465 100644 --- a/src/Seam/Model/AcsSystem.cs +++ b/src/Seam/Model/AcsSystem.cs @@ -8,1156 +8,1297 @@ namespace Seam.Model { -/// -/// Represents an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// Within an `acs_system`, create [`acs_user`s](https://www.seam.co/docs/api/acs/users/object) and [`acs_credential`s](https://www.seam.co/docs/api/acs/credentials/object) to grant access to the `acs_user`s. -/// -/// For details about the resources associated with an access control system, see the [access control systems namespace](https://www.seam.co/docs/api/acs/object). -/// -[DataContract(Name = "seamModel_acsSystem_model")] -public class AcsSystem -{ -[JsonConstructorAttribute] -protected AcsSystem() { } - -public AcsSystem(float? acsAccessGroupCount = default, string acsSystemId = default, float? acsUserCount = default, string connectedAccountId = default, List connectedAccountIds = default, string createdAt = default, string? defaultCredentialManagerAcsSystemId = default, List errors = default, AcsSystem.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, string imageAltText = default, string imageUrl = default, bool isCredentialManager = default, AcsSystemLocation location = default, string name = default, AcsSystem.SystemTypeEnum? systemType = default, string? systemTypeDisplayName = default, AcsSystemVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) -{ -AcsAccessGroupCount = acsAccessGroupCount; -AcsSystemId = acsSystemId; -AcsUserCount = acsUserCount; -ConnectedAccountId = connectedAccountId; -ConnectedAccountIds = connectedAccountIds; -CreatedAt = createdAt; -DefaultCredentialManagerAcsSystemId = defaultCredentialManagerAcsSystemId; -Errors = errors; -ExternalType = externalType; -ExternalTypeDisplayName = externalTypeDisplayName; -ImageAltText = imageAltText; -ImageUrl = imageUrl; -IsCredentialManager = isCredentialManager; -Location = location; -Name = name; -SystemType = systemType; -SystemTypeDisplayName = systemTypeDisplayName; -VisionlineMetadata = visionlineMetadata; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsSystemErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsProviderServiceUnavailable), "provider_service_unavailable")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsSaltoKsCertificationExpired), "salto_ks_certification_expired")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsAccountDisconnected), "account_disconnected")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsAcsSystemDisconnected), "acs_system_disconnected")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsInsufficientPermissions), "insufficient_permissions")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsVisionlineInstanceUnreachable), "visionline_instance_unreachable")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsBridgeDisconnected), "bridge_disconnected")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemErrorsSeamBridgeDisconnected), "seam_bridge_disconnected")] -public abstract class AcsSystemErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsSystemErrorsSeamBridgeDisconnected_model")] -public class AcsSystemErrorsSeamBridgeDisconnected : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsSeamBridgeDisconnected() { } - -public AcsSystemErrorsSeamBridgeDisconnected(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "seam_bridge_disconnected"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsBridgeDisconnected_model")] -public class AcsSystemErrorsBridgeDisconnected : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsBridgeDisconnected() { } - -public AcsSystemErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "bridge_disconnected"; - -/// -/// Indicates whether the error is related to the [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBridgeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsVisionlineInstanceUnreachable_model")] -public class AcsSystemErrorsVisionlineInstanceUnreachable : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsVisionlineInstanceUnreachable() { } - -public AcsSystemErrorsVisionlineInstanceUnreachable(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "visionline_instance_unreachable"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsSaltoKsSubscriptionLimitExceeded_model")] -public class AcsSystemErrorsSaltoKsSubscriptionLimitExceeded : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsSaltoKsSubscriptionLimitExceeded() { } - -public AcsSystemErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsInsufficientPermissions_model")] -public class AcsSystemErrorsInsufficientPermissions : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsInsufficientPermissions() { } - -public AcsSystemErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "insufficient_permissions"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsAcsSystemDisconnected_model")] -public class AcsSystemErrorsAcsSystemDisconnected : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsAcsSystemDisconnected() { } - -public AcsSystemErrorsAcsSystemDisconnected(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "acs_system_disconnected"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsAccountDisconnected_model")] -public class AcsSystemErrorsAccountDisconnected : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsAccountDisconnected() { } - -public AcsSystemErrorsAccountDisconnected(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "account_disconnected"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsSaltoKsCertificationExpired_model")] -public class AcsSystemErrorsSaltoKsCertificationExpired : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsSaltoKsCertificationExpired() { } - -public AcsSystemErrorsSaltoKsCertificationExpired(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "salto_ks_certification_expired"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsProviderServiceUnavailable_model")] -public class AcsSystemErrorsProviderServiceUnavailable : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsProviderServiceUnavailable() { } - -public AcsSystemErrorsProviderServiceUnavailable(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "provider_service_unavailable"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemErrorsUnrecognized_model")] -public class AcsSystemErrorsUnrecognized : AcsSystemErrors -{ -[JsonConstructorAttribute] -protected AcsSystemErrorsUnrecognized() { } - -public AcsSystemErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExternalTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_site")] -PtiSite = 1, - -[EnumMember(Value = "avigilon_alta_org")] -AvigilonAltaOrg = 2, - -[EnumMember(Value = "salto_ks_site")] -SaltoKsSite = 3, - -[EnumMember(Value = "salto_space_system")] -SaltoSpaceSystem = 4, - -[EnumMember(Value = "brivo_account")] -BrivoAccount = 5, - -[EnumMember(Value = "hid_credential_manager_organization")] -HidCredentialManagerOrganization = 6, - -[EnumMember(Value = "visionline_system")] -VisionlineSystem = 7, - -[EnumMember(Value = "assa_abloy_credential_service")] -AssaAbloyCredentialService = 8, - -[EnumMember(Value = "latch_building")] -LatchBuilding = 9, - -[EnumMember(Value = "dormakaba_community_site")] -DormakabaCommunitySite = 10, - -[EnumMember(Value = "dormakaba_ambiance_site")] -DormakabaAmbianceSite = 11, - -[EnumMember(Value = "legic_connect_credential_service")] -LegicConnectCredentialService = 12, - -[EnumMember(Value = "assa_abloy_vostio")] -AssaAbloyVostio = 13, - -[EnumMember(Value = "assa_abloy_vostio_credential_service")] -AssaAbloyVostioCredentialService = 14, - -[EnumMember(Value = "hotek_site")] -HotekSite = 15, - -[EnumMember(Value = "kisi_organization")] -KisiOrganization = 16, - -[EnumMember(Value = "akiles_organization")] -AkilesOrganization = 17, -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum SystemTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_site")] -PtiSite = 1, - -[EnumMember(Value = "avigilon_alta_org")] -AvigilonAltaOrg = 2, - -[EnumMember(Value = "salto_ks_site")] -SaltoKsSite = 3, - -[EnumMember(Value = "salto_space_system")] -SaltoSpaceSystem = 4, - -[EnumMember(Value = "brivo_account")] -BrivoAccount = 5, - -[EnumMember(Value = "hid_credential_manager_organization")] -HidCredentialManagerOrganization = 6, - -[EnumMember(Value = "visionline_system")] -VisionlineSystem = 7, - -[EnumMember(Value = "assa_abloy_credential_service")] -AssaAbloyCredentialService = 8, - -[EnumMember(Value = "latch_building")] -LatchBuilding = 9, - -[EnumMember(Value = "dormakaba_community_site")] -DormakabaCommunitySite = 10, - -[EnumMember(Value = "dormakaba_ambiance_site")] -DormakabaAmbianceSite = 11, - -[EnumMember(Value = "legic_connect_credential_service")] -LegicConnectCredentialService = 12, - -[EnumMember(Value = "assa_abloy_vostio")] -AssaAbloyVostio = 13, - -[EnumMember(Value = "assa_abloy_vostio_credential_service")] -AssaAbloyVostioCredentialService = 14, - -[EnumMember(Value = "hotek_site")] -HotekSite = 15, - -[EnumMember(Value = "kisi_organization")] -KisiOrganization = 16, - -[EnumMember(Value = "akiles_organization")] -AkilesOrganization = 17, -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsSystemWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsUnknownIssueWithAcsSystem), "unknown_issue_with_acs_system")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsSetupRequired), "setup_required")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsTimeZoneDoesNotMatchLocation), "time_zone_does_not_match_location")] -[JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached), "salto_ks_subscription_limit_almost_reached")] -public abstract class AcsSystemWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsSystemWarningsSaltoKsSubscriptionLimitAlmostReached_model")] -public class AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached : AcsSystemWarnings -{ -[JsonConstructorAttribute] -protected AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached() { } - -public AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_subscription_limit_almost_reached"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemWarningsTimeZoneDoesNotMatchLocation_model")] -public class AcsSystemWarningsTimeZoneDoesNotMatchLocation : AcsSystemWarnings -{ -[JsonConstructorAttribute] -protected AcsSystemWarningsTimeZoneDoesNotMatchLocation() { } - -public AcsSystemWarningsTimeZoneDoesNotMatchLocation(string createdAt = default, string message = default, List? misconfiguredAcsEntranceIds = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -MisconfiguredAcsEntranceIds = misconfiguredAcsEntranceIds; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[Obsolete("this field is deprecated.")] -[DataMember(Name = "misconfigured_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? MisconfiguredAcsEntranceIds { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "time_zone_does_not_match_location"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemWarningsSetupRequired_model")] -public class AcsSystemWarningsSetupRequired : AcsSystemWarnings -{ -[JsonConstructorAttribute] -protected AcsSystemWarningsSetupRequired() { } - -public AcsSystemWarningsSetupRequired(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "setup_required"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemWarningsUnknownIssueWithAcsSystem_model")] -public class AcsSystemWarningsUnknownIssueWithAcsSystem : AcsSystemWarnings -{ -[JsonConstructorAttribute] -protected AcsSystemWarningsUnknownIssueWithAcsSystem() { } - -public AcsSystemWarningsUnknownIssueWithAcsSystem(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unknown_issue_with_acs_system"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemWarningsUnrecognized_model")] -public class AcsSystemWarningsUnrecognized : AcsSystemWarnings -{ -[JsonConstructorAttribute] -protected AcsSystemWarningsUnrecognized() { } - -public AcsSystemWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Number of access groups in the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "acs_access_group_count", IsRequired = false, EmitDefaultValue = false)] -public float? AcsAccessGroupCount { get; set; } - -/// -/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// Number of users in the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "acs_user_count", IsRequired = false, EmitDefaultValue = false)] -public float? AcsUserCount { get; set; } - -/// -/// ID of the connected account associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[Obsolete("Use `connected_account_id`.")] -[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountIds { get; set; } - -/// -/// Date and time at which the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the default credential manager `acs_system` for this [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "default_credential_manager_acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCredentialManagerAcsSystemId { get; set; } - -/// -/// Errors associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. -/// -[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] -public AcsSystem.ExternalTypeEnum? ExternalType { get; set; } - -/// -/// Display name that corresponds to the brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. -/// -[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string? ExternalTypeDisplayName { get; set; } - -/// -/// Alternative text for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) image. -/// -[DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] -public string ImageAltText { get; set; } - -/// -/// URL for the image that represents the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string ImageUrl { get; set; } - -/// -/// Indicates whether the `acs_system` is a credential manager. -/// -[DataMember(Name = "is_credential_manager", IsRequired = false, EmitDefaultValue = false)] -public bool IsCredentialManager { get; set; } - -/// -/// Location information for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] -public AcsSystemLocation Location { get; set; } - -/// -/// Name of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string Name { get; set; } - -[Obsolete("Use `external_type`.")] -[DataMember(Name = "system_type", IsRequired = false, EmitDefaultValue = false)] -public AcsSystem.SystemTypeEnum? SystemType { get; set; } - -[Obsolete("Use `external_type_display_name`.")] -[DataMember(Name = "system_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string? SystemTypeDisplayName { get; set; } - -/// -/// Visionline-specific metadata for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsSystemVisionlineMetadata? VisionlineMetadata { get; set; } - -/// -/// Warnings associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemLocation_model")] -public class AcsSystemLocation -{ -[JsonConstructorAttribute] -protected AcsSystemLocation() { } - -public AcsSystemLocation(string? timeZone = default) -{ -TimeZone = timeZone; -} - -/// -/// Time zone in which the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) is located. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsSystemVisionlineMetadata_model")] -public class AcsSystemVisionlineMetadata -{ -[JsonConstructorAttribute] -protected AcsSystemVisionlineMetadata() { } - -public AcsSystemVisionlineMetadata(string? lanAddress = default, string? mobileAccessUuid = default, string? systemId = default) -{ -LanAddress = lanAddress; -MobileAccessUuid = mobileAccessUuid; -SystemId = systemId; -} - -/// -/// IP address or hostname of the main Visionline server relative to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge) on the local network. -/// -[DataMember(Name = "lan_address", IsRequired = false, EmitDefaultValue = false)] -public string? LanAddress { get; set; } - -/// -/// Keyset loaded into a reader. Mobile keys and reader administration tools securely authenticate only with readers programmed with a matching keyset. -/// -[DataMember(Name = "mobile_access_uuid", IsRequired = false, EmitDefaultValue = false)] -public string? MobileAccessUuid { get; set; } - -/// -/// Unique ID assigned by the ASSA ABLOY licensing team that identifies each hotel in your credential manager. -/// -[DataMember(Name = "system_id", IsRequired = false, EmitDefaultValue = false)] -public string? SystemId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// Within an `acs_system`, create [`acs_user`s](https://www.seam.co/docs/api/acs/users/object) and [`acs_credential`s](https://www.seam.co/docs/api/acs/credentials/object) to grant access to the `acs_user`s. + /// + /// For details about the resources associated with an access control system, see the [access control systems namespace](https://www.seam.co/docs/api/acs/object). + /// + [DataContract(Name = "seamModel_acsSystem_model")] + public class AcsSystem + { + [JsonConstructorAttribute] + protected AcsSystem() { } + + public AcsSystem( + float? acsAccessGroupCount = default, + string acsSystemId = default, + float? acsUserCount = default, + string connectedAccountId = default, + List connectedAccountIds = default, + string createdAt = default, + string? defaultCredentialManagerAcsSystemId = default, + List errors = default, + AcsSystem.ExternalTypeEnum? externalType = default, + string? externalTypeDisplayName = default, + string imageAltText = default, + string imageUrl = default, + bool isCredentialManager = default, + AcsSystemLocation location = default, + string name = default, + AcsSystem.SystemTypeEnum? systemType = default, + string? systemTypeDisplayName = default, + AcsSystemVisionlineMetadata? visionlineMetadata = default, + List warnings = default, + string workspaceId = default + ) + { + AcsAccessGroupCount = acsAccessGroupCount; + AcsSystemId = acsSystemId; + AcsUserCount = acsUserCount; + ConnectedAccountId = connectedAccountId; + ConnectedAccountIds = connectedAccountIds; + CreatedAt = createdAt; + DefaultCredentialManagerAcsSystemId = defaultCredentialManagerAcsSystemId; + Errors = errors; + ExternalType = externalType; + ExternalTypeDisplayName = externalTypeDisplayName; + ImageAltText = imageAltText; + ImageUrl = imageUrl; + IsCredentialManager = isCredentialManager; + Location = location; + Name = name; + SystemType = systemType; + SystemTypeDisplayName = systemTypeDisplayName; + VisionlineMetadata = visionlineMetadata; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsSystemErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsProviderServiceUnavailable), + "provider_service_unavailable" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsSaltoKsCertificationExpired), + "salto_ks_certification_expired" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsAccountDisconnected), + "account_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsAcsSystemDisconnected), + "acs_system_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsInsufficientPermissions), + "insufficient_permissions" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsSaltoKsSubscriptionLimitExceeded), + "salto_ks_subscription_limit_exceeded" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsVisionlineInstanceUnreachable), + "visionline_instance_unreachable" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsBridgeDisconnected), + "bridge_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemErrorsSeamBridgeDisconnected), + "seam_bridge_disconnected" + )] + public abstract class AcsSystemErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_acsSystemErrorsSeamBridgeDisconnected_model")] + public class AcsSystemErrorsSeamBridgeDisconnected : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsSeamBridgeDisconnected() { } + + public AcsSystemErrorsSeamBridgeDisconnected( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "seam_bridge_disconnected"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsBridgeDisconnected_model")] + public class AcsSystemErrorsBridgeDisconnected : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsBridgeDisconnected() { } + + public AcsSystemErrorsBridgeDisconnected( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "bridge_disconnected"; + + /// + /// Indicates whether the error is related to the [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBridgeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsVisionlineInstanceUnreachable_model")] + public class AcsSystemErrorsVisionlineInstanceUnreachable : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsVisionlineInstanceUnreachable() { } + + public AcsSystemErrorsVisionlineInstanceUnreachable( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "visionline_instance_unreachable"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsSaltoKsSubscriptionLimitExceeded_model")] + public class AcsSystemErrorsSaltoKsSubscriptionLimitExceeded : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsSaltoKsSubscriptionLimitExceeded() { } + + public AcsSystemErrorsSaltoKsSubscriptionLimitExceeded( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsInsufficientPermissions_model")] + public class AcsSystemErrorsInsufficientPermissions : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsInsufficientPermissions() { } + + public AcsSystemErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsAcsSystemDisconnected_model")] + public class AcsSystemErrorsAcsSystemDisconnected : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsAcsSystemDisconnected() { } + + public AcsSystemErrorsAcsSystemDisconnected( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "acs_system_disconnected"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsAccountDisconnected_model")] + public class AcsSystemErrorsAccountDisconnected : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsAccountDisconnected() { } + + public AcsSystemErrorsAccountDisconnected( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "account_disconnected"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsSaltoKsCertificationExpired_model")] + public class AcsSystemErrorsSaltoKsCertificationExpired : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsSaltoKsCertificationExpired() { } + + public AcsSystemErrorsSaltoKsCertificationExpired( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "salto_ks_certification_expired"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsProviderServiceUnavailable_model")] + public class AcsSystemErrorsProviderServiceUnavailable : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsProviderServiceUnavailable() { } + + public AcsSystemErrorsProviderServiceUnavailable( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "provider_service_unavailable"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemErrorsUnrecognized_model")] + public class AcsSystemErrorsUnrecognized : AcsSystemErrors + { + [JsonConstructorAttribute] + protected AcsSystemErrorsUnrecognized() { } + + public AcsSystemErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExternalTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_site")] + PtiSite = 1, + + [EnumMember(Value = "avigilon_alta_org")] + AvigilonAltaOrg = 2, + + [EnumMember(Value = "salto_ks_site")] + SaltoKsSite = 3, + + [EnumMember(Value = "salto_space_system")] + SaltoSpaceSystem = 4, + + [EnumMember(Value = "brivo_account")] + BrivoAccount = 5, + + [EnumMember(Value = "hid_credential_manager_organization")] + HidCredentialManagerOrganization = 6, + + [EnumMember(Value = "visionline_system")] + VisionlineSystem = 7, + + [EnumMember(Value = "assa_abloy_credential_service")] + AssaAbloyCredentialService = 8, + + [EnumMember(Value = "latch_building")] + LatchBuilding = 9, + + [EnumMember(Value = "dormakaba_community_site")] + DormakabaCommunitySite = 10, + + [EnumMember(Value = "dormakaba_ambiance_site")] + DormakabaAmbianceSite = 11, + + [EnumMember(Value = "legic_connect_credential_service")] + LegicConnectCredentialService = 12, + + [EnumMember(Value = "assa_abloy_vostio")] + AssaAbloyVostio = 13, + + [EnumMember(Value = "assa_abloy_vostio_credential_service")] + AssaAbloyVostioCredentialService = 14, + + [EnumMember(Value = "hotek_site")] + HotekSite = 15, + + [EnumMember(Value = "kisi_organization")] + KisiOrganization = 16, + + [EnumMember(Value = "akiles_organization")] + AkilesOrganization = 17, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum SystemTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_site")] + PtiSite = 1, + + [EnumMember(Value = "avigilon_alta_org")] + AvigilonAltaOrg = 2, + + [EnumMember(Value = "salto_ks_site")] + SaltoKsSite = 3, + + [EnumMember(Value = "salto_space_system")] + SaltoSpaceSystem = 4, + + [EnumMember(Value = "brivo_account")] + BrivoAccount = 5, + + [EnumMember(Value = "hid_credential_manager_organization")] + HidCredentialManagerOrganization = 6, + + [EnumMember(Value = "visionline_system")] + VisionlineSystem = 7, + + [EnumMember(Value = "assa_abloy_credential_service")] + AssaAbloyCredentialService = 8, + + [EnumMember(Value = "latch_building")] + LatchBuilding = 9, + + [EnumMember(Value = "dormakaba_community_site")] + DormakabaCommunitySite = 10, + + [EnumMember(Value = "dormakaba_ambiance_site")] + DormakabaAmbianceSite = 11, + + [EnumMember(Value = "legic_connect_credential_service")] + LegicConnectCredentialService = 12, + + [EnumMember(Value = "assa_abloy_vostio")] + AssaAbloyVostio = 13, + + [EnumMember(Value = "assa_abloy_vostio_credential_service")] + AssaAbloyVostioCredentialService = 14, + + [EnumMember(Value = "hotek_site")] + HotekSite = 15, + + [EnumMember(Value = "kisi_organization")] + KisiOrganization = 16, + + [EnumMember(Value = "akiles_organization")] + AkilesOrganization = 17, + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsSystemWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemWarningsUnknownIssueWithAcsSystem), + "unknown_issue_with_acs_system" + )] + [JsonSubtypes.KnownSubType(typeof(AcsSystemWarningsSetupRequired), "setup_required")] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemWarningsTimeZoneDoesNotMatchLocation), + "time_zone_does_not_match_location" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached), + "salto_ks_subscription_limit_almost_reached" + )] + public abstract class AcsSystemWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract( + Name = "seamModel_acsSystemWarningsSaltoKsSubscriptionLimitAlmostReached_model" + )] + public class AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached : AcsSystemWarnings + { + [JsonConstructorAttribute] + protected AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached() { } + + public AcsSystemWarningsSaltoKsSubscriptionLimitAlmostReached( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "salto_ks_subscription_limit_almost_reached"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemWarningsTimeZoneDoesNotMatchLocation_model")] + public class AcsSystemWarningsTimeZoneDoesNotMatchLocation : AcsSystemWarnings + { + [JsonConstructorAttribute] + protected AcsSystemWarningsTimeZoneDoesNotMatchLocation() { } + + public AcsSystemWarningsTimeZoneDoesNotMatchLocation( + string createdAt = default, + string message = default, + List? misconfiguredAcsEntranceIds = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + MisconfiguredAcsEntranceIds = misconfiguredAcsEntranceIds; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [Obsolete("this field is deprecated.")] + [DataMember( + Name = "misconfigured_acs_entrance_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? MisconfiguredAcsEntranceIds { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "time_zone_does_not_match_location"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemWarningsSetupRequired_model")] + public class AcsSystemWarningsSetupRequired : AcsSystemWarnings + { + [JsonConstructorAttribute] + protected AcsSystemWarningsSetupRequired() { } + + public AcsSystemWarningsSetupRequired( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "setup_required"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemWarningsUnknownIssueWithAcsSystem_model")] + public class AcsSystemWarningsUnknownIssueWithAcsSystem : AcsSystemWarnings + { + [JsonConstructorAttribute] + protected AcsSystemWarningsUnknownIssueWithAcsSystem() { } + + public AcsSystemWarningsUnknownIssueWithAcsSystem( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_acs_system"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemWarningsUnrecognized_model")] + public class AcsSystemWarningsUnrecognized : AcsSystemWarnings + { + [JsonConstructorAttribute] + protected AcsSystemWarningsUnrecognized() { } + + public AcsSystemWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Number of access groups in the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "acs_access_group_count", IsRequired = false, EmitDefaultValue = false)] + public float? AcsAccessGroupCount { get; set; } + + /// + /// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// Number of users in the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "acs_user_count", IsRequired = false, EmitDefaultValue = false)] + public float? AcsUserCount { get; set; } + + /// + /// ID of the connected account associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [Obsolete("Use `connected_account_id`.")] + [DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] + public List ConnectedAccountIds { get; set; } + + /// + /// Date and time at which the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the default credential manager `acs_system` for this [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember( + Name = "default_credential_manager_acs_system_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DefaultCredentialManagerAcsSystemId { get; set; } + + /// + /// Errors associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. + /// + [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] + public AcsSystem.ExternalTypeEnum? ExternalType { get; set; } + + /// + /// Display name that corresponds to the brand-specific terminology for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) type. + /// + [DataMember( + Name = "external_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ExternalTypeDisplayName { get; set; } + + /// + /// Alternative text for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) image. + /// + [DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] + public string ImageAltText { get; set; } + + /// + /// URL for the image that represents the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string ImageUrl { get; set; } + + /// + /// Indicates whether the `acs_system` is a credential manager. + /// + [DataMember(Name = "is_credential_manager", IsRequired = false, EmitDefaultValue = false)] + public bool IsCredentialManager { get; set; } + + /// + /// Location information for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] + public AcsSystemLocation Location { get; set; } + + /// + /// Name of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + [Obsolete("Use `external_type`.")] + [DataMember(Name = "system_type", IsRequired = false, EmitDefaultValue = false)] + public AcsSystem.SystemTypeEnum? SystemType { get; set; } + + [Obsolete("Use `external_type_display_name`.")] + [DataMember( + Name = "system_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? SystemTypeDisplayName { get; set; } + + /// + /// Visionline-specific metadata for the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsSystemVisionlineMetadata? VisionlineMetadata { get; set; } + + /// + /// Warnings associated with the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemLocation_model")] + public class AcsSystemLocation + { + [JsonConstructorAttribute] + protected AcsSystemLocation() { } + + public AcsSystemLocation(string? timeZone = default) + { + TimeZone = timeZone; + } + + /// + /// Time zone in which the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) is located. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsSystemVisionlineMetadata_model")] + public class AcsSystemVisionlineMetadata + { + [JsonConstructorAttribute] + protected AcsSystemVisionlineMetadata() { } + + public AcsSystemVisionlineMetadata( + string? lanAddress = default, + string? mobileAccessUuid = default, + string? systemId = default + ) + { + LanAddress = lanAddress; + MobileAccessUuid = mobileAccessUuid; + SystemId = systemId; + } + + /// + /// IP address or hostname of the main Visionline server relative to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge) on the local network. + /// + [DataMember(Name = "lan_address", IsRequired = false, EmitDefaultValue = false)] + public string? LanAddress { get; set; } + + /// + /// Keyset loaded into a reader. Mobile keys and reader administration tools securely authenticate only with readers programmed with a matching keyset. + /// + [DataMember(Name = "mobile_access_uuid", IsRequired = false, EmitDefaultValue = false)] + public string? MobileAccessUuid { get; set; } + + /// + /// Unique ID assigned by the ASSA ABLOY licensing team that identifies each hotel in your credential manager. + /// + [DataMember(Name = "system_id", IsRequired = false, EmitDefaultValue = false)] + public string? SystemId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/AcsUser.cs b/src/Seam/Model/AcsUser.cs index bf452c2a..f431ac5e 100644 --- a/src/Seam/Model/AcsUser.cs +++ b/src/Seam/Model/AcsUser.cs @@ -8,2052 +8,2264 @@ namespace Seam.Model { -/// -/// Represents a [user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. -/// -/// For details about how to configure users in your access system, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). -/// -[DataContract(Name = "seamModel_acsUser_model")] -public class AcsUser -{ -[JsonConstructorAttribute] -protected AcsUser() { } - -public AcsUser(AcsUserAccessSchedule? accessSchedule = default, string acsSystemId = default, string acsUserId = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? email = default, string? emailAddress = default, List errors = default, AcsUser.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, string? fullName = default, string? hidAcsSystemId = default, bool isManaged = default, bool? isSuspended = default, List? pendingMutations = default, string? phoneNumber = default, AcsUserSaltoKsMetadata? saltoKsMetadata = default, AcsUserSaltoSpaceMetadata? saltoSpaceMetadata = default, string? userIdentityEmailAddress = default, string? userIdentityFullName = default, string? userIdentityId = default, string? userIdentityPhoneNumber = default, List warnings = default, string workspaceId = default) -{ -AccessSchedule = accessSchedule; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DisplayName = displayName; -Email = email; -EmailAddress = emailAddress; -Errors = errors; -ExternalType = externalType; -ExternalTypeDisplayName = externalTypeDisplayName; -FullName = fullName; -HidAcsSystemId = hidAcsSystemId; -IsManaged = isManaged; -IsSuspended = isSuspended; -PendingMutations = pendingMutations; -PhoneNumber = phoneNumber; -SaltoKsMetadata = saltoKsMetadata; -SaltoSpaceMetadata = saltoSpaceMetadata; -UserIdentityEmailAddress = userIdentityEmailAddress; -UserIdentityFullName = userIdentityFullName; -UserIdentityId = userIdentityId; -UserIdentityPhoneNumber = userIdentityPhoneNumber; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsUserErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsLatchConflictWithResidentUser), "latch_conflict_with_resident_user")] -[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsFailedToDeleteOnAcsSystem), "failed_to_delete_on_acs_system")] -[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsFailedToUpdateOnAcsSystem), "failed_to_update_on_acs_system")] -[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsFailedToCreateOnAcsSystem), "failed_to_create_on_acs_system")] -[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] -[JsonSubtypes.KnownSubType(typeof(AcsUserErrorsDeletedExternally), "deleted_externally")] -public abstract class AcsUserErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsUserErrorsDeletedExternally_model")] -public class AcsUserErrorsDeletedExternally : AcsUserErrors -{ -[JsonConstructorAttribute] -protected AcsUserErrorsDeletedExternally() { } - -public AcsUserErrorsDeletedExternally(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "deleted_externally"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserErrorsSaltoKsSubscriptionLimitExceeded_model")] -public class AcsUserErrorsSaltoKsSubscriptionLimitExceeded : AcsUserErrors -{ -[JsonConstructorAttribute] -protected AcsUserErrorsSaltoKsSubscriptionLimitExceeded() { } - -public AcsUserErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserErrorsFailedToCreateOnAcsSystem_model")] -public class AcsUserErrorsFailedToCreateOnAcsSystem : AcsUserErrors -{ -[JsonConstructorAttribute] -protected AcsUserErrorsFailedToCreateOnAcsSystem() { } - -public AcsUserErrorsFailedToCreateOnAcsSystem(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_create_on_acs_system"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserErrorsFailedToUpdateOnAcsSystem_model")] -public class AcsUserErrorsFailedToUpdateOnAcsSystem : AcsUserErrors -{ -[JsonConstructorAttribute] -protected AcsUserErrorsFailedToUpdateOnAcsSystem() { } - -public AcsUserErrorsFailedToUpdateOnAcsSystem(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_update_on_acs_system"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserErrorsFailedToDeleteOnAcsSystem_model")] -public class AcsUserErrorsFailedToDeleteOnAcsSystem : AcsUserErrors -{ -[JsonConstructorAttribute] -protected AcsUserErrorsFailedToDeleteOnAcsSystem() { } - -public AcsUserErrorsFailedToDeleteOnAcsSystem(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_delete_on_acs_system"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserErrorsLatchConflictWithResidentUser_model")] -public class AcsUserErrorsLatchConflictWithResidentUser : AcsUserErrors -{ -[JsonConstructorAttribute] -protected AcsUserErrorsLatchConflictWithResidentUser() { } - -public AcsUserErrorsLatchConflictWithResidentUser(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "latch_conflict_with_resident_user"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserErrorsUnrecognized_model")] -public class AcsUserErrorsUnrecognized : AcsUserErrors -{ -[JsonConstructorAttribute] -protected AcsUserErrorsUnrecognized() { } - -public AcsUserErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExternalTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_user")] -PtiUser = 1, - -[EnumMember(Value = "brivo_user")] -BrivoUser = 2, - -[EnumMember(Value = "hid_credential_manager_user")] -HidCredentialManagerUser = 3, - -[EnumMember(Value = "salto_site_user")] -SaltoSiteUser = 4, - -[EnumMember(Value = "latch_user")] -LatchUser = 5, - -[EnumMember(Value = "dormakaba_community_user")] -DormakabaCommunityUser = 6, - -[EnumMember(Value = "salto_space_user")] -SaltoSpaceUser = 7, - -[EnumMember(Value = "avigilon_alta_user")] -AvigilonAltaUser = 8, - -[EnumMember(Value = "kisi_user")] -KisiUser = 9, -} - -[JsonConverter(typeof(JsonSubtypes), "mutation_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsUserPendingMutationsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingCredentialAssignment), "updating_credential_assignment")] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsDeferringGroupMembershipUpdate), "deferring_group_membership_update")] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingGroupMembership), "updating_group_membership")] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingSuspensionState), "updating_suspension_state")] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingAccessSchedule), "updating_access_schedule")] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsUpdatingUserInformation), "updating_user_information")] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsDeferringCreation), "deferring_creation")] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsDeleting), "deleting")] -[JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsCreating), "creating")] -public abstract class AcsUserPendingMutations -{ -public abstract string MutationCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsCreating_model")] -public class AcsUserPendingMutationsCreating : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsCreating() { } - -public AcsUserPendingMutationsCreating(string createdAt = default, string message = default, string mutationCode = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "creating"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsDeleting_model")] -public class AcsUserPendingMutationsDeleting : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsDeleting() { } - -public AcsUserPendingMutationsDeleting(string createdAt = default, string message = default, string mutationCode = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "deleting"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsDeferringCreation_model")] -public class AcsUserPendingMutationsDeferringCreation : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsDeferringCreation() { } - -public AcsUserPendingMutationsDeferringCreation(string createdAt = default, string message = default, string mutationCode = default, string? scheduledAt = default) -{ -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -ScheduledAt = scheduledAt; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "deferring_creation"; - -/// -/// Optional: When the user creation is scheduled to occur. -/// -[DataMember(Name = "scheduled_at", IsRequired = false, EmitDefaultValue = false)] -public string? ScheduledAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformation_model")] -public class AcsUserPendingMutationsUpdatingUserInformation : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingUserInformation() { } - -public AcsUserPendingMutationsUpdatingUserInformation(string createdAt = default, AcsUserPendingMutationsUpdatingUserInformationFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingUserInformationTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Old access system user information. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingUserInformationFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_user_information"; - -/// -/// New access system user information. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingUserInformationTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformationFrom_model")] -public class AcsUserPendingMutationsUpdatingUserInformationFrom -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingUserInformationFrom() { } - -public AcsUserPendingMutationsUpdatingUserInformationFrom(string? emailAddress = default, string? fullName = default, string? phoneNumber = default) -{ -EmailAddress = emailAddress; -FullName = fullName; -PhoneNumber = phoneNumber; -} - -/// -/// Email address of the access system user. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Full name of the access system user. -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// Phone number of the access system user. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformationTo_model")] -public class AcsUserPendingMutationsUpdatingUserInformationTo -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingUserInformationTo() { } - -public AcsUserPendingMutationsUpdatingUserInformationTo(string? emailAddress = default, string? fullName = default, string? phoneNumber = default) -{ -EmailAddress = emailAddress; -FullName = fullName; -PhoneNumber = phoneNumber; -} - -/// -/// Email address of the access system user. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Full name of the access system user. -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// Phone number of the access system user. -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessSchedule_model")] -public class AcsUserPendingMutationsUpdatingAccessSchedule : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingAccessSchedule() { } - -public AcsUserPendingMutationsUpdatingAccessSchedule(string createdAt = default, AcsUserPendingMutationsUpdatingAccessScheduleFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingAccessScheduleTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Old access schedule information. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingAccessScheduleFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_access_schedule"; - -/// -/// New access schedule information. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingAccessScheduleTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessScheduleFrom_model")] -public class AcsUserPendingMutationsUpdatingAccessScheduleFrom -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingAccessScheduleFrom() { } - -public AcsUserPendingMutationsUpdatingAccessScheduleFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Starting time for the access schedule. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Starting time for the access schedule. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessScheduleTo_model")] -public class AcsUserPendingMutationsUpdatingAccessScheduleTo -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingAccessScheduleTo() { } - -public AcsUserPendingMutationsUpdatingAccessScheduleTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Starting time for the access schedule. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Starting time for the access schedule. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionState_model")] -public class AcsUserPendingMutationsUpdatingSuspensionState : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingSuspensionState() { } - -public AcsUserPendingMutationsUpdatingSuspensionState(string createdAt = default, AcsUserPendingMutationsUpdatingSuspensionStateFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingSuspensionStateTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Old user suspension state information. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingSuspensionStateFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_suspension_state"; - -/// -/// New user suspension state information. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingSuspensionStateTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionStateFrom_model")] -public class AcsUserPendingMutationsUpdatingSuspensionStateFrom -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingSuspensionStateFrom() { } - -public AcsUserPendingMutationsUpdatingSuspensionStateFrom(bool isSuspended = default) -{ -IsSuspended = isSuspended; -} - -[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] -public bool IsSuspended { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionStateTo_model")] -public class AcsUserPendingMutationsUpdatingSuspensionStateTo -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingSuspensionStateTo() { } - -public AcsUserPendingMutationsUpdatingSuspensionStateTo(bool isSuspended = default) -{ -IsSuspended = isSuspended; -} - -[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] -public bool IsSuspended { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembership_model")] -public class AcsUserPendingMutationsUpdatingGroupMembership : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingGroupMembership() { } - -public AcsUserPendingMutationsUpdatingGroupMembership(string createdAt = default, AcsUserPendingMutationsUpdatingGroupMembershipFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingGroupMembershipTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Old access group membership. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingGroupMembershipFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_group_membership"; - -/// -/// New access group membership. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingGroupMembershipTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembershipFrom_model")] -public class AcsUserPendingMutationsUpdatingGroupMembershipFrom -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingGroupMembershipFrom() { } - -public AcsUserPendingMutationsUpdatingGroupMembershipFrom(string? acsAccessGroupId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -} - -/// -/// Old access group ID. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsAccessGroupId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembershipTo_model")] -public class AcsUserPendingMutationsUpdatingGroupMembershipTo -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingGroupMembershipTo() { } - -public AcsUserPendingMutationsUpdatingGroupMembershipTo(string? acsAccessGroupId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -} - -/// -/// New access group ID. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsAccessGroupId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsDeferringGroupMembershipUpdate_model")] -public class AcsUserPendingMutationsDeferringGroupMembershipUpdate : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsDeferringGroupMembershipUpdate() { } - -public AcsUserPendingMutationsDeferringGroupMembershipUpdate(string acsAccessGroupId = default, string createdAt = default, string message = default, string mutationCode = default, AcsUserPendingMutationsDeferringGroupMembershipUpdate.VariantEnum variant = default) -{ -AcsAccessGroupId = acsAccessGroupId; -CreatedAt = createdAt; -Message = message; -MutationCode = mutationCode; -Variant = variant; -} - -/// -/// Whether the user is scheduled to be added to or removed from the access group. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum VariantEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "adding")] -Adding = 1, - -[EnumMember(Value = "removing")] -Removing = 2, -} - -/// -/// ID of the access group involved in the scheduled change. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "deferring_group_membership_update"; - -/// -/// Whether the user is scheduled to be added to or removed from the access group. -/// -[DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsDeferringGroupMembershipUpdate.VariantEnum Variant { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignment_model")] -public class AcsUserPendingMutationsUpdatingCredentialAssignment : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingCredentialAssignment() { } - -public AcsUserPendingMutationsUpdatingCredentialAssignment(string createdAt = default, AcsUserPendingMutationsUpdatingCredentialAssignmentFrom from = default, string message = default, string mutationCode = default, AcsUserPendingMutationsUpdatingCredentialAssignmentTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous credential assignment. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingCredentialAssignmentFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_credential_assignment"; - -/// -/// New credential assignment. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public AcsUserPendingMutationsUpdatingCredentialAssignmentTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignmentFrom_model")] -public class AcsUserPendingMutationsUpdatingCredentialAssignmentFrom -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingCredentialAssignmentFrom() { } - -public AcsUserPendingMutationsUpdatingCredentialAssignmentFrom(string? acsCredentialId = default) -{ -AcsCredentialId = acsCredentialId; -} - -/// -/// Previous credential ID. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignmentTo_model")] -public class AcsUserPendingMutationsUpdatingCredentialAssignmentTo -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUpdatingCredentialAssignmentTo() { } - -public AcsUserPendingMutationsUpdatingCredentialAssignmentTo(string? acsCredentialId = default) -{ -AcsCredentialId = acsCredentialId; -} - -/// -/// New credential ID. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserPendingMutationsUnrecognized_model")] -public class AcsUserPendingMutationsUnrecognized : AcsUserPendingMutations -{ -[JsonConstructorAttribute] -protected AcsUserPendingMutationsUnrecognized() { } - -public AcsUserPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) -{ -MutationCode = mutationCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "unrecognized"; - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(AcsUserWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsLatchResidentUser), "latch_resident_user")] -[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsUnknownIssueWithAcsUser), "unknown_issue_with_acs_user")] -[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsAcsUserInactive), "acs_user_inactive")] -[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsSaltoKsUserNotSubscribed), "salto_ks_user_not_subscribed")] -[JsonSubtypes.KnownSubType(typeof(AcsUserWarningsBeingDeleted), "being_deleted")] -public abstract class AcsUserWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_acsUserWarningsBeingDeleted_model")] -public class AcsUserWarningsBeingDeleted : AcsUserWarnings -{ -[JsonConstructorAttribute] -protected AcsUserWarningsBeingDeleted() { } - -public AcsUserWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserWarningsSaltoKsUserNotSubscribed_model")] -public class AcsUserWarningsSaltoKsUserNotSubscribed : AcsUserWarnings -{ -[JsonConstructorAttribute] -protected AcsUserWarningsSaltoKsUserNotSubscribed() { } - -public AcsUserWarningsSaltoKsUserNotSubscribed(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_user_not_subscribed"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserWarningsAcsUserInactive_model")] -public class AcsUserWarningsAcsUserInactive : AcsUserWarnings -{ -[JsonConstructorAttribute] -protected AcsUserWarningsAcsUserInactive() { } - -public AcsUserWarningsAcsUserInactive(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "acs_user_inactive"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserWarningsUnknownIssueWithAcsUser_model")] -public class AcsUserWarningsUnknownIssueWithAcsUser : AcsUserWarnings -{ -[JsonConstructorAttribute] -protected AcsUserWarningsUnknownIssueWithAcsUser() { } - -public AcsUserWarningsUnknownIssueWithAcsUser(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unknown_issue_with_acs_user"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserWarningsLatchResidentUser_model")] -public class AcsUserWarningsLatchResidentUser : AcsUserWarnings -{ -[JsonConstructorAttribute] -protected AcsUserWarningsLatchResidentUser() { } - -public AcsUserWarningsLatchResidentUser(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "latch_resident_user"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserWarningsUnrecognized_model")] -public class AcsUserWarningsUnrecognized : AcsUserWarnings -{ -[JsonConstructorAttribute] -protected AcsUserWarningsUnrecognized() { } - -public AcsUserWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// `starts_at` and `ends_at` timestamps for the [access system user's](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access. -/// -[DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] -public AcsUserAccessSchedule? AccessSchedule { get; set; } - -/// -/// ID of the [access system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsUserId { get; set; } - -/// -/// The ID of the connected account that is associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -[Obsolete("use email_address.")] -[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] -public string? Email { get; set; } - -/// -/// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Errors associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. -/// -[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] -public AcsUser.ExternalTypeEnum? ExternalType { get; set; } - -/// -/// Display name that corresponds to the brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. -/// -[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string? ExternalTypeDisplayName { get; set; } - -/// -/// Full name of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// ID of the HID access control system associated with the user. -/// -[DataMember(Name = "hid_acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string? HidAcsSystemId { get; set; } - -/// -/// Indicates whether Seam manages the access system user. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Indicates whether the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) is currently [suspended](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users). -/// -[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] -public bool? IsSuspended { get; set; } - -/// -/// Pending mutations associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Seam is in the process of pushing these mutations to the integrated access system. -/// -[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] -public List? PendingMutations { get; set; } - -/// -/// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// Salto KS-specific metadata associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsUserSaltoKsMetadata? SaltoKsMetadata { get; set; } - -/// -/// Salto Space-specific metadata associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] -public AcsUserSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } - -/// -/// Email address of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "user_identity_email_address", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityEmailAddress { get; set; } - -/// -/// Full name of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "user_identity_full_name", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityFullName { get; set; } - -/// -/// ID of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Phone number of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). -/// -[DataMember(Name = "user_identity_phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityPhoneNumber { get; set; } - -/// -/// Warnings associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserAccessSchedule_model")] -public class AcsUserAccessSchedule -{ -[JsonConstructorAttribute] -protected AcsUserAccessSchedule() { } - -public AcsUserAccessSchedule(string? endsAt = default, string startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserSaltoKsMetadata_model")] -public class AcsUserSaltoKsMetadata -{ -[JsonConstructorAttribute] -protected AcsUserSaltoKsMetadata() { } - -public AcsUserSaltoKsMetadata(bool? isSubscribed = default) -{ -IsSubscribed = isSubscribed; -} - -/// -/// Indicates whether the user holds an active subscription slot on the Salto KS site. Only subscribed users can unlock doors and count against the site's user-subscription limit. A user may not be subscribed because their access schedule has not started or has ended, the site has reached its subscription limit, or they were manually unsubscribed. This is distinct from `is_suspended`, which reflects whether the user has been explicitly blocked. -/// -[DataMember(Name = "is_subscribed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsSubscribed { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_acsUserSaltoSpaceMetadata_model")] -public class AcsUserSaltoSpaceMetadata -{ -[JsonConstructorAttribute] -protected AcsUserSaltoSpaceMetadata() { } - -public AcsUserSaltoSpaceMetadata(bool? auditOpenings = default, string? userId = default) -{ -AuditOpenings = auditOpenings; -UserId = userId; -} - -/// -/// Indicates whether AuditOpenings is enabled for the user in the Salto Space access system. -/// -[DataMember(Name = "audit_openings", IsRequired = false, EmitDefaultValue = false)] -public bool? AuditOpenings { get; set; } - -/// -/// User ID in the Salto Space access system. -/// -[DataMember(Name = "user_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a [user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. + /// + /// For details about how to configure users in your access system, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). + /// + [DataContract(Name = "seamModel_acsUser_model")] + public class AcsUser + { + [JsonConstructorAttribute] + protected AcsUser() { } + + public AcsUser( + AcsUserAccessSchedule? accessSchedule = default, + string acsSystemId = default, + string acsUserId = default, + string connectedAccountId = default, + string createdAt = default, + string displayName = default, + string? email = default, + string? emailAddress = default, + List errors = default, + AcsUser.ExternalTypeEnum? externalType = default, + string? externalTypeDisplayName = default, + string? fullName = default, + string? hidAcsSystemId = default, + bool isManaged = default, + bool? isSuspended = default, + List? pendingMutations = default, + string? phoneNumber = default, + AcsUserSaltoKsMetadata? saltoKsMetadata = default, + AcsUserSaltoSpaceMetadata? saltoSpaceMetadata = default, + string? userIdentityEmailAddress = default, + string? userIdentityFullName = default, + string? userIdentityId = default, + string? userIdentityPhoneNumber = default, + List warnings = default, + string workspaceId = default + ) + { + AccessSchedule = accessSchedule; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DisplayName = displayName; + Email = email; + EmailAddress = emailAddress; + Errors = errors; + ExternalType = externalType; + ExternalTypeDisplayName = externalTypeDisplayName; + FullName = fullName; + HidAcsSystemId = hidAcsSystemId; + IsManaged = isManaged; + IsSuspended = isSuspended; + PendingMutations = pendingMutations; + PhoneNumber = phoneNumber; + SaltoKsMetadata = saltoKsMetadata; + SaltoSpaceMetadata = saltoSpaceMetadata; + UserIdentityEmailAddress = userIdentityEmailAddress; + UserIdentityFullName = userIdentityFullName; + UserIdentityId = userIdentityId; + UserIdentityPhoneNumber = userIdentityPhoneNumber; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsUserErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsUserErrorsLatchConflictWithResidentUser), + "latch_conflict_with_resident_user" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserErrorsFailedToDeleteOnAcsSystem), + "failed_to_delete_on_acs_system" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserErrorsFailedToUpdateOnAcsSystem), + "failed_to_update_on_acs_system" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserErrorsFailedToCreateOnAcsSystem), + "failed_to_create_on_acs_system" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserErrorsSaltoKsSubscriptionLimitExceeded), + "salto_ks_subscription_limit_exceeded" + )] + [JsonSubtypes.KnownSubType(typeof(AcsUserErrorsDeletedExternally), "deleted_externally")] + public abstract class AcsUserErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_acsUserErrorsDeletedExternally_model")] + public class AcsUserErrorsDeletedExternally : AcsUserErrors + { + [JsonConstructorAttribute] + protected AcsUserErrorsDeletedExternally() { } + + public AcsUserErrorsDeletedExternally( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "deleted_externally"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserErrorsSaltoKsSubscriptionLimitExceeded_model")] + public class AcsUserErrorsSaltoKsSubscriptionLimitExceeded : AcsUserErrors + { + [JsonConstructorAttribute] + protected AcsUserErrorsSaltoKsSubscriptionLimitExceeded() { } + + public AcsUserErrorsSaltoKsSubscriptionLimitExceeded( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserErrorsFailedToCreateOnAcsSystem_model")] + public class AcsUserErrorsFailedToCreateOnAcsSystem : AcsUserErrors + { + [JsonConstructorAttribute] + protected AcsUserErrorsFailedToCreateOnAcsSystem() { } + + public AcsUserErrorsFailedToCreateOnAcsSystem( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_create_on_acs_system"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserErrorsFailedToUpdateOnAcsSystem_model")] + public class AcsUserErrorsFailedToUpdateOnAcsSystem : AcsUserErrors + { + [JsonConstructorAttribute] + protected AcsUserErrorsFailedToUpdateOnAcsSystem() { } + + public AcsUserErrorsFailedToUpdateOnAcsSystem( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_update_on_acs_system"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserErrorsFailedToDeleteOnAcsSystem_model")] + public class AcsUserErrorsFailedToDeleteOnAcsSystem : AcsUserErrors + { + [JsonConstructorAttribute] + protected AcsUserErrorsFailedToDeleteOnAcsSystem() { } + + public AcsUserErrorsFailedToDeleteOnAcsSystem( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_delete_on_acs_system"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserErrorsLatchConflictWithResidentUser_model")] + public class AcsUserErrorsLatchConflictWithResidentUser : AcsUserErrors + { + [JsonConstructorAttribute] + protected AcsUserErrorsLatchConflictWithResidentUser() { } + + public AcsUserErrorsLatchConflictWithResidentUser( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "latch_conflict_with_resident_user"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserErrorsUnrecognized_model")] + public class AcsUserErrorsUnrecognized : AcsUserErrors + { + [JsonConstructorAttribute] + protected AcsUserErrorsUnrecognized() { } + + public AcsUserErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExternalTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_user")] + PtiUser = 1, + + [EnumMember(Value = "brivo_user")] + BrivoUser = 2, + + [EnumMember(Value = "hid_credential_manager_user")] + HidCredentialManagerUser = 3, + + [EnumMember(Value = "salto_site_user")] + SaltoSiteUser = 4, + + [EnumMember(Value = "latch_user")] + LatchUser = 5, + + [EnumMember(Value = "dormakaba_community_user")] + DormakabaCommunityUser = 6, + + [EnumMember(Value = "salto_space_user")] + SaltoSpaceUser = 7, + + [EnumMember(Value = "avigilon_alta_user")] + AvigilonAltaUser = 8, + + [EnumMember(Value = "kisi_user")] + KisiUser = 9, + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsUserPendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(AcsUserPendingMutationsUpdatingCredentialAssignment), + "updating_credential_assignment" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserPendingMutationsDeferringGroupMembershipUpdate), + "deferring_group_membership_update" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserPendingMutationsUpdatingGroupMembership), + "updating_group_membership" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserPendingMutationsUpdatingSuspensionState), + "updating_suspension_state" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserPendingMutationsUpdatingAccessSchedule), + "updating_access_schedule" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserPendingMutationsUpdatingUserInformation), + "updating_user_information" + )] + [JsonSubtypes.KnownSubType( + typeof(AcsUserPendingMutationsDeferringCreation), + "deferring_creation" + )] + [JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsDeleting), "deleting")] + [JsonSubtypes.KnownSubType(typeof(AcsUserPendingMutationsCreating), "creating")] + public abstract class AcsUserPendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsCreating_model")] + public class AcsUserPendingMutationsCreating : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsCreating() { } + + public AcsUserPendingMutationsCreating( + string createdAt = default, + string message = default, + string mutationCode = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "creating"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsDeleting_model")] + public class AcsUserPendingMutationsDeleting : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsDeleting() { } + + public AcsUserPendingMutationsDeleting( + string createdAt = default, + string message = default, + string mutationCode = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "deleting"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsDeferringCreation_model")] + public class AcsUserPendingMutationsDeferringCreation : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsDeferringCreation() { } + + public AcsUserPendingMutationsDeferringCreation( + string createdAt = default, + string message = default, + string mutationCode = default, + string? scheduledAt = default + ) + { + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + ScheduledAt = scheduledAt; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "deferring_creation"; + + /// + /// Optional: When the user creation is scheduled to occur. + /// + [DataMember(Name = "scheduled_at", IsRequired = false, EmitDefaultValue = false)] + public string? ScheduledAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformation_model")] + public class AcsUserPendingMutationsUpdatingUserInformation : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingUserInformation() { } + + public AcsUserPendingMutationsUpdatingUserInformation( + string createdAt = default, + AcsUserPendingMutationsUpdatingUserInformationFrom from = default, + string message = default, + string mutationCode = default, + AcsUserPendingMutationsUpdatingUserInformationTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Old access system user information. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingUserInformationFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_user_information"; + + /// + /// New access system user information. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingUserInformationTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformationFrom_model")] + public class AcsUserPendingMutationsUpdatingUserInformationFrom + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingUserInformationFrom() { } + + public AcsUserPendingMutationsUpdatingUserInformationFrom( + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default + ) + { + EmailAddress = emailAddress; + FullName = fullName; + PhoneNumber = phoneNumber; + } + + /// + /// Email address of the access system user. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Full name of the access system user. + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// Phone number of the access system user. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingUserInformationTo_model")] + public class AcsUserPendingMutationsUpdatingUserInformationTo + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingUserInformationTo() { } + + public AcsUserPendingMutationsUpdatingUserInformationTo( + string? emailAddress = default, + string? fullName = default, + string? phoneNumber = default + ) + { + EmailAddress = emailAddress; + FullName = fullName; + PhoneNumber = phoneNumber; + } + + /// + /// Email address of the access system user. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Full name of the access system user. + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// Phone number of the access system user. + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessSchedule_model")] + public class AcsUserPendingMutationsUpdatingAccessSchedule : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingAccessSchedule() { } + + public AcsUserPendingMutationsUpdatingAccessSchedule( + string createdAt = default, + AcsUserPendingMutationsUpdatingAccessScheduleFrom from = default, + string message = default, + string mutationCode = default, + AcsUserPendingMutationsUpdatingAccessScheduleTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Old access schedule information. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingAccessScheduleFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_access_schedule"; + + /// + /// New access schedule information. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingAccessScheduleTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessScheduleFrom_model")] + public class AcsUserPendingMutationsUpdatingAccessScheduleFrom + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingAccessScheduleFrom() { } + + public AcsUserPendingMutationsUpdatingAccessScheduleFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Starting time for the access schedule. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Starting time for the access schedule. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingAccessScheduleTo_model")] + public class AcsUserPendingMutationsUpdatingAccessScheduleTo + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingAccessScheduleTo() { } + + public AcsUserPendingMutationsUpdatingAccessScheduleTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Starting time for the access schedule. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Starting time for the access schedule. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionState_model")] + public class AcsUserPendingMutationsUpdatingSuspensionState : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingSuspensionState() { } + + public AcsUserPendingMutationsUpdatingSuspensionState( + string createdAt = default, + AcsUserPendingMutationsUpdatingSuspensionStateFrom from = default, + string message = default, + string mutationCode = default, + AcsUserPendingMutationsUpdatingSuspensionStateTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Old user suspension state information. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingSuspensionStateFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_suspension_state"; + + /// + /// New user suspension state information. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingSuspensionStateTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionStateFrom_model")] + public class AcsUserPendingMutationsUpdatingSuspensionStateFrom + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingSuspensionStateFrom() { } + + public AcsUserPendingMutationsUpdatingSuspensionStateFrom(bool isSuspended = default) + { + IsSuspended = isSuspended; + } + + [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] + public bool IsSuspended { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingSuspensionStateTo_model")] + public class AcsUserPendingMutationsUpdatingSuspensionStateTo + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingSuspensionStateTo() { } + + public AcsUserPendingMutationsUpdatingSuspensionStateTo(bool isSuspended = default) + { + IsSuspended = isSuspended; + } + + [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] + public bool IsSuspended { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembership_model")] + public class AcsUserPendingMutationsUpdatingGroupMembership : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingGroupMembership() { } + + public AcsUserPendingMutationsUpdatingGroupMembership( + string createdAt = default, + AcsUserPendingMutationsUpdatingGroupMembershipFrom from = default, + string message = default, + string mutationCode = default, + AcsUserPendingMutationsUpdatingGroupMembershipTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Old access group membership. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingGroupMembershipFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_group_membership"; + + /// + /// New access group membership. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingGroupMembershipTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembershipFrom_model")] + public class AcsUserPendingMutationsUpdatingGroupMembershipFrom + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingGroupMembershipFrom() { } + + public AcsUserPendingMutationsUpdatingGroupMembershipFrom( + string? acsAccessGroupId = default + ) + { + AcsAccessGroupId = acsAccessGroupId; + } + + /// + /// Old access group ID. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsAccessGroupId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingGroupMembershipTo_model")] + public class AcsUserPendingMutationsUpdatingGroupMembershipTo + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingGroupMembershipTo() { } + + public AcsUserPendingMutationsUpdatingGroupMembershipTo( + string? acsAccessGroupId = default + ) + { + AcsAccessGroupId = acsAccessGroupId; + } + + /// + /// New access group ID. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsAccessGroupId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsUserPendingMutationsDeferringGroupMembershipUpdate_model" + )] + public class AcsUserPendingMutationsDeferringGroupMembershipUpdate : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsDeferringGroupMembershipUpdate() { } + + public AcsUserPendingMutationsDeferringGroupMembershipUpdate( + string acsAccessGroupId = default, + string createdAt = default, + string message = default, + string mutationCode = default, + AcsUserPendingMutationsDeferringGroupMembershipUpdate.VariantEnum variant = default + ) + { + AcsAccessGroupId = acsAccessGroupId; + CreatedAt = createdAt; + Message = message; + MutationCode = mutationCode; + Variant = variant; + } + + /// + /// Whether the user is scheduled to be added to or removed from the access group. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum VariantEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "adding")] + Adding = 1, + + [EnumMember(Value = "removing")] + Removing = 2, + } + + /// + /// ID of the access group involved in the scheduled change. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "deferring_group_membership_update"; + + /// + /// Whether the user is scheduled to be added to or removed from the access group. + /// + [DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsDeferringGroupMembershipUpdate.VariantEnum Variant { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignment_model")] + public class AcsUserPendingMutationsUpdatingCredentialAssignment : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingCredentialAssignment() { } + + public AcsUserPendingMutationsUpdatingCredentialAssignment( + string createdAt = default, + AcsUserPendingMutationsUpdatingCredentialAssignmentFrom from = default, + string message = default, + string mutationCode = default, + AcsUserPendingMutationsUpdatingCredentialAssignmentTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous credential assignment. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingCredentialAssignmentFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_credential_assignment"; + + /// + /// New credential assignment. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public AcsUserPendingMutationsUpdatingCredentialAssignmentTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignmentFrom_model" + )] + public class AcsUserPendingMutationsUpdatingCredentialAssignmentFrom + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingCredentialAssignmentFrom() { } + + public AcsUserPendingMutationsUpdatingCredentialAssignmentFrom( + string? acsCredentialId = default + ) + { + AcsCredentialId = acsCredentialId; + } + + /// + /// Previous credential ID. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_acsUserPendingMutationsUpdatingCredentialAssignmentTo_model" + )] + public class AcsUserPendingMutationsUpdatingCredentialAssignmentTo + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUpdatingCredentialAssignmentTo() { } + + public AcsUserPendingMutationsUpdatingCredentialAssignmentTo( + string? acsCredentialId = default + ) + { + AcsCredentialId = acsCredentialId; + } + + /// + /// New credential ID. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserPendingMutationsUnrecognized_model")] + public class AcsUserPendingMutationsUnrecognized : AcsUserPendingMutations + { + [JsonConstructorAttribute] + protected AcsUserPendingMutationsUnrecognized() { } + + public AcsUserPendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(AcsUserWarningsUnrecognized))] + [JsonSubtypes.KnownSubType(typeof(AcsUserWarningsLatchResidentUser), "latch_resident_user")] + [JsonSubtypes.KnownSubType( + typeof(AcsUserWarningsUnknownIssueWithAcsUser), + "unknown_issue_with_acs_user" + )] + [JsonSubtypes.KnownSubType(typeof(AcsUserWarningsAcsUserInactive), "acs_user_inactive")] + [JsonSubtypes.KnownSubType( + typeof(AcsUserWarningsSaltoKsUserNotSubscribed), + "salto_ks_user_not_subscribed" + )] + [JsonSubtypes.KnownSubType(typeof(AcsUserWarningsBeingDeleted), "being_deleted")] + public abstract class AcsUserWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_acsUserWarningsBeingDeleted_model")] + public class AcsUserWarningsBeingDeleted : AcsUserWarnings + { + [JsonConstructorAttribute] + protected AcsUserWarningsBeingDeleted() { } + + public AcsUserWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserWarningsSaltoKsUserNotSubscribed_model")] + public class AcsUserWarningsSaltoKsUserNotSubscribed : AcsUserWarnings + { + [JsonConstructorAttribute] + protected AcsUserWarningsSaltoKsUserNotSubscribed() { } + + public AcsUserWarningsSaltoKsUserNotSubscribed( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "salto_ks_user_not_subscribed"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserWarningsAcsUserInactive_model")] + public class AcsUserWarningsAcsUserInactive : AcsUserWarnings + { + [JsonConstructorAttribute] + protected AcsUserWarningsAcsUserInactive() { } + + public AcsUserWarningsAcsUserInactive( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "acs_user_inactive"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserWarningsUnknownIssueWithAcsUser_model")] + public class AcsUserWarningsUnknownIssueWithAcsUser : AcsUserWarnings + { + [JsonConstructorAttribute] + protected AcsUserWarningsUnknownIssueWithAcsUser() { } + + public AcsUserWarningsUnknownIssueWithAcsUser( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_acs_user"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserWarningsLatchResidentUser_model")] + public class AcsUserWarningsLatchResidentUser : AcsUserWarnings + { + [JsonConstructorAttribute] + protected AcsUserWarningsLatchResidentUser() { } + + public AcsUserWarningsLatchResidentUser( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "latch_resident_user"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserWarningsUnrecognized_model")] + public class AcsUserWarningsUnrecognized : AcsUserWarnings + { + [JsonConstructorAttribute] + protected AcsUserWarningsUnrecognized() { } + + public AcsUserWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// `starts_at` and `ends_at` timestamps for the [access system user's](https://www.seam.co/docs/low-level-apis/access-systems/user-management) access. + /// + [DataMember(Name = "access_schedule", IsRequired = false, EmitDefaultValue = false)] + public AcsUserAccessSchedule? AccessSchedule { get; set; } + + /// + /// ID of the [access system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsUserId { get; set; } + + /// + /// The ID of the connected account that is associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + [Obsolete("use email_address.")] + [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] + public string? Email { get; set; } + + /// + /// Email address of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Errors associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. + /// + [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] + public AcsUser.ExternalTypeEnum? ExternalType { get; set; } + + /// + /// Display name that corresponds to the brand-specific terminology for the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) type. + /// + [DataMember( + Name = "external_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ExternalTypeDisplayName { get; set; } + + /// + /// Full name of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// ID of the HID access control system associated with the user. + /// + [DataMember(Name = "hid_acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string? HidAcsSystemId { get; set; } + + /// + /// Indicates whether Seam manages the access system user. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Indicates whether the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) is currently [suspended](https://www.seam.co/docs/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users). + /// + [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] + public bool? IsSuspended { get; set; } + + /// + /// Pending mutations associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). Seam is in the process of pushing these mutations to the integrated access system. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List? PendingMutations { get; set; } + + /// + /// Phone number of the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// Salto KS-specific metadata associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsUserSaltoKsMetadata? SaltoKsMetadata { get; set; } + + /// + /// Salto Space-specific metadata associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "salto_space_metadata", IsRequired = false, EmitDefaultValue = false)] + public AcsUserSaltoSpaceMetadata? SaltoSpaceMetadata { get; set; } + + /// + /// Email address of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember( + Name = "user_identity_email_address", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UserIdentityEmailAddress { get; set; } + + /// + /// Full name of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "user_identity_full_name", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityFullName { get; set; } + + /// + /// ID of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Phone number of the user identity associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). + /// + [DataMember( + Name = "user_identity_phone_number", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UserIdentityPhoneNumber { get; set; } + + /// + /// Warnings associated with the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management). + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserAccessSchedule_model")] + public class AcsUserAccessSchedule + { + [JsonConstructorAttribute] + protected AcsUserAccessSchedule() { } + + public AcsUserAccessSchedule(string? endsAt = default, string startsAt = default) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserSaltoKsMetadata_model")] + public class AcsUserSaltoKsMetadata + { + [JsonConstructorAttribute] + protected AcsUserSaltoKsMetadata() { } + + public AcsUserSaltoKsMetadata(bool? isSubscribed = default) + { + IsSubscribed = isSubscribed; + } + + /// + /// Indicates whether the user holds an active subscription slot on the Salto KS site. Only subscribed users can unlock doors and count against the site's user-subscription limit. A user may not be subscribed because their access schedule has not started or has ended, the site has reached its subscription limit, or they were manually unsubscribed. This is distinct from `is_suspended`, which reflects whether the user has been explicitly blocked. + /// + [DataMember(Name = "is_subscribed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsSubscribed { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_acsUserSaltoSpaceMetadata_model")] + public class AcsUserSaltoSpaceMetadata + { + [JsonConstructorAttribute] + protected AcsUserSaltoSpaceMetadata() { } + + public AcsUserSaltoSpaceMetadata(bool? auditOpenings = default, string? userId = default) + { + AuditOpenings = auditOpenings; + UserId = userId; + } + + /// + /// Indicates whether AuditOpenings is enabled for the user in the Salto Space access system. + /// + [DataMember(Name = "audit_openings", IsRequired = false, EmitDefaultValue = false)] + public bool? AuditOpenings { get; set; } + + /// + /// User ID in the Salto Space access system. + /// + [DataMember(Name = "user_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/ActionAttempt.cs b/src/Seam/Model/ActionAttempt.cs index 55ec0bfe..68134346 100644 --- a/src/Seam/Model/ActionAttempt.cs +++ b/src/Seam/Model/ActionAttempt.cs @@ -8,6160 +8,6736 @@ namespace Seam.Model { -[JsonConverter(typeof(JsonSubtypes), "action_type")] -[JsonSubtypes.FallBackSubType(typeof(ActionAttemptUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptUpdateNoiseThreshold), "UPDATE_NOISE_THRESHOLD")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptDeleteNoiseThreshold), "DELETE_NOISE_THRESHOLD")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptCreateNoiseThreshold), "CREATE_NOISE_THRESHOLD")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptUpdateAccessCode), "UPDATE_ACCESS_CODE")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptDeleteAccessCode), "DELETE_ACCESS_CODE")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptCreateAccessCode), "CREATE_ACCESS_CODE")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptSyncAccessCodes), "SYNC_ACCESS_CODES")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptConfigureAutoLock), "CONFIGURE_AUTO_LOCK")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptPushThermostatPrograms), "PUSH_THERMOSTAT_PROGRAMS")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptSimulateManualLockViaKeypad), "SIMULATE_MANUAL_LOCK_VIA_KEYPAD")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptSimulateKeypadCodeEntry), "SIMULATE_KEYPAD_CODE_ENTRY")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptActivateWeeklyProgram), "ACTIVATE_WEEKLY_PROGRAM")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptActivateClimatePreset), "ACTIVATE_CLIMATE_PRESET")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptSetHvacMode), "SET_HVAC_MODE")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptSetFanMode), "SET_FAN_MODE")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptResetSandboxWorkspace), "RESET_SANDBOX_WORKSPACE")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptAssignCredential), "ASSIGN_CREDENTIAL")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptScanToAssignCredential), "SCAN_TO_ASSIGN_CREDENTIAL")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptEncodeCredential), "ENCODE_CREDENTIAL")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptScanCredential), "SCAN_CREDENTIAL")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptUnlockDoor), "UNLOCK_DOOR")] -[JsonSubtypes.KnownSubType(typeof(ActionAttemptLockDoor), "LOCK_DOOR")] -public abstract class ActionAttempt -{ -public abstract string ActionType { get; } - -public abstract string ActionAttemptId { get; set; } - -public abstract override string ToString(); -} - -/// -/// Locking a door is pending. -/// -[DataContract(Name = "seamModel_actionAttemptLockDoor_model")] -public class ActionAttemptLockDoor : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptLockDoor() { } - -public ActionAttemptLockDoor(string actionAttemptId = default, string actionType = default, ActionAttemptLockDoorError error = default, ActionAttemptLockDoorResult result = default, ActionAttemptLockDoor.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "LOCK_DOOR"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptLockDoorError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptLockDoorResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptLockDoor.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptLockDoorError_model")] -public class ActionAttemptLockDoorError -{ -[JsonConstructorAttribute] -protected ActionAttemptLockDoorError() { } - -public ActionAttemptLockDoorError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptLockDoorResult_model")] -public class ActionAttemptLockDoorResult -{ -[JsonConstructorAttribute] -protected ActionAttemptLockDoorResult() { } - -public ActionAttemptLockDoorResult(bool? wasConfirmedByDevice = default) -{ -WasConfirmedByDevice = wasConfirmedByDevice; -} - -/// -/// Indicates whether the device confirmed that the lock action occurred. -/// -[DataMember(Name = "was_confirmed_by_device", IsRequired = false, EmitDefaultValue = false)] -public bool? WasConfirmedByDevice { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Unlocking a door is pending. -/// -[DataContract(Name = "seamModel_actionAttemptUnlockDoor_model")] -public class ActionAttemptUnlockDoor : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptUnlockDoor() { } - -public ActionAttemptUnlockDoor(string actionAttemptId = default, string actionType = default, ActionAttemptUnlockDoorError error = default, ActionAttemptUnlockDoorResult result = default, ActionAttemptUnlockDoor.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "UNLOCK_DOOR"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUnlockDoorError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUnlockDoorResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUnlockDoor.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUnlockDoorError_model")] -public class ActionAttemptUnlockDoorError -{ -[JsonConstructorAttribute] -protected ActionAttemptUnlockDoorError() { } - -public ActionAttemptUnlockDoorError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUnlockDoorResult_model")] -public class ActionAttemptUnlockDoorResult -{ -[JsonConstructorAttribute] -protected ActionAttemptUnlockDoorResult() { } - -public ActionAttemptUnlockDoorResult(bool? wasConfirmedByDevice = default) -{ -WasConfirmedByDevice = wasConfirmedByDevice; -} - -/// -/// Indicates whether the device confirmed that the unlock action occurred. -/// -[DataMember(Name = "was_confirmed_by_device", IsRequired = false, EmitDefaultValue = false)] -public bool? WasConfirmedByDevice { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Reading credential data from the physical encoder is pending. -/// -[DataContract(Name = "seamModel_actionAttemptScanCredential_model")] -public class ActionAttemptScanCredential : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredential() { } - -public ActionAttemptScanCredential(string actionAttemptId = default, string actionType = default, ActionAttemptScanCredentialError error = default, ActionAttemptScanCredentialResult result = default, ActionAttemptScanCredential.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "SCAN_CREDENTIAL"; - -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialError Error { get; set; } - -/// -/// Result of scanning a card. If the attempt was successful, includes a snapshot of credential data read from the physical encoder, the corresponding data stored on Seam and the access system, and any associated warnings. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredential.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialError_model")] -public class ActionAttemptScanCredentialError -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialError() { } - -public ActionAttemptScanCredentialError(string message = default, ActionAttemptScanCredentialError.TypeEnum type = default) -{ -Message = message; -Type = type; -} - -/// -/// Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "uncategorized_error")] -UncategorizedError = 1, - -[EnumMember(Value = "action_attempt_expired")] -ActionAttemptExpired = 2, - -[EnumMember(Value = "no_credential_on_encoder")] -NoCredentialOnEncoder = 3, - -[EnumMember(Value = "encoder_not_online")] -EncoderNotOnline = 4, - -[EnumMember(Value = "encoder_communication_timeout")] -EncoderCommunicationTimeout = 5, - -[EnumMember(Value = "bridge_disconnected")] -BridgeDisconnected = 6, -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialError.TypeEnum Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResult_model")] -public class ActionAttemptScanCredentialResult -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResult() { } - -public ActionAttemptScanCredentialResult(ActionAttemptScanCredentialResultAcsCredentialOnEncoder? acsCredentialOnEncoder = default, ActionAttemptScanCredentialResultAcsCredentialOnSeam? acsCredentialOnSeam = default, List warnings = default) -{ -AcsCredentialOnEncoder = acsCredentialOnEncoder; -AcsCredentialOnSeam = acsCredentialOnSeam; -Warnings = warnings; -} - -/// -/// Snapshot of credential data read from the physical encoder. -/// -[DataMember(Name = "acs_credential_on_encoder", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnEncoder? AcsCredentialOnEncoder { get; set; } - -/// -/// Corresponding credential data as stored on Seam and the access system. -/// -[DataMember(Name = "acs_credential_on_seam", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnSeam? AcsCredentialOnSeam { get; set; } - -/// -/// Warnings related to scanning the credential, such as mismatches between the credential data currently encoded on the card and the corresponding data stored on Seam and the access system. -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnEncoder_model")] -public class ActionAttemptScanCredentialResultAcsCredentialOnEncoder -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultAcsCredentialOnEncoder() { } - -public ActionAttemptScanCredentialResultAcsCredentialOnEncoder(string? cardNumber = default, string? createdAt = default, string? endsAt = default, bool? isIssued = default, string? startsAt = default, ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata? visionlineMetadata = default) -{ -CardNumber = cardNumber; -CreatedAt = createdAt; -EndsAt = endsAt; -IsIssued = isIssued; -StartsAt = startsAt; -VisionlineMetadata = visionlineMetadata; -} - -/// -/// A number or string that physically identifies the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] -public string? CardNumber { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) will stop being usable. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Indicates whether the credential has been issued (encoded onto a card). -/// -[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] -public bool? IsIssued { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) becomes usable. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata? VisionlineMetadata { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata_model")] -public class ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata() { } - -public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata(bool? cancelled = default, ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata.CardFormatEnum? cardFormat = default, string? cardHolder = default, string? cardId = default, List? commonAcsEntranceIds = default, bool? discarded = default, bool? expired = default, List? guestAcsEntranceIds = default, float? numberOfIssuedCards = default, bool? overridden = default, bool? overwritten = default, bool? pendingAutoUpdate = default) -{ -Cancelled = cancelled; -CardFormat = cardFormat; -CardHolder = cardHolder; -CardId = cardId; -CommonAcsEntranceIds = commonAcsEntranceIds; -Discarded = discarded; -Expired = expired; -GuestAcsEntranceIds = guestAcsEntranceIds; -NumberOfIssuedCards = numberOfIssuedCards; -Overridden = overridden; -Overwritten = overwritten; -PendingAutoUpdate = pendingAutoUpdate; -} - -/// -/// Format of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CardFormatEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "TLCode")] -TlCode = 1, - -[EnumMember(Value = "rfid48")] -Rfid48 = 2, -} - -/// -/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is cancelled. -/// -[DataMember(Name = "cancelled", IsRequired = false, EmitDefaultValue = false)] -public bool? Cancelled { get; set; } - -/// -/// Format of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "card_format", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata.CardFormatEnum? CardFormat { get; set; } - -/// -/// Holder of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "card_holder", IsRequired = false, EmitDefaultValue = false)] -public string? CardHolder { get; set; } - -/// -/// Card ID for the Visionline card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] -public string? CardId { get; set; } - -/// -/// IDs of the common [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAcsEntranceIds { get; set; } - -/// -/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is discarded. -/// -[DataMember(Name = "discarded", IsRequired = false, EmitDefaultValue = false)] -public bool? Discarded { get; set; } - -/// -/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is expired. -/// -[DataMember(Name = "expired", IsRequired = false, EmitDefaultValue = false)] -public bool? Expired { get; set; } - -/// -/// IDs of the guest [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? GuestAcsEntranceIds { get; set; } - -/// -/// Number of issued cards associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "number_of_issued_cards", IsRequired = false, EmitDefaultValue = false)] -public float? NumberOfIssuedCards { get; set; } - -/// -/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is overridden. -/// -[DataMember(Name = "overridden", IsRequired = false, EmitDefaultValue = false)] -public bool? Overridden { get; set; } - -/// -/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is overwritten. -/// -[DataMember(Name = "overwritten", IsRequired = false, EmitDefaultValue = false)] -public bool? Overwritten { get; set; } - -/// -/// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is pending auto-update. -/// -[DataMember(Name = "pending_auto_update", IsRequired = false, EmitDefaultValue = false)] -public bool? PendingAutoUpdate { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeam_model")] -public class ActionAttemptScanCredentialResultAcsCredentialOnSeam -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultAcsCredentialOnSeam() { } - -public ActionAttemptScanCredentialResultAcsCredentialOnSeam(ActionAttemptScanCredentialResultAcsCredentialOnSeam.AccessMethodEnum accessMethod = default, string acsCredentialId = default, string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? akilesMetadata = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, ActionAttemptScanCredentialResultAcsCredentialOnSeam.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, bool? isIssued = default, bool? isLatestDesiredStateSyncedWithProvider = default, bool isManaged = default, bool? isMultiPhoneSyncCredential = default, bool? isOneTimeUse = default, string? issuedAt = default, string? latestDesiredStateSyncedWithProviderAt = default, string? parentAcsCredentialId = default, string? startsAt = default, string? userIdentityId = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) -{ -AccessMethod = accessMethod; -AcsCredentialId = acsCredentialId; -AcsCredentialPoolId = acsCredentialPoolId; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -AkilesMetadata = akilesMetadata; -AssaAbloyVostioMetadata = assaAbloyVostioMetadata; -CardNumber = cardNumber; -Code = code; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DisplayName = displayName; -EndsAt = endsAt; -Errors = errors; -ExternalType = externalType; -ExternalTypeDisplayName = externalTypeDisplayName; -IsIssued = isIssued; -IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; -IsManaged = isManaged; -IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; -IsOneTimeUse = isOneTimeUse; -IssuedAt = issuedAt; -LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; -ParentAcsCredentialId = parentAcsCredentialId; -StartsAt = startsAt; -UserIdentityId = userIdentityId; -VisionlineMetadata = visionlineMetadata; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -/// -/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AccessMethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExternalTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_card")] -PtiCard = 1, - -[EnumMember(Value = "brivo_credential")] -BrivoCredential = 2, - -[EnumMember(Value = "hid_credential")] -HidCredential = 3, - -[EnumMember(Value = "visionline_card")] -VisionlineCard = 4, - -[EnumMember(Value = "salto_ks_credential")] -SaltoKsCredential = 5, - -[EnumMember(Value = "assa_abloy_vostio_key")] -AssaAbloyVostioKey = 6, - -[EnumMember(Value = "salto_space_key")] -SaltoSpaceKey = 7, - -[EnumMember(Value = "latch_access")] -LatchAccess = 8, - -[EnumMember(Value = "dormakaba_ambiance_credential")] -DormakabaAmbianceCredential = 9, - -[EnumMember(Value = "hotek_card")] -HotekCard = 10, - -[EnumMember(Value = "salto_ks_tag")] -SaltoKsTag = 11, - -[EnumMember(Value = "avigilon_alta_credential")] -AvigilonAltaCredential = 12, - -[EnumMember(Value = "kisi_credential")] -KisiCredential = 13, - -[EnumMember(Value = "akiles_credential")] -AkilesCredential = 14, -} - -/// -/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnSeam.AccessMethodEnum AccessMethod { get; set; } - -/// -/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the credential pool to which the credential belongs. -/// -[DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialPoolId { get; set; } - -/// -/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? AkilesMetadata { get; set; } - -/// -/// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - -/// -/// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] -public string? CardNumber { get; set; } - -/// -/// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. -/// -[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnSeam.ExternalTypeEnum? ExternalType { get; set; } - -/// -/// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. -/// -[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string? ExternalTypeDisplayName { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. -/// -[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] -public bool? IsIssued { get; set; } - -/// -/// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. -/// -[DataMember(Name = "is_latest_desired_state_synced_with_provider", IsRequired = false, EmitDefaultValue = false)] -public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } - -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). -/// -[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] -public bool? IsMultiPhoneSyncCredential { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. -/// -[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOneTimeUse { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. -/// -[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] -public string? IssuedAt { get; set; } - -/// -/// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. -/// -[DataMember(Name = "latest_desired_state_synced_with_provider_at", IsRequired = false, EmitDefaultValue = false)] -public string? LatestDesiredStateSyncedWithProviderAt { get; set; } - -/// -/// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "parent_acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? ParentAcsCredentialId { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata? VisionlineMetadata { get; set; } - -/// -/// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata_model")] -public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata() { } - -public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata(string? memberPinId = default) -{ -MemberPinId = memberPinId; -} - -/// -/// ID of the Akiles member PIN. -/// -[DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] -public string? MemberPinId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata_model")] -public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata() { } - -public ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata(bool? autoJoin = default, List? doorNames = default, string? endpointId = default, string? keyId = default, string? keyIssuingRequestId = default, List? overrideGuestAcsEntranceIds = default) -{ -AutoJoin = autoJoin; -DoorNames = doorNames; -EndpointId = endpointId; -KeyId = keyId; -KeyIssuingRequestId = keyIssuingRequestId; -OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; -} - -/// -/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. -/// -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -/// -/// Names of the doors to which to grant access in the Vostio access system. -/// -[DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] -public List? DoorNames { get; set; } - -/// -/// Endpoint ID in the Vostio access system. -/// -[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] -public string? EndpointId { get; set; } - -/// -/// Key ID in the Vostio access system. -/// -[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyId { get; set; } - -/// -/// Key issuing request ID in the Vostio access system. -/// -[DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyIssuingRequestId { get; set; } - -/// -/// IDs of the guest entrances to override in the Vostio access system. -/// -[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? OverrideGuestAcsEntranceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamErrors_model")] -public class ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors() { } - -public ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata_model")] -public class ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata() { } - -public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata(bool? autoJoin = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, string? cardId = default, List? commonAcsEntranceIds = default, string? credentialId = default, List? guestAcsEntranceIds = default, bool? isValid = default, List? joinerAcsCredentialIds = default) -{ -AutoJoin = autoJoin; -CardFunctionType = cardFunctionType; -CardId = cardId; -CommonAcsEntranceIds = commonAcsEntranceIds; -CredentialId = credentialId; -GuestAcsEntranceIds = guestAcsEntranceIds; -IsValid = isValid; -JoinerAcsCredentialIds = joinerAcsCredentialIds; -} - -/// -/// Card function type in the Visionline access system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CardFunctionTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "guest")] -Guest = 1, - -[EnumMember(Value = "staff")] -Staff = 2, -} - -/// -/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. -/// -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -/// -/// Card function type in the Visionline access system. -/// -[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - -/// -/// ID of the card in the Visionline access system. -/// -[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] -public string? CardId { get; set; } - -/// -/// Common entrance IDs in the Visionline access system. -/// -[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAcsEntranceIds { get; set; } - -/// -/// ID of the credential in the Visionline access system. -/// -[DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? CredentialId { get; set; } - -/// -/// Guest entrance IDs in the Visionline access system. -/// -[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? GuestAcsEntranceIds { get; set; } - -/// -/// Indicates whether the credential is valid. -/// -[DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] -public bool? IsValid { get; set; } - -/// -/// IDs of the credentials to which you want to join. -/// -[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] -public List? JoinerAcsCredentialIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamWarnings_model")] -public class ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings() { } - -public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings(string createdAt = default, string message = default, ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum warningCode = default, string? newCode = default, string? originalCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -NewCode = newCode; -OriginalCode = originalCode; -} - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum WarningCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "waiting_to_be_issued")] -WaitingToBeIssued = 1, - -[EnumMember(Value = "schedule_externally_modified")] -ScheduleExternallyModified = 2, - -[EnumMember(Value = "schedule_modified")] -ScheduleModified = 3, - -[EnumMember(Value = "being_deleted")] -BeingDeleted = 4, - -[EnumMember(Value = "unknown_issue_with_acs_credential")] -UnknownIssueWithAcsCredential = 5, - -[EnumMember(Value = "needs_to_be_reissued")] -NeedsToBeReissued = 6, - -[EnumMember(Value = "requested_code_unavailable")] -RequestedCodeUnavailable = 7, -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum WarningCode { get; set; } - -/// -/// The PIN code that was assigned instead. -/// -[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] -public string? NewCode { get; set; } - -/// -/// The originally requested PIN code that could not be used. -/// -[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] -public string? OriginalCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanCredentialResultWarnings_model")] -public class ActionAttemptScanCredentialResultWarnings -{ -[JsonConstructorAttribute] -protected ActionAttemptScanCredentialResultWarnings() { } - -public ActionAttemptScanCredentialResultWarnings(ActionAttemptScanCredentialResultWarnings.WarningCodeEnum warningCode = default, string warningMessage = default) -{ -WarningCode = warningCode; -WarningMessage = warningMessage; -} - -/// -/// Indicates a warning related to scanning a credential. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum WarningCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "acs_credential_on_encoder_out_of_sync")] -AcsCredentialOnEncoderOutOfSync = 1, - -[EnumMember(Value = "acs_credential_on_seam_not_found")] -AcsCredentialOnSeamNotFound = 2, -} - -/// -/// Indicates a warning related to scanning a credential. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "warning_message", IsRequired = false, EmitDefaultValue = false)] -public string WarningMessage { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Encoding credential data from the physical encoder onto a card is pending. -/// -[DataContract(Name = "seamModel_actionAttemptEncodeCredential_model")] -public class ActionAttemptEncodeCredential : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptEncodeCredential() { } - -public ActionAttemptEncodeCredential(string actionAttemptId = default, string actionType = default, ActionAttemptEncodeCredentialError error = default, ActionAttemptEncodeCredentialResult result = default, ActionAttemptEncodeCredential.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "ENCODE_CREDENTIAL"; - -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialError Error { get; set; } - -/// -/// Result of an encoding attempt. If the attempt was successful, includes the credential data that was encoded onto the card. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredential.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptEncodeCredentialError_model")] -public class ActionAttemptEncodeCredentialError -{ -[JsonConstructorAttribute] -protected ActionAttemptEncodeCredentialError() { } - -public ActionAttemptEncodeCredentialError(string message = default, ActionAttemptEncodeCredentialError.TypeEnum type = default) -{ -Message = message; -Type = type; -} - -/// -/// Error type to indicate that the credential was deleted and can no longer be encoded. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "uncategorized_error")] -UncategorizedError = 1, - -[EnumMember(Value = "action_attempt_expired")] -ActionAttemptExpired = 2, - -[EnumMember(Value = "no_credential_on_encoder")] -NoCredentialOnEncoder = 3, - -[EnumMember(Value = "incompatible_card_format")] -IncompatibleCardFormat = 4, - -[EnumMember(Value = "credential_cannot_be_reissued")] -CredentialCannotBeReissued = 5, - -[EnumMember(Value = "encoder_not_online")] -EncoderNotOnline = 6, - -[EnumMember(Value = "encoder_communication_timeout")] -EncoderCommunicationTimeout = 7, - -[EnumMember(Value = "bridge_disconnected")] -BridgeDisconnected = 8, - -[EnumMember(Value = "encoding_interrupted")] -EncodingInterrupted = 9, - -[EnumMember(Value = "credential_deleted")] -CredentialDeleted = 10, -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Error type to indicate that the credential was deleted and can no longer be encoded. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialError.TypeEnum Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResult_model")] -public class ActionAttemptEncodeCredentialResult -{ -[JsonConstructorAttribute] -protected ActionAttemptEncodeCredentialResult() { } - -public ActionAttemptEncodeCredentialResult(ActionAttemptEncodeCredentialResult.AccessMethodEnum accessMethod = default, string acsCredentialId = default, string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, ActionAttemptEncodeCredentialResultAkilesMetadata? akilesMetadata = default, ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, ActionAttemptEncodeCredentialResult.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, bool? isIssued = default, bool? isLatestDesiredStateSyncedWithProvider = default, bool isManaged = default, bool? isMultiPhoneSyncCredential = default, bool? isOneTimeUse = default, string? issuedAt = default, string? latestDesiredStateSyncedWithProviderAt = default, string? parentAcsCredentialId = default, string? startsAt = default, string? userIdentityId = default, ActionAttemptEncodeCredentialResultVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) -{ -AccessMethod = accessMethod; -AcsCredentialId = acsCredentialId; -AcsCredentialPoolId = acsCredentialPoolId; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -AkilesMetadata = akilesMetadata; -AssaAbloyVostioMetadata = assaAbloyVostioMetadata; -CardNumber = cardNumber; -Code = code; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DisplayName = displayName; -EndsAt = endsAt; -Errors = errors; -ExternalType = externalType; -ExternalTypeDisplayName = externalTypeDisplayName; -IsIssued = isIssued; -IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; -IsManaged = isManaged; -IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; -IsOneTimeUse = isOneTimeUse; -IssuedAt = issuedAt; -LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; -ParentAcsCredentialId = parentAcsCredentialId; -StartsAt = startsAt; -UserIdentityId = userIdentityId; -VisionlineMetadata = visionlineMetadata; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -/// -/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AccessMethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExternalTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_card")] -PtiCard = 1, - -[EnumMember(Value = "brivo_credential")] -BrivoCredential = 2, - -[EnumMember(Value = "hid_credential")] -HidCredential = 3, - -[EnumMember(Value = "visionline_card")] -VisionlineCard = 4, - -[EnumMember(Value = "salto_ks_credential")] -SaltoKsCredential = 5, - -[EnumMember(Value = "assa_abloy_vostio_key")] -AssaAbloyVostioKey = 6, - -[EnumMember(Value = "salto_space_key")] -SaltoSpaceKey = 7, - -[EnumMember(Value = "latch_access")] -LatchAccess = 8, - -[EnumMember(Value = "dormakaba_ambiance_credential")] -DormakabaAmbianceCredential = 9, - -[EnumMember(Value = "hotek_card")] -HotekCard = 10, - -[EnumMember(Value = "salto_ks_tag")] -SaltoKsTag = 11, - -[EnumMember(Value = "avigilon_alta_credential")] -AvigilonAltaCredential = 12, - -[EnumMember(Value = "kisi_credential")] -KisiCredential = 13, - -[EnumMember(Value = "akiles_credential")] -AkilesCredential = 14, -} - -/// -/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialResult.AccessMethodEnum AccessMethod { get; set; } - -/// -/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the credential pool to which the credential belongs. -/// -[DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialPoolId { get; set; } - -/// -/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialResultAkilesMetadata? AkilesMetadata { get; set; } - -/// -/// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - -/// -/// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] -public string? CardNumber { get; set; } - -/// -/// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. -/// -[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialResult.ExternalTypeEnum? ExternalType { get; set; } - -/// -/// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. -/// -[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string? ExternalTypeDisplayName { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. -/// -[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] -public bool? IsIssued { get; set; } - -/// -/// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. -/// -[DataMember(Name = "is_latest_desired_state_synced_with_provider", IsRequired = false, EmitDefaultValue = false)] -public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } - -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). -/// -[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] -public bool? IsMultiPhoneSyncCredential { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. -/// -[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOneTimeUse { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. -/// -[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] -public string? IssuedAt { get; set; } - -/// -/// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. -/// -[DataMember(Name = "latest_desired_state_synced_with_provider_at", IsRequired = false, EmitDefaultValue = false)] -public string? LatestDesiredStateSyncedWithProviderAt { get; set; } - -/// -/// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "parent_acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? ParentAcsCredentialId { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialResultVisionlineMetadata? VisionlineMetadata { get; set; } - -/// -/// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultAkilesMetadata_model")] -public class ActionAttemptEncodeCredentialResultAkilesMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptEncodeCredentialResultAkilesMetadata() { } - -public ActionAttemptEncodeCredentialResultAkilesMetadata(string? memberPinId = default) -{ -MemberPinId = memberPinId; -} - -/// -/// ID of the Akiles member PIN. -/// -[DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] -public string? MemberPinId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultAssaAbloyVostioMetadata_model")] -public class ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata() { } - -public ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata(bool? autoJoin = default, List? doorNames = default, string? endpointId = default, string? keyId = default, string? keyIssuingRequestId = default, List? overrideGuestAcsEntranceIds = default) -{ -AutoJoin = autoJoin; -DoorNames = doorNames; -EndpointId = endpointId; -KeyId = keyId; -KeyIssuingRequestId = keyIssuingRequestId; -OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; -} - -/// -/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. -/// -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -/// -/// Names of the doors to which to grant access in the Vostio access system. -/// -[DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] -public List? DoorNames { get; set; } - -/// -/// Endpoint ID in the Vostio access system. -/// -[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] -public string? EndpointId { get; set; } - -/// -/// Key ID in the Vostio access system. -/// -[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyId { get; set; } - -/// -/// Key issuing request ID in the Vostio access system. -/// -[DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyIssuingRequestId { get; set; } - -/// -/// IDs of the guest entrances to override in the Vostio access system. -/// -[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? OverrideGuestAcsEntranceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultErrors_model")] -public class ActionAttemptEncodeCredentialResultErrors -{ -[JsonConstructorAttribute] -protected ActionAttemptEncodeCredentialResultErrors() { } - -public ActionAttemptEncodeCredentialResultErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultVisionlineMetadata_model")] -public class ActionAttemptEncodeCredentialResultVisionlineMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptEncodeCredentialResultVisionlineMetadata() { } - -public ActionAttemptEncodeCredentialResultVisionlineMetadata(bool? autoJoin = default, ActionAttemptEncodeCredentialResultVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, string? cardId = default, List? commonAcsEntranceIds = default, string? credentialId = default, List? guestAcsEntranceIds = default, bool? isValid = default, List? joinerAcsCredentialIds = default) -{ -AutoJoin = autoJoin; -CardFunctionType = cardFunctionType; -CardId = cardId; -CommonAcsEntranceIds = commonAcsEntranceIds; -CredentialId = credentialId; -GuestAcsEntranceIds = guestAcsEntranceIds; -IsValid = isValid; -JoinerAcsCredentialIds = joinerAcsCredentialIds; -} - -/// -/// Card function type in the Visionline access system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CardFunctionTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "guest")] -Guest = 1, - -[EnumMember(Value = "staff")] -Staff = 2, -} - -/// -/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. -/// -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -/// -/// Card function type in the Visionline access system. -/// -[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialResultVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - -/// -/// ID of the card in the Visionline access system. -/// -[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] -public string? CardId { get; set; } - -/// -/// Common entrance IDs in the Visionline access system. -/// -[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAcsEntranceIds { get; set; } - -/// -/// ID of the credential in the Visionline access system. -/// -[DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? CredentialId { get; set; } - -/// -/// Guest entrance IDs in the Visionline access system. -/// -[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? GuestAcsEntranceIds { get; set; } - -/// -/// Indicates whether the credential is valid. -/// -[DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] -public bool? IsValid { get; set; } - -/// -/// IDs of the credentials to which you want to join. -/// -[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] -public List? JoinerAcsCredentialIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultWarnings_model")] -public class ActionAttemptEncodeCredentialResultWarnings -{ -[JsonConstructorAttribute] -protected ActionAttemptEncodeCredentialResultWarnings() { } - -public ActionAttemptEncodeCredentialResultWarnings(string createdAt = default, string message = default, ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum warningCode = default, string? newCode = default, string? originalCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -NewCode = newCode; -OriginalCode = originalCode; -} - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum WarningCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "waiting_to_be_issued")] -WaitingToBeIssued = 1, - -[EnumMember(Value = "schedule_externally_modified")] -ScheduleExternallyModified = 2, - -[EnumMember(Value = "schedule_modified")] -ScheduleModified = 3, - -[EnumMember(Value = "being_deleted")] -BeingDeleted = 4, - -[EnumMember(Value = "unknown_issue_with_acs_credential")] -UnknownIssueWithAcsCredential = 5, - -[EnumMember(Value = "needs_to_be_reissued")] -NeedsToBeReissued = 6, - -[EnumMember(Value = "requested_code_unavailable")] -RequestedCodeUnavailable = 7, -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } - -/// -/// The PIN code that was assigned instead. -/// -[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] -public string? NewCode { get; set; } - -/// -/// The originally requested PIN code that could not be used. -/// -[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] -public string? OriginalCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Scanning a physical card and assigning the credential is pending. -/// -[DataContract(Name = "seamModel_actionAttemptScanToAssignCredential_model")] -public class ActionAttemptScanToAssignCredential : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptScanToAssignCredential() { } - -public ActionAttemptScanToAssignCredential(string actionAttemptId = default, string actionType = default, ActionAttemptScanToAssignCredentialError error = default, ActionAttemptScanToAssignCredentialResult result = default, ActionAttemptScanToAssignCredential.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "SCAN_TO_ASSIGN_CREDENTIAL"; - -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialError Error { get; set; } - -/// -/// Result of a scan to assign attempt. If the attempt was successful, includes the credential data that was scanned and assigned. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredential.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialError_model")] -public class ActionAttemptScanToAssignCredentialError -{ -[JsonConstructorAttribute] -protected ActionAttemptScanToAssignCredentialError() { } - -public ActionAttemptScanToAssignCredentialError(string message = default, ActionAttemptScanToAssignCredentialError.TypeEnum type = default) -{ -Message = message; -Type = type; -} - -/// -/// Error type to indicate that there is no credential on the encoder. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "uncategorized_error")] -UncategorizedError = 1, - -[EnumMember(Value = "action_attempt_expired")] -ActionAttemptExpired = 2, - -[EnumMember(Value = "no_credential_on_encoder")] -NoCredentialOnEncoder = 3, -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Error type to indicate that there is no credential on the encoder. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialError.TypeEnum Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResult_model")] -public class ActionAttemptScanToAssignCredentialResult -{ -[JsonConstructorAttribute] -protected ActionAttemptScanToAssignCredentialResult() { } - -public ActionAttemptScanToAssignCredentialResult(ActionAttemptScanToAssignCredentialResult.AccessMethodEnum accessMethod = default, string acsCredentialId = default, string? acsCredentialPoolId = default, string acsSystemId = default, string? acsUserId = default, ActionAttemptScanToAssignCredentialResultAkilesMetadata? akilesMetadata = default, ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, string? cardNumber = default, string? code = default, string connectedAccountId = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, ActionAttemptScanToAssignCredentialResult.ExternalTypeEnum? externalType = default, string? externalTypeDisplayName = default, bool? isIssued = default, bool? isLatestDesiredStateSyncedWithProvider = default, bool isManaged = default, bool? isMultiPhoneSyncCredential = default, bool? isOneTimeUse = default, string? issuedAt = default, string? latestDesiredStateSyncedWithProviderAt = default, string? parentAcsCredentialId = default, string? startsAt = default, string? userIdentityId = default, ActionAttemptScanToAssignCredentialResultVisionlineMetadata? visionlineMetadata = default, List warnings = default, string workspaceId = default) -{ -AccessMethod = accessMethod; -AcsCredentialId = acsCredentialId; -AcsCredentialPoolId = acsCredentialPoolId; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -AkilesMetadata = akilesMetadata; -AssaAbloyVostioMetadata = assaAbloyVostioMetadata; -CardNumber = cardNumber; -Code = code; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DisplayName = displayName; -EndsAt = endsAt; -Errors = errors; -ExternalType = externalType; -ExternalTypeDisplayName = externalTypeDisplayName; -IsIssued = isIssued; -IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; -IsManaged = isManaged; -IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; -IsOneTimeUse = isOneTimeUse; -IssuedAt = issuedAt; -LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; -ParentAcsCredentialId = parentAcsCredentialId; -StartsAt = startsAt; -UserIdentityId = userIdentityId; -VisionlineMetadata = visionlineMetadata; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -/// -/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AccessMethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ExternalTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pti_card")] -PtiCard = 1, - -[EnumMember(Value = "brivo_credential")] -BrivoCredential = 2, - -[EnumMember(Value = "hid_credential")] -HidCredential = 3, - -[EnumMember(Value = "visionline_card")] -VisionlineCard = 4, - -[EnumMember(Value = "salto_ks_credential")] -SaltoKsCredential = 5, - -[EnumMember(Value = "assa_abloy_vostio_key")] -AssaAbloyVostioKey = 6, - -[EnumMember(Value = "salto_space_key")] -SaltoSpaceKey = 7, - -[EnumMember(Value = "latch_access")] -LatchAccess = 8, - -[EnumMember(Value = "dormakaba_ambiance_credential")] -DormakabaAmbianceCredential = 9, - -[EnumMember(Value = "hotek_card")] -HotekCard = 10, - -[EnumMember(Value = "salto_ks_tag")] -SaltoKsTag = 11, - -[EnumMember(Value = "avigilon_alta_credential")] -AvigilonAltaCredential = 12, - -[EnumMember(Value = "kisi_credential")] -KisiCredential = 13, - -[EnumMember(Value = "akiles_credential")] -AkilesCredential = 14, -} - -/// -/// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialResult.AccessMethodEnum AccessMethod { get; set; } - -/// -/// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the credential pool to which the credential belongs. -/// -[DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsCredentialPoolId { get; set; } - -/// -/// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string? AcsUserId { get; set; } - -/// -/// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialResultAkilesMetadata? AkilesMetadata { get; set; } - -/// -/// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - -/// -/// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] -public string? CardNumber { get; set; } - -/// -/// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. -/// -[DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialResult.ExternalTypeEnum? ExternalType { get; set; } - -/// -/// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. -/// -[DataMember(Name = "external_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string? ExternalTypeDisplayName { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. -/// -[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] -public bool? IsIssued { get; set; } - -/// -/// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. -/// -[DataMember(Name = "is_latest_desired_state_synced_with_provider", IsRequired = false, EmitDefaultValue = false)] -public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } - -/// -/// Indicates whether Seam manages the credential. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). -/// -[DataMember(Name = "is_multi_phone_sync_credential", IsRequired = false, EmitDefaultValue = false)] -public bool? IsMultiPhoneSyncCredential { get; set; } - -/// -/// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. -/// -[DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOneTimeUse { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. -/// -[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] -public string? IssuedAt { get; set; } - -/// -/// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. -/// -[DataMember(Name = "latest_desired_state_synced_with_provider_at", IsRequired = false, EmitDefaultValue = false)] -public string? LatestDesiredStateSyncedWithProviderAt { get; set; } - -/// -/// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "parent_acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? ParentAcsCredentialId { get; set; } - -/// -/// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialResultVisionlineMetadata? VisionlineMetadata { get; set; } - -/// -/// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultAkilesMetadata_model")] -public class ActionAttemptScanToAssignCredentialResultAkilesMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptScanToAssignCredentialResultAkilesMetadata() { } - -public ActionAttemptScanToAssignCredentialResultAkilesMetadata(string? memberPinId = default) -{ -MemberPinId = memberPinId; -} - -/// -/// ID of the Akiles member PIN. -/// -[DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] -public string? MemberPinId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata_model")] -public class ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata() { } - -public ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata(bool? autoJoin = default, List? doorNames = default, string? endpointId = default, string? keyId = default, string? keyIssuingRequestId = default, List? overrideGuestAcsEntranceIds = default) -{ -AutoJoin = autoJoin; -DoorNames = doorNames; -EndpointId = endpointId; -KeyId = keyId; -KeyIssuingRequestId = keyIssuingRequestId; -OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; -} - -/// -/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. -/// -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -/// -/// Names of the doors to which to grant access in the Vostio access system. -/// -[DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] -public List? DoorNames { get; set; } - -/// -/// Endpoint ID in the Vostio access system. -/// -[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] -public string? EndpointId { get; set; } - -/// -/// Key ID in the Vostio access system. -/// -[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyId { get; set; } - -/// -/// Key issuing request ID in the Vostio access system. -/// -[DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyIssuingRequestId { get; set; } - -/// -/// IDs of the guest entrances to override in the Vostio access system. -/// -[DataMember(Name = "override_guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? OverrideGuestAcsEntranceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultErrors_model")] -public class ActionAttemptScanToAssignCredentialResultErrors -{ -[JsonConstructorAttribute] -protected ActionAttemptScanToAssignCredentialResultErrors() { } - -public ActionAttemptScanToAssignCredentialResultErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultVisionlineMetadata_model")] -public class ActionAttemptScanToAssignCredentialResultVisionlineMetadata -{ -[JsonConstructorAttribute] -protected ActionAttemptScanToAssignCredentialResultVisionlineMetadata() { } - -public ActionAttemptScanToAssignCredentialResultVisionlineMetadata(bool? autoJoin = default, ActionAttemptScanToAssignCredentialResultVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = default, string? cardId = default, List? commonAcsEntranceIds = default, string? credentialId = default, List? guestAcsEntranceIds = default, bool? isValid = default, List? joinerAcsCredentialIds = default) -{ -AutoJoin = autoJoin; -CardFunctionType = cardFunctionType; -CardId = cardId; -CommonAcsEntranceIds = commonAcsEntranceIds; -CredentialId = credentialId; -GuestAcsEntranceIds = guestAcsEntranceIds; -IsValid = isValid; -JoinerAcsCredentialIds = joinerAcsCredentialIds; -} - -/// -/// Card function type in the Visionline access system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CardFunctionTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "guest")] -Guest = 1, - -[EnumMember(Value = "staff")] -Staff = 2, -} - -/// -/// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. -/// -[DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoJoin { get; set; } - -/// -/// Card function type in the Visionline access system. -/// -[DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialResultVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } - -/// -/// ID of the card in the Visionline access system. -/// -[DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] -public string? CardId { get; set; } - -/// -/// Common entrance IDs in the Visionline access system. -/// -[DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? CommonAcsEntranceIds { get; set; } - -/// -/// ID of the credential in the Visionline access system. -/// -[DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] -public string? CredentialId { get; set; } - -/// -/// Guest entrance IDs in the Visionline access system. -/// -[DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List? GuestAcsEntranceIds { get; set; } - -/// -/// Indicates whether the credential is valid. -/// -[DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] -public bool? IsValid { get; set; } - -/// -/// IDs of the credentials to which you want to join. -/// -[DataMember(Name = "joiner_acs_credential_ids", IsRequired = false, EmitDefaultValue = false)] -public List? JoinerAcsCredentialIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultWarnings_model")] -public class ActionAttemptScanToAssignCredentialResultWarnings -{ -[JsonConstructorAttribute] -protected ActionAttemptScanToAssignCredentialResultWarnings() { } - -public ActionAttemptScanToAssignCredentialResultWarnings(string createdAt = default, string message = default, ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, string? newCode = default, string? originalCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -NewCode = newCode; -OriginalCode = originalCode; -} - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum WarningCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "waiting_to_be_issued")] -WaitingToBeIssued = 1, - -[EnumMember(Value = "schedule_externally_modified")] -ScheduleExternallyModified = 2, - -[EnumMember(Value = "schedule_modified")] -ScheduleModified = 3, - -[EnumMember(Value = "being_deleted")] -BeingDeleted = 4, - -[EnumMember(Value = "unknown_issue_with_acs_credential")] -UnknownIssueWithAcsCredential = 5, - -[EnumMember(Value = "needs_to_be_reissued")] -NeedsToBeReissued = 6, - -[EnumMember(Value = "requested_code_unavailable")] -RequestedCodeUnavailable = 7, -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } - -/// -/// The PIN code that was assigned instead. -/// -[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] -public string? NewCode { get; set; } - -/// -/// The originally requested PIN code that could not be used. -/// -[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] -public string? OriginalCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Assigning a credential to an access method is pending. -/// -[DataContract(Name = "seamModel_actionAttemptAssignCredential_model")] -public class ActionAttemptAssignCredential : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptAssignCredential() { } - -public ActionAttemptAssignCredential(string actionAttemptId = default, string actionType = default, ActionAttemptAssignCredentialError error = default, ActionAttemptAssignCredentialResult result = default, ActionAttemptAssignCredential.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "ASSIGN_CREDENTIAL"; - -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialError Error { get; set; } - -/// -/// Result of assigning a credential. If successful, includes the updated access method with the assigned credential. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredential.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptAssignCredentialError_model")] -public class ActionAttemptAssignCredentialError -{ -[JsonConstructorAttribute] -protected ActionAttemptAssignCredentialError() { } - -public ActionAttemptAssignCredentialError(string message = default, ActionAttemptAssignCredentialError.TypeEnum type = default) -{ -Message = message; -Type = type; -} - -/// -/// Error type to indicate that no matching credential was found. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "uncategorized_error")] -UncategorizedError = 1, - -[EnumMember(Value = "action_attempt_expired")] -ActionAttemptExpired = 2, - -[EnumMember(Value = "credential_not_found")] -CredentialNotFound = 3, -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Error type to indicate that no matching credential was found. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialError.TypeEnum Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptAssignCredentialResult_model")] -public class ActionAttemptAssignCredentialResult -{ -[JsonConstructorAttribute] -protected ActionAttemptAssignCredentialResult() { } - -public ActionAttemptAssignCredentialResult(string accessMethodId = default, string? clientSessionToken = default, string? code = default, string createdAt = default, string? customizationProfileId = default, string displayName = default, string displayStatus = default, List errors = default, string? instantKeyUrl = default, bool? isAssignmentRequired = default, bool? isEncodingRequired = default, bool isIssued = default, bool? isReadyForAssignment = default, bool? isReadyForEncoding = default, string? issuedAt = default, ActionAttemptAssignCredentialResult.ModeEnum mode = default, List pendingMutations = default, List warnings = default, string workspaceId = default) -{ -AccessMethodId = accessMethodId; -ClientSessionToken = clientSessionToken; -Code = code; -CreatedAt = createdAt; -CustomizationProfileId = customizationProfileId; -DisplayName = displayName; -DisplayStatus = displayStatus; -Errors = errors; -InstantKeyUrl = instantKeyUrl; -IsAssignmentRequired = isAssignmentRequired; -IsEncodingRequired = isEncodingRequired; -IsIssued = isIssued; -IsReadyForAssignment = isReadyForAssignment; -IsReadyForEncoding = isReadyForEncoding; -IssuedAt = issuedAt; -Mode = mode; -PendingMutations = pendingMutations; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// ID of the access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Token of the client session associated with the access method. -/// -[DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] -public string? ClientSessionToken { get; set; } - -/// -/// The actual PIN code for code access methods. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Date and time at which the access method was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the customization profile associated with the access method. -/// -[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomizationProfileId { get; set; } - -/// -/// Display name of the access method. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. -/// -[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] -public string DisplayStatus { get; set; } - -/// -/// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// URL of the Instant Key for mobile key access methods. -/// -[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] -public string? InstantKeyUrl { get; set; } - -/// -/// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. -/// -[DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] -public bool? IsAssignmentRequired { get; set; } - -/// -/// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. -/// -[DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] -public bool? IsEncodingRequired { get; set; } - -/// -/// Indicates whether the access method has been issued. -/// -[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] -public bool IsIssued { get; set; } - -/// -/// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. -/// -[DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] -public bool? IsReadyForAssignment { get; set; } - -/// -/// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. -/// -[DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] -public bool? IsReadyForEncoding { get; set; } - -/// -/// Date and time at which the access method was issued. -/// -[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] -public string? IssuedAt { get; set; } - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialResult.ModeEnum Mode { get; set; } - -/// -/// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. -/// -[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] -public List PendingMutations { get; set; } - -/// -/// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the Seam workspace associated with the access method. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultErrors_model")] -public class ActionAttemptAssignCredentialResultErrors -{ -[JsonConstructorAttribute] -protected ActionAttemptAssignCredentialResultErrors() { } - -public ActionAttemptAssignCredentialResultErrors(string createdAt = default, ActionAttemptAssignCredentialResultErrors.ErrorCodeEnum errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ErrorCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "failed_to_issue")] -FailedToIssue = 1, -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialResultErrors.ErrorCodeEnum ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutations_model")] -public class ActionAttemptAssignCredentialResultPendingMutations -{ -[JsonConstructorAttribute] -protected ActionAttemptAssignCredentialResultPendingMutations() { } - -public ActionAttemptAssignCredentialResultPendingMutations(string createdAt = default, ActionAttemptAssignCredentialResultPendingMutationsFrom from = default, string message = default, ActionAttemptAssignCredentialResultPendingMutations.MutationCodeEnum mutationCode = default, ActionAttemptAssignCredentialResultPendingMutationsTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Mutation code to indicate that Seam is in the process of updating the access times for this access method. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum MutationCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "provisioning_access")] -ProvisioningAccess = 1, - -[EnumMember(Value = "revoking_access")] -RevokingAccess = 2, - -[EnumMember(Value = "updating_access_times")] -UpdatingAccessTimes = 3, -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Previous access time configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialResultPendingMutationsFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Mutation code to indicate that Seam is in the process of updating the access times for this access method. -/// -[DataMember(Name = "mutation_code", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialResultPendingMutations.MutationCodeEnum MutationCode { get; set; } - -/// -/// New access time configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialResultPendingMutationsTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutationsFrom_model")] -public class ActionAttemptAssignCredentialResultPendingMutationsFrom -{ -[JsonConstructorAttribute] -protected ActionAttemptAssignCredentialResultPendingMutationsFrom() { } - -public ActionAttemptAssignCredentialResultPendingMutationsFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Previous end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Previous start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutationsTo_model")] -public class ActionAttemptAssignCredentialResultPendingMutationsTo -{ -[JsonConstructorAttribute] -protected ActionAttemptAssignCredentialResultPendingMutationsTo() { } - -public ActionAttemptAssignCredentialResultPendingMutationsTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// New end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// New start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptAssignCredentialResultWarnings_model")] -public class ActionAttemptAssignCredentialResultWarnings -{ -[JsonConstructorAttribute] -protected ActionAttemptAssignCredentialResultWarnings() { } - -public ActionAttemptAssignCredentialResultWarnings(string createdAt = default, string message = default, ActionAttemptAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, string? originalAccessMethodId = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -OriginalAccessMethodId = originalAccessMethodId; -} - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum WarningCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "being_deleted")] -BeingDeleted = 1, - -[EnumMember(Value = "updating_access_times")] -UpdatingAccessTimes = 2, - -[EnumMember(Value = "pulled_backup_access_code")] -PulledBackupAccessCode = 3, - -[EnumMember(Value = "delay_in_issuing")] -DelayInIssuing = 4, - -[EnumMember(Value = "user_identity_missing_email_address")] -UserIdentityMissingEmailAddress = 5, - -[EnumMember(Value = "user_identity_missing_phone_number")] -UserIdentityMissingPhoneNumber = 6, -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } - -/// -/// ID of the original access method from which this backup access method was split, if applicable. -/// -[DataMember(Name = "original_access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string? OriginalAccessMethodId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Resetting a sandbox workspace is pending. -/// -[DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspace_model")] -public class ActionAttemptResetSandboxWorkspace : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptResetSandboxWorkspace() { } - -public ActionAttemptResetSandboxWorkspace(string actionAttemptId = default, string actionType = default, ActionAttemptResetSandboxWorkspaceError error = default, ActionAttemptResetSandboxWorkspaceResult result = default, ActionAttemptResetSandboxWorkspace.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "RESET_SANDBOX_WORKSPACE"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptResetSandboxWorkspaceError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptResetSandboxWorkspaceResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptResetSandboxWorkspace.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspaceError_model")] -public class ActionAttemptResetSandboxWorkspaceError -{ -[JsonConstructorAttribute] -protected ActionAttemptResetSandboxWorkspaceError() { } - -public ActionAttemptResetSandboxWorkspaceError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspaceResult_model")] -public class ActionAttemptResetSandboxWorkspaceResult -{ -[JsonConstructorAttribute] -public ActionAttemptResetSandboxWorkspaceResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Setting the fan mode is pending. -/// -[DataContract(Name = "seamModel_actionAttemptSetFanMode_model")] -public class ActionAttemptSetFanMode : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptSetFanMode() { } - -public ActionAttemptSetFanMode(string actionAttemptId = default, string actionType = default, ActionAttemptSetFanModeError error = default, ActionAttemptSetFanModeResult result = default, ActionAttemptSetFanMode.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "SET_FAN_MODE"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSetFanModeError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSetFanModeResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSetFanMode.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSetFanModeError_model")] -public class ActionAttemptSetFanModeError -{ -[JsonConstructorAttribute] -protected ActionAttemptSetFanModeError() { } - -public ActionAttemptSetFanModeError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSetFanModeResult_model")] -public class ActionAttemptSetFanModeResult -{ -[JsonConstructorAttribute] -public ActionAttemptSetFanModeResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Setting the HVAC mode is pending. -/// -[DataContract(Name = "seamModel_actionAttemptSetHvacMode_model")] -public class ActionAttemptSetHvacMode : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptSetHvacMode() { } - -public ActionAttemptSetHvacMode(string actionAttemptId = default, string actionType = default, ActionAttemptSetHvacModeError error = default, ActionAttemptSetHvacModeResult result = default, ActionAttemptSetHvacMode.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "SET_HVAC_MODE"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSetHvacModeError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSetHvacModeResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSetHvacMode.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSetHvacModeError_model")] -public class ActionAttemptSetHvacModeError -{ -[JsonConstructorAttribute] -protected ActionAttemptSetHvacModeError() { } - -public ActionAttemptSetHvacModeError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSetHvacModeResult_model")] -public class ActionAttemptSetHvacModeResult -{ -[JsonConstructorAttribute] -public ActionAttemptSetHvacModeResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Activating a climate preset is pending. -/// -[DataContract(Name = "seamModel_actionAttemptActivateClimatePreset_model")] -public class ActionAttemptActivateClimatePreset : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptActivateClimatePreset() { } - -public ActionAttemptActivateClimatePreset(string actionAttemptId = default, string actionType = default, ActionAttemptActivateClimatePresetError error = default, ActionAttemptActivateClimatePresetResult result = default, ActionAttemptActivateClimatePreset.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "ACTIVATE_CLIMATE_PRESET"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptActivateClimatePresetError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptActivateClimatePresetResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptActivateClimatePreset.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptActivateClimatePresetError_model")] -public class ActionAttemptActivateClimatePresetError -{ -[JsonConstructorAttribute] -protected ActionAttemptActivateClimatePresetError() { } - -public ActionAttemptActivateClimatePresetError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptActivateClimatePresetResult_model")] -public class ActionAttemptActivateClimatePresetResult -{ -[JsonConstructorAttribute] -public ActionAttemptActivateClimatePresetResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Activating the weekly program is pending. -/// -[DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgram_model")] -public class ActionAttemptActivateWeeklyProgram : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptActivateWeeklyProgram() { } - -public ActionAttemptActivateWeeklyProgram(string actionAttemptId = default, string actionType = default, ActionAttemptActivateWeeklyProgramError error = default, ActionAttemptActivateWeeklyProgramResult result = default, ActionAttemptActivateWeeklyProgram.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "ACTIVATE_WEEKLY_PROGRAM"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptActivateWeeklyProgramError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptActivateWeeklyProgramResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptActivateWeeklyProgram.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgramError_model")] -public class ActionAttemptActivateWeeklyProgramError -{ -[JsonConstructorAttribute] -protected ActionAttemptActivateWeeklyProgramError() { } - -public ActionAttemptActivateWeeklyProgramError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgramResult_model")] -public class ActionAttemptActivateWeeklyProgramResult -{ -[JsonConstructorAttribute] -public ActionAttemptActivateWeeklyProgramResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulating a keypad code entry is pending. -/// -[DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntry_model")] -public class ActionAttemptSimulateKeypadCodeEntry : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptSimulateKeypadCodeEntry() { } - -public ActionAttemptSimulateKeypadCodeEntry(string actionAttemptId = default, string actionType = default, ActionAttemptSimulateKeypadCodeEntryError error = default, ActionAttemptSimulateKeypadCodeEntryResult result = default, ActionAttemptSimulateKeypadCodeEntry.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "SIMULATE_KEYPAD_CODE_ENTRY"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSimulateKeypadCodeEntryError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSimulateKeypadCodeEntryResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSimulateKeypadCodeEntry.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntryError_model")] -public class ActionAttemptSimulateKeypadCodeEntryError -{ -[JsonConstructorAttribute] -protected ActionAttemptSimulateKeypadCodeEntryError() { } - -public ActionAttemptSimulateKeypadCodeEntryError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntryResult_model")] -public class ActionAttemptSimulateKeypadCodeEntryResult -{ -[JsonConstructorAttribute] -public ActionAttemptSimulateKeypadCodeEntryResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Simulating a manual lock action using a keypad is pending. -/// -[DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypad_model")] -public class ActionAttemptSimulateManualLockViaKeypad : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptSimulateManualLockViaKeypad() { } - -public ActionAttemptSimulateManualLockViaKeypad(string actionAttemptId = default, string actionType = default, ActionAttemptSimulateManualLockViaKeypadError error = default, ActionAttemptSimulateManualLockViaKeypadResult result = default, ActionAttemptSimulateManualLockViaKeypad.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "SIMULATE_MANUAL_LOCK_VIA_KEYPAD"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSimulateManualLockViaKeypadError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSimulateManualLockViaKeypadResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSimulateManualLockViaKeypad.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypadError_model")] -public class ActionAttemptSimulateManualLockViaKeypadError -{ -[JsonConstructorAttribute] -protected ActionAttemptSimulateManualLockViaKeypadError() { } - -public ActionAttemptSimulateManualLockViaKeypadError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypadResult_model")] -public class ActionAttemptSimulateManualLockViaKeypadResult -{ -[JsonConstructorAttribute] -public ActionAttemptSimulateManualLockViaKeypadResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Pushing thermostat weekly programs is pending. -/// -[DataContract(Name = "seamModel_actionAttemptPushThermostatPrograms_model")] -public class ActionAttemptPushThermostatPrograms : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptPushThermostatPrograms() { } - -public ActionAttemptPushThermostatPrograms(string actionAttemptId = default, string actionType = default, ActionAttemptPushThermostatProgramsError error = default, ActionAttemptPushThermostatProgramsResult result = default, ActionAttemptPushThermostatPrograms.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "PUSH_THERMOSTAT_PROGRAMS"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptPushThermostatProgramsError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptPushThermostatProgramsResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptPushThermostatPrograms.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptPushThermostatProgramsError_model")] -public class ActionAttemptPushThermostatProgramsError -{ -[JsonConstructorAttribute] -protected ActionAttemptPushThermostatProgramsError() { } - -public ActionAttemptPushThermostatProgramsError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptPushThermostatProgramsResult_model")] -public class ActionAttemptPushThermostatProgramsResult -{ -[JsonConstructorAttribute] -public ActionAttemptPushThermostatProgramsResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Configuring the auto-lock is pending. -/// -[DataContract(Name = "seamModel_actionAttemptConfigureAutoLock_model")] -public class ActionAttemptConfigureAutoLock : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptConfigureAutoLock() { } - -public ActionAttemptConfigureAutoLock(string actionAttemptId = default, string actionType = default, ActionAttemptConfigureAutoLockError error = default, ActionAttemptConfigureAutoLockResult result = default, ActionAttemptConfigureAutoLock.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "CONFIGURE_AUTO_LOCK"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptConfigureAutoLockError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptConfigureAutoLockResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptConfigureAutoLock.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptConfigureAutoLockError_model")] -public class ActionAttemptConfigureAutoLockError -{ -[JsonConstructorAttribute] -protected ActionAttemptConfigureAutoLockError() { } - -public ActionAttemptConfigureAutoLockError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptConfigureAutoLockResult_model")] -public class ActionAttemptConfigureAutoLockResult -{ -[JsonConstructorAttribute] -public ActionAttemptConfigureAutoLockResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSyncAccessCodes_model")] -public class ActionAttemptSyncAccessCodes : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptSyncAccessCodes() { } - -public ActionAttemptSyncAccessCodes(string actionAttemptId = default, string actionType = default, ActionAttemptSyncAccessCodesError error = default, ActionAttemptSyncAccessCodesResult result = default, ActionAttemptSyncAccessCodes.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "SYNC_ACCESS_CODES"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSyncAccessCodesError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSyncAccessCodesResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptSyncAccessCodes.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSyncAccessCodesError_model")] -public class ActionAttemptSyncAccessCodesError -{ -[JsonConstructorAttribute] -protected ActionAttemptSyncAccessCodesError() { } - -public ActionAttemptSyncAccessCodesError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptSyncAccessCodesResult_model")] -public class ActionAttemptSyncAccessCodesResult -{ -[JsonConstructorAttribute] -public ActionAttemptSyncAccessCodesResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptCreateAccessCode_model")] -public class ActionAttemptCreateAccessCode : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptCreateAccessCode() { } - -public ActionAttemptCreateAccessCode(string actionAttemptId = default, string actionType = default, ActionAttemptCreateAccessCodeError error = default, ActionAttemptCreateAccessCodeResult result = default, ActionAttemptCreateAccessCode.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "CREATE_ACCESS_CODE"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptCreateAccessCodeError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptCreateAccessCodeResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptCreateAccessCode.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptCreateAccessCodeError_model")] -public class ActionAttemptCreateAccessCodeError -{ -[JsonConstructorAttribute] -protected ActionAttemptCreateAccessCodeError() { } - -public ActionAttemptCreateAccessCodeError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptCreateAccessCodeResult_model")] -public class ActionAttemptCreateAccessCodeResult -{ -[JsonConstructorAttribute] -protected ActionAttemptCreateAccessCodeResult() { } - -public ActionAttemptCreateAccessCodeResult(object accessCode = default) -{ -AccessCode = accessCode; -} - -/// -/// Created access code. -/// -[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] -public object AccessCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptDeleteAccessCode_model")] -public class ActionAttemptDeleteAccessCode : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptDeleteAccessCode() { } - -public ActionAttemptDeleteAccessCode(string actionAttemptId = default, string actionType = default, ActionAttemptDeleteAccessCodeError error = default, ActionAttemptDeleteAccessCodeResult result = default, ActionAttemptDeleteAccessCode.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "DELETE_ACCESS_CODE"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptDeleteAccessCodeError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptDeleteAccessCodeResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptDeleteAccessCode.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptDeleteAccessCodeError_model")] -public class ActionAttemptDeleteAccessCodeError -{ -[JsonConstructorAttribute] -protected ActionAttemptDeleteAccessCodeError() { } - -public ActionAttemptDeleteAccessCodeError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptDeleteAccessCodeResult_model")] -public class ActionAttemptDeleteAccessCodeResult -{ -[JsonConstructorAttribute] -public ActionAttemptDeleteAccessCodeResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUpdateAccessCode_model")] -public class ActionAttemptUpdateAccessCode : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptUpdateAccessCode() { } - -public ActionAttemptUpdateAccessCode(string actionAttemptId = default, string actionType = default, ActionAttemptUpdateAccessCodeError error = default, ActionAttemptUpdateAccessCodeResult result = default, ActionAttemptUpdateAccessCode.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "UPDATE_ACCESS_CODE"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUpdateAccessCodeError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUpdateAccessCodeResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUpdateAccessCode.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUpdateAccessCodeError_model")] -public class ActionAttemptUpdateAccessCodeError -{ -[JsonConstructorAttribute] -protected ActionAttemptUpdateAccessCodeError() { } - -public ActionAttemptUpdateAccessCodeError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUpdateAccessCodeResult_model")] -public class ActionAttemptUpdateAccessCodeResult -{ -[JsonConstructorAttribute] -protected ActionAttemptUpdateAccessCodeResult() { } - -public ActionAttemptUpdateAccessCodeResult(object? accessCode = default) -{ -AccessCode = accessCode; -} - -/// -/// Updated access code. -/// -[DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] -public object? AccessCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptCreateNoiseThreshold_model")] -public class ActionAttemptCreateNoiseThreshold : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptCreateNoiseThreshold() { } - -public ActionAttemptCreateNoiseThreshold(string actionAttemptId = default, string actionType = default, ActionAttemptCreateNoiseThresholdError error = default, ActionAttemptCreateNoiseThresholdResult result = default, ActionAttemptCreateNoiseThreshold.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "CREATE_NOISE_THRESHOLD"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptCreateNoiseThresholdError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptCreateNoiseThresholdResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptCreateNoiseThreshold.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptCreateNoiseThresholdError_model")] -public class ActionAttemptCreateNoiseThresholdError -{ -[JsonConstructorAttribute] -protected ActionAttemptCreateNoiseThresholdError() { } - -public ActionAttemptCreateNoiseThresholdError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptCreateNoiseThresholdResult_model")] -public class ActionAttemptCreateNoiseThresholdResult -{ -[JsonConstructorAttribute] -protected ActionAttemptCreateNoiseThresholdResult() { } - -public ActionAttemptCreateNoiseThresholdResult(object noiseThreshold = default) -{ -NoiseThreshold = noiseThreshold; -} - -/// -/// Created noise threshold. -/// -[DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] -public object NoiseThreshold { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptDeleteNoiseThreshold_model")] -public class ActionAttemptDeleteNoiseThreshold : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptDeleteNoiseThreshold() { } - -public ActionAttemptDeleteNoiseThreshold(string actionAttemptId = default, string actionType = default, ActionAttemptDeleteNoiseThresholdError error = default, ActionAttemptDeleteNoiseThresholdResult result = default, ActionAttemptDeleteNoiseThreshold.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "DELETE_NOISE_THRESHOLD"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptDeleteNoiseThresholdError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptDeleteNoiseThresholdResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptDeleteNoiseThreshold.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptDeleteNoiseThresholdError_model")] -public class ActionAttemptDeleteNoiseThresholdError -{ -[JsonConstructorAttribute] -protected ActionAttemptDeleteNoiseThresholdError() { } - -public ActionAttemptDeleteNoiseThresholdError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptDeleteNoiseThresholdResult_model")] -public class ActionAttemptDeleteNoiseThresholdResult -{ -[JsonConstructorAttribute] -public ActionAttemptDeleteNoiseThresholdResult() { } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUpdateNoiseThreshold_model")] -public class ActionAttemptUpdateNoiseThreshold : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptUpdateNoiseThreshold() { } - -public ActionAttemptUpdateNoiseThreshold(string actionAttemptId = default, string actionType = default, ActionAttemptUpdateNoiseThresholdError error = default, ActionAttemptUpdateNoiseThresholdResult result = default, ActionAttemptUpdateNoiseThreshold.StatusEnum status = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -Error = error; -Result = result; -Status = status; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "success")] -Success = 1, - -[EnumMember(Value = "pending")] -Pending = 2, - -[EnumMember(Value = "error")] -Error = 3, -} - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "UPDATE_NOISE_THRESHOLD"; - -/// -/// Error associated with the action. -/// -[DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUpdateNoiseThresholdError Error { get; set; } - -/// -/// Result of the action. -/// -[DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUpdateNoiseThresholdResult Result { get; set; } - -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ActionAttemptUpdateNoiseThreshold.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUpdateNoiseThresholdError_model")] -public class ActionAttemptUpdateNoiseThresholdError -{ -[JsonConstructorAttribute] -protected ActionAttemptUpdateNoiseThresholdError() { } - -public ActionAttemptUpdateNoiseThresholdError(string message = default, string type = default) -{ -Message = message; -Type = type; -} - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Type of the error. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public string Type { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUpdateNoiseThresholdResult_model")] -public class ActionAttemptUpdateNoiseThresholdResult -{ -[JsonConstructorAttribute] -protected ActionAttemptUpdateNoiseThresholdResult() { } - -public ActionAttemptUpdateNoiseThresholdResult(object noiseThreshold = default) -{ -NoiseThreshold = noiseThreshold; -} - -/// -/// Updated noise threshold. -/// -[DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] -public object NoiseThreshold { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_actionAttemptUnrecognized_model")] -public class ActionAttemptUnrecognized : ActionAttempt -{ -[JsonConstructorAttribute] -protected ActionAttemptUnrecognized() { } - -public ActionAttemptUnrecognized(string actionType = default, string actionAttemptId = default) -{ -ActionType = actionType; -ActionAttemptId = actionAttemptId; -} - -[DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] -public override string ActionType { get; } = "unrecognized"; - -/// -/// ID of the action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public override string ActionAttemptId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + [JsonConverter(typeof(JsonSubtypes), "action_type")] + [JsonSubtypes.FallBackSubType(typeof(ActionAttemptUnrecognized))] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptUpdateNoiseThreshold), "UPDATE_NOISE_THRESHOLD")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptDeleteNoiseThreshold), "DELETE_NOISE_THRESHOLD")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptCreateNoiseThreshold), "CREATE_NOISE_THRESHOLD")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptUpdateAccessCode), "UPDATE_ACCESS_CODE")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptDeleteAccessCode), "DELETE_ACCESS_CODE")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptCreateAccessCode), "CREATE_ACCESS_CODE")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptSyncAccessCodes), "SYNC_ACCESS_CODES")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptConfigureAutoLock), "CONFIGURE_AUTO_LOCK")] + [JsonSubtypes.KnownSubType( + typeof(ActionAttemptPushThermostatPrograms), + "PUSH_THERMOSTAT_PROGRAMS" + )] + [JsonSubtypes.KnownSubType( + typeof(ActionAttemptSimulateManualLockViaKeypad), + "SIMULATE_MANUAL_LOCK_VIA_KEYPAD" + )] + [JsonSubtypes.KnownSubType( + typeof(ActionAttemptSimulateKeypadCodeEntry), + "SIMULATE_KEYPAD_CODE_ENTRY" + )] + [JsonSubtypes.KnownSubType( + typeof(ActionAttemptActivateWeeklyProgram), + "ACTIVATE_WEEKLY_PROGRAM" + )] + [JsonSubtypes.KnownSubType( + typeof(ActionAttemptActivateClimatePreset), + "ACTIVATE_CLIMATE_PRESET" + )] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptSetHvacMode), "SET_HVAC_MODE")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptSetFanMode), "SET_FAN_MODE")] + [JsonSubtypes.KnownSubType( + typeof(ActionAttemptResetSandboxWorkspace), + "RESET_SANDBOX_WORKSPACE" + )] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptAssignCredential), "ASSIGN_CREDENTIAL")] + [JsonSubtypes.KnownSubType( + typeof(ActionAttemptScanToAssignCredential), + "SCAN_TO_ASSIGN_CREDENTIAL" + )] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptEncodeCredential), "ENCODE_CREDENTIAL")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptScanCredential), "SCAN_CREDENTIAL")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptUnlockDoor), "UNLOCK_DOOR")] + [JsonSubtypes.KnownSubType(typeof(ActionAttemptLockDoor), "LOCK_DOOR")] + public abstract class ActionAttempt + { + public abstract string ActionType { get; } + + public abstract string ActionAttemptId { get; set; } + + public abstract override string ToString(); + } + + /// + /// Locking a door is pending. + /// + [DataContract(Name = "seamModel_actionAttemptLockDoor_model")] + public class ActionAttemptLockDoor : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptLockDoor() { } + + public ActionAttemptLockDoor( + string actionAttemptId = default, + string actionType = default, + ActionAttemptLockDoorError error = default, + ActionAttemptLockDoorResult result = default, + ActionAttemptLockDoor.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "LOCK_DOOR"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptLockDoorError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptLockDoorResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptLockDoor.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptLockDoorError_model")] + public class ActionAttemptLockDoorError + { + [JsonConstructorAttribute] + protected ActionAttemptLockDoorError() { } + + public ActionAttemptLockDoorError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptLockDoorResult_model")] + public class ActionAttemptLockDoorResult + { + [JsonConstructorAttribute] + protected ActionAttemptLockDoorResult() { } + + public ActionAttemptLockDoorResult(bool? wasConfirmedByDevice = default) + { + WasConfirmedByDevice = wasConfirmedByDevice; + } + + /// + /// Indicates whether the device confirmed that the lock action occurred. + /// + [DataMember(Name = "was_confirmed_by_device", IsRequired = false, EmitDefaultValue = false)] + public bool? WasConfirmedByDevice { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Unlocking a door is pending. + /// + [DataContract(Name = "seamModel_actionAttemptUnlockDoor_model")] + public class ActionAttemptUnlockDoor : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptUnlockDoor() { } + + public ActionAttemptUnlockDoor( + string actionAttemptId = default, + string actionType = default, + ActionAttemptUnlockDoorError error = default, + ActionAttemptUnlockDoorResult result = default, + ActionAttemptUnlockDoor.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "UNLOCK_DOOR"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUnlockDoorError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUnlockDoorResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUnlockDoor.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUnlockDoorError_model")] + public class ActionAttemptUnlockDoorError + { + [JsonConstructorAttribute] + protected ActionAttemptUnlockDoorError() { } + + public ActionAttemptUnlockDoorError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUnlockDoorResult_model")] + public class ActionAttemptUnlockDoorResult + { + [JsonConstructorAttribute] + protected ActionAttemptUnlockDoorResult() { } + + public ActionAttemptUnlockDoorResult(bool? wasConfirmedByDevice = default) + { + WasConfirmedByDevice = wasConfirmedByDevice; + } + + /// + /// Indicates whether the device confirmed that the unlock action occurred. + /// + [DataMember(Name = "was_confirmed_by_device", IsRequired = false, EmitDefaultValue = false)] + public bool? WasConfirmedByDevice { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Reading credential data from the physical encoder is pending. + /// + [DataContract(Name = "seamModel_actionAttemptScanCredential_model")] + public class ActionAttemptScanCredential : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredential() { } + + public ActionAttemptScanCredential( + string actionAttemptId = default, + string actionType = default, + ActionAttemptScanCredentialError error = default, + ActionAttemptScanCredentialResult result = default, + ActionAttemptScanCredential.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "SCAN_CREDENTIAL"; + + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialError Error { get; set; } + + /// + /// Result of scanning a card. If the attempt was successful, includes a snapshot of credential data read from the physical encoder, the corresponding data stored on Seam and the access system, and any associated warnings. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredential.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanCredentialError_model")] + public class ActionAttemptScanCredentialError + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialError() { } + + public ActionAttemptScanCredentialError( + string message = default, + ActionAttemptScanCredentialError.TypeEnum type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "uncategorized_error")] + UncategorizedError = 1, + + [EnumMember(Value = "action_attempt_expired")] + ActionAttemptExpired = 2, + + [EnumMember(Value = "no_credential_on_encoder")] + NoCredentialOnEncoder = 3, + + [EnumMember(Value = "encoder_not_online")] + EncoderNotOnline = 4, + + [EnumMember(Value = "encoder_communication_timeout")] + EncoderCommunicationTimeout = 5, + + [EnumMember(Value = "bridge_disconnected")] + BridgeDisconnected = 6, + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialError.TypeEnum Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanCredentialResult_model")] + public class ActionAttemptScanCredentialResult + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResult() { } + + public ActionAttemptScanCredentialResult( + ActionAttemptScanCredentialResultAcsCredentialOnEncoder? acsCredentialOnEncoder = + default, + ActionAttemptScanCredentialResultAcsCredentialOnSeam? acsCredentialOnSeam = default, + List warnings = default + ) + { + AcsCredentialOnEncoder = acsCredentialOnEncoder; + AcsCredentialOnSeam = acsCredentialOnSeam; + Warnings = warnings; + } + + /// + /// Snapshot of credential data read from the physical encoder. + /// + [DataMember( + Name = "acs_credential_on_encoder", + IsRequired = false, + EmitDefaultValue = false + )] + public ActionAttemptScanCredentialResultAcsCredentialOnEncoder? AcsCredentialOnEncoder { get; set; } + + /// + /// Corresponding credential data as stored on Seam and the access system. + /// + [DataMember(Name = "acs_credential_on_seam", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnSeam? AcsCredentialOnSeam { get; set; } + + /// + /// Warnings related to scanning the credential, such as mismatches between the credential data currently encoded on the card and the corresponding data stored on Seam and the access system. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnEncoder_model")] + public class ActionAttemptScanCredentialResultAcsCredentialOnEncoder + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnEncoder() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnEncoder( + string? cardNumber = default, + string? createdAt = default, + string? endsAt = default, + bool? isIssued = default, + string? startsAt = default, + ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata? visionlineMetadata = + default + ) + { + CardNumber = cardNumber; + CreatedAt = createdAt; + EndsAt = endsAt; + IsIssued = isIssued; + StartsAt = startsAt; + VisionlineMetadata = visionlineMetadata; + } + + /// + /// A number or string that physically identifies the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] + public string? CardNumber { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) will stop being usable. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Indicates whether the credential has been issued (encoded onto a card). + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool? IsIssued { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) becomes usable. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata? VisionlineMetadata { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata_model" + )] + public class ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata( + bool? cancelled = default, + ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata.CardFormatEnum? cardFormat = + default, + string? cardHolder = default, + string? cardId = default, + List? commonAcsEntranceIds = default, + bool? discarded = default, + bool? expired = default, + List? guestAcsEntranceIds = default, + float? numberOfIssuedCards = default, + bool? overridden = default, + bool? overwritten = default, + bool? pendingAutoUpdate = default + ) + { + Cancelled = cancelled; + CardFormat = cardFormat; + CardHolder = cardHolder; + CardId = cardId; + CommonAcsEntranceIds = commonAcsEntranceIds; + Discarded = discarded; + Expired = expired; + GuestAcsEntranceIds = guestAcsEntranceIds; + NumberOfIssuedCards = numberOfIssuedCards; + Overridden = overridden; + Overwritten = overwritten; + PendingAutoUpdate = pendingAutoUpdate; + } + + /// + /// Format of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CardFormatEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "TLCode")] + TlCode = 1, + + [EnumMember(Value = "rfid48")] + Rfid48 = 2, + } + + /// + /// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is cancelled. + /// + [DataMember(Name = "cancelled", IsRequired = false, EmitDefaultValue = false)] + public bool? Cancelled { get; set; } + + /// + /// Format of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "card_format", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnEncoderVisionlineMetadata.CardFormatEnum? CardFormat { get; set; } + + /// + /// Holder of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "card_holder", IsRequired = false, EmitDefaultValue = false)] + public string? CardHolder { get; set; } + + /// + /// Card ID for the Visionline card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] + public string? CardId { get; set; } + + /// + /// IDs of the common [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAcsEntranceIds { get; set; } + + /// + /// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is discarded. + /// + [DataMember(Name = "discarded", IsRequired = false, EmitDefaultValue = false)] + public bool? Discarded { get; set; } + + /// + /// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is expired. + /// + [DataMember(Name = "expired", IsRequired = false, EmitDefaultValue = false)] + public bool? Expired { get; set; } + + /// + /// IDs of the guest [entrances](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? GuestAcsEntranceIds { get; set; } + + /// + /// Number of issued cards associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "number_of_issued_cards", IsRequired = false, EmitDefaultValue = false)] + public float? NumberOfIssuedCards { get; set; } + + /// + /// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is overridden. + /// + [DataMember(Name = "overridden", IsRequired = false, EmitDefaultValue = false)] + public bool? Overridden { get; set; } + + /// + /// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is overwritten. + /// + [DataMember(Name = "overwritten", IsRequired = false, EmitDefaultValue = false)] + public bool? Overwritten { get; set; } + + /// + /// Indicates whether the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is pending auto-update. + /// + [DataMember(Name = "pending_auto_update", IsRequired = false, EmitDefaultValue = false)] + public bool? PendingAutoUpdate { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeam_model")] + public class ActionAttemptScanCredentialResultAcsCredentialOnSeam + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnSeam() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnSeam( + ActionAttemptScanCredentialResultAcsCredentialOnSeam.AccessMethodEnum accessMethod = + default, + string acsCredentialId = default, + string? acsCredentialPoolId = default, + string acsSystemId = default, + string? acsUserId = default, + ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? akilesMetadata = + default, + ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? assaAbloyVostioMetadata = + default, + string? cardNumber = default, + string? code = default, + string connectedAccountId = default, + string createdAt = default, + string displayName = default, + string? endsAt = default, + List errors = default, + ActionAttemptScanCredentialResultAcsCredentialOnSeam.ExternalTypeEnum? externalType = + default, + string? externalTypeDisplayName = default, + bool? isIssued = default, + bool? isLatestDesiredStateSyncedWithProvider = default, + bool isManaged = default, + bool? isMultiPhoneSyncCredential = default, + bool? isOneTimeUse = default, + string? issuedAt = default, + string? latestDesiredStateSyncedWithProviderAt = default, + string? parentAcsCredentialId = default, + string? startsAt = default, + string? userIdentityId = default, + ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata? visionlineMetadata = + default, + List warnings = default, + string workspaceId = default + ) + { + AccessMethod = accessMethod; + AcsCredentialId = acsCredentialId; + AcsCredentialPoolId = acsCredentialPoolId; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + AkilesMetadata = akilesMetadata; + AssaAbloyVostioMetadata = assaAbloyVostioMetadata; + CardNumber = cardNumber; + Code = code; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DisplayName = displayName; + EndsAt = endsAt; + Errors = errors; + ExternalType = externalType; + ExternalTypeDisplayName = externalTypeDisplayName; + IsIssued = isIssued; + IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; + IsManaged = isManaged; + IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; + IsOneTimeUse = isOneTimeUse; + IssuedAt = issuedAt; + LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; + ParentAcsCredentialId = parentAcsCredentialId; + StartsAt = startsAt; + UserIdentityId = userIdentityId; + VisionlineMetadata = visionlineMetadata; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + /// + /// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AccessMethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExternalTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_card")] + PtiCard = 1, + + [EnumMember(Value = "brivo_credential")] + BrivoCredential = 2, + + [EnumMember(Value = "hid_credential")] + HidCredential = 3, + + [EnumMember(Value = "visionline_card")] + VisionlineCard = 4, + + [EnumMember(Value = "salto_ks_credential")] + SaltoKsCredential = 5, + + [EnumMember(Value = "assa_abloy_vostio_key")] + AssaAbloyVostioKey = 6, + + [EnumMember(Value = "salto_space_key")] + SaltoSpaceKey = 7, + + [EnumMember(Value = "latch_access")] + LatchAccess = 8, + + [EnumMember(Value = "dormakaba_ambiance_credential")] + DormakabaAmbianceCredential = 9, + + [EnumMember(Value = "hotek_card")] + HotekCard = 10, + + [EnumMember(Value = "salto_ks_tag")] + SaltoKsTag = 11, + + [EnumMember(Value = "avigilon_alta_credential")] + AvigilonAltaCredential = 12, + + [EnumMember(Value = "kisi_credential")] + KisiCredential = 13, + + [EnumMember(Value = "akiles_credential")] + AkilesCredential = 14, + } + + /// + /// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnSeam.AccessMethodEnum AccessMethod { get; set; } + + /// + /// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the credential pool to which the credential belongs. + /// + [DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialPoolId { get; set; } + + /// + /// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata? AkilesMetadata { get; set; } + + /// + /// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember( + Name = "assa_abloy_vostio_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + + /// + /// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] + public string? CardNumber { get; set; } + + /// + /// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + /// + [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnSeam.ExternalTypeEnum? ExternalType { get; set; } + + /// + /// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. + /// + [DataMember( + Name = "external_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ExternalTypeDisplayName { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool? IsIssued { get; set; } + + /// + /// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. + /// + [DataMember( + Name = "is_latest_desired_state_synced_with_provider", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } + + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + /// + [DataMember( + Name = "is_multi_phone_sync_credential", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsMultiPhoneSyncCredential { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. + /// + [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOneTimeUse { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. + /// + [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] + public string? IssuedAt { get; set; } + + /// + /// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. + /// + [DataMember( + Name = "latest_desired_state_synced_with_provider_at", + IsRequired = false, + EmitDefaultValue = false + )] + public string? LatestDesiredStateSyncedWithProviderAt { get; set; } + + /// + /// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember( + Name = "parent_acs_credential_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ParentAcsCredentialId { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata? VisionlineMetadata { get; set; } + + /// + /// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata_model" + )] + public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnSeamAkilesMetadata( + string? memberPinId = default + ) + { + MemberPinId = memberPinId; + } + + /// + /// ID of the Akiles member PIN. + /// + [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] + public string? MemberPinId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata_model" + )] + public class ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnSeamAssaAbloyVostioMetadata( + bool? autoJoin = default, + List? doorNames = default, + string? endpointId = default, + string? keyId = default, + string? keyIssuingRequestId = default, + List? overrideGuestAcsEntranceIds = default + ) + { + AutoJoin = autoJoin; + DoorNames = doorNames; + EndpointId = endpointId; + KeyId = keyId; + KeyIssuingRequestId = keyIssuingRequestId; + OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; + } + + /// + /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + /// + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + /// + /// Names of the doors to which to grant access in the Vostio access system. + /// + [DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] + public List? DoorNames { get; set; } + + /// + /// Endpoint ID in the Vostio access system. + /// + [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] + public string? EndpointId { get; set; } + + /// + /// Key ID in the Vostio access system. + /// + [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyId { get; set; } + + /// + /// Key issuing request ID in the Vostio access system. + /// + [DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyIssuingRequestId { get; set; } + + /// + /// IDs of the guest entrances to override in the Vostio access system. + /// + [DataMember( + Name = "override_guest_acs_entrance_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? OverrideGuestAcsEntranceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamErrors_model" + )] + public class ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnSeamErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata_model" + )] + public class ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata( + bool? autoJoin = default, + ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = + default, + string? cardId = default, + List? commonAcsEntranceIds = default, + string? credentialId = default, + List? guestAcsEntranceIds = default, + bool? isValid = default, + List? joinerAcsCredentialIds = default + ) + { + AutoJoin = autoJoin; + CardFunctionType = cardFunctionType; + CardId = cardId; + CommonAcsEntranceIds = commonAcsEntranceIds; + CredentialId = credentialId; + GuestAcsEntranceIds = guestAcsEntranceIds; + IsValid = isValid; + JoinerAcsCredentialIds = joinerAcsCredentialIds; + } + + /// + /// Card function type in the Visionline access system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CardFunctionTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "guest")] + Guest = 1, + + [EnumMember(Value = "staff")] + Staff = 2, + } + + /// + /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + /// + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + /// + /// Card function type in the Visionline access system. + /// + [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnSeamVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + + /// + /// ID of the card in the Visionline access system. + /// + [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] + public string? CardId { get; set; } + + /// + /// Common entrance IDs in the Visionline access system. + /// + [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAcsEntranceIds { get; set; } + + /// + /// ID of the credential in the Visionline access system. + /// + [DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? CredentialId { get; set; } + + /// + /// Guest entrance IDs in the Visionline access system. + /// + [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? GuestAcsEntranceIds { get; set; } + + /// + /// Indicates whether the credential is valid. + /// + [DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] + public bool? IsValid { get; set; } + + /// + /// IDs of the credentials to which you want to join. + /// + [DataMember( + Name = "joiner_acs_credential_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? JoinerAcsCredentialIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptScanCredentialResultAcsCredentialOnSeamWarnings_model" + )] + public class ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings() { } + + public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings( + string createdAt = default, + string message = default, + ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum warningCode = + default, + string? newCode = default, + string? originalCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + NewCode = newCode; + OriginalCode = originalCode; + } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum WarningCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "waiting_to_be_issued")] + WaitingToBeIssued = 1, + + [EnumMember(Value = "schedule_externally_modified")] + ScheduleExternallyModified = 2, + + [EnumMember(Value = "schedule_modified")] + ScheduleModified = 3, + + [EnumMember(Value = "being_deleted")] + BeingDeleted = 4, + + [EnumMember(Value = "unknown_issue_with_acs_credential")] + UnknownIssueWithAcsCredential = 5, + + [EnumMember(Value = "needs_to_be_reissued")] + NeedsToBeReissued = 6, + + [EnumMember(Value = "requested_code_unavailable")] + RequestedCodeUnavailable = 7, + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultAcsCredentialOnSeamWarnings.WarningCodeEnum WarningCode { get; set; } + + /// + /// The PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string? NewCode { get; set; } + + /// + /// The originally requested PIN code that could not be used. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string? OriginalCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanCredentialResultWarnings_model")] + public class ActionAttemptScanCredentialResultWarnings + { + [JsonConstructorAttribute] + protected ActionAttemptScanCredentialResultWarnings() { } + + public ActionAttemptScanCredentialResultWarnings( + ActionAttemptScanCredentialResultWarnings.WarningCodeEnum warningCode = default, + string warningMessage = default + ) + { + WarningCode = warningCode; + WarningMessage = warningMessage; + } + + /// + /// Indicates a warning related to scanning a credential. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum WarningCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "acs_credential_on_encoder_out_of_sync")] + AcsCredentialOnEncoderOutOfSync = 1, + + [EnumMember(Value = "acs_credential_on_seam_not_found")] + AcsCredentialOnSeamNotFound = 2, + } + + /// + /// Indicates a warning related to scanning a credential. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "warning_message", IsRequired = false, EmitDefaultValue = false)] + public string WarningMessage { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Encoding credential data from the physical encoder onto a card is pending. + /// + [DataContract(Name = "seamModel_actionAttemptEncodeCredential_model")] + public class ActionAttemptEncodeCredential : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredential() { } + + public ActionAttemptEncodeCredential( + string actionAttemptId = default, + string actionType = default, + ActionAttemptEncodeCredentialError error = default, + ActionAttemptEncodeCredentialResult result = default, + ActionAttemptEncodeCredential.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "ENCODE_CREDENTIAL"; + + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialError Error { get; set; } + + /// + /// Result of an encoding attempt. If the attempt was successful, includes the credential data that was encoded onto the card. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredential.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptEncodeCredentialError_model")] + public class ActionAttemptEncodeCredentialError + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredentialError() { } + + public ActionAttemptEncodeCredentialError( + string message = default, + ActionAttemptEncodeCredentialError.TypeEnum type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Error type to indicate that the credential was deleted and can no longer be encoded. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "uncategorized_error")] + UncategorizedError = 1, + + [EnumMember(Value = "action_attempt_expired")] + ActionAttemptExpired = 2, + + [EnumMember(Value = "no_credential_on_encoder")] + NoCredentialOnEncoder = 3, + + [EnumMember(Value = "incompatible_card_format")] + IncompatibleCardFormat = 4, + + [EnumMember(Value = "credential_cannot_be_reissued")] + CredentialCannotBeReissued = 5, + + [EnumMember(Value = "encoder_not_online")] + EncoderNotOnline = 6, + + [EnumMember(Value = "encoder_communication_timeout")] + EncoderCommunicationTimeout = 7, + + [EnumMember(Value = "bridge_disconnected")] + BridgeDisconnected = 8, + + [EnumMember(Value = "encoding_interrupted")] + EncodingInterrupted = 9, + + [EnumMember(Value = "credential_deleted")] + CredentialDeleted = 10, + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Error type to indicate that the credential was deleted and can no longer be encoded. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialError.TypeEnum Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResult_model")] + public class ActionAttemptEncodeCredentialResult + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredentialResult() { } + + public ActionAttemptEncodeCredentialResult( + ActionAttemptEncodeCredentialResult.AccessMethodEnum accessMethod = default, + string acsCredentialId = default, + string? acsCredentialPoolId = default, + string acsSystemId = default, + string? acsUserId = default, + ActionAttemptEncodeCredentialResultAkilesMetadata? akilesMetadata = default, + ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = + default, + string? cardNumber = default, + string? code = default, + string connectedAccountId = default, + string createdAt = default, + string displayName = default, + string? endsAt = default, + List errors = default, + ActionAttemptEncodeCredentialResult.ExternalTypeEnum? externalType = default, + string? externalTypeDisplayName = default, + bool? isIssued = default, + bool? isLatestDesiredStateSyncedWithProvider = default, + bool isManaged = default, + bool? isMultiPhoneSyncCredential = default, + bool? isOneTimeUse = default, + string? issuedAt = default, + string? latestDesiredStateSyncedWithProviderAt = default, + string? parentAcsCredentialId = default, + string? startsAt = default, + string? userIdentityId = default, + ActionAttemptEncodeCredentialResultVisionlineMetadata? visionlineMetadata = default, + List warnings = default, + string workspaceId = default + ) + { + AccessMethod = accessMethod; + AcsCredentialId = acsCredentialId; + AcsCredentialPoolId = acsCredentialPoolId; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + AkilesMetadata = akilesMetadata; + AssaAbloyVostioMetadata = assaAbloyVostioMetadata; + CardNumber = cardNumber; + Code = code; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DisplayName = displayName; + EndsAt = endsAt; + Errors = errors; + ExternalType = externalType; + ExternalTypeDisplayName = externalTypeDisplayName; + IsIssued = isIssued; + IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; + IsManaged = isManaged; + IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; + IsOneTimeUse = isOneTimeUse; + IssuedAt = issuedAt; + LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; + ParentAcsCredentialId = parentAcsCredentialId; + StartsAt = startsAt; + UserIdentityId = userIdentityId; + VisionlineMetadata = visionlineMetadata; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + /// + /// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AccessMethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExternalTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_card")] + PtiCard = 1, + + [EnumMember(Value = "brivo_credential")] + BrivoCredential = 2, + + [EnumMember(Value = "hid_credential")] + HidCredential = 3, + + [EnumMember(Value = "visionline_card")] + VisionlineCard = 4, + + [EnumMember(Value = "salto_ks_credential")] + SaltoKsCredential = 5, + + [EnumMember(Value = "assa_abloy_vostio_key")] + AssaAbloyVostioKey = 6, + + [EnumMember(Value = "salto_space_key")] + SaltoSpaceKey = 7, + + [EnumMember(Value = "latch_access")] + LatchAccess = 8, + + [EnumMember(Value = "dormakaba_ambiance_credential")] + DormakabaAmbianceCredential = 9, + + [EnumMember(Value = "hotek_card")] + HotekCard = 10, + + [EnumMember(Value = "salto_ks_tag")] + SaltoKsTag = 11, + + [EnumMember(Value = "avigilon_alta_credential")] + AvigilonAltaCredential = 12, + + [EnumMember(Value = "kisi_credential")] + KisiCredential = 13, + + [EnumMember(Value = "akiles_credential")] + AkilesCredential = 14, + } + + /// + /// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialResult.AccessMethodEnum AccessMethod { get; set; } + + /// + /// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the credential pool to which the credential belongs. + /// + [DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialPoolId { get; set; } + + /// + /// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialResultAkilesMetadata? AkilesMetadata { get; set; } + + /// + /// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember( + Name = "assa_abloy_vostio_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + + /// + /// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] + public string? CardNumber { get; set; } + + /// + /// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + /// + [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialResult.ExternalTypeEnum? ExternalType { get; set; } + + /// + /// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. + /// + [DataMember( + Name = "external_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ExternalTypeDisplayName { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool? IsIssued { get; set; } + + /// + /// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. + /// + [DataMember( + Name = "is_latest_desired_state_synced_with_provider", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } + + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + /// + [DataMember( + Name = "is_multi_phone_sync_credential", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsMultiPhoneSyncCredential { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. + /// + [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOneTimeUse { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. + /// + [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] + public string? IssuedAt { get; set; } + + /// + /// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. + /// + [DataMember( + Name = "latest_desired_state_synced_with_provider_at", + IsRequired = false, + EmitDefaultValue = false + )] + public string? LatestDesiredStateSyncedWithProviderAt { get; set; } + + /// + /// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember( + Name = "parent_acs_credential_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ParentAcsCredentialId { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialResultVisionlineMetadata? VisionlineMetadata { get; set; } + + /// + /// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultAkilesMetadata_model")] + public class ActionAttemptEncodeCredentialResultAkilesMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredentialResultAkilesMetadata() { } + + public ActionAttemptEncodeCredentialResultAkilesMetadata(string? memberPinId = default) + { + MemberPinId = memberPinId; + } + + /// + /// ID of the Akiles member PIN. + /// + [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] + public string? MemberPinId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptEncodeCredentialResultAssaAbloyVostioMetadata_model" + )] + public class ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata() { } + + public ActionAttemptEncodeCredentialResultAssaAbloyVostioMetadata( + bool? autoJoin = default, + List? doorNames = default, + string? endpointId = default, + string? keyId = default, + string? keyIssuingRequestId = default, + List? overrideGuestAcsEntranceIds = default + ) + { + AutoJoin = autoJoin; + DoorNames = doorNames; + EndpointId = endpointId; + KeyId = keyId; + KeyIssuingRequestId = keyIssuingRequestId; + OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; + } + + /// + /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + /// + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + /// + /// Names of the doors to which to grant access in the Vostio access system. + /// + [DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] + public List? DoorNames { get; set; } + + /// + /// Endpoint ID in the Vostio access system. + /// + [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] + public string? EndpointId { get; set; } + + /// + /// Key ID in the Vostio access system. + /// + [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyId { get; set; } + + /// + /// Key issuing request ID in the Vostio access system. + /// + [DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyIssuingRequestId { get; set; } + + /// + /// IDs of the guest entrances to override in the Vostio access system. + /// + [DataMember( + Name = "override_guest_acs_entrance_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? OverrideGuestAcsEntranceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultErrors_model")] + public class ActionAttemptEncodeCredentialResultErrors + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredentialResultErrors() { } + + public ActionAttemptEncodeCredentialResultErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultVisionlineMetadata_model")] + public class ActionAttemptEncodeCredentialResultVisionlineMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredentialResultVisionlineMetadata() { } + + public ActionAttemptEncodeCredentialResultVisionlineMetadata( + bool? autoJoin = default, + ActionAttemptEncodeCredentialResultVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = + default, + string? cardId = default, + List? commonAcsEntranceIds = default, + string? credentialId = default, + List? guestAcsEntranceIds = default, + bool? isValid = default, + List? joinerAcsCredentialIds = default + ) + { + AutoJoin = autoJoin; + CardFunctionType = cardFunctionType; + CardId = cardId; + CommonAcsEntranceIds = commonAcsEntranceIds; + CredentialId = credentialId; + GuestAcsEntranceIds = guestAcsEntranceIds; + IsValid = isValid; + JoinerAcsCredentialIds = joinerAcsCredentialIds; + } + + /// + /// Card function type in the Visionline access system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CardFunctionTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "guest")] + Guest = 1, + + [EnumMember(Value = "staff")] + Staff = 2, + } + + /// + /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + /// + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + /// + /// Card function type in the Visionline access system. + /// + [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialResultVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + + /// + /// ID of the card in the Visionline access system. + /// + [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] + public string? CardId { get; set; } + + /// + /// Common entrance IDs in the Visionline access system. + /// + [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAcsEntranceIds { get; set; } + + /// + /// ID of the credential in the Visionline access system. + /// + [DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? CredentialId { get; set; } + + /// + /// Guest entrance IDs in the Visionline access system. + /// + [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? GuestAcsEntranceIds { get; set; } + + /// + /// Indicates whether the credential is valid. + /// + [DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] + public bool? IsValid { get; set; } + + /// + /// IDs of the credentials to which you want to join. + /// + [DataMember( + Name = "joiner_acs_credential_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? JoinerAcsCredentialIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptEncodeCredentialResultWarnings_model")] + public class ActionAttemptEncodeCredentialResultWarnings + { + [JsonConstructorAttribute] + protected ActionAttemptEncodeCredentialResultWarnings() { } + + public ActionAttemptEncodeCredentialResultWarnings( + string createdAt = default, + string message = default, + ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum warningCode = default, + string? newCode = default, + string? originalCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + NewCode = newCode; + OriginalCode = originalCode; + } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum WarningCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "waiting_to_be_issued")] + WaitingToBeIssued = 1, + + [EnumMember(Value = "schedule_externally_modified")] + ScheduleExternallyModified = 2, + + [EnumMember(Value = "schedule_modified")] + ScheduleModified = 3, + + [EnumMember(Value = "being_deleted")] + BeingDeleted = 4, + + [EnumMember(Value = "unknown_issue_with_acs_credential")] + UnknownIssueWithAcsCredential = 5, + + [EnumMember(Value = "needs_to_be_reissued")] + NeedsToBeReissued = 6, + + [EnumMember(Value = "requested_code_unavailable")] + RequestedCodeUnavailable = 7, + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptEncodeCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + + /// + /// The PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string? NewCode { get; set; } + + /// + /// The originally requested PIN code that could not be used. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string? OriginalCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Scanning a physical card and assigning the credential is pending. + /// + [DataContract(Name = "seamModel_actionAttemptScanToAssignCredential_model")] + public class ActionAttemptScanToAssignCredential : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredential() { } + + public ActionAttemptScanToAssignCredential( + string actionAttemptId = default, + string actionType = default, + ActionAttemptScanToAssignCredentialError error = default, + ActionAttemptScanToAssignCredentialResult result = default, + ActionAttemptScanToAssignCredential.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "SCAN_TO_ASSIGN_CREDENTIAL"; + + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialError Error { get; set; } + + /// + /// Result of a scan to assign attempt. If the attempt was successful, includes the credential data that was scanned and assigned. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredential.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialError_model")] + public class ActionAttemptScanToAssignCredentialError + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredentialError() { } + + public ActionAttemptScanToAssignCredentialError( + string message = default, + ActionAttemptScanToAssignCredentialError.TypeEnum type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Error type to indicate that there is no credential on the encoder. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "uncategorized_error")] + UncategorizedError = 1, + + [EnumMember(Value = "action_attempt_expired")] + ActionAttemptExpired = 2, + + [EnumMember(Value = "no_credential_on_encoder")] + NoCredentialOnEncoder = 3, + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Error type to indicate that there is no credential on the encoder. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialError.TypeEnum Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResult_model")] + public class ActionAttemptScanToAssignCredentialResult + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredentialResult() { } + + public ActionAttemptScanToAssignCredentialResult( + ActionAttemptScanToAssignCredentialResult.AccessMethodEnum accessMethod = default, + string acsCredentialId = default, + string? acsCredentialPoolId = default, + string acsSystemId = default, + string? acsUserId = default, + ActionAttemptScanToAssignCredentialResultAkilesMetadata? akilesMetadata = default, + ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? assaAbloyVostioMetadata = + default, + string? cardNumber = default, + string? code = default, + string connectedAccountId = default, + string createdAt = default, + string displayName = default, + string? endsAt = default, + List errors = default, + ActionAttemptScanToAssignCredentialResult.ExternalTypeEnum? externalType = default, + string? externalTypeDisplayName = default, + bool? isIssued = default, + bool? isLatestDesiredStateSyncedWithProvider = default, + bool isManaged = default, + bool? isMultiPhoneSyncCredential = default, + bool? isOneTimeUse = default, + string? issuedAt = default, + string? latestDesiredStateSyncedWithProviderAt = default, + string? parentAcsCredentialId = default, + string? startsAt = default, + string? userIdentityId = default, + ActionAttemptScanToAssignCredentialResultVisionlineMetadata? visionlineMetadata = + default, + List warnings = default, + string workspaceId = default + ) + { + AccessMethod = accessMethod; + AcsCredentialId = acsCredentialId; + AcsCredentialPoolId = acsCredentialPoolId; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + AkilesMetadata = akilesMetadata; + AssaAbloyVostioMetadata = assaAbloyVostioMetadata; + CardNumber = cardNumber; + Code = code; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DisplayName = displayName; + EndsAt = endsAt; + Errors = errors; + ExternalType = externalType; + ExternalTypeDisplayName = externalTypeDisplayName; + IsIssued = isIssued; + IsLatestDesiredStateSyncedWithProvider = isLatestDesiredStateSyncedWithProvider; + IsManaged = isManaged; + IsMultiPhoneSyncCredential = isMultiPhoneSyncCredential; + IsOneTimeUse = isOneTimeUse; + IssuedAt = issuedAt; + LatestDesiredStateSyncedWithProviderAt = latestDesiredStateSyncedWithProviderAt; + ParentAcsCredentialId = parentAcsCredentialId; + StartsAt = startsAt; + UserIdentityId = userIdentityId; + VisionlineMetadata = visionlineMetadata; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + /// + /// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AccessMethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ExternalTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pti_card")] + PtiCard = 1, + + [EnumMember(Value = "brivo_credential")] + BrivoCredential = 2, + + [EnumMember(Value = "hid_credential")] + HidCredential = 3, + + [EnumMember(Value = "visionline_card")] + VisionlineCard = 4, + + [EnumMember(Value = "salto_ks_credential")] + SaltoKsCredential = 5, + + [EnumMember(Value = "assa_abloy_vostio_key")] + AssaAbloyVostioKey = 6, + + [EnumMember(Value = "salto_space_key")] + SaltoSpaceKey = 7, + + [EnumMember(Value = "latch_access")] + LatchAccess = 8, + + [EnumMember(Value = "dormakaba_ambiance_credential")] + DormakabaAmbianceCredential = 9, + + [EnumMember(Value = "hotek_card")] + HotekCard = 10, + + [EnumMember(Value = "salto_ks_tag")] + SaltoKsTag = 11, + + [EnumMember(Value = "avigilon_alta_credential")] + AvigilonAltaCredential = 12, + + [EnumMember(Value = "kisi_credential")] + KisiCredential = 13, + + [EnumMember(Value = "akiles_credential")] + AkilesCredential = 14, + } + + /// + /// Access method for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "access_method", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialResult.AccessMethodEnum AccessMethod { get; set; } + + /// + /// ID of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the credential pool to which the credential belongs. + /// + [DataMember(Name = "acs_credential_pool_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsCredentialPoolId { get; set; } + + /// + /// ID of the [access control system](https://www.seam.co/docs/low-level-apis/access-systems) that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the [ACS user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string? AcsUserId { get; set; } + + /// + /// Akiles-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialResultAkilesMetadata? AkilesMetadata { get; set; } + + /// + /// Vostio-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember( + Name = "assa_abloy_vostio_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + + /// + /// Number of the card associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "card_number", IsRequired = false, EmitDefaultValue = false)] + public string? CardNumber { get; set; } + + /// + /// Access (PIN) code for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// ID of the [connected account](https://www.seam.co/docs/core-concepts/connected-accounts) to which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name that corresponds to the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + /// + [DataMember(Name = "external_type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialResult.ExternalTypeEnum? ExternalType { get; set; } + + /// + /// Display name that corresponds to the brand-specific terminology for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) type. + /// + [DataMember( + Name = "external_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ExternalTypeDisplayName { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool? IsIssued { get; set; } + + /// + /// Indicates whether the latest state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. + /// + [DataMember( + Name = "is_latest_desired_state_synced_with_provider", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsLatestDesiredStateSyncedWithProvider { get; set; } + + /// + /// Indicates whether Seam manages the credential. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://www.seam.co/docs/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + /// + [DataMember( + Name = "is_multi_phone_sync_credential", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsMultiPhoneSyncCredential { get; set; } + + /// + /// Indicates whether the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. + /// + [DataMember(Name = "is_one_time_use", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOneTimeUse { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was encoded onto a card. + /// + [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] + public string? IssuedAt { get; set; } + + /// + /// Date and time at which the state of the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. + /// + [DataMember( + Name = "latest_desired_state_synced_with_provider_at", + IsRequired = false, + EmitDefaultValue = false + )] + public string? LatestDesiredStateSyncedWithProviderAt { get; set; } + + /// + /// ID of the parent [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember( + Name = "parent_acs_credential_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ParentAcsCredentialId { get; set; } + + /// + /// Date and time at which the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/api/user_identities/object) to whom the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) belongs. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Visionline-specific metadata for the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialResultVisionlineMetadata? VisionlineMetadata { get; set; } + + /// + /// Warnings associated with the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials). + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultAkilesMetadata_model")] + public class ActionAttemptScanToAssignCredentialResultAkilesMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredentialResultAkilesMetadata() { } + + public ActionAttemptScanToAssignCredentialResultAkilesMetadata( + string? memberPinId = default + ) + { + MemberPinId = memberPinId; + } + + /// + /// ID of the Akiles member PIN. + /// + [DataMember(Name = "member_pin_id", IsRequired = false, EmitDefaultValue = false)] + public string? MemberPinId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata_model" + )] + public class ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata() { } + + public ActionAttemptScanToAssignCredentialResultAssaAbloyVostioMetadata( + bool? autoJoin = default, + List? doorNames = default, + string? endpointId = default, + string? keyId = default, + string? keyIssuingRequestId = default, + List? overrideGuestAcsEntranceIds = default + ) + { + AutoJoin = autoJoin; + DoorNames = doorNames; + EndpointId = endpointId; + KeyId = keyId; + KeyIssuingRequestId = keyIssuingRequestId; + OverrideGuestAcsEntranceIds = overrideGuestAcsEntranceIds; + } + + /// + /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + /// + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + /// + /// Names of the doors to which to grant access in the Vostio access system. + /// + [DataMember(Name = "door_names", IsRequired = false, EmitDefaultValue = false)] + public List? DoorNames { get; set; } + + /// + /// Endpoint ID in the Vostio access system. + /// + [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] + public string? EndpointId { get; set; } + + /// + /// Key ID in the Vostio access system. + /// + [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyId { get; set; } + + /// + /// Key issuing request ID in the Vostio access system. + /// + [DataMember(Name = "key_issuing_request_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyIssuingRequestId { get; set; } + + /// + /// IDs of the guest entrances to override in the Vostio access system. + /// + [DataMember( + Name = "override_guest_acs_entrance_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? OverrideGuestAcsEntranceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultErrors_model")] + public class ActionAttemptScanToAssignCredentialResultErrors + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredentialResultErrors() { } + + public ActionAttemptScanToAssignCredentialResultErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_actionAttemptScanToAssignCredentialResultVisionlineMetadata_model" + )] + public class ActionAttemptScanToAssignCredentialResultVisionlineMetadata + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredentialResultVisionlineMetadata() { } + + public ActionAttemptScanToAssignCredentialResultVisionlineMetadata( + bool? autoJoin = default, + ActionAttemptScanToAssignCredentialResultVisionlineMetadata.CardFunctionTypeEnum? cardFunctionType = + default, + string? cardId = default, + List? commonAcsEntranceIds = default, + string? credentialId = default, + List? guestAcsEntranceIds = default, + bool? isValid = default, + List? joinerAcsCredentialIds = default + ) + { + AutoJoin = autoJoin; + CardFunctionType = cardFunctionType; + CardId = cardId; + CommonAcsEntranceIds = commonAcsEntranceIds; + CredentialId = credentialId; + GuestAcsEntranceIds = guestAcsEntranceIds; + IsValid = isValid; + JoinerAcsCredentialIds = joinerAcsCredentialIds; + } + + /// + /// Card function type in the Visionline access system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CardFunctionTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "guest")] + Guest = 1, + + [EnumMember(Value = "staff")] + Staff = 2, + } + + /// + /// Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + /// + [DataMember(Name = "auto_join", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoJoin { get; set; } + + /// + /// Card function type in the Visionline access system. + /// + [DataMember(Name = "card_function_type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialResultVisionlineMetadata.CardFunctionTypeEnum? CardFunctionType { get; set; } + + /// + /// ID of the card in the Visionline access system. + /// + [DataMember(Name = "card_id", IsRequired = false, EmitDefaultValue = false)] + public string? CardId { get; set; } + + /// + /// Common entrance IDs in the Visionline access system. + /// + [DataMember(Name = "common_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? CommonAcsEntranceIds { get; set; } + + /// + /// ID of the credential in the Visionline access system. + /// + [DataMember(Name = "credential_id", IsRequired = false, EmitDefaultValue = false)] + public string? CredentialId { get; set; } + + /// + /// Guest entrance IDs in the Visionline access system. + /// + [DataMember(Name = "guest_acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List? GuestAcsEntranceIds { get; set; } + + /// + /// Indicates whether the credential is valid. + /// + [DataMember(Name = "is_valid", IsRequired = false, EmitDefaultValue = false)] + public bool? IsValid { get; set; } + + /// + /// IDs of the credentials to which you want to join. + /// + [DataMember( + Name = "joiner_acs_credential_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? JoinerAcsCredentialIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptScanToAssignCredentialResultWarnings_model")] + public class ActionAttemptScanToAssignCredentialResultWarnings + { + [JsonConstructorAttribute] + protected ActionAttemptScanToAssignCredentialResultWarnings() { } + + public ActionAttemptScanToAssignCredentialResultWarnings( + string createdAt = default, + string message = default, + ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, + string? newCode = default, + string? originalCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + NewCode = newCode; + OriginalCode = originalCode; + } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum WarningCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "waiting_to_be_issued")] + WaitingToBeIssued = 1, + + [EnumMember(Value = "schedule_externally_modified")] + ScheduleExternallyModified = 2, + + [EnumMember(Value = "schedule_modified")] + ScheduleModified = 3, + + [EnumMember(Value = "being_deleted")] + BeingDeleted = 4, + + [EnumMember(Value = "unknown_issue_with_acs_credential")] + UnknownIssueWithAcsCredential = 5, + + [EnumMember(Value = "needs_to_be_reissued")] + NeedsToBeReissued = 6, + + [EnumMember(Value = "requested_code_unavailable")] + RequestedCodeUnavailable = 7, + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptScanToAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + + /// + /// The PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string? NewCode { get; set; } + + /// + /// The originally requested PIN code that could not be used. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string? OriginalCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Assigning a credential to an access method is pending. + /// + [DataContract(Name = "seamModel_actionAttemptAssignCredential_model")] + public class ActionAttemptAssignCredential : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptAssignCredential() { } + + public ActionAttemptAssignCredential( + string actionAttemptId = default, + string actionType = default, + ActionAttemptAssignCredentialError error = default, + ActionAttemptAssignCredentialResult result = default, + ActionAttemptAssignCredential.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "ASSIGN_CREDENTIAL"; + + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialError Error { get; set; } + + /// + /// Result of assigning a credential. If successful, includes the updated access method with the assigned credential. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredential.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptAssignCredentialError_model")] + public class ActionAttemptAssignCredentialError + { + [JsonConstructorAttribute] + protected ActionAttemptAssignCredentialError() { } + + public ActionAttemptAssignCredentialError( + string message = default, + ActionAttemptAssignCredentialError.TypeEnum type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Error type to indicate that no matching credential was found. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "uncategorized_error")] + UncategorizedError = 1, + + [EnumMember(Value = "action_attempt_expired")] + ActionAttemptExpired = 2, + + [EnumMember(Value = "credential_not_found")] + CredentialNotFound = 3, + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Error type to indicate that no matching credential was found. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialError.TypeEnum Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptAssignCredentialResult_model")] + public class ActionAttemptAssignCredentialResult + { + [JsonConstructorAttribute] + protected ActionAttemptAssignCredentialResult() { } + + public ActionAttemptAssignCredentialResult( + string accessMethodId = default, + string? clientSessionToken = default, + string? code = default, + string createdAt = default, + string? customizationProfileId = default, + string displayName = default, + string displayStatus = default, + List errors = default, + string? instantKeyUrl = default, + bool? isAssignmentRequired = default, + bool? isEncodingRequired = default, + bool isIssued = default, + bool? isReadyForAssignment = default, + bool? isReadyForEncoding = default, + string? issuedAt = default, + ActionAttemptAssignCredentialResult.ModeEnum mode = default, + List pendingMutations = default, + List warnings = default, + string workspaceId = default + ) + { + AccessMethodId = accessMethodId; + ClientSessionToken = clientSessionToken; + Code = code; + CreatedAt = createdAt; + CustomizationProfileId = customizationProfileId; + DisplayName = displayName; + DisplayStatus = displayStatus; + Errors = errors; + InstantKeyUrl = instantKeyUrl; + IsAssignmentRequired = isAssignmentRequired; + IsEncodingRequired = isEncodingRequired; + IsIssued = isIssued; + IsReadyForAssignment = isReadyForAssignment; + IsReadyForEncoding = isReadyForEncoding; + IssuedAt = issuedAt; + Mode = mode; + PendingMutations = pendingMutations; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// ID of the access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Token of the client session associated with the access method. + /// + [DataMember(Name = "client_session_token", IsRequired = false, EmitDefaultValue = false)] + public string? ClientSessionToken { get; set; } + + /// + /// The actual PIN code for code access methods. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Date and time at which the access method was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the customization profile associated with the access method. + /// + [DataMember( + Name = "customization_profile_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomizationProfileId { get; set; } + + /// + /// Display name of the access method. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + + /// + /// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// URL of the Instant Key for mobile key access methods. + /// + [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] + public string? InstantKeyUrl { get; set; } + + /// + /// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + /// + [DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] + public bool? IsAssignmentRequired { get; set; } + + /// + /// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + /// + [DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] + public bool? IsEncodingRequired { get; set; } + + /// + /// Indicates whether the access method has been issued. + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool IsIssued { get; set; } + + /// + /// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + /// + [DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] + public bool? IsReadyForAssignment { get; set; } + + /// + /// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + /// + [DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] + public bool? IsReadyForEncoding { get; set; } + + /// + /// Date and time at which the access method was issued. + /// + [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] + public string? IssuedAt { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialResult.ModeEnum Mode { get; set; } + + /// + /// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the Seam workspace associated with the access method. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultErrors_model")] + public class ActionAttemptAssignCredentialResultErrors + { + [JsonConstructorAttribute] + protected ActionAttemptAssignCredentialResultErrors() { } + + public ActionAttemptAssignCredentialResultErrors( + string createdAt = default, + ActionAttemptAssignCredentialResultErrors.ErrorCodeEnum errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ErrorCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "failed_to_issue")] + FailedToIssue = 1, + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialResultErrors.ErrorCodeEnum ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutations_model")] + public class ActionAttemptAssignCredentialResultPendingMutations + { + [JsonConstructorAttribute] + protected ActionAttemptAssignCredentialResultPendingMutations() { } + + public ActionAttemptAssignCredentialResultPendingMutations( + string createdAt = default, + ActionAttemptAssignCredentialResultPendingMutationsFrom from = default, + string message = default, + ActionAttemptAssignCredentialResultPendingMutations.MutationCodeEnum mutationCode = + default, + ActionAttemptAssignCredentialResultPendingMutationsTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Mutation code to indicate that Seam is in the process of updating the access times for this access method. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum MutationCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "provisioning_access")] + ProvisioningAccess = 1, + + [EnumMember(Value = "revoking_access")] + RevokingAccess = 2, + + [EnumMember(Value = "updating_access_times")] + UpdatingAccessTimes = 3, + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Previous access time configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialResultPendingMutationsFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Mutation code to indicate that Seam is in the process of updating the access times for this access method. + /// + [DataMember(Name = "mutation_code", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialResultPendingMutations.MutationCodeEnum MutationCode { get; set; } + + /// + /// New access time configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialResultPendingMutationsTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutationsFrom_model")] + public class ActionAttemptAssignCredentialResultPendingMutationsFrom + { + [JsonConstructorAttribute] + protected ActionAttemptAssignCredentialResultPendingMutationsFrom() { } + + public ActionAttemptAssignCredentialResultPendingMutationsFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultPendingMutationsTo_model")] + public class ActionAttemptAssignCredentialResultPendingMutationsTo + { + [JsonConstructorAttribute] + protected ActionAttemptAssignCredentialResultPendingMutationsTo() { } + + public ActionAttemptAssignCredentialResultPendingMutationsTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptAssignCredentialResultWarnings_model")] + public class ActionAttemptAssignCredentialResultWarnings + { + [JsonConstructorAttribute] + protected ActionAttemptAssignCredentialResultWarnings() { } + + public ActionAttemptAssignCredentialResultWarnings( + string createdAt = default, + string message = default, + ActionAttemptAssignCredentialResultWarnings.WarningCodeEnum warningCode = default, + string? originalAccessMethodId = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + OriginalAccessMethodId = originalAccessMethodId; + } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum WarningCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "being_deleted")] + BeingDeleted = 1, + + [EnumMember(Value = "updating_access_times")] + UpdatingAccessTimes = 2, + + [EnumMember(Value = "pulled_backup_access_code")] + PulledBackupAccessCode = 3, + + [EnumMember(Value = "delay_in_issuing")] + DelayInIssuing = 4, + + [EnumMember(Value = "user_identity_missing_email_address")] + UserIdentityMissingEmailAddress = 5, + + [EnumMember(Value = "user_identity_missing_phone_number")] + UserIdentityMissingPhoneNumber = 6, + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptAssignCredentialResultWarnings.WarningCodeEnum WarningCode { get; set; } + + /// + /// ID of the original access method from which this backup access method was split, if applicable. + /// + [DataMember( + Name = "original_access_method_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? OriginalAccessMethodId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Resetting a sandbox workspace is pending. + /// + [DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspace_model")] + public class ActionAttemptResetSandboxWorkspace : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptResetSandboxWorkspace() { } + + public ActionAttemptResetSandboxWorkspace( + string actionAttemptId = default, + string actionType = default, + ActionAttemptResetSandboxWorkspaceError error = default, + ActionAttemptResetSandboxWorkspaceResult result = default, + ActionAttemptResetSandboxWorkspace.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "RESET_SANDBOX_WORKSPACE"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptResetSandboxWorkspaceError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptResetSandboxWorkspaceResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptResetSandboxWorkspace.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspaceError_model")] + public class ActionAttemptResetSandboxWorkspaceError + { + [JsonConstructorAttribute] + protected ActionAttemptResetSandboxWorkspaceError() { } + + public ActionAttemptResetSandboxWorkspaceError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptResetSandboxWorkspaceResult_model")] + public class ActionAttemptResetSandboxWorkspaceResult + { + [JsonConstructorAttribute] + public ActionAttemptResetSandboxWorkspaceResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Setting the fan mode is pending. + /// + [DataContract(Name = "seamModel_actionAttemptSetFanMode_model")] + public class ActionAttemptSetFanMode : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptSetFanMode() { } + + public ActionAttemptSetFanMode( + string actionAttemptId = default, + string actionType = default, + ActionAttemptSetFanModeError error = default, + ActionAttemptSetFanModeResult result = default, + ActionAttemptSetFanMode.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "SET_FAN_MODE"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSetFanModeError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSetFanModeResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSetFanMode.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSetFanModeError_model")] + public class ActionAttemptSetFanModeError + { + [JsonConstructorAttribute] + protected ActionAttemptSetFanModeError() { } + + public ActionAttemptSetFanModeError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSetFanModeResult_model")] + public class ActionAttemptSetFanModeResult + { + [JsonConstructorAttribute] + public ActionAttemptSetFanModeResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Setting the HVAC mode is pending. + /// + [DataContract(Name = "seamModel_actionAttemptSetHvacMode_model")] + public class ActionAttemptSetHvacMode : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptSetHvacMode() { } + + public ActionAttemptSetHvacMode( + string actionAttemptId = default, + string actionType = default, + ActionAttemptSetHvacModeError error = default, + ActionAttemptSetHvacModeResult result = default, + ActionAttemptSetHvacMode.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "SET_HVAC_MODE"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSetHvacModeError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSetHvacModeResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSetHvacMode.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSetHvacModeError_model")] + public class ActionAttemptSetHvacModeError + { + [JsonConstructorAttribute] + protected ActionAttemptSetHvacModeError() { } + + public ActionAttemptSetHvacModeError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSetHvacModeResult_model")] + public class ActionAttemptSetHvacModeResult + { + [JsonConstructorAttribute] + public ActionAttemptSetHvacModeResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Activating a climate preset is pending. + /// + [DataContract(Name = "seamModel_actionAttemptActivateClimatePreset_model")] + public class ActionAttemptActivateClimatePreset : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptActivateClimatePreset() { } + + public ActionAttemptActivateClimatePreset( + string actionAttemptId = default, + string actionType = default, + ActionAttemptActivateClimatePresetError error = default, + ActionAttemptActivateClimatePresetResult result = default, + ActionAttemptActivateClimatePreset.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "ACTIVATE_CLIMATE_PRESET"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptActivateClimatePresetError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptActivateClimatePresetResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptActivateClimatePreset.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptActivateClimatePresetError_model")] + public class ActionAttemptActivateClimatePresetError + { + [JsonConstructorAttribute] + protected ActionAttemptActivateClimatePresetError() { } + + public ActionAttemptActivateClimatePresetError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptActivateClimatePresetResult_model")] + public class ActionAttemptActivateClimatePresetResult + { + [JsonConstructorAttribute] + public ActionAttemptActivateClimatePresetResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Activating the weekly program is pending. + /// + [DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgram_model")] + public class ActionAttemptActivateWeeklyProgram : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptActivateWeeklyProgram() { } + + public ActionAttemptActivateWeeklyProgram( + string actionAttemptId = default, + string actionType = default, + ActionAttemptActivateWeeklyProgramError error = default, + ActionAttemptActivateWeeklyProgramResult result = default, + ActionAttemptActivateWeeklyProgram.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "ACTIVATE_WEEKLY_PROGRAM"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptActivateWeeklyProgramError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptActivateWeeklyProgramResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptActivateWeeklyProgram.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgramError_model")] + public class ActionAttemptActivateWeeklyProgramError + { + [JsonConstructorAttribute] + protected ActionAttemptActivateWeeklyProgramError() { } + + public ActionAttemptActivateWeeklyProgramError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptActivateWeeklyProgramResult_model")] + public class ActionAttemptActivateWeeklyProgramResult + { + [JsonConstructorAttribute] + public ActionAttemptActivateWeeklyProgramResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulating a keypad code entry is pending. + /// + [DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntry_model")] + public class ActionAttemptSimulateKeypadCodeEntry : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptSimulateKeypadCodeEntry() { } + + public ActionAttemptSimulateKeypadCodeEntry( + string actionAttemptId = default, + string actionType = default, + ActionAttemptSimulateKeypadCodeEntryError error = default, + ActionAttemptSimulateKeypadCodeEntryResult result = default, + ActionAttemptSimulateKeypadCodeEntry.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "SIMULATE_KEYPAD_CODE_ENTRY"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSimulateKeypadCodeEntryError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSimulateKeypadCodeEntryResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSimulateKeypadCodeEntry.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntryError_model")] + public class ActionAttemptSimulateKeypadCodeEntryError + { + [JsonConstructorAttribute] + protected ActionAttemptSimulateKeypadCodeEntryError() { } + + public ActionAttemptSimulateKeypadCodeEntryError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSimulateKeypadCodeEntryResult_model")] + public class ActionAttemptSimulateKeypadCodeEntryResult + { + [JsonConstructorAttribute] + public ActionAttemptSimulateKeypadCodeEntryResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Simulating a manual lock action using a keypad is pending. + /// + [DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypad_model")] + public class ActionAttemptSimulateManualLockViaKeypad : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptSimulateManualLockViaKeypad() { } + + public ActionAttemptSimulateManualLockViaKeypad( + string actionAttemptId = default, + string actionType = default, + ActionAttemptSimulateManualLockViaKeypadError error = default, + ActionAttemptSimulateManualLockViaKeypadResult result = default, + ActionAttemptSimulateManualLockViaKeypad.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "SIMULATE_MANUAL_LOCK_VIA_KEYPAD"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSimulateManualLockViaKeypadError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSimulateManualLockViaKeypadResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSimulateManualLockViaKeypad.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypadError_model")] + public class ActionAttemptSimulateManualLockViaKeypadError + { + [JsonConstructorAttribute] + protected ActionAttemptSimulateManualLockViaKeypadError() { } + + public ActionAttemptSimulateManualLockViaKeypadError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSimulateManualLockViaKeypadResult_model")] + public class ActionAttemptSimulateManualLockViaKeypadResult + { + [JsonConstructorAttribute] + public ActionAttemptSimulateManualLockViaKeypadResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Pushing thermostat weekly programs is pending. + /// + [DataContract(Name = "seamModel_actionAttemptPushThermostatPrograms_model")] + public class ActionAttemptPushThermostatPrograms : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptPushThermostatPrograms() { } + + public ActionAttemptPushThermostatPrograms( + string actionAttemptId = default, + string actionType = default, + ActionAttemptPushThermostatProgramsError error = default, + ActionAttemptPushThermostatProgramsResult result = default, + ActionAttemptPushThermostatPrograms.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "PUSH_THERMOSTAT_PROGRAMS"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptPushThermostatProgramsError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptPushThermostatProgramsResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptPushThermostatPrograms.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptPushThermostatProgramsError_model")] + public class ActionAttemptPushThermostatProgramsError + { + [JsonConstructorAttribute] + protected ActionAttemptPushThermostatProgramsError() { } + + public ActionAttemptPushThermostatProgramsError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptPushThermostatProgramsResult_model")] + public class ActionAttemptPushThermostatProgramsResult + { + [JsonConstructorAttribute] + public ActionAttemptPushThermostatProgramsResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Configuring the auto-lock is pending. + /// + [DataContract(Name = "seamModel_actionAttemptConfigureAutoLock_model")] + public class ActionAttemptConfigureAutoLock : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptConfigureAutoLock() { } + + public ActionAttemptConfigureAutoLock( + string actionAttemptId = default, + string actionType = default, + ActionAttemptConfigureAutoLockError error = default, + ActionAttemptConfigureAutoLockResult result = default, + ActionAttemptConfigureAutoLock.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "CONFIGURE_AUTO_LOCK"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptConfigureAutoLockError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptConfigureAutoLockResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptConfigureAutoLock.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptConfigureAutoLockError_model")] + public class ActionAttemptConfigureAutoLockError + { + [JsonConstructorAttribute] + protected ActionAttemptConfigureAutoLockError() { } + + public ActionAttemptConfigureAutoLockError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptConfigureAutoLockResult_model")] + public class ActionAttemptConfigureAutoLockResult + { + [JsonConstructorAttribute] + public ActionAttemptConfigureAutoLockResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSyncAccessCodes_model")] + public class ActionAttemptSyncAccessCodes : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptSyncAccessCodes() { } + + public ActionAttemptSyncAccessCodes( + string actionAttemptId = default, + string actionType = default, + ActionAttemptSyncAccessCodesError error = default, + ActionAttemptSyncAccessCodesResult result = default, + ActionAttemptSyncAccessCodes.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "SYNC_ACCESS_CODES"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSyncAccessCodesError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSyncAccessCodesResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptSyncAccessCodes.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSyncAccessCodesError_model")] + public class ActionAttemptSyncAccessCodesError + { + [JsonConstructorAttribute] + protected ActionAttemptSyncAccessCodesError() { } + + public ActionAttemptSyncAccessCodesError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptSyncAccessCodesResult_model")] + public class ActionAttemptSyncAccessCodesResult + { + [JsonConstructorAttribute] + public ActionAttemptSyncAccessCodesResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptCreateAccessCode_model")] + public class ActionAttemptCreateAccessCode : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptCreateAccessCode() { } + + public ActionAttemptCreateAccessCode( + string actionAttemptId = default, + string actionType = default, + ActionAttemptCreateAccessCodeError error = default, + ActionAttemptCreateAccessCodeResult result = default, + ActionAttemptCreateAccessCode.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "CREATE_ACCESS_CODE"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptCreateAccessCodeError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptCreateAccessCodeResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptCreateAccessCode.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptCreateAccessCodeError_model")] + public class ActionAttemptCreateAccessCodeError + { + [JsonConstructorAttribute] + protected ActionAttemptCreateAccessCodeError() { } + + public ActionAttemptCreateAccessCodeError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptCreateAccessCodeResult_model")] + public class ActionAttemptCreateAccessCodeResult + { + [JsonConstructorAttribute] + protected ActionAttemptCreateAccessCodeResult() { } + + public ActionAttemptCreateAccessCodeResult(object accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// Created access code. + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public object AccessCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptDeleteAccessCode_model")] + public class ActionAttemptDeleteAccessCode : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptDeleteAccessCode() { } + + public ActionAttemptDeleteAccessCode( + string actionAttemptId = default, + string actionType = default, + ActionAttemptDeleteAccessCodeError error = default, + ActionAttemptDeleteAccessCodeResult result = default, + ActionAttemptDeleteAccessCode.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "DELETE_ACCESS_CODE"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptDeleteAccessCodeError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptDeleteAccessCodeResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptDeleteAccessCode.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptDeleteAccessCodeError_model")] + public class ActionAttemptDeleteAccessCodeError + { + [JsonConstructorAttribute] + protected ActionAttemptDeleteAccessCodeError() { } + + public ActionAttemptDeleteAccessCodeError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptDeleteAccessCodeResult_model")] + public class ActionAttemptDeleteAccessCodeResult + { + [JsonConstructorAttribute] + public ActionAttemptDeleteAccessCodeResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUpdateAccessCode_model")] + public class ActionAttemptUpdateAccessCode : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptUpdateAccessCode() { } + + public ActionAttemptUpdateAccessCode( + string actionAttemptId = default, + string actionType = default, + ActionAttemptUpdateAccessCodeError error = default, + ActionAttemptUpdateAccessCodeResult result = default, + ActionAttemptUpdateAccessCode.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "UPDATE_ACCESS_CODE"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUpdateAccessCodeError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUpdateAccessCodeResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUpdateAccessCode.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUpdateAccessCodeError_model")] + public class ActionAttemptUpdateAccessCodeError + { + [JsonConstructorAttribute] + protected ActionAttemptUpdateAccessCodeError() { } + + public ActionAttemptUpdateAccessCodeError(string message = default, string type = default) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUpdateAccessCodeResult_model")] + public class ActionAttemptUpdateAccessCodeResult + { + [JsonConstructorAttribute] + protected ActionAttemptUpdateAccessCodeResult() { } + + public ActionAttemptUpdateAccessCodeResult(object? accessCode = default) + { + AccessCode = accessCode; + } + + /// + /// Updated access code. + /// + [DataMember(Name = "access_code", IsRequired = false, EmitDefaultValue = false)] + public object? AccessCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptCreateNoiseThreshold_model")] + public class ActionAttemptCreateNoiseThreshold : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptCreateNoiseThreshold() { } + + public ActionAttemptCreateNoiseThreshold( + string actionAttemptId = default, + string actionType = default, + ActionAttemptCreateNoiseThresholdError error = default, + ActionAttemptCreateNoiseThresholdResult result = default, + ActionAttemptCreateNoiseThreshold.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "CREATE_NOISE_THRESHOLD"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptCreateNoiseThresholdError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptCreateNoiseThresholdResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptCreateNoiseThreshold.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptCreateNoiseThresholdError_model")] + public class ActionAttemptCreateNoiseThresholdError + { + [JsonConstructorAttribute] + protected ActionAttemptCreateNoiseThresholdError() { } + + public ActionAttemptCreateNoiseThresholdError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptCreateNoiseThresholdResult_model")] + public class ActionAttemptCreateNoiseThresholdResult + { + [JsonConstructorAttribute] + protected ActionAttemptCreateNoiseThresholdResult() { } + + public ActionAttemptCreateNoiseThresholdResult(object noiseThreshold = default) + { + NoiseThreshold = noiseThreshold; + } + + /// + /// Created noise threshold. + /// + [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] + public object NoiseThreshold { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptDeleteNoiseThreshold_model")] + public class ActionAttemptDeleteNoiseThreshold : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptDeleteNoiseThreshold() { } + + public ActionAttemptDeleteNoiseThreshold( + string actionAttemptId = default, + string actionType = default, + ActionAttemptDeleteNoiseThresholdError error = default, + ActionAttemptDeleteNoiseThresholdResult result = default, + ActionAttemptDeleteNoiseThreshold.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "DELETE_NOISE_THRESHOLD"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptDeleteNoiseThresholdError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptDeleteNoiseThresholdResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptDeleteNoiseThreshold.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptDeleteNoiseThresholdError_model")] + public class ActionAttemptDeleteNoiseThresholdError + { + [JsonConstructorAttribute] + protected ActionAttemptDeleteNoiseThresholdError() { } + + public ActionAttemptDeleteNoiseThresholdError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptDeleteNoiseThresholdResult_model")] + public class ActionAttemptDeleteNoiseThresholdResult + { + [JsonConstructorAttribute] + public ActionAttemptDeleteNoiseThresholdResult() { } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUpdateNoiseThreshold_model")] + public class ActionAttemptUpdateNoiseThreshold : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptUpdateNoiseThreshold() { } + + public ActionAttemptUpdateNoiseThreshold( + string actionAttemptId = default, + string actionType = default, + ActionAttemptUpdateNoiseThresholdError error = default, + ActionAttemptUpdateNoiseThresholdResult result = default, + ActionAttemptUpdateNoiseThreshold.StatusEnum status = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + Error = error; + Result = result; + Status = status; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "success")] + Success = 1, + + [EnumMember(Value = "pending")] + Pending = 2, + + [EnumMember(Value = "error")] + Error = 3, + } + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "UPDATE_NOISE_THRESHOLD"; + + /// + /// Error associated with the action. + /// + [DataMember(Name = "error", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUpdateNoiseThresholdError Error { get; set; } + + /// + /// Result of the action. + /// + [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUpdateNoiseThresholdResult Result { get; set; } + + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ActionAttemptUpdateNoiseThreshold.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUpdateNoiseThresholdError_model")] + public class ActionAttemptUpdateNoiseThresholdError + { + [JsonConstructorAttribute] + protected ActionAttemptUpdateNoiseThresholdError() { } + + public ActionAttemptUpdateNoiseThresholdError( + string message = default, + string type = default + ) + { + Message = message; + Type = type; + } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Type of the error. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public string Type { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUpdateNoiseThresholdResult_model")] + public class ActionAttemptUpdateNoiseThresholdResult + { + [JsonConstructorAttribute] + protected ActionAttemptUpdateNoiseThresholdResult() { } + + public ActionAttemptUpdateNoiseThresholdResult(object noiseThreshold = default) + { + NoiseThreshold = noiseThreshold; + } + + /// + /// Updated noise threshold. + /// + [DataMember(Name = "noise_threshold", IsRequired = false, EmitDefaultValue = false)] + public object NoiseThreshold { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_actionAttemptUnrecognized_model")] + public class ActionAttemptUnrecognized : ActionAttempt + { + [JsonConstructorAttribute] + protected ActionAttemptUnrecognized() { } + + public ActionAttemptUnrecognized( + string actionType = default, + string actionAttemptId = default + ) + { + ActionType = actionType; + ActionAttemptId = actionAttemptId; + } + + [DataMember(Name = "action_type", IsRequired = true, EmitDefaultValue = false)] + public override string ActionType { get; } = "unrecognized"; + + /// + /// ID of the action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public override string ActionAttemptId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/Batch.cs b/src/Seam/Model/Batch.cs index e7340782..2e4388b4 100644 --- a/src/Seam/Model/Batch.cs +++ b/src/Seam/Model/Batch.cs @@ -8,282 +8,310 @@ namespace Seam.Model { -/// -/// A batch of workspace resources. -/// -[DataContract(Name = "seamModel_batch_model")] -public class Batch -{ -[JsonConstructorAttribute] -protected Batch() { } + /// + /// A batch of workspace resources. + /// + [DataContract(Name = "seamModel_batch_model")] + public class Batch + { + [JsonConstructorAttribute] + protected Batch() { } -public Batch(object? accessCodes = default, object? accessGrants = default, object? accessMethods = default, object? acsAccessGroups = default, object? acsCredentials = default, object? acsEncoders = default, object? acsEntrances = default, object? acsSystems = default, object? acsUsers = default, object? actionAttempts = default, object? clientSessions = default, object? connectWebviews = default, object? connectedAccounts = default, object? devices = default, object? events = default, object? instantKeys = default, object? noiseThresholds = default, object? spaces = default, object? thermostatDailyPrograms = default, object? thermostatSchedules = default, object? unmanagedAccessCodes = default, object? unmanagedDevices = default, object? userIdentities = default, object? workspaces = default) -{ -AccessCodes = accessCodes; -AccessGrants = accessGrants; -AccessMethods = accessMethods; -AcsAccessGroups = acsAccessGroups; -AcsCredentials = acsCredentials; -AcsEncoders = acsEncoders; -AcsEntrances = acsEntrances; -AcsSystems = acsSystems; -AcsUsers = acsUsers; -ActionAttempts = actionAttempts; -ClientSessions = clientSessions; -ConnectWebviews = connectWebviews; -ConnectedAccounts = connectedAccounts; -Devices = devices; -Events = events; -InstantKeys = instantKeys; -NoiseThresholds = noiseThresholds; -Spaces = spaces; -ThermostatDailyPrograms = thermostatDailyPrograms; -ThermostatSchedules = thermostatSchedules; -UnmanagedAccessCodes = unmanagedAccessCodes; -UnmanagedDevices = unmanagedDevices; -UserIdentities = userIdentities; -Workspaces = workspaces; -} + public Batch( + object? accessCodes = default, + object? accessGrants = default, + object? accessMethods = default, + object? acsAccessGroups = default, + object? acsCredentials = default, + object? acsEncoders = default, + object? acsEntrances = default, + object? acsSystems = default, + object? acsUsers = default, + object? actionAttempts = default, + object? clientSessions = default, + object? connectWebviews = default, + object? connectedAccounts = default, + object? devices = default, + object? events = default, + object? instantKeys = default, + object? noiseThresholds = default, + object? spaces = default, + object? thermostatDailyPrograms = default, + object? thermostatSchedules = default, + object? unmanagedAccessCodes = default, + object? unmanagedDevices = default, + object? userIdentities = default, + object? workspaces = default + ) + { + AccessCodes = accessCodes; + AccessGrants = accessGrants; + AccessMethods = accessMethods; + AcsAccessGroups = acsAccessGroups; + AcsCredentials = acsCredentials; + AcsEncoders = acsEncoders; + AcsEntrances = acsEntrances; + AcsSystems = acsSystems; + AcsUsers = acsUsers; + ActionAttempts = actionAttempts; + ClientSessions = clientSessions; + ConnectWebviews = connectWebviews; + ConnectedAccounts = connectedAccounts; + Devices = devices; + Events = events; + InstantKeys = instantKeys; + NoiseThresholds = noiseThresholds; + Spaces = spaces; + ThermostatDailyPrograms = thermostatDailyPrograms; + ThermostatSchedules = thermostatSchedules; + UnmanagedAccessCodes = unmanagedAccessCodes; + UnmanagedDevices = unmanagedDevices; + UserIdentities = userIdentities; + Workspaces = workspaces; + } -/// -/// Represents a smart lock [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -/// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. -/// -/// Seam supports programming two types of access codes: [ongoing](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. -/// -/// In addition, for certain devices, Seam also supports [offline access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. -/// -/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. -/// -[DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] -public object? AccessCodes { get; set; } + /// + /// Represents a smart lock [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + /// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. + /// + /// Seam supports programming two types of access codes: [ongoing](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. + /// + /// In addition, for certain devices, Seam also supports [offline access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. + /// + /// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + /// + [DataMember(Name = "access_codes", IsRequired = false, EmitDefaultValue = false)] + public object? AccessCodes { get; set; } -/// -/// Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. -/// -[DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] -public object? AccessGrants { get; set; } + /// + /// Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. + /// + [DataMember(Name = "access_grants", IsRequired = false, EmitDefaultValue = false)] + public object? AccessGrants { get; set; } -/// -/// Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. -/// -[DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] -public object? AccessMethods { get; set; } + /// + /// Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. + /// + [DataMember(Name = "access_methods", IsRequired = false, EmitDefaultValue = false)] + public object? AccessMethods { get; set; } -/// -/// Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. -/// -/// Some access control systems use [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. -/// -/// To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). -/// -[DataMember(Name = "acs_access_groups", IsRequired = false, EmitDefaultValue = false)] -public object? AcsAccessGroups { get; set; } + /// + /// Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. + /// + /// Some access control systems use [access group](https://www.seam.co/docs/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. + /// + /// To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). + /// + [DataMember(Name = "acs_access_groups", IsRequired = false, EmitDefaultValue = false)] + public object? AcsAccessGroups { get; set; } -/// -/// Means by which an [access control system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) gains access at an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. -/// -/// For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. -/// -/// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. -/// -[DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] -public object? AcsCredentials { get; set; } + /// + /// Means by which an [access control system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) gains access at an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. + /// + /// For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. + /// + /// For granting a person access to a space, [Access Grants](https://www.seam.co/docs/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. + /// + [DataMember(Name = "acs_credentials", IsRequired = false, EmitDefaultValue = false)] + public object? AcsCredentials { get; set; } -/// -/// Represents a hardware device that encodes [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: -/// -/// 1. Credential creation -/// Configure the access parameters for the credential. -/// 2. Card encoding -/// Write the credential data onto the card using a compatible card encoder. -/// -/// Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. -/// -/// See [Working with Card Encoders and Scanners](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). -/// -/// To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). -/// -[DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] -public object? AcsEncoders { get; set; } + /// + /// Represents a hardware device that encodes [credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: + /// + /// 1. Credential creation + /// Configure the access parameters for the credential. + /// 2. Card encoding + /// Write the credential data onto the card using a compatible card encoder. + /// + /// Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. + /// + /// See [Working with Card Encoders and Scanners](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + /// + /// To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). + /// + [DataMember(Name = "acs_encoders", IsRequired = false, EmitDefaultValue = false)] + public object? AcsEncoders { get; set; } -/// -/// Represents an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. -/// -[DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] -public object? AcsEntrances { get; set; } + /// + /// Represents an [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. + /// + [DataMember(Name = "acs_entrances", IsRequired = false, EmitDefaultValue = false)] + public object? AcsEntrances { get; set; } -/// -/// Represents an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// Within an `acs_system`, create [`acs_user`s](https://www.seam.co/docs/api/acs/users/object) and [`acs_credential`s](https://www.seam.co/docs/api/acs/credentials/object) to grant access to the `acs_user`s. -/// -/// For details about the resources associated with an access control system, see the [access control systems namespace](https://www.seam.co/docs/api/acs/object). -/// -[DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] -public object? AcsSystems { get; set; } + /// + /// Represents an [access control system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// Within an `acs_system`, create [`acs_user`s](https://www.seam.co/docs/api/acs/users/object) and [`acs_credential`s](https://www.seam.co/docs/api/acs/credentials/object) to grant access to the `acs_user`s. + /// + /// For details about the resources associated with an access control system, see the [access control systems namespace](https://www.seam.co/docs/api/acs/object). + /// + [DataMember(Name = "acs_systems", IsRequired = false, EmitDefaultValue = false)] + public object? AcsSystems { get; set; } -/// -/// Represents a [user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access system](https://www.seam.co/docs/low-level-apis/access-systems). -/// -/// An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. -/// -/// For details about how to configure users in your access system, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). -/// -[DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] -public object? AcsUsers { get; set; } + /// + /// Represents a [user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) in an [access system](https://www.seam.co/docs/low-level-apis/access-systems). + /// + /// An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. + /// + /// For details about how to configure users in your access system, see the corresponding [system integration guide](https://www.seam.co/docs/device-and-system-integration-guides#access-control-systems). + /// + [DataMember(Name = "acs_users", IsRequired = false, EmitDefaultValue = false)] + public object? AcsUsers { get; set; } -/// -/// Represents an action attempt that enables you to keep track of the progress of your action that affects a physical device or system.actions against a device. Action attempts are useful because the physical world is intrinsically asynchronous. -/// -/// When you request for a device to perform an action, the Seam API immediately returns an action attempt object. In the background, the Seam API performs the action. -/// -/// See also [Action Attempts](https://www.seam.co/docs/core-concepts/action-attempts). -/// -[DataMember(Name = "action_attempts", IsRequired = false, EmitDefaultValue = false)] -public object? ActionAttempts { get; set; } + /// + /// Represents an action attempt that enables you to keep track of the progress of your action that affects a physical device or system.actions against a device. Action attempts are useful because the physical world is intrinsically asynchronous. + /// + /// When you request for a device to perform an action, the Seam API immediately returns an action attempt object. In the background, the Seam API performs the action. + /// + /// See also [Action Attempts](https://www.seam.co/docs/core-concepts/action-attempts). + /// + [DataMember(Name = "action_attempts", IsRequired = false, EmitDefaultValue = false)] + public object? ActionAttempts { get; set; } -/// -/// Represents a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. -/// -/// You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. -/// -/// When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. -/// -/// A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. -/// -/// See also [Get Started with React](https://www.seam.co/docs/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). -/// -[DataMember(Name = "client_sessions", IsRequired = false, EmitDefaultValue = false)] -public object? ClientSessions { get; set; } + /// + /// Represents a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. + /// + /// You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. + /// + /// When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. + /// + /// A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. + /// + /// See also [Get Started with React](https://www.seam.co/docs/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). + /// + [DataMember(Name = "client_sessions", IsRequired = false, EmitDefaultValue = false)] + public object? ClientSessions { get; set; } -/// -/// Represents a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. -/// -/// Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. -/// -/// To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. -/// -/// When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. -/// -/// To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. -/// -[DataMember(Name = "connect_webviews", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectWebviews { get; set; } + /// + /// Represents a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. + /// + /// Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. + /// + /// To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. + /// + /// When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. + /// + /// To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. + /// + [DataMember(Name = "connect_webviews", IsRequired = false, EmitDefaultValue = false)] + public object? ConnectWebviews { get; set; } -/// -/// Represents a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. -/// -[DataMember(Name = "connected_accounts", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccounts { get; set; } + /// + /// Represents a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. + /// + [DataMember(Name = "connected_accounts", IsRequired = false, EmitDefaultValue = false)] + public object? ConnectedAccounts { get; set; } -/// -/// Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam. -/// -[DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] -public object? Devices { get; set; } + /// + /// Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam. + /// + [DataMember(Name = "devices", IsRequired = false, EmitDefaultValue = false)] + public object? Devices { get; set; } -/// -/// Represents an event. Events let you know when something interesting happens in your workspace. For example, when a lock is unlocked, Seam creates a `lock.unlocked` event. When a device's battery level is low, Seam creates a `device.battery_low` event. -/// -/// As with other API resources, you can retrieve an individual event or a list of events. Seam also provides a separate webhook system for sending the event objects directly to an endpoint on your sever. Manage webhooks through [Seam Console](https://console.seam.co). You can also use the webhooks sandbox in Seam Console to see the different payloads for each event and test them against your own endpoints. -/// -[DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] -public object? Events { get; set; } + /// + /// Represents an event. Events let you know when something interesting happens in your workspace. For example, when a lock is unlocked, Seam creates a `lock.unlocked` event. When a device's battery level is low, Seam creates a `device.battery_low` event. + /// + /// As with other API resources, you can retrieve an individual event or a list of events. Seam also provides a separate webhook system for sending the event objects directly to an endpoint on your sever. Manage webhooks through [Seam Console](https://console.seam.co). You can also use the webhooks sandbox in Seam Console to see the different payloads for each event and test them against your own endpoints. + /// + [DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] + public object? Events { get; set; } -/// -/// Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. -/// -/// There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. -/// -[DataMember(Name = "instant_keys", IsRequired = false, EmitDefaultValue = false)] -public object? InstantKeys { get; set; } + /// + /// Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. + /// + /// There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. + /// + [DataMember(Name = "instant_keys", IsRequired = false, EmitDefaultValue = false)] + public object? InstantKeys { get; set; } -/// -/// Represents a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. -/// -[DataMember(Name = "noise_thresholds", IsRequired = false, EmitDefaultValue = false)] -public object? NoiseThresholds { get; set; } + /// + /// Represents a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + /// + [DataMember(Name = "noise_thresholds", IsRequired = false, EmitDefaultValue = false)] + public object? NoiseThresholds { get; set; } -/// -/// Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. -/// -[DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] -public object? Spaces { get; set; } + /// + /// Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. + /// + [DataMember(Name = "spaces", IsRequired = false, EmitDefaultValue = false)] + public object? Spaces { get; set; } -/// -/// Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. -/// -[DataMember(Name = "thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] -public object? ThermostatDailyPrograms { get; set; } + /// + /// Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. + /// + [DataMember( + Name = "thermostat_daily_programs", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ThermostatDailyPrograms { get; set; } -/// -/// Represents a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. -/// -[DataMember(Name = "thermostat_schedules", IsRequired = false, EmitDefaultValue = false)] -public object? ThermostatSchedules { get; set; } + /// + /// Represents a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. + /// + [DataMember(Name = "thermostat_schedules", IsRequired = false, EmitDefaultValue = false)] + public object? ThermostatSchedules { get; set; } -/// -/// Represents an [unmanaged smart lock access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -/// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. -/// -/// When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. -/// -/// Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. -/// -/// Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: -/// -/// - [Kwikset](https://www.seam.co/docs/device-and-system-integration-guides/kwikset-locks) -/// -[DataMember(Name = "unmanaged_access_codes", IsRequired = false, EmitDefaultValue = false)] -public object? UnmanagedAccessCodes { get; set; } + /// + /// Represents an [unmanaged smart lock access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + /// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. + /// + /// When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. + /// + /// Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. + /// + /// Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: + /// + /// - [Kwikset](https://www.seam.co/docs/device-and-system-integration-guides/kwikset-locks) + /// + [DataMember(Name = "unmanaged_access_codes", IsRequired = false, EmitDefaultValue = false)] + public object? UnmanagedAccessCodes { get; set; } -/// -/// Represents an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -[DataMember(Name = "unmanaged_devices", IsRequired = false, EmitDefaultValue = false)] -public object? UnmanagedDevices { get; set; } + /// + /// Represents an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + [DataMember(Name = "unmanaged_devices", IsRequired = false, EmitDefaultValue = false)] + public object? UnmanagedDevices { get; set; } -/// -/// Represents a [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. -/// -[DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] -public object? UserIdentities { get; set; } + /// + /// Represents a [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. + /// + [DataMember(Name = "user_identities", IsRequired = false, EmitDefaultValue = false)] + public object? UserIdentities { get; set; } -/// -/// Represents a Seam [workspace](https://www.seam.co/docs/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://www.seam.co/docs/core-concepts/workspaces#production-workspaces). -/// -[DataMember(Name = "workspaces", IsRequired = false, EmitDefaultValue = false)] -public object? Workspaces { get; set; } + /// + /// Represents a Seam [workspace](https://www.seam.co/docs/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://www.seam.co/docs/core-concepts/workspaces#production-workspaces). + /// + [DataMember(Name = "workspaces", IsRequired = false, EmitDefaultValue = false)] + public object? Workspaces { get; set; } -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/CameraLiveViewAnswer.cs b/src/Seam/Model/CameraLiveViewAnswer.cs index 13157aa5..633316ef 100644 --- a/src/Seam/Model/CameraLiveViewAnswer.cs +++ b/src/Seam/Model/CameraLiveViewAnswer.cs @@ -8,44 +8,43 @@ namespace Seam.Model { -/// -/// Represents the WebRTC SDP answer that starts streaming video from a camera for a live view session. -/// -[DataContract(Name = "seamModel_cameraLiveViewAnswer_model")] -public class CameraLiveViewAnswer -{ -[JsonConstructorAttribute] -protected CameraLiveViewAnswer() { } + /// + /// Represents the WebRTC SDP answer that starts streaming video from a camera for a live view session. + /// + [DataContract(Name = "seamModel_cameraLiveViewAnswer_model")] + public class CameraLiveViewAnswer + { + [JsonConstructorAttribute] + protected CameraLiveViewAnswer() { } -public CameraLiveViewAnswer(string sdpAnswer = default) -{ -SdpAnswer = sdpAnswer; -} + public CameraLiveViewAnswer(string sdpAnswer = default) + { + SdpAnswer = sdpAnswer; + } -/// -/// WebRTC SDP answer for the offer, limited to 64 KiB of UTF-8 data. -/// -[DataMember(Name = "sdp_answer", IsRequired = false, EmitDefaultValue = false)] -public string SdpAnswer { get; set; } + /// + /// WebRTC SDP answer for the offer, limited to 64 KiB of UTF-8 data. + /// + [DataMember(Name = "sdp_answer", IsRequired = false, EmitDefaultValue = false)] + public string SdpAnswer { get; set; } -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/CameraLiveViewSession.cs b/src/Seam/Model/CameraLiveViewSession.cs index ddd58ee9..b6eff450 100644 --- a/src/Seam/Model/CameraLiveViewSession.cs +++ b/src/Seam/Model/CameraLiveViewSession.cs @@ -8,65 +8,73 @@ namespace Seam.Model { -/// -/// Represents a short-lived live view session for a single camera. Use the session ID and token to start a WebRTC stream and to stop the session. -/// -[DataContract(Name = "seamModel_cameraLiveViewSession_model")] -public class CameraLiveViewSession -{ -[JsonConstructorAttribute] -protected CameraLiveViewSession() { } + /// + /// Represents a short-lived live view session for a single camera. Use the session ID and token to start a WebRTC stream and to stop the session. + /// + [DataContract(Name = "seamModel_cameraLiveViewSession_model")] + public class CameraLiveViewSession + { + [JsonConstructorAttribute] + protected CameraLiveViewSession() { } -public CameraLiveViewSession(string cameraLiveViewSessionId = default, string deviceId = default, string expiresAt = default, string token = default) -{ -CameraLiveViewSessionId = cameraLiveViewSessionId; -DeviceId = deviceId; -ExpiresAt = expiresAt; -Token = token; -} + public CameraLiveViewSession( + string cameraLiveViewSessionId = default, + string deviceId = default, + string expiresAt = default, + string token = default + ) + { + CameraLiveViewSessionId = cameraLiveViewSessionId; + DeviceId = deviceId; + ExpiresAt = expiresAt; + Token = token; + } -/// -/// ID of the camera live view session. -/// -[DataMember(Name = "camera_live_view_session_id", IsRequired = false, EmitDefaultValue = false)] -public string CameraLiveViewSessionId { get; set; } + /// + /// ID of the camera live view session. + /// + [DataMember( + Name = "camera_live_view_session_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string CameraLiveViewSessionId { get; set; } -/// -/// ID of the camera. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } + /// + /// ID of the camera. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } -/// -/// Date and time at which the live view session expires. -/// -[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] -public string ExpiresAt { get; set; } + /// + /// Date and time at which the live view session expires. + /// + [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] + public string ExpiresAt { get; set; } -/// -/// Token that authorizes the offer and stop requests for this session. -/// -[DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] -public string Token { get; set; } + /// + /// Token that authorizes the offer and stop requests for this session. + /// + [DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] + public string Token { get; set; } -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/ClientSession.cs b/src/Seam/Model/ClientSession.cs index 09f18c68..003994c5 100644 --- a/src/Seam/Model/ClientSession.cs +++ b/src/Seam/Model/ClientSession.cs @@ -8,130 +8,142 @@ namespace Seam.Model { -/// -/// Represents a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. -/// -/// You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. -/// -/// When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. -/// -/// A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. -/// -/// See also [Get Started with React](https://www.seam.co/docs/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). -/// -[DataContract(Name = "seamModel_clientSession_model")] -public class ClientSession -{ -[JsonConstructorAttribute] -protected ClientSession() { } - -public ClientSession(string clientSessionId = default, List connectWebviewIds = default, List connectedAccountIds = default, string createdAt = default, string? customerKey = default, float deviceCount = default, string expiresAt = default, string token = default, string? userIdentifierKey = default, string? userIdentityId = default, List userIdentityIds = default, string workspaceId = default) -{ -ClientSessionId = clientSessionId; -ConnectWebviewIds = connectWebviewIds; -ConnectedAccountIds = connectedAccountIds; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCount = deviceCount; -ExpiresAt = expiresAt; -Token = token; -UserIdentifierKey = userIdentifierKey; -UserIdentityId = userIdentityId; -UserIdentityIds = userIdentityIds; -WorkspaceId = workspaceId; -} - -/// -/// ID of the client session. -/// -[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] -public string ClientSessionId { get; set; } - -/// -/// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -[DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] -public List ConnectWebviewIds { get; set; } - -/// -/// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -[DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountIds { get; set; } - -/// -/// Date and time at which the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Customer key associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Number of devices associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -[DataMember(Name = "device_count", IsRequired = false, EmitDefaultValue = false)] -public float DeviceCount { get; set; } - -/// -/// Date and time at which the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) expires. -/// -[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] -public string ExpiresAt { get; set; } - -/// -/// Client session token associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -[DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] -public string Token { get; set; } - -/// -/// Your user ID for the user associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). -/// -[DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentifierKey { get; set; } - -/// -/// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. -/// -[Obsolete("Use `user_identity_id` instead.")] -[DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] -public List UserIdentityIds { get; set; } - -/// -/// ID of the workspace associated with the client session. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. + /// + /// You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. + /// + /// When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. + /// + /// A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. + /// + /// See also [Get Started with React](https://www.seam.co/docs/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). + /// + [DataContract(Name = "seamModel_clientSession_model")] + public class ClientSession + { + [JsonConstructorAttribute] + protected ClientSession() { } + + public ClientSession( + string clientSessionId = default, + List connectWebviewIds = default, + List connectedAccountIds = default, + string createdAt = default, + string? customerKey = default, + float deviceCount = default, + string expiresAt = default, + string token = default, + string? userIdentifierKey = default, + string? userIdentityId = default, + List userIdentityIds = default, + string workspaceId = default + ) + { + ClientSessionId = clientSessionId; + ConnectWebviewIds = connectWebviewIds; + ConnectedAccountIds = connectedAccountIds; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCount = deviceCount; + ExpiresAt = expiresAt; + Token = token; + UserIdentifierKey = userIdentifierKey; + UserIdentityId = userIdentityId; + UserIdentityIds = userIdentityIds; + WorkspaceId = workspaceId; + } + + /// + /// ID of the client session. + /// + [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] + public string ClientSessionId { get; set; } + + /// + /// IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + [DataMember(Name = "connect_webview_ids", IsRequired = false, EmitDefaultValue = false)] + public List ConnectWebviewIds { get; set; } + + /// + /// IDs of the [connected accounts](https://www.seam.co/docs/core-concepts/connected-accounts) associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + [DataMember(Name = "connected_account_ids", IsRequired = false, EmitDefaultValue = false)] + public List ConnectedAccountIds { get; set; } + + /// + /// Date and time at which the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Customer key associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Number of devices associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + [DataMember(Name = "device_count", IsRequired = false, EmitDefaultValue = false)] + public float DeviceCount { get; set; } + + /// + /// Date and time at which the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens) expires. + /// + [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] + public string ExpiresAt { get; set; } + + /// + /// Client session token associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + [DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] + public string Token { get; set; } + + /// + /// Your user ID for the user associated with the [client session](https://www.seam.co/docs/core-concepts/authentication/client-session-tokens). + /// + [DataMember(Name = "user_identifier_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentifierKey { get; set; } + + /// + /// ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. + /// + [Obsolete("Use `user_identity_id` instead.")] + [DataMember(Name = "user_identity_ids", IsRequired = false, EmitDefaultValue = false)] + public List UserIdentityIds { get; set; } + + /// + /// ID of the workspace associated with the client session. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/ConnectWebview.cs b/src/Seam/Model/ConnectWebview.cs index 09723fe2..b7056f5a 100644 --- a/src/Seam/Model/ConnectWebview.cs +++ b/src/Seam/Model/ConnectWebview.cs @@ -8,243 +8,274 @@ namespace Seam.Model { -/// -/// Represents a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). -/// -/// Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. -/// -/// Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. -/// -/// To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. -/// -/// When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. -/// -/// To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. -/// -[DataContract(Name = "seamModel_connectWebview_model")] -public class ConnectWebview -{ -[JsonConstructorAttribute] -protected ConnectWebview() { } - -public ConnectWebview(List acceptedCapabilities = default, List acceptedProviders = default, bool anyProviderAllowed = default, string? authorizedAt = default, bool automaticallyManageNewDevices = default, string connectWebviewId = default, string? connectedAccountId = default, string createdAt = default, object customMetadata = default, string? customRedirectFailureUrl = default, string? customRedirectUrl = default, string? customerKey = default, ConnectWebview.DeviceSelectionModeEnum deviceSelectionMode = default, bool loginSuccessful = default, string? selectedProvider = default, ConnectWebview.StatusEnum status = default, string url = default, bool waitForDeviceCreation = default, string workspaceId = default) -{ -AcceptedCapabilities = acceptedCapabilities; -AcceptedProviders = acceptedProviders; -AnyProviderAllowed = anyProviderAllowed; -AuthorizedAt = authorizedAt; -AutomaticallyManageNewDevices = automaticallyManageNewDevices; -ConnectWebviewId = connectWebviewId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomMetadata = customMetadata; -CustomRedirectFailureUrl = customRedirectFailureUrl; -CustomRedirectUrl = customRedirectUrl; -CustomerKey = customerKey; -DeviceSelectionMode = deviceSelectionMode; -LoginSuccessful = loginSuccessful; -SelectedProvider = selectedProvider; -Status = status; -Url = url; -WaitForDeviceCreation = waitForDeviceCreation; -WorkspaceId = workspaceId; -} - -/// -/// High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AcceptedCapabilitiesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "lock")] -Lock = 1, - -[EnumMember(Value = "thermostat")] -Thermostat = 2, - -[EnumMember(Value = "noise_sensor")] -NoiseSensor = 3, - -[EnumMember(Value = "access_control")] -AccessControl = 4, - -[EnumMember(Value = "camera")] -Camera = 5, -} - -/// -/// Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceSelectionModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "none")] -None = 1, - -[EnumMember(Value = "single")] -Single = 2, - -[EnumMember(Value = "multiple")] -Multiple = 3, -} - -/// -/// Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pending")] -Pending = 1, - -[EnumMember(Value = "failed")] -Failed = 2, - -[EnumMember(Value = "authorized")] -Authorized = 3, -} - -/// -/// High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. -/// -[DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] -public List AcceptedCapabilities { get; set; } - -/// -/// List of accepted [provider keys](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). -/// -[DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] -public List AcceptedProviders { get; set; } - -/// -/// Indicates whether any provider is allowed. -/// -[DataMember(Name = "any_provider_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool AnyProviderAllowed { get; set; } - -/// -/// Date and time at which the user authorized (through the Connect Webview) the management of their devices. -/// -[DataMember(Name = "authorized_at", IsRequired = false, EmitDefaultValue = false)] -public string? AuthorizedAt { get; set; } - -/// -/// Indicates whether Seam should [import all new devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for use and management by the Seam API. -/// -[DataMember(Name = "automatically_manage_new_devices", IsRequired = false, EmitDefaultValue = false)] -public bool AutomaticallyManageNewDevices { get; set; } - -/// -/// ID of the Connect Webview. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectWebviewId { get; set; } - -/// -/// ID of the connected account associated with the Connect Webview. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the Connect Webview was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object CustomMetadata { get; set; } - -/// -/// URL to which the Connect Webview should redirect when an unexpected error occurs. -/// -[DataMember(Name = "custom_redirect_failure_url", IsRequired = false, EmitDefaultValue = false)] -public string? CustomRedirectFailureUrl { get; set; } - -/// -/// URL to which the Connect Webview should redirect when the user successfully pairs a device or system. If you do not set the `custom_redirect_failure_url`, the Connect Webview redirects to the `custom_redirect_url` when an unexpected error occurs. -/// -[DataMember(Name = "custom_redirect_url", IsRequired = false, EmitDefaultValue = false)] -public string? CustomRedirectUrl { get; set; } - -/// -/// The customer key associated with this webview, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. -/// -[DataMember(Name = "device_selection_mode", IsRequired = false, EmitDefaultValue = false)] -public ConnectWebview.DeviceSelectionModeEnum DeviceSelectionMode { get; set; } - -/// -/// Indicates whether the user logged in successfully using the Connect Webview. -/// -[DataMember(Name = "login_successful", IsRequired = false, EmitDefaultValue = false)] -public bool LoginSuccessful { get; set; } - -/// -/// Selected provider of the Connect Webview, one of the [provider keys](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). -/// -[DataMember(Name = "selected_provider", IsRequired = false, EmitDefaultValue = false)] -public string? SelectedProvider { get; set; } - -/// -/// Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public ConnectWebview.StatusEnum Status { get; set; } - -/// -/// URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. -/// -[DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] -public string Url { get; set; } - -/// -/// Indicates whether Seam should [finish syncing all devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#wait_for_device_creation) in a newly-connected account before completing the associated Connect Webview. -/// -[DataMember(Name = "wait_for_device_creation", IsRequired = false, EmitDefaultValue = false)] -public bool WaitForDeviceCreation { get; set; } - -/// -/// ID of the workspace that contains the Connect Webview. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews). + /// + /// Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. + /// + /// Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. + /// + /// To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. + /// + /// When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. + /// + /// To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. + /// + [DataContract(Name = "seamModel_connectWebview_model")] + public class ConnectWebview + { + [JsonConstructorAttribute] + protected ConnectWebview() { } + + public ConnectWebview( + List acceptedCapabilities = default, + List acceptedProviders = default, + bool anyProviderAllowed = default, + string? authorizedAt = default, + bool automaticallyManageNewDevices = default, + string connectWebviewId = default, + string? connectedAccountId = default, + string createdAt = default, + object customMetadata = default, + string? customRedirectFailureUrl = default, + string? customRedirectUrl = default, + string? customerKey = default, + ConnectWebview.DeviceSelectionModeEnum deviceSelectionMode = default, + bool loginSuccessful = default, + string? selectedProvider = default, + ConnectWebview.StatusEnum status = default, + string url = default, + bool waitForDeviceCreation = default, + string workspaceId = default + ) + { + AcceptedCapabilities = acceptedCapabilities; + AcceptedProviders = acceptedProviders; + AnyProviderAllowed = anyProviderAllowed; + AuthorizedAt = authorizedAt; + AutomaticallyManageNewDevices = automaticallyManageNewDevices; + ConnectWebviewId = connectWebviewId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomMetadata = customMetadata; + CustomRedirectFailureUrl = customRedirectFailureUrl; + CustomRedirectUrl = customRedirectUrl; + CustomerKey = customerKey; + DeviceSelectionMode = deviceSelectionMode; + LoginSuccessful = loginSuccessful; + SelectedProvider = selectedProvider; + Status = status; + Url = url; + WaitForDeviceCreation = waitForDeviceCreation; + WorkspaceId = workspaceId; + } + + /// + /// High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AcceptedCapabilitiesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "lock")] + Lock = 1, + + [EnumMember(Value = "thermostat")] + Thermostat = 2, + + [EnumMember(Value = "noise_sensor")] + NoiseSensor = 3, + + [EnumMember(Value = "access_control")] + AccessControl = 4, + + [EnumMember(Value = "camera")] + Camera = 5, + } + + /// + /// Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceSelectionModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "none")] + None = 1, + + [EnumMember(Value = "single")] + Single = 2, + + [EnumMember(Value = "multiple")] + Multiple = 3, + } + + /// + /// Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pending")] + Pending = 1, + + [EnumMember(Value = "failed")] + Failed = 2, + + [EnumMember(Value = "authorized")] + Authorized = 3, + } + + /// + /// High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. + /// + [DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] + public List AcceptedCapabilities { get; set; } + + /// + /// List of accepted [provider keys](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + /// + [DataMember(Name = "accepted_providers", IsRequired = false, EmitDefaultValue = false)] + public List AcceptedProviders { get; set; } + + /// + /// Indicates whether any provider is allowed. + /// + [DataMember(Name = "any_provider_allowed", IsRequired = false, EmitDefaultValue = false)] + public bool AnyProviderAllowed { get; set; } + + /// + /// Date and time at which the user authorized (through the Connect Webview) the management of their devices. + /// + [DataMember(Name = "authorized_at", IsRequired = false, EmitDefaultValue = false)] + public string? AuthorizedAt { get; set; } + + /// + /// Indicates whether Seam should [import all new devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for use and management by the Seam API. + /// + [DataMember( + Name = "automatically_manage_new_devices", + IsRequired = false, + EmitDefaultValue = false + )] + public bool AutomaticallyManageNewDevices { get; set; } + + /// + /// ID of the Connect Webview. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectWebviewId { get; set; } + + /// + /// ID of the connected account associated with the Connect Webview. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the Connect Webview was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object CustomMetadata { get; set; } + + /// + /// URL to which the Connect Webview should redirect when an unexpected error occurs. + /// + [DataMember( + Name = "custom_redirect_failure_url", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomRedirectFailureUrl { get; set; } + + /// + /// URL to which the Connect Webview should redirect when the user successfully pairs a device or system. If you do not set the `custom_redirect_failure_url`, the Connect Webview redirects to the `custom_redirect_url` when an unexpected error occurs. + /// + [DataMember(Name = "custom_redirect_url", IsRequired = false, EmitDefaultValue = false)] + public string? CustomRedirectUrl { get; set; } + + /// + /// The customer key associated with this webview, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. + /// + [DataMember(Name = "device_selection_mode", IsRequired = false, EmitDefaultValue = false)] + public ConnectWebview.DeviceSelectionModeEnum DeviceSelectionMode { get; set; } + + /// + /// Indicates whether the user logged in successfully using the Connect Webview. + /// + [DataMember(Name = "login_successful", IsRequired = false, EmitDefaultValue = false)] + public bool LoginSuccessful { get; set; } + + /// + /// Selected provider of the Connect Webview, one of the [provider keys](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + /// + [DataMember(Name = "selected_provider", IsRequired = false, EmitDefaultValue = false)] + public string? SelectedProvider { get; set; } + + /// + /// Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public ConnectWebview.StatusEnum Status { get; set; } + + /// + /// URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. + /// + [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] + public string Url { get; set; } + + /// + /// Indicates whether Seam should [finish syncing all devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#wait_for_device_creation) in a newly-connected account before completing the associated Connect Webview. + /// + [DataMember( + Name = "wait_for_device_creation", + IsRequired = false, + EmitDefaultValue = false + )] + public bool WaitForDeviceCreation { get; set; } + + /// + /// ID of the workspace that contains the Connect Webview. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/ConnectedAccount.cs b/src/Seam/Model/ConnectedAccount.cs index 415b016c..56281762 100644 --- a/src/Seam/Model/ConnectedAccount.cs +++ b/src/Seam/Model/ConnectedAccount.cs @@ -8,1242 +8,1449 @@ namespace Seam.Model { -/// -/// Represents a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. -/// -[DataContract(Name = "seamModel_connectedAccount_model")] -public class ConnectedAccount -{ -[JsonConstructorAttribute] -protected ConnectedAccount() { } - -public ConnectedAccount(List acceptedCapabilities = default, string? accountType = default, string accountTypeDisplayName = default, bool automaticallyManageNewDevices = default, string connectedAccountId = default, string? createdAt = default, object customMetadata = default, string? customerKey = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string displayName = default, List errors = default, string? icalFeedOrigin = default, string? icalUrl = default, string? imageUrl = default, string? timeZone = default, ConnectedAccountUserIdentifier? userIdentifier = default, List warnings = default) -{ -AcceptedCapabilities = acceptedCapabilities; -AccountType = accountType; -AccountTypeDisplayName = accountTypeDisplayName; -AutomaticallyManageNewDevices = automaticallyManageNewDevices; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomMetadata = customMetadata; -CustomerKey = customerKey; -DefaultCheckinTime = defaultCheckinTime; -DefaultCheckoutTime = defaultCheckoutTime; -DisplayName = displayName; -Errors = errors; -IcalFeedOrigin = icalFeedOrigin; -IcalUrl = icalUrl; -ImageUrl = imageUrl; -TimeZone = timeZone; -UserIdentifier = userIdentifier; -Warnings = warnings; -} - -/// -/// List of capabilities that were accepted during the account connection process. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AcceptedCapabilitiesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "lock")] -Lock = 1, - -[EnumMember(Value = "thermostat")] -Thermostat = 2, - -[EnumMember(Value = "noise_sensor")] -NoiseSensor = 3, - -[EnumMember(Value = "access_control")] -AccessControl = 4, - -[EnumMember(Value = "camera")] -Camera = 5, -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(ConnectedAccountErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountErrorsBridgeDisconnected), "bridge_disconnected")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountErrorsAccountDisconnected), "account_disconnected")] -public abstract class ConnectedAccountErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract bool? IsBridgeError { get; set; } - -public abstract bool? IsConnectedAccountError { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_connectedAccountErrorsAccountDisconnected_model")] -public class ConnectedAccountErrorsAccountDisconnected : ConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected ConnectedAccountErrorsAccountDisconnected() { } - -public ConnectedAccountErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "account_disconnected"; - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountErrorsBridgeDisconnected_model")] -public class ConnectedAccountErrorsBridgeDisconnected : ConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected ConnectedAccountErrorsBridgeDisconnected() { } - -public ConnectedAccountErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "bridge_disconnected"; - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceeded_model")] -public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded : ConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded() { } - -public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default, ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata saltoKsMetadata = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -SaltoKsMetadata = saltoKsMetadata; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// Salto KS metadata associated with the connected account that has an error. -/// -[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] -public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata SaltoKsMetadata { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata_model")] -public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata -{ -[JsonConstructorAttribute] -protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata() { } - -public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata(List? sites = default) -{ -Sites = sites; -} - -/// -/// Salto sites associated with the connected account that has an error. -/// -[DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] -public List? Sites { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites_model")] -public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites -{ -[JsonConstructorAttribute] -protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites() { } - -public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites(string? siteId = default, string? siteName = default, int? siteUserSubscriptionLimit = default, int? subscribedSiteUserCount = default) -{ -SiteId = siteId; -SiteName = siteName; -SiteUserSubscriptionLimit = siteUserSubscriptionLimit; -SubscribedSiteUserCount = subscribedSiteUserCount; -} - -/// -/// ID of a Salto site associated with the connected account that has an error. -/// -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public string? SiteId { get; set; } - -/// -/// Name of a Salto site associated with the connected account that has an error. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -/// -/// Subscription limit of site users for a Salto site associated with the connected account that has an error. -/// -[DataMember(Name = "site_user_subscription_limit", IsRequired = false, EmitDefaultValue = false)] -public int? SiteUserSubscriptionLimit { get; set; } - -/// -/// Count of subscribed site users for a Salto site associated with the connected account that has an error. -/// -[DataMember(Name = "subscribed_site_user_count", IsRequired = false, EmitDefaultValue = false)] -public int? SubscribedSiteUserCount { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountErrorsDormakabaSitesDisconnected_model")] -public class ConnectedAccountErrorsDormakabaSitesDisconnected : ConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected ConnectedAccountErrorsDormakabaSitesDisconnected() { } - -public ConnectedAccountErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountErrorsUnrecognized_model")] -public class ConnectedAccountErrorsUnrecognized : ConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected ConnectedAccountErrorsUnrecognized() { } - -public ConnectedAccountErrorsUnrecognized(string errorCode = default, string createdAt = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public override bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(ConnectedAccountWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsDormakabaSitesUnapproved), "dormakaba_sites_unapproved")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsSetupRequired), "setup_required")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsProviderServiceUnavailable), "provider_service_unavailable")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsBeingDeleted), "being_deleted")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsAccountReauthorizationRequested), "account_reauthorization_requested")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached), "salto_ks_subscription_limit_almost_reached")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsUnknownIssueWithConnectedAccount), "unknown_issue_with_connected_account")] -[JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsScheduledMaintenanceWindow), "scheduled_maintenance_window")] -public abstract class ConnectedAccountWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_connectedAccountWarningsScheduledMaintenanceWindow_model")] -public class ConnectedAccountWarningsScheduledMaintenanceWindow : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsScheduledMaintenanceWindow() { } - -public ConnectedAccountWarningsScheduledMaintenanceWindow(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "scheduled_maintenance_window"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsUnknownIssueWithConnectedAccount_model")] -public class ConnectedAccountWarningsUnknownIssueWithConnectedAccount : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsUnknownIssueWithConnectedAccount() { } - -public ConnectedAccountWarningsUnknownIssueWithConnectedAccount(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unknown_issue_with_connected_account"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached_model")] -public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached() { } - -public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached(string createdAt = default, string message = default, ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata saltoKsMetadata = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -SaltoKsMetadata = saltoKsMetadata; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// Salto KS metadata associated with the connected account that has a warning. -/// -[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] -public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata SaltoKsMetadata { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_subscription_limit_almost_reached"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata_model")] -public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata() { } - -public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata(List? sites = default) -{ -Sites = sites; -} - -/// -/// Salto sites associated with the connected account that has a warning. -/// -[DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] -public List? Sites { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites_model")] -public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites() { } - -public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites(string? siteId = default, string? siteName = default, int? siteUserSubscriptionLimit = default, int? subscribedSiteUserCount = default) -{ -SiteId = siteId; -SiteName = siteName; -SiteUserSubscriptionLimit = siteUserSubscriptionLimit; -SubscribedSiteUserCount = subscribedSiteUserCount; -} - -/// -/// ID of a Salto site associated with the connected account that has a warning. -/// -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public string? SiteId { get; set; } - -/// -/// Name of a Salto site associated with the connected account that has a warning. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -/// -/// Subscription limit of site users for a Salto site associated with the connected account that has a warning. -/// -[DataMember(Name = "site_user_subscription_limit", IsRequired = false, EmitDefaultValue = false)] -public int? SiteUserSubscriptionLimit { get; set; } - -/// -/// Count of subscribed site users for a Salto site associated with the connected account that has a warning. -/// -[DataMember(Name = "subscribed_site_user_count", IsRequired = false, EmitDefaultValue = false)] -public int? SubscribedSiteUserCount { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsAccountReauthorizationRequested_model")] -public class ConnectedAccountWarningsAccountReauthorizationRequested : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsAccountReauthorizationRequested() { } - -public ConnectedAccountWarningsAccountReauthorizationRequested(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "account_reauthorization_requested"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsBeingDeleted_model")] -public class ConnectedAccountWarningsBeingDeleted : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsBeingDeleted() { } - -public ConnectedAccountWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsProviderServiceUnavailable_model")] -public class ConnectedAccountWarningsProviderServiceUnavailable : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsProviderServiceUnavailable() { } - -public ConnectedAccountWarningsProviderServiceUnavailable(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "provider_service_unavailable"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsSetupRequired_model")] -public class ConnectedAccountWarningsSetupRequired : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsSetupRequired() { } - -public ConnectedAccountWarningsSetupRequired(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "setup_required"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsDormakabaSitesUnapproved_model")] -public class ConnectedAccountWarningsDormakabaSitesUnapproved : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsDormakabaSitesUnapproved() { } - -public ConnectedAccountWarningsDormakabaSitesUnapproved(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "dormakaba_sites_unapproved"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountWarningsUnrecognized_model")] -public class ConnectedAccountWarningsUnrecognized : ConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected ConnectedAccountWarningsUnrecognized() { } - -public ConnectedAccountWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// List of capabilities that were accepted during the account connection process. -/// -[DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] -public List AcceptedCapabilities { get; set; } - -/// -/// Type of connected account. -/// -[DataMember(Name = "account_type", IsRequired = false, EmitDefaultValue = false)] -public string? AccountType { get; set; } - -/// -/// Display name for the connected account type. -/// -[DataMember(Name = "account_type_display_name", IsRequired = false, EmitDefaultValue = false)] -public string AccountTypeDisplayName { get; set; } - -/// -/// Indicates whether Seam should [import all new devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for management by the Seam API. -/// -[DataMember(Name = "automatically_manage_new_devices", IsRequired = false, EmitDefaultValue = false)] -public bool AutomaticallyManageNewDevices { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the connected account was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -/// -/// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object CustomMetadata { get; set; } - -/// -/// Your unique key for the customer associated with this connected account. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Default reservation check-in time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration — set during the connect_webview for providers like Lodgify whose API does not expose check-in times. -/// -[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckinTime { get; set; } - -/// -/// Default reservation check-out time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration. -/// -[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckoutTime { get; set; } - -/// -/// Display name for the connected account. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// For iCal connected accounts, the platform that produced the feed (for example, `airbnb`, `vrbo`, or `booking`), or `unknown` when it could not be determined. Intended for rendering the source platform's logo. -/// -[DataMember(Name = "ical_feed_origin", IsRequired = false, EmitDefaultValue = false)] -public string? IcalFeedOrigin { get; set; } - -/// -/// For iCal connected accounts, the feed URL for the connection. Sourced from the connector configuration. -/// -[DataMember(Name = "ical_url", IsRequired = false, EmitDefaultValue = false)] -public string? IcalUrl { get; set; } - -/// -/// Logo URL for the connected account provider. -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string? ImageUrl { get; set; } - -/// -/// IANA time zone (e.g. America/Los_Angeles) for this connected account. Sourced from the connector configuration. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -/// -/// User identifier associated with the connected account. -/// -[Obsolete("Use `display_name` instead.")] -[DataMember(Name = "user_identifier", IsRequired = false, EmitDefaultValue = false)] -public ConnectedAccountUserIdentifier? UserIdentifier { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_connectedAccountUserIdentifier_model")] -public class ConnectedAccountUserIdentifier -{ -[JsonConstructorAttribute] -protected ConnectedAccountUserIdentifier() { } - -public ConnectedAccountUserIdentifier(string? apiUrl = default, string? email = default, bool? exclusive = default, string? phone = default, string? username = default) -{ -ApiUrl = apiUrl; -Email = email; -Exclusive = exclusive; -Phone = phone; -Username = username; -} - -/// -/// API URL for the user identifier associated with the connected account. -/// -[DataMember(Name = "api_url", IsRequired = false, EmitDefaultValue = false)] -public string? ApiUrl { get; set; } - -/// -/// Email address of the user identifier associated with the connected account. -/// -[DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] -public string? Email { get; set; } - -/// -/// Indicates whether the user identifier associated with the connected account is exclusive. -/// -[DataMember(Name = "exclusive", IsRequired = false, EmitDefaultValue = false)] -public bool? Exclusive { get; set; } - -/// -/// Phone number of the user identifier associated with the connected account. -/// -[DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] -public string? Phone { get; set; } - -/// -/// Username of the user identifier associated with the connected account. -/// -[DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] -public string? Username { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a [connected account](https://www.seam.co/docs/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. + /// + [DataContract(Name = "seamModel_connectedAccount_model")] + public class ConnectedAccount + { + [JsonConstructorAttribute] + protected ConnectedAccount() { } + + public ConnectedAccount( + List acceptedCapabilities = default, + string? accountType = default, + string accountTypeDisplayName = default, + bool automaticallyManageNewDevices = default, + string connectedAccountId = default, + string? createdAt = default, + object customMetadata = default, + string? customerKey = default, + string? defaultCheckinTime = default, + string? defaultCheckoutTime = default, + string displayName = default, + List errors = default, + string? icalFeedOrigin = default, + string? icalUrl = default, + string? imageUrl = default, + string? timeZone = default, + ConnectedAccountUserIdentifier? userIdentifier = default, + List warnings = default + ) + { + AcceptedCapabilities = acceptedCapabilities; + AccountType = accountType; + AccountTypeDisplayName = accountTypeDisplayName; + AutomaticallyManageNewDevices = automaticallyManageNewDevices; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomMetadata = customMetadata; + CustomerKey = customerKey; + DefaultCheckinTime = defaultCheckinTime; + DefaultCheckoutTime = defaultCheckoutTime; + DisplayName = displayName; + Errors = errors; + IcalFeedOrigin = icalFeedOrigin; + IcalUrl = icalUrl; + ImageUrl = imageUrl; + TimeZone = timeZone; + UserIdentifier = userIdentifier; + Warnings = warnings; + } + + /// + /// List of capabilities that were accepted during the account connection process. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AcceptedCapabilitiesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "lock")] + Lock = 1, + + [EnumMember(Value = "thermostat")] + Thermostat = 2, + + [EnumMember(Value = "noise_sensor")] + NoiseSensor = 3, + + [EnumMember(Value = "access_control")] + AccessControl = 4, + + [EnumMember(Value = "camera")] + Camera = 5, + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(ConnectedAccountErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountErrorsDormakabaSitesDisconnected), + "dormakaba_sites_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded), + "salto_ks_subscription_limit_exceeded" + )] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountErrorsBridgeDisconnected), + "bridge_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountErrorsAccountDisconnected), + "account_disconnected" + )] + public abstract class ConnectedAccountErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract bool? IsBridgeError { get; set; } + + public abstract bool? IsConnectedAccountError { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_connectedAccountErrorsAccountDisconnected_model")] + public class ConnectedAccountErrorsAccountDisconnected : ConnectedAccountErrors + { + [JsonConstructorAttribute] + protected ConnectedAccountErrorsAccountDisconnected() { } + + public ConnectedAccountErrorsAccountDisconnected( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "account_disconnected"; + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public override bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public override bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountErrorsBridgeDisconnected_model")] + public class ConnectedAccountErrorsBridgeDisconnected : ConnectedAccountErrors + { + [JsonConstructorAttribute] + protected ConnectedAccountErrorsBridgeDisconnected() { } + + public ConnectedAccountErrorsBridgeDisconnected( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "bridge_disconnected"; + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public override bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public override bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceeded_model" + )] + public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded : ConnectedAccountErrors + { + [JsonConstructorAttribute] + protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded() { } + + public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceeded( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default, + ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata saltoKsMetadata = + default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + SaltoKsMetadata = saltoKsMetadata; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public override bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public override bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// Salto KS metadata associated with the connected account that has an error. + /// + [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] + public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata SaltoKsMetadata { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata_model" + )] + public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata + { + [JsonConstructorAttribute] + protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata() { } + + public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadata( + List? sites = + default + ) + { + Sites = sites; + } + + /// + /// Salto sites associated with the connected account that has an error. + /// + [DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] + public List? Sites { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_connectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites_model" + )] + public class ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites + { + [JsonConstructorAttribute] + protected ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites() + { } + + public ConnectedAccountErrorsSaltoKsSubscriptionLimitExceededSaltoKsMetadataSites( + string? siteId = default, + string? siteName = default, + int? siteUserSubscriptionLimit = default, + int? subscribedSiteUserCount = default + ) + { + SiteId = siteId; + SiteName = siteName; + SiteUserSubscriptionLimit = siteUserSubscriptionLimit; + SubscribedSiteUserCount = subscribedSiteUserCount; + } + + /// + /// ID of a Salto site associated with the connected account that has an error. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public string? SiteId { get; set; } + + /// + /// Name of a Salto site associated with the connected account that has an error. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + /// + /// Subscription limit of site users for a Salto site associated with the connected account that has an error. + /// + [DataMember( + Name = "site_user_subscription_limit", + IsRequired = false, + EmitDefaultValue = false + )] + public int? SiteUserSubscriptionLimit { get; set; } + + /// + /// Count of subscribed site users for a Salto site associated with the connected account that has an error. + /// + [DataMember( + Name = "subscribed_site_user_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int? SubscribedSiteUserCount { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountErrorsDormakabaSitesDisconnected_model")] + public class ConnectedAccountErrorsDormakabaSitesDisconnected : ConnectedAccountErrors + { + [JsonConstructorAttribute] + protected ConnectedAccountErrorsDormakabaSitesDisconnected() { } + + public ConnectedAccountErrorsDormakabaSitesDisconnected( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public override bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public override bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountErrorsUnrecognized_model")] + public class ConnectedAccountErrorsUnrecognized : ConnectedAccountErrors + { + [JsonConstructorAttribute] + protected ConnectedAccountErrorsUnrecognized() { } + + public ConnectedAccountErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public override bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public override bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(ConnectedAccountWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountWarningsDormakabaSitesUnapproved), + "dormakaba_sites_unapproved" + )] + [JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsSetupRequired), "setup_required")] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountWarningsProviderServiceUnavailable), + "provider_service_unavailable" + )] + [JsonSubtypes.KnownSubType(typeof(ConnectedAccountWarningsBeingDeleted), "being_deleted")] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountWarningsAccountReauthorizationRequested), + "account_reauthorization_requested" + )] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached), + "salto_ks_subscription_limit_almost_reached" + )] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountWarningsUnknownIssueWithConnectedAccount), + "unknown_issue_with_connected_account" + )] + [JsonSubtypes.KnownSubType( + typeof(ConnectedAccountWarningsScheduledMaintenanceWindow), + "scheduled_maintenance_window" + )] + public abstract class ConnectedAccountWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_connectedAccountWarningsScheduledMaintenanceWindow_model")] + public class ConnectedAccountWarningsScheduledMaintenanceWindow : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsScheduledMaintenanceWindow() { } + + public ConnectedAccountWarningsScheduledMaintenanceWindow( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "scheduled_maintenance_window"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_connectedAccountWarningsUnknownIssueWithConnectedAccount_model" + )] + public class ConnectedAccountWarningsUnknownIssueWithConnectedAccount + : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsUnknownIssueWithConnectedAccount() { } + + public ConnectedAccountWarningsUnknownIssueWithConnectedAccount( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_connected_account"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached_model" + )] + public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached + : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached() { } + + public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReached( + string createdAt = default, + string message = default, + ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata saltoKsMetadata = + default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + SaltoKsMetadata = saltoKsMetadata; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// Salto KS metadata associated with the connected account that has a warning. + /// + [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] + public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata SaltoKsMetadata { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "salto_ks_subscription_limit_almost_reached"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata_model" + )] + public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata() + { } + + public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadata( + List? sites = + default + ) + { + Sites = sites; + } + + /// + /// Salto sites associated with the connected account that has a warning. + /// + [DataMember(Name = "sites", IsRequired = false, EmitDefaultValue = false)] + public List? Sites { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_connectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites_model" + )] + public class ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites() + { } + + public ConnectedAccountWarningsSaltoKsSubscriptionLimitAlmostReachedSaltoKsMetadataSites( + string? siteId = default, + string? siteName = default, + int? siteUserSubscriptionLimit = default, + int? subscribedSiteUserCount = default + ) + { + SiteId = siteId; + SiteName = siteName; + SiteUserSubscriptionLimit = siteUserSubscriptionLimit; + SubscribedSiteUserCount = subscribedSiteUserCount; + } + + /// + /// ID of a Salto site associated with the connected account that has a warning. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public string? SiteId { get; set; } + + /// + /// Name of a Salto site associated with the connected account that has a warning. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + /// + /// Subscription limit of site users for a Salto site associated with the connected account that has a warning. + /// + [DataMember( + Name = "site_user_subscription_limit", + IsRequired = false, + EmitDefaultValue = false + )] + public int? SiteUserSubscriptionLimit { get; set; } + + /// + /// Count of subscribed site users for a Salto site associated with the connected account that has a warning. + /// + [DataMember( + Name = "subscribed_site_user_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int? SubscribedSiteUserCount { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_connectedAccountWarningsAccountReauthorizationRequested_model" + )] + public class ConnectedAccountWarningsAccountReauthorizationRequested + : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsAccountReauthorizationRequested() { } + + public ConnectedAccountWarningsAccountReauthorizationRequested( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "account_reauthorization_requested"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountWarningsBeingDeleted_model")] + public class ConnectedAccountWarningsBeingDeleted : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsBeingDeleted() { } + + public ConnectedAccountWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountWarningsProviderServiceUnavailable_model")] + public class ConnectedAccountWarningsProviderServiceUnavailable : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsProviderServiceUnavailable() { } + + public ConnectedAccountWarningsProviderServiceUnavailable( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "provider_service_unavailable"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountWarningsSetupRequired_model")] + public class ConnectedAccountWarningsSetupRequired : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsSetupRequired() { } + + public ConnectedAccountWarningsSetupRequired( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "setup_required"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountWarningsDormakabaSitesUnapproved_model")] + public class ConnectedAccountWarningsDormakabaSitesUnapproved : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsDormakabaSitesUnapproved() { } + + public ConnectedAccountWarningsDormakabaSitesUnapproved( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "dormakaba_sites_unapproved"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountWarningsUnrecognized_model")] + public class ConnectedAccountWarningsUnrecognized : ConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected ConnectedAccountWarningsUnrecognized() { } + + public ConnectedAccountWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// List of capabilities that were accepted during the account connection process. + /// + [DataMember(Name = "accepted_capabilities", IsRequired = false, EmitDefaultValue = false)] + public List AcceptedCapabilities { get; set; } + + /// + /// Type of connected account. + /// + [DataMember(Name = "account_type", IsRequired = false, EmitDefaultValue = false)] + public string? AccountType { get; set; } + + /// + /// Display name for the connected account type. + /// + [DataMember( + Name = "account_type_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string AccountTypeDisplayName { get; set; } + + /// + /// Indicates whether Seam should [import all new devices](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for management by the Seam API. + /// + [DataMember( + Name = "automatically_manage_new_devices", + IsRequired = false, + EmitDefaultValue = false + )] + public bool AutomaticallyManageNewDevices { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the connected account was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + /// + /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object CustomMetadata { get; set; } + + /// + /// Your unique key for the customer associated with this connected account. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Default reservation check-in time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration — set during the connect_webview for providers like Lodgify whose API does not expose check-in times. + /// + [DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] + public string? DefaultCheckinTime { get; set; } + + /// + /// Default reservation check-out time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration. + /// + [DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] + public string? DefaultCheckoutTime { get; set; } + + /// + /// Display name for the connected account. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// For iCal connected accounts, the platform that produced the feed (for example, `airbnb`, `vrbo`, or `booking`), or `unknown` when it could not be determined. Intended for rendering the source platform's logo. + /// + [DataMember(Name = "ical_feed_origin", IsRequired = false, EmitDefaultValue = false)] + public string? IcalFeedOrigin { get; set; } + + /// + /// For iCal connected accounts, the feed URL for the connection. Sourced from the connector configuration. + /// + [DataMember(Name = "ical_url", IsRequired = false, EmitDefaultValue = false)] + public string? IcalUrl { get; set; } + + /// + /// Logo URL for the connected account provider. + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string? ImageUrl { get; set; } + + /// + /// IANA time zone (e.g. America/Los_Angeles) for this connected account. Sourced from the connector configuration. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + /// + /// User identifier associated with the connected account. + /// + [Obsolete("Use `display_name` instead.")] + [DataMember(Name = "user_identifier", IsRequired = false, EmitDefaultValue = false)] + public ConnectedAccountUserIdentifier? UserIdentifier { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_connectedAccountUserIdentifier_model")] + public class ConnectedAccountUserIdentifier + { + [JsonConstructorAttribute] + protected ConnectedAccountUserIdentifier() { } + + public ConnectedAccountUserIdentifier( + string? apiUrl = default, + string? email = default, + bool? exclusive = default, + string? phone = default, + string? username = default + ) + { + ApiUrl = apiUrl; + Email = email; + Exclusive = exclusive; + Phone = phone; + Username = username; + } + + /// + /// API URL for the user identifier associated with the connected account. + /// + [DataMember(Name = "api_url", IsRequired = false, EmitDefaultValue = false)] + public string? ApiUrl { get; set; } + + /// + /// Email address of the user identifier associated with the connected account. + /// + [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] + public string? Email { get; set; } + + /// + /// Indicates whether the user identifier associated with the connected account is exclusive. + /// + [DataMember(Name = "exclusive", IsRequired = false, EmitDefaultValue = false)] + public bool? Exclusive { get; set; } + + /// + /// Phone number of the user identifier associated with the connected account. + /// + [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] + public string? Phone { get; set; } + + /// + /// Username of the user identifier associated with the connected account. + /// + [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] + public string? Username { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/CustomerPortal.cs b/src/Seam/Model/CustomerPortal.cs index 266f89c1..6e0515ef 100644 --- a/src/Seam/Model/CustomerPortal.cs +++ b/src/Seam/Model/CustomerPortal.cs @@ -8,76 +8,81 @@ namespace Seam.Model { -/// -/// Represents a Customer Portal. Customer Portal is a hosted, customizable interface for managing device access. It enables you to embed secure, pre-authenticated access flows into your product—either by sharing a link with users or embedding a view in an iframe. -/// -/// With Customer Portal, you no longer need to build out frontend experiences for physical access, thermostats, and sensors. Instead, you can ship enterprise-grade access control experiences in a fraction of the time, while maintaining your product's branding and user experience. -/// -/// Seam hosts these flows, handling everything from account connection and device mapping to full-featured device control. -/// -[DataContract(Name = "seamModel_customerPortal_model")] -public class CustomerPortal -{ -[JsonConstructorAttribute] -protected CustomerPortal() { } + /// + /// Represents a Customer Portal. Customer Portal is a hosted, customizable interface for managing device access. It enables you to embed secure, pre-authenticated access flows into your product—either by sharing a link with users or embedding a view in an iframe. + /// + /// With Customer Portal, you no longer need to build out frontend experiences for physical access, thermostats, and sensors. Instead, you can ship enterprise-grade access control experiences in a fraction of the time, while maintaining your product's branding and user experience. + /// + /// Seam hosts these flows, handling everything from account connection and device mapping to full-featured device control. + /// + [DataContract(Name = "seamModel_customerPortal_model")] + public class CustomerPortal + { + [JsonConstructorAttribute] + protected CustomerPortal() { } -public CustomerPortal(string createdAt = default, string customerKey = default, string expiresAt = default, string url = default, string workspaceId = default) -{ -CreatedAt = createdAt; -CustomerKey = customerKey; -ExpiresAt = expiresAt; -Url = url; -WorkspaceId = workspaceId; -} + public CustomerPortal( + string createdAt = default, + string customerKey = default, + string expiresAt = default, + string url = default, + string workspaceId = default + ) + { + CreatedAt = createdAt; + CustomerKey = customerKey; + ExpiresAt = expiresAt; + Url = url; + WorkspaceId = workspaceId; + } -/// -/// Date and time at which the customer portal link was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } + /// + /// Date and time at which the customer portal link was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } -/// -/// Customer key for the customer portal. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string CustomerKey { get; set; } + /// + /// Customer key for the customer portal. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string CustomerKey { get; set; } -/// -/// Date and time at which the customer portal link expires. -/// -[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] -public string ExpiresAt { get; set; } + /// + /// Date and time at which the customer portal link expires. + /// + [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] + public string ExpiresAt { get; set; } -/// -/// URL for the customer portal. -/// -[DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] -public string Url { get; set; } + /// + /// URL for the customer portal. + /// + [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] + public string Url { get; set; } -/// -/// ID of the workspace associated with the customer portal. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } + /// + /// ID of the workspace associated with the customer portal. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/Device.cs b/src/Seam/Model/Device.cs index 2a3ce407..3133920f 100644 --- a/src/Seam/Model/Device.cs +++ b/src/Seam/Model/Device.cs @@ -8,9198 +8,10495 @@ namespace Seam.Model { -/// -/// Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam. -/// -[DataContract(Name = "seamModel_device_model")] -public class Device -{ -[JsonConstructorAttribute] -protected Device() { } - -public Device(bool? canActivateWeeklyProgram = default, bool? canConfigureAutoLock = default, bool? canHvacCool = default, bool? canHvacHeat = default, bool? canHvacHeatCool = default, bool? canProgramOfflineAccessCodes = default, bool? canProgramOnlineAccessCodes = default, bool? canProgramThermostatProgramsAsDifferentEachDay = default, bool? canProgramThermostatProgramsAsSameEachDay = default, bool? canProgramThermostatProgramsAsWeekdayWeekend = default, bool? canRemotelyLock = default, bool? canRemotelyUnlock = default, bool? canRunThermostatPrograms = default, bool? canSimulateConnection = default, bool? canSimulateDisconnection = default, bool? canSimulateHubConnection = default, bool? canSimulateHubDisconnection = default, bool? canSimulatePaidSubscription = default, bool? canSimulateRemoval = default, bool? canStreamLiveVideo = default, bool? canTurnOffHvac = default, bool? canUnlockWithCode = default, List capabilitiesSupported = default, string connectedAccountId = default, string createdAt = default, object customMetadata = default, string deviceId = default, DeviceDeviceManufacturer? deviceManufacturer = default, DeviceDeviceProvider? deviceProvider = default, Device.DeviceTypeEnum deviceType = default, string displayName = default, List errors = default, bool isManaged = default, DeviceLocation? location = default, string? nickname = default, DeviceProperties properties = default, List spaceIds = default, List warnings = default, string workspaceId = default) -{ -CanActivateWeeklyProgram = canActivateWeeklyProgram; -CanConfigureAutoLock = canConfigureAutoLock; -CanHvacCool = canHvacCool; -CanHvacHeat = canHvacHeat; -CanHvacHeatCool = canHvacHeatCool; -CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; -CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; -CanProgramThermostatProgramsAsDifferentEachDay = canProgramThermostatProgramsAsDifferentEachDay; -CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; -CanProgramThermostatProgramsAsWeekdayWeekend = canProgramThermostatProgramsAsWeekdayWeekend; -CanRemotelyLock = canRemotelyLock; -CanRemotelyUnlock = canRemotelyUnlock; -CanRunThermostatPrograms = canRunThermostatPrograms; -CanSimulateConnection = canSimulateConnection; -CanSimulateDisconnection = canSimulateDisconnection; -CanSimulateHubConnection = canSimulateHubConnection; -CanSimulateHubDisconnection = canSimulateHubDisconnection; -CanSimulatePaidSubscription = canSimulatePaidSubscription; -CanSimulateRemoval = canSimulateRemoval; -CanStreamLiveVideo = canStreamLiveVideo; -CanTurnOffHvac = canTurnOffHvac; -CanUnlockWithCode = canUnlockWithCode; -CapabilitiesSupported = capabilitiesSupported; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomMetadata = customMetadata; -DeviceId = deviceId; -DeviceManufacturer = deviceManufacturer; -DeviceProvider = deviceProvider; -DeviceType = deviceType; -DisplayName = displayName; -Errors = errors; -IsManaged = isManaged; -Location = location; -Nickname = nickname; -Properties = properties; -SpaceIds = spaceIds; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -/// -/// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CapabilitiesSupportedEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "access_code")] -AccessCode = 1, - -[EnumMember(Value = "lock")] -Lock = 2, - -[EnumMember(Value = "noise_detection")] -NoiseDetection = 3, - -[EnumMember(Value = "thermostat")] -Thermostat = 4, - -[EnumMember(Value = "battery")] -Battery = 5, - -[EnumMember(Value = "phone")] -Phone = 6, -} - -/// -/// Type of the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "akuvox_lock")] -AkuvoxLock = 1, - -[EnumMember(Value = "august_lock")] -AugustLock = 2, - -[EnumMember(Value = "brivo_access_point")] -BrivoAccessPoint = 3, - -[EnumMember(Value = "butterflymx_panel")] -ButterflymxPanel = 4, - -[EnumMember(Value = "avigilon_alta_entry")] -AvigilonAltaEntry = 5, - -[EnumMember(Value = "doorking_lock")] -DoorkingLock = 6, - -[EnumMember(Value = "genie_door")] -GenieDoor = 7, - -[EnumMember(Value = "igloo_lock")] -IglooLock = 8, - -[EnumMember(Value = "linear_lock")] -LinearLock = 9, - -[EnumMember(Value = "lockly_lock")] -LocklyLock = 10, - -[EnumMember(Value = "kwikset_lock")] -KwiksetLock = 11, - -[EnumMember(Value = "nuki_lock")] -NukiLock = 12, - -[EnumMember(Value = "salto_lock")] -SaltoLock = 13, - -[EnumMember(Value = "schlage_lock")] -SchlageLock = 14, - -[EnumMember(Value = "smartthings_lock")] -SmartthingsLock = 15, - -[EnumMember(Value = "wyze_lock")] -WyzeLock = 16, - -[EnumMember(Value = "yale_lock")] -YaleLock = 17, - -[EnumMember(Value = "two_n_intercom")] -TwoNIntercom = 18, - -[EnumMember(Value = "controlbyweb_device")] -ControlbywebDevice = 19, - -[EnumMember(Value = "ttlock_lock")] -TtlockLock = 20, - -[EnumMember(Value = "igloohome_lock")] -IgloohomeLock = 21, - -[EnumMember(Value = "four_suites_door")] -FourSuitesDoor = 22, - -[EnumMember(Value = "dormakaba_oracode_door")] -DormakabaOracodeDoor = 23, - -[EnumMember(Value = "tedee_lock")] -TedeeLock = 24, - -[EnumMember(Value = "akiles_lock")] -AkilesLock = 25, - -[EnumMember(Value = "ultraloq_lock")] -UltraloqLock = 26, - -[EnumMember(Value = "yacan_lock")] -YacanLock = 27, - -[EnumMember(Value = "keyincode_lock")] -KeyincodeLock = 28, - -[EnumMember(Value = "omnitec_lock")] -OmnitecLock = 29, - -[EnumMember(Value = "kisi_lock")] -KisiLock = 30, - -[EnumMember(Value = "aqara_lock")] -AqaraLock = 31, - -[EnumMember(Value = "keynest_key")] -KeynestKey = 32, - -[EnumMember(Value = "noiseaware_activity_zone")] -NoiseawareActivityZone = 33, - -[EnumMember(Value = "minut_sensor")] -MinutSensor = 34, - -[EnumMember(Value = "ecobee_thermostat")] -EcobeeThermostat = 35, - -[EnumMember(Value = "nest_thermostat")] -NestThermostat = 36, - -[EnumMember(Value = "honeywell_resideo_thermostat")] -HoneywellResideoThermostat = 37, - -[EnumMember(Value = "tado_thermostat")] -TadoThermostat = 38, - -[EnumMember(Value = "sensi_thermostat")] -SensiThermostat = 39, - -[EnumMember(Value = "smartthings_thermostat")] -SmartthingsThermostat = 40, - -[EnumMember(Value = "ios_phone")] -IosPhone = 41, - -[EnumMember(Value = "android_phone")] -AndroidPhone = 42, - -[EnumMember(Value = "ring_camera")] -RingCamera = 43, - -[EnumMember(Value = "tapo_camera")] -TapoCamera = 44, - -[EnumMember(Value = "arlo_camera")] -ArloCamera = 45, - -[EnumMember(Value = "reolink_camera")] -ReolinkCamera = 46, -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(DeviceErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsBridgeDisconnected), "bridge_disconnected")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsSubscriptionRequired), "subscription_required")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsAuxiliaryHeatRunning), "auxiliary_heat_running")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsMissingDeviceCredentials), "missing_device_credentials")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsAugustLockNotAuthorized), "august_lock_not_authorized")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsEmptyBackupAccessCodePool), "empty_backup_access_code_pool")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceDisconnected), "device_disconnected")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsHubDisconnected), "hub_disconnected")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceRemoved), "device_removed")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceOffline), "device_offline")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsInsufficientPermissions), "insufficient_permissions")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] -[JsonSubtypes.KnownSubType(typeof(DeviceErrorsAccountDisconnected), "account_disconnected")] -public abstract class DeviceErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_deviceErrorsAccountDisconnected_model")] -public class DeviceErrorsAccountDisconnected : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsAccountDisconnected() { } - -public DeviceErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "account_disconnected"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsSaltoKsSubscriptionLimitExceeded_model")] -public class DeviceErrorsSaltoKsSubscriptionLimitExceeded : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsSaltoKsSubscriptionLimitExceeded() { } - -public DeviceErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsInsufficientPermissions_model")] -public class DeviceErrorsInsufficientPermissions : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsInsufficientPermissions() { } - -public DeviceErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "insufficient_permissions"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsDormakabaSitesDisconnected_model")] -public class DeviceErrorsDormakabaSitesDisconnected : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsDormakabaSitesDisconnected() { } - -public DeviceErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsDeviceOffline_model")] -public class DeviceErrorsDeviceOffline : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsDeviceOffline() { } - -public DeviceErrorsDeviceOffline(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_offline"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsDeviceRemoved_model")] -public class DeviceErrorsDeviceRemoved : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsDeviceRemoved() { } - -public DeviceErrorsDeviceRemoved(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_removed"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsHubDisconnected_model")] -public class DeviceErrorsHubDisconnected : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsHubDisconnected() { } - -public DeviceErrorsHubDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "hub_disconnected"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsDeviceDisconnected_model")] -public class DeviceErrorsDeviceDisconnected : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsDeviceDisconnected() { } - -public DeviceErrorsDeviceDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_disconnected"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsEmptyBackupAccessCodePool_model")] -public class DeviceErrorsEmptyBackupAccessCodePool : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsEmptyBackupAccessCodePool() { } - -public DeviceErrorsEmptyBackupAccessCodePool(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "empty_backup_access_code_pool"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsAugustLockNotAuthorized_model")] -public class DeviceErrorsAugustLockNotAuthorized : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsAugustLockNotAuthorized() { } - -public DeviceErrorsAugustLockNotAuthorized(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "august_lock_not_authorized"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsMissingDeviceCredentials_model")] -public class DeviceErrorsMissingDeviceCredentials : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsMissingDeviceCredentials() { } - -public DeviceErrorsMissingDeviceCredentials(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "missing_device_credentials"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsAuxiliaryHeatRunning_model")] -public class DeviceErrorsAuxiliaryHeatRunning : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsAuxiliaryHeatRunning() { } - -public DeviceErrorsAuxiliaryHeatRunning(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "auxiliary_heat_running"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsSubscriptionRequired_model")] -public class DeviceErrorsSubscriptionRequired : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsSubscriptionRequired() { } - -public DeviceErrorsSubscriptionRequired(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "subscription_required"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsBridgeDisconnected_model")] -public class DeviceErrorsBridgeDisconnected : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsBridgeDisconnected() { } - -public DeviceErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "bridge_disconnected"; - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceErrorsUnrecognized_model")] -public class DeviceErrorsUnrecognized : DeviceErrors -{ -[JsonConstructorAttribute] -protected DeviceErrorsUnrecognized() { } - -public DeviceErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(DeviceWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsMaxAccessCodesReached), "max_access_codes_reached")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsUnreliableOnlineStatus), "unreliable_online_status")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsAccessoryKeypadLowBattery), "accessory_keypad_low_battery")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsAccessoryKeypadSetupRequired), "accessory_keypad_setup_required")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsKeynestUnsupportedLocker), "keynest_unsupported_locker")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsProviderIssue), "provider_issue")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsHubRequiredForAdditionalCapabilities), "hub_required_for_additional_capabilities")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTwoNDeviceMissingTimezone), "two_n_device_missing_timezone")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTimeZoneMismatch), "time_zone_mismatch")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTimeZoneUnknown), "time_zone_unknown")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsUltraloqTimeZoneUnknown), "ultraloq_time_zone_unknown")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsLocklyTimeZoneNotConfigured), "lockly_time_zone_not_configured")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsUnknownIssueWithPhone), "unknown_issue_with_phone")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsLockAccessCodeSupportRemoved), "salto_ks_lock_access_code_support_removed")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsSubscriptionLimitAlmostReached), "salto_ks_subscription_limit_almost_reached")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsPrivacyMode), "privacy_mode")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsPrivacyMode), "salto_ks_privacy_mode")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsOfficeMode), "salto_ks_office_mode")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsDeviceHasFlakyConnection), "device_has_flaky_connection")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsScheduledMaintenanceWindow), "scheduled_maintenance_window")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsDeviceCommunicationDegraded), "device_communication_degraded")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTemperatureThresholdExceeded), "temperature_threshold_exceeded")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsPowerSavingMode), "power_saving_mode")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTtlockWeakGatewaySignal), "ttlock_weak_gateway_signal")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsTtlockLockGatewayUnlockingNotEnabled), "ttlock_lock_gateway_unlocking_not_enabled")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsThirdPartyIntegrationDetected), "third_party_integration_detected")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsManyActiveBackupCodes), "many_active_backup_codes")] -[JsonSubtypes.KnownSubType(typeof(DeviceWarningsPartialBackupAccessCodePool), "partial_backup_access_code_pool")] -public abstract class DeviceWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_deviceWarningsPartialBackupAccessCodePool_model")] -public class DeviceWarningsPartialBackupAccessCodePool : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsPartialBackupAccessCodePool() { } - -public DeviceWarningsPartialBackupAccessCodePool(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "partial_backup_access_code_pool"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsManyActiveBackupCodes_model")] -public class DeviceWarningsManyActiveBackupCodes : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsManyActiveBackupCodes() { } - -public DeviceWarningsManyActiveBackupCodes(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "many_active_backup_codes"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsThirdPartyIntegrationDetected_model")] -public class DeviceWarningsThirdPartyIntegrationDetected : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsThirdPartyIntegrationDetected() { } - -public DeviceWarningsThirdPartyIntegrationDetected(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "third_party_integration_detected"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsTtlockLockGatewayUnlockingNotEnabled_model")] -public class DeviceWarningsTtlockLockGatewayUnlockingNotEnabled : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsTtlockLockGatewayUnlockingNotEnabled() { } - -public DeviceWarningsTtlockLockGatewayUnlockingNotEnabled(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "ttlock_lock_gateway_unlocking_not_enabled"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsTtlockWeakGatewaySignal_model")] -public class DeviceWarningsTtlockWeakGatewaySignal : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsTtlockWeakGatewaySignal() { } - -public DeviceWarningsTtlockWeakGatewaySignal(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "ttlock_weak_gateway_signal"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsPowerSavingMode_model")] -public class DeviceWarningsPowerSavingMode : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsPowerSavingMode() { } - -public DeviceWarningsPowerSavingMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "power_saving_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsTemperatureThresholdExceeded_model")] -public class DeviceWarningsTemperatureThresholdExceeded : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsTemperatureThresholdExceeded() { } - -public DeviceWarningsTemperatureThresholdExceeded(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "temperature_threshold_exceeded"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsDeviceCommunicationDegraded_model")] -public class DeviceWarningsDeviceCommunicationDegraded : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsDeviceCommunicationDegraded() { } - -public DeviceWarningsDeviceCommunicationDegraded(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "device_communication_degraded"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsScheduledMaintenanceWindow_model")] -public class DeviceWarningsScheduledMaintenanceWindow : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsScheduledMaintenanceWindow() { } - -public DeviceWarningsScheduledMaintenanceWindow(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "scheduled_maintenance_window"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsDeviceHasFlakyConnection_model")] -public class DeviceWarningsDeviceHasFlakyConnection : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsDeviceHasFlakyConnection() { } - -public DeviceWarningsDeviceHasFlakyConnection(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "device_has_flaky_connection"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsSaltoKsOfficeMode_model")] -public class DeviceWarningsSaltoKsOfficeMode : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsSaltoKsOfficeMode() { } - -public DeviceWarningsSaltoKsOfficeMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_office_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsSaltoKsPrivacyMode_model")] -public class DeviceWarningsSaltoKsPrivacyMode : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsSaltoKsPrivacyMode() { } - -public DeviceWarningsSaltoKsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_privacy_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsPrivacyMode_model")] -public class DeviceWarningsPrivacyMode : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsPrivacyMode() { } - -public DeviceWarningsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "privacy_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsSaltoKsSubscriptionLimitAlmostReached_model")] -public class DeviceWarningsSaltoKsSubscriptionLimitAlmostReached : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsSaltoKsSubscriptionLimitAlmostReached() { } - -public DeviceWarningsSaltoKsSubscriptionLimitAlmostReached(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_subscription_limit_almost_reached"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsSaltoKsLockAccessCodeSupportRemoved_model")] -public class DeviceWarningsSaltoKsLockAccessCodeSupportRemoved : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsSaltoKsLockAccessCodeSupportRemoved() { } - -public DeviceWarningsSaltoKsLockAccessCodeSupportRemoved(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_lock_access_code_support_removed"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsUnknownIssueWithPhone_model")] -public class DeviceWarningsUnknownIssueWithPhone : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsUnknownIssueWithPhone() { } - -public DeviceWarningsUnknownIssueWithPhone(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unknown_issue_with_phone"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsLocklyTimeZoneNotConfigured_model")] -public class DeviceWarningsLocklyTimeZoneNotConfigured : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsLocklyTimeZoneNotConfigured() { } - -public DeviceWarningsLocklyTimeZoneNotConfigured(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "lockly_time_zone_not_configured"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsUltraloqTimeZoneUnknown_model")] -public class DeviceWarningsUltraloqTimeZoneUnknown : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsUltraloqTimeZoneUnknown() { } - -public DeviceWarningsUltraloqTimeZoneUnknown(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "ultraloq_time_zone_unknown"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsTimeZoneUnknown_model")] -public class DeviceWarningsTimeZoneUnknown : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsTimeZoneUnknown() { } - -public DeviceWarningsTimeZoneUnknown(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "time_zone_unknown"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsTimeZoneMismatch_model")] -public class DeviceWarningsTimeZoneMismatch : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsTimeZoneMismatch() { } - -public DeviceWarningsTimeZoneMismatch(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "time_zone_mismatch"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsTwoNDeviceMissingTimezone_model")] -public class DeviceWarningsTwoNDeviceMissingTimezone : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsTwoNDeviceMissingTimezone() { } - -public DeviceWarningsTwoNDeviceMissingTimezone(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "two_n_device_missing_timezone"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsHubRequiredForAdditionalCapabilities_model")] -public class DeviceWarningsHubRequiredForAdditionalCapabilities : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsHubRequiredForAdditionalCapabilities() { } - -public DeviceWarningsHubRequiredForAdditionalCapabilities(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "hub_required_for_additional_capabilities"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsProviderIssue_model")] -public class DeviceWarningsProviderIssue : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsProviderIssue() { } - -public DeviceWarningsProviderIssue(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "provider_issue"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsKeynestUnsupportedLocker_model")] -public class DeviceWarningsKeynestUnsupportedLocker : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsKeynestUnsupportedLocker() { } - -public DeviceWarningsKeynestUnsupportedLocker(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "keynest_unsupported_locker"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsAccessoryKeypadSetupRequired_model")] -public class DeviceWarningsAccessoryKeypadSetupRequired : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsAccessoryKeypadSetupRequired() { } - -public DeviceWarningsAccessoryKeypadSetupRequired(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "accessory_keypad_setup_required"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsAccessoryKeypadLowBattery_model")] -public class DeviceWarningsAccessoryKeypadLowBattery : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsAccessoryKeypadLowBattery() { } - -public DeviceWarningsAccessoryKeypadLowBattery(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "accessory_keypad_low_battery"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsUnreliableOnlineStatus_model")] -public class DeviceWarningsUnreliableOnlineStatus : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsUnreliableOnlineStatus() { } - -public DeviceWarningsUnreliableOnlineStatus(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unreliable_online_status"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsMaxAccessCodesReached_model")] -public class DeviceWarningsMaxAccessCodesReached : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsMaxAccessCodesReached() { } - -public DeviceWarningsMaxAccessCodesReached(int activeAccessCodeCount = default, string createdAt = default, int maxActiveAccessCodeCount = default, string message = default, string warningCode = default) -{ -ActiveAccessCodeCount = activeAccessCodeCount; -CreatedAt = createdAt; -MaxActiveAccessCodeCount = maxActiveAccessCodeCount; -Message = message; -WarningCode = warningCode; -} - -/// -/// Number of active access codes on the device when the warning was set. -/// -[DataMember(Name = "active_access_code_count", IsRequired = false, EmitDefaultValue = false)] -public int ActiveAccessCodeCount { get; set; } - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Maximum number of active access codes supported by the device. -/// -[DataMember(Name = "max_active_access_code_count", IsRequired = false, EmitDefaultValue = false)] -public int MaxActiveAccessCodeCount { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "max_access_codes_reached"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceWarningsUnrecognized_model")] -public class DeviceWarningsUnrecognized : DeviceWarnings -{ -[JsonConstructorAttribute] -protected DeviceWarningsUnrecognized() { } - -public DeviceWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. -/// -[DataMember(Name = "can_activate_weekly_program", IsRequired = false, EmitDefaultValue = false)] -public bool? CanActivateWeeklyProgram { get; set; } - -/// -/// Indicates whether the lock supports configuring automatic locking. -/// -[DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanConfigureAutoLock { get; set; } - -/// -/// Indicates whether the thermostat supports cooling. -/// -[DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacCool { get; set; } - -/// -/// Indicates whether the thermostat supports heating. -/// -[DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacHeat { get; set; } - -/// -/// Indicates whether the thermostat supports simultaneous heating and cooling. -/// -[DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacHeatCool { get; set; } - -/// -/// Indicates whether the device supports programming offline access codes. -/// -[DataMember(Name = "can_program_offline_access_codes", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramOfflineAccessCodes { get; set; } - -/// -/// Indicates whether the device supports programming online access codes. -/// -[DataMember(Name = "can_program_online_access_codes", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramOnlineAccessCodes { get; set; } - -/// -/// Indicates whether the thermostat supports different climate programs for each day of the week. -/// -[DataMember(Name = "can_program_thermostat_programs_as_different_each_day", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } - -/// -/// Indicates whether the thermostat supports a single climate program applied to every day. -/// -[DataMember(Name = "can_program_thermostat_programs_as_same_each_day", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } - -/// -/// Indicates whether the thermostat supports weekday/weekend climate programs. -/// -[DataMember(Name = "can_program_thermostat_programs_as_weekday_weekend", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } - -/// -/// Indicates whether the device supports remote locking. -/// -[DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRemotelyLock { get; set; } - -/// -/// Indicates whether the device supports remote unlocking. -/// -[DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRemotelyUnlock { get; set; } - -/// -/// Indicates whether the thermostat supports running climate programs. -/// -[DataMember(Name = "can_run_thermostat_programs", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRunThermostatPrograms { get; set; } - -/// -/// Indicates whether the device supports simulating connection in a sandbox. -/// -[DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateConnection { get; set; } - -/// -/// Indicates whether the device supports simulating disconnection in a sandbox. -/// -[DataMember(Name = "can_simulate_disconnection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateDisconnection { get; set; } - -/// -/// Indicates whether the hub supports simulating connection in a sandbox. -/// -[DataMember(Name = "can_simulate_hub_connection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateHubConnection { get; set; } - -/// -/// Indicates whether the hub supports simulating disconnection in a sandbox. -/// -[DataMember(Name = "can_simulate_hub_disconnection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateHubDisconnection { get; set; } - -/// -/// Indicates whether the device supports simulating a paid subscription in a sandbox. -/// -[DataMember(Name = "can_simulate_paid_subscription", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulatePaidSubscription { get; set; } - -/// -/// Indicates whether the device supports simulating removal in a sandbox. -/// -[DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateRemoval { get; set; } - -/// -/// Indicates whether the camera supports streaming live video through a camera live view session. -/// -[DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] -public bool? CanStreamLiveVideo { get; set; } - -/// -/// Indicates whether the thermostat can be turned off. -/// -[DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] -public bool? CanTurnOffHvac { get; set; } - -/// -/// Indicates whether the lock supports unlocking with an access code. -/// -[DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUnlockWithCode { get; set; } - -/// -/// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). -/// -[DataMember(Name = "capabilities_supported", IsRequired = false, EmitDefaultValue = false)] -public List CapabilitiesSupported { get; set; } - -/// -/// Unique identifier for the account associated with the device. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the device object was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object CustomMetadata { get; set; } - -/// -/// ID of the device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Manufacturer of the device. Represents the hardware brand, which may differ from the provider. -/// -[DataMember(Name = "device_manufacturer", IsRequired = false, EmitDefaultValue = false)] -public DeviceDeviceManufacturer? DeviceManufacturer { get; set; } - -/// -/// Provider of the device. Represents the third-party service through which the device is controlled. -/// -[DataMember(Name = "device_provider", IsRequired = false, EmitDefaultValue = false)] -public DeviceDeviceProvider? DeviceProvider { get; set; } - -/// -/// Type of the device. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public Device.DeviceTypeEnum DeviceType { get; set; } - -/// -/// Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Location information for the device. -/// -[DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] -public DeviceLocation? Location { get; set; } - -/// -/// Optional nickname to describe the device, settable through Seam. -/// -[DataMember(Name = "nickname", IsRequired = false, EmitDefaultValue = false)] -public string? Nickname { get; set; } - -/// -/// Properties of the device. -/// -[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] -public DeviceProperties Properties { get; set; } - -/// -/// IDs of the spaces the device is in. -/// -[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] -public List SpaceIds { get; set; } - -/// -/// Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// Unique identifier for the Seam workspace associated with the device. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceDeviceManufacturer_model")] -public class DeviceDeviceManufacturer -{ -[JsonConstructorAttribute] -protected DeviceDeviceManufacturer() { } - -public DeviceDeviceManufacturer(string displayName = default, string? imageUrl = default, string manufacturer = default) -{ -DisplayName = displayName; -ImageUrl = imageUrl; -Manufacturer = manufacturer; -} - -/// -/// Display name for the manufacturer, such as `August`, `Yale`, `Salto`, and so on. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Image URL for the manufacturer logo. -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string? ImageUrl { get; set; } - -/// -/// Manufacturer identifier, such as `august`, `yale`, `salto`, and so on. -/// -[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] -public string Manufacturer { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceDeviceProvider_model")] -public class DeviceDeviceProvider -{ -[JsonConstructorAttribute] -protected DeviceDeviceProvider() { } - -public DeviceDeviceProvider(string deviceProviderName = default, string displayName = default, string? imageUrl = default, string providerCategory = default) -{ -DeviceProviderName = deviceProviderName; -DisplayName = displayName; -ImageUrl = imageUrl; -ProviderCategory = providerCategory; -} - -/// -/// Device provider name. Corresponds to the integration type, such as `august`, `schlage`, `yale_access`, and so on. -/// -[DataMember(Name = "device_provider_name", IsRequired = false, EmitDefaultValue = false)] -public string DeviceProviderName { get; set; } - -/// -/// Display name for the device provider type. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Image URL for the device provider. -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string? ImageUrl { get; set; } - -/// -/// Provider category. Indicates the third-party provider type, such as `stable`, for stable integrations, or `internal`, for internal integrations. -/// -[DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] -public string ProviderCategory { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceLocation_model")] -public class DeviceLocation -{ -[JsonConstructorAttribute] -protected DeviceLocation() { } - -public DeviceLocation(string? locationName = default, string? roomName = default, string? timeZone = default, string? timezone = default) -{ -LocationName = locationName; -RoomName = roomName; -TimeZone = timeZone; -Timezone = timezone; -} - -/// -/// Name of the device location. -/// -[DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] -public string? LocationName { get; set; } - -/// -/// Name of the room within the device location, when the provider reports one. -/// -[DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] -public string? RoomName { get; set; } - -/// -/// Time zone of the device location. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -/// -/// Time zone of the device location. -/// -[Obsolete("Use `time_zone` instead.")] -[DataMember(Name = "timezone", IsRequired = false, EmitDefaultValue = false)] -public string? Timezone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_deviceProperties_model")] -public class DeviceProperties -{ -[JsonConstructorAttribute] -protected DeviceProperties() { } - -public DeviceProperties(DevicePropertiesAccessoryKeypad? accessoryKeypad = default, DevicePropertiesAppearance appearance = default, DevicePropertiesBattery? battery = default, float? batteryLevel = default, List? currentlyTriggeringNoiseThresholdIds = default, bool? hasDirectPower = default, string? imageAltText = default, string? imageUrl = default, string? manufacturer = default, DevicePropertiesModel model = default, string name = default, float? noiseLevelDecibels = default, bool? offlineAccessCodesEnabled = default, bool online = default, bool? onlineAccessCodesEnabled = default, string? serialNumber = default, bool? supportsAccessoryKeypad = default, bool? supportsOfflineAccessCodes = default, DevicePropertiesAssaAbloyCredentialServiceMetadata? assaAbloyCredentialServiceMetadata = default, DevicePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = default, DevicePropertiesAkilesMetadata? akilesMetadata = default, DevicePropertiesAqaraMetadata? aqaraMetadata = default, DevicePropertiesArloMetadata? arloMetadata = default, DevicePropertiesAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, DevicePropertiesAugustMetadata? augustMetadata = default, DevicePropertiesAvigilonAltaMetadata? avigilonAltaMetadata = default, DevicePropertiesBrivoMetadata? brivoMetadata = default, DevicePropertiesControlbywebMetadata? controlbywebMetadata = default, DevicePropertiesDormakabaOracodeIhoMetadata? dormakabaOracodeIhoMetadata = default, DevicePropertiesDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, DevicePropertiesEcobeeMetadata? ecobeeMetadata = default, DevicePropertiesFourSuitesMetadata? fourSuitesMetadata = default, DevicePropertiesGenieMetadata? genieMetadata = default, DevicePropertiesHoneywellResideoMetadata? honeywellResideoMetadata = default, DevicePropertiesIglooMetadata? iglooMetadata = default, DevicePropertiesIgloohomeMetadata? igloohomeMetadata = default, DevicePropertiesKeynestMetadata? keynestMetadata = default, DevicePropertiesKisiMetadata? kisiMetadata = default, DevicePropertiesKorelockMetadata? korelockMetadata = default, DevicePropertiesKwiksetMetadata? kwiksetMetadata = default, DevicePropertiesLocklyMetadata? locklyMetadata = default, DevicePropertiesMinutMetadata? minutMetadata = default, DevicePropertiesNestMetadata? nestMetadata = default, DevicePropertiesNoiseawareMetadata? noiseawareMetadata = default, DevicePropertiesNukiMetadata? nukiMetadata = default, DevicePropertiesOmnitecMetadata? omnitecMetadata = default, DevicePropertiesReolinkMetadata? reolinkMetadata = default, DevicePropertiesRingMetadata? ringMetadata = default, DevicePropertiesSaltoKsMetadata? saltoKsMetadata = default, DevicePropertiesSaltoMetadata? saltoMetadata = default, DevicePropertiesSchlageMetadata? schlageMetadata = default, DevicePropertiesSeamBridgeMetadata? seamBridgeMetadata = default, DevicePropertiesSensiMetadata? sensiMetadata = default, DevicePropertiesSmartthingsMetadata? smartthingsMetadata = default, DevicePropertiesTadoMetadata? tadoMetadata = default, DevicePropertiesTapoMetadata? tapoMetadata = default, DevicePropertiesTedeeMetadata? tedeeMetadata = default, DevicePropertiesTtlockMetadata? ttlockMetadata = default, DevicePropertiesTwoNMetadata? twoNMetadata = default, DevicePropertiesUltraloqMetadata? ultraloqMetadata = default, DevicePropertiesVisionlineMetadata? visionlineMetadata = default, DevicePropertiesWyzeMetadata? wyzeMetadata = default, DevicePropertiesYacanMetadata? yacanMetadata = default, float? autoLockDelaySeconds = default, bool? autoLockEnabled = default, bool? backupAccessCodePoolEnabled = default, List? codeConstraints = default, bool? doorOpen = default, bool? hasNativeEntryEvents = default, DevicePropertiesKeypadBattery? keypadBattery = default, bool? locked = default, float? maxActiveCodesSupported = default, List? offlineTimeFrameOptions = default, List? onlineTimeFrameOptions = default, List? supportedCodeLengths = default, bool? supportsBackupAccessCodePool = default, DevicePropertiesActiveThermostatSchedule? activeThermostatSchedule = default, string? activeThermostatScheduleId = default, List? availableClimatePresetModes = default, List? availableClimatePresets = default, List? availableFanModeSettings = default, List? availableHvacModeSettings = default, DevicePropertiesCurrentClimateSetting? currentClimateSetting = default, DevicePropertiesDefaultClimateSetting? defaultClimateSetting = default, string? fallbackClimatePresetKey = default, DeviceProperties.FanModeSettingEnum? fanModeSetting = default, bool? isCooling = default, bool? isFanRunning = default, bool? isHeating = default, bool? isTemporaryManualOverrideActive = default, float? maxCoolingSetPointCelsius = default, float? maxCoolingSetPointFahrenheit = default, float? maxHeatingSetPointCelsius = default, float? maxHeatingSetPointFahrenheit = default, float? maxThermostatDailyProgramPeriodsPerDay = default, float? maxUniqueClimatePresetsPerThermostatWeeklyProgram = default, float? minCoolingSetPointCelsius = default, float? minCoolingSetPointFahrenheit = default, float? minHeatingCoolingDeltaCelsius = default, float? minHeatingCoolingDeltaFahrenheit = default, float? minHeatingSetPointCelsius = default, float? minHeatingSetPointFahrenheit = default, float? relativeHumidity = default, float? temperatureCelsius = default, float? temperatureFahrenheit = default, DevicePropertiesTemperatureThreshold? temperatureThreshold = default, float? thermostatDailyProgramPeriodPrecisionMinutes = default, List? thermostatDailyPrograms = default, DevicePropertiesThermostatWeeklyProgram? thermostatWeeklyProgram = default) -{ -AccessoryKeypad = accessoryKeypad; -Appearance = appearance; -Battery = battery; -BatteryLevel = batteryLevel; -CurrentlyTriggeringNoiseThresholdIds = currentlyTriggeringNoiseThresholdIds; -HasDirectPower = hasDirectPower; -ImageAltText = imageAltText; -ImageUrl = imageUrl; -Manufacturer = manufacturer; -Model = model; -Name = name; -NoiseLevelDecibels = noiseLevelDecibels; -OfflineAccessCodesEnabled = offlineAccessCodesEnabled; -Online = online; -OnlineAccessCodesEnabled = onlineAccessCodesEnabled; -SerialNumber = serialNumber; -SupportsAccessoryKeypad = supportsAccessoryKeypad; -SupportsOfflineAccessCodes = supportsOfflineAccessCodes; -AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; -SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; -AkilesMetadata = akilesMetadata; -AqaraMetadata = aqaraMetadata; -ArloMetadata = arloMetadata; -AssaAbloyVostioMetadata = assaAbloyVostioMetadata; -AugustMetadata = augustMetadata; -AvigilonAltaMetadata = avigilonAltaMetadata; -BrivoMetadata = brivoMetadata; -ControlbywebMetadata = controlbywebMetadata; -DormakabaOracodeIhoMetadata = dormakabaOracodeIhoMetadata; -DormakabaOracodeMetadata = dormakabaOracodeMetadata; -EcobeeMetadata = ecobeeMetadata; -FourSuitesMetadata = fourSuitesMetadata; -GenieMetadata = genieMetadata; -HoneywellResideoMetadata = honeywellResideoMetadata; -IglooMetadata = iglooMetadata; -IgloohomeMetadata = igloohomeMetadata; -KeynestMetadata = keynestMetadata; -KisiMetadata = kisiMetadata; -KorelockMetadata = korelockMetadata; -KwiksetMetadata = kwiksetMetadata; -LocklyMetadata = locklyMetadata; -MinutMetadata = minutMetadata; -NestMetadata = nestMetadata; -NoiseawareMetadata = noiseawareMetadata; -NukiMetadata = nukiMetadata; -OmnitecMetadata = omnitecMetadata; -ReolinkMetadata = reolinkMetadata; -RingMetadata = ringMetadata; -SaltoKsMetadata = saltoKsMetadata; -SaltoMetadata = saltoMetadata; -SchlageMetadata = schlageMetadata; -SeamBridgeMetadata = seamBridgeMetadata; -SensiMetadata = sensiMetadata; -SmartthingsMetadata = smartthingsMetadata; -TadoMetadata = tadoMetadata; -TapoMetadata = tapoMetadata; -TedeeMetadata = tedeeMetadata; -TtlockMetadata = ttlockMetadata; -TwoNMetadata = twoNMetadata; -UltraloqMetadata = ultraloqMetadata; -VisionlineMetadata = visionlineMetadata; -WyzeMetadata = wyzeMetadata; -YacanMetadata = yacanMetadata; -AutoLockDelaySeconds = autoLockDelaySeconds; -AutoLockEnabled = autoLockEnabled; -BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; -CodeConstraints = codeConstraints; -DoorOpen = doorOpen; -HasNativeEntryEvents = hasNativeEntryEvents; -KeypadBattery = keypadBattery; -Locked = locked; -MaxActiveCodesSupported = maxActiveCodesSupported; -OfflineTimeFrameOptions = offlineTimeFrameOptions; -OnlineTimeFrameOptions = onlineTimeFrameOptions; -SupportedCodeLengths = supportedCodeLengths; -SupportsBackupAccessCodePool = supportsBackupAccessCodePool; -ActiveThermostatSchedule = activeThermostatSchedule; -ActiveThermostatScheduleId = activeThermostatScheduleId; -AvailableClimatePresetModes = availableClimatePresetModes; -AvailableClimatePresets = availableClimatePresets; -AvailableFanModeSettings = availableFanModeSettings; -AvailableHvacModeSettings = availableHvacModeSettings; -CurrentClimateSetting = currentClimateSetting; -DefaultClimateSetting = defaultClimateSetting; -FallbackClimatePresetKey = fallbackClimatePresetKey; -FanModeSetting = fanModeSetting; -IsCooling = isCooling; -IsFanRunning = isFanRunning; -IsHeating = isHeating; -IsTemporaryManualOverrideActive = isTemporaryManualOverrideActive; -MaxCoolingSetPointCelsius = maxCoolingSetPointCelsius; -MaxCoolingSetPointFahrenheit = maxCoolingSetPointFahrenheit; -MaxHeatingSetPointCelsius = maxHeatingSetPointCelsius; -MaxHeatingSetPointFahrenheit = maxHeatingSetPointFahrenheit; -MaxThermostatDailyProgramPeriodsPerDay = maxThermostatDailyProgramPeriodsPerDay; -MaxUniqueClimatePresetsPerThermostatWeeklyProgram = maxUniqueClimatePresetsPerThermostatWeeklyProgram; -MinCoolingSetPointCelsius = minCoolingSetPointCelsius; -MinCoolingSetPointFahrenheit = minCoolingSetPointFahrenheit; -MinHeatingCoolingDeltaCelsius = minHeatingCoolingDeltaCelsius; -MinHeatingCoolingDeltaFahrenheit = minHeatingCoolingDeltaFahrenheit; -MinHeatingSetPointCelsius = minHeatingSetPointCelsius; -MinHeatingSetPointFahrenheit = minHeatingSetPointFahrenheit; -RelativeHumidity = relativeHumidity; -TemperatureCelsius = temperatureCelsius; -TemperatureFahrenheit = temperatureFahrenheit; -TemperatureThreshold = temperatureThreshold; -ThermostatDailyProgramPeriodPrecisionMinutes = thermostatDailyProgramPeriodPrecisionMinutes; -ThermostatDailyPrograms = thermostatDailyPrograms; -ThermostatWeeklyProgram = thermostatWeeklyProgram; -} - -/// -/// Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AvailableClimatePresetModesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "home")] -Home = 1, - -[EnumMember(Value = "away")] -Away = 2, - -[EnumMember(Value = "wake")] -Wake = 3, - -[EnumMember(Value = "sleep")] -Sleep = 4, - -[EnumMember(Value = "occupied")] -Occupied = 5, - -[EnumMember(Value = "unoccupied")] -Unoccupied = 6, -} - -/// -/// Fan mode settings that the thermostat supports. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AvailableFanModeSettingsEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// HVAC mode settings that the thermostat supports. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum AvailableHvacModeSettingsEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, - -[EnumMember(Value = "heat")] -Heat = 2, - -[EnumMember(Value = "cool")] -Cool = 3, - -[EnumMember(Value = "heat_cool")] -HeatCool = 4, - -[EnumMember(Value = "eco")] -Eco = 5, -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// Accessory keypad properties and state. -/// -[DataMember(Name = "accessory_keypad", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAccessoryKeypad? AccessoryKeypad { get; set; } - -/// -/// Appearance-related properties, as reported by the device. -/// -[DataMember(Name = "appearance", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAppearance Appearance { get; set; } - -/// -/// Represents the current status of the battery charge level. -/// -[DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesBattery? Battery { get; set; } - -/// -/// Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. -/// -[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] -public float? BatteryLevel { get; set; } - -/// -/// Array of noise threshold IDs that are currently triggering. -/// -[DataMember(Name = "currently_triggering_noise_threshold_ids", IsRequired = false, EmitDefaultValue = false)] -public List? CurrentlyTriggeringNoiseThresholdIds { get; set; } - -/// -/// Indicates whether the device has direct power. -/// -[DataMember(Name = "has_direct_power", IsRequired = false, EmitDefaultValue = false)] -public bool? HasDirectPower { get; set; } - -/// -/// Alt text for the device image. -/// -[DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] -public string? ImageAltText { get; set; } - -/// -/// Image URL for the device. -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string? ImageUrl { get; set; } - -/// -/// Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. -/// -[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] -public string? Manufacturer { get; set; } - -/// -/// Device model-related properties. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesModel Model { get; set; } - -/// -/// Name of the device. -/// -[Obsolete("use device.display_name instead")] -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// Indicates current noise level in decibels, if the device supports noise detection. -/// -[DataMember(Name = "noise_level_decibels", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseLevelDecibels { get; set; } - -/// -/// Indicates whether it is currently possible to use offline access codes for the device. -/// -[Obsolete("use device.can_program_offline_access_codes")] -[DataMember(Name = "offline_access_codes_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? OfflineAccessCodesEnabled { get; set; } - -/// -/// Indicates whether the device is online. -/// -[DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] -public bool Online { get; set; } - -/// -/// Indicates whether it is currently possible to use online access codes for the device. -/// -[Obsolete("use device.can_program_online_access_codes")] -[DataMember(Name = "online_access_codes_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? OnlineAccessCodesEnabled { get; set; } - -/// -/// Serial number of the device. -/// -[DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] -public string? SerialNumber { get; set; } - -[Obsolete("use device.properties.model.can_connect_accessory_keypad")] -[DataMember(Name = "supports_accessory_keypad", IsRequired = false, EmitDefaultValue = false)] -public bool? SupportsAccessoryKeypad { get; set; } - -[Obsolete("use offline_access_codes_enabled")] -[DataMember(Name = "supports_offline_access_codes", IsRequired = false, EmitDefaultValue = false)] -public bool? SupportsOfflineAccessCodes { get; set; } - -/// -/// ASSA ABLOY Credential Service metadata for the phone. -/// -[DataMember(Name = "assa_abloy_credential_service_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAssaAbloyCredentialServiceMetadata? AssaAbloyCredentialServiceMetadata { get; set; } - -/// -/// Salto Space credential service metadata for the phone. -/// -[DataMember(Name = "salto_space_credential_service_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesSaltoSpaceCredentialServiceMetadata? SaltoSpaceCredentialServiceMetadata { get; set; } - -/// -/// Metadata for an Akiles device. -/// -[DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAkilesMetadata? AkilesMetadata { get; set; } - -/// -/// Metadata for an Aqara device. -/// -[DataMember(Name = "aqara_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAqaraMetadata? AqaraMetadata { get; set; } - -/// -/// Metadata for an Arlo camera. -/// -[DataMember(Name = "arlo_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesArloMetadata? ArloMetadata { get; set; } - -/// -/// Metadata for an ASSA ABLOY Vostio system. -/// -[DataMember(Name = "assa_abloy_vostio_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } - -/// -/// Metadata for an August device. -/// -[DataMember(Name = "august_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAugustMetadata? AugustMetadata { get; set; } - -/// -/// Metadata for an Avigilon Alta system. -/// -[DataMember(Name = "avigilon_alta_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAvigilonAltaMetadata? AvigilonAltaMetadata { get; set; } - -/// -/// Metadata for a Brivo device. -/// -[DataMember(Name = "brivo_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesBrivoMetadata? BrivoMetadata { get; set; } - -/// -/// Metadata for a ControlByWeb device. -/// -[DataMember(Name = "controlbyweb_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesControlbywebMetadata? ControlbywebMetadata { get; set; } - -/// -/// Metadata for a dormakaba Oracode Homeowner's Portal device. -/// -[DataMember(Name = "dormakaba_oracode_iho_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesDormakabaOracodeIhoMetadata? DormakabaOracodeIhoMetadata { get; set; } - -/// -/// Metadata for a dormakaba Oracode device. -/// -[DataMember(Name = "dormakaba_oracode_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } - -/// -/// Metadata for an ecobee device. -/// -[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesEcobeeMetadata? EcobeeMetadata { get; set; } - -/// -/// Metadata for a 4SUITES device. -/// -[DataMember(Name = "four_suites_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesFourSuitesMetadata? FourSuitesMetadata { get; set; } - -/// -/// Metadata for a Genie device. -/// -[DataMember(Name = "genie_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesGenieMetadata? GenieMetadata { get; set; } - -/// -/// Metadata for a Honeywell Resideo device. -/// -[DataMember(Name = "honeywell_resideo_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesHoneywellResideoMetadata? HoneywellResideoMetadata { get; set; } - -/// -/// Metadata for an igloo device. -/// -[DataMember(Name = "igloo_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesIglooMetadata? IglooMetadata { get; set; } - -/// -/// Metadata for an igloohome device. -/// -[DataMember(Name = "igloohome_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesIgloohomeMetadata? IgloohomeMetadata { get; set; } - -/// -/// Metadata for a KeyNest device. -/// -[DataMember(Name = "keynest_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesKeynestMetadata? KeynestMetadata { get; set; } - -/// -/// Metadata for a Kisi device. -/// -[DataMember(Name = "kisi_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesKisiMetadata? KisiMetadata { get; set; } - -/// -/// Metadata for a Korelock device. -/// -[DataMember(Name = "korelock_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesKorelockMetadata? KorelockMetadata { get; set; } - -/// -/// Metadata for a Kwikset device. -/// -[DataMember(Name = "kwikset_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesKwiksetMetadata? KwiksetMetadata { get; set; } - -/// -/// Metadata for a Lockly device. -/// -[DataMember(Name = "lockly_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesLocklyMetadata? LocklyMetadata { get; set; } - -/// -/// Metadata for a Minut device. -/// -[DataMember(Name = "minut_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesMinutMetadata? MinutMetadata { get; set; } - -/// -/// Metadata for a Google Nest device. -/// -[DataMember(Name = "nest_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesNestMetadata? NestMetadata { get; set; } - -/// -/// Metadata for a NoiseAware device. -/// -[DataMember(Name = "noiseaware_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesNoiseawareMetadata? NoiseawareMetadata { get; set; } - -/// -/// Metadata for a Nuki device. -/// -[DataMember(Name = "nuki_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesNukiMetadata? NukiMetadata { get; set; } - -/// -/// Metadata for an Omnitec device. -/// -[DataMember(Name = "omnitec_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesOmnitecMetadata? OmnitecMetadata { get; set; } - -/// -/// Metadata for a Reolink camera. -/// -[DataMember(Name = "reolink_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesReolinkMetadata? ReolinkMetadata { get; set; } - -/// -/// Metadata for a Ring device. -/// -[DataMember(Name = "ring_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesRingMetadata? RingMetadata { get; set; } - -/// -/// Metadata for a Salto KS device. -/// -[DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesSaltoKsMetadata? SaltoKsMetadata { get; set; } - -/// -/// Metada for a Salto device. -/// -[Obsolete("Use `salto_ks_metadata` instead.")] -[DataMember(Name = "salto_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesSaltoMetadata? SaltoMetadata { get; set; } - -/// -/// Metadata for a Schlage device. -/// -[DataMember(Name = "schlage_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesSchlageMetadata? SchlageMetadata { get; set; } - -/// -/// Metadata for Seam Bridge. -/// -[DataMember(Name = "seam_bridge_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesSeamBridgeMetadata? SeamBridgeMetadata { get; set; } - -/// -/// Metadata for a Sensi device. -/// -[DataMember(Name = "sensi_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesSensiMetadata? SensiMetadata { get; set; } - -/// -/// Metadata for a SmartThings device. -/// -[DataMember(Name = "smartthings_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesSmartthingsMetadata? SmartthingsMetadata { get; set; } - -/// -/// Metadata for a tado° device. -/// -[DataMember(Name = "tado_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesTadoMetadata? TadoMetadata { get; set; } - -/// -/// Metadata for a Tapo camera. -/// -[DataMember(Name = "tapo_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesTapoMetadata? TapoMetadata { get; set; } - -/// -/// Metadata for a Tedee device. -/// -[DataMember(Name = "tedee_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesTedeeMetadata? TedeeMetadata { get; set; } - -/// -/// Metadata for a TTLock device. -/// -[DataMember(Name = "ttlock_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesTtlockMetadata? TtlockMetadata { get; set; } - -/// -/// Metadata for a 2N device. -/// -[DataMember(Name = "two_n_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesTwoNMetadata? TwoNMetadata { get; set; } - -/// -/// Metadata for an Ultraloq device. -/// -[DataMember(Name = "ultraloq_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesUltraloqMetadata? UltraloqMetadata { get; set; } - -/// -/// Metadata for an ASSA ABLOY Visionline system. -/// -[DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesVisionlineMetadata? VisionlineMetadata { get; set; } - -/// -/// Metadata for a Wyze device. -/// -[DataMember(Name = "wyze_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesWyzeMetadata? WyzeMetadata { get; set; } - -/// -/// Metadata for a Yacan device. -/// -[DataMember(Name = "yacan_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesYacanMetadata? YacanMetadata { get; set; } - -/// -/// The delay in seconds before the lock automatically locks after being unlocked. -/// -[DataMember(Name = "auto_lock_delay_seconds", IsRequired = false, EmitDefaultValue = false)] -public float? AutoLockDelaySeconds { get; set; } - -/// -/// Indicates whether automatic locking is enabled. -/// -[DataMember(Name = "auto_lock_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoLockEnabled { get; set; } - -/// -/// Indicates whether the [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) is currently enabled for the device. To disable it, set this to `false` using [/devices/update](https://www.seam.co/docs/api/devices/update). -/// -[DataMember(Name = "backup_access_code_pool_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? BackupAccessCodePoolEnabled { get; set; } - -/// -/// Constraints on access codes for the device. Seam represents each constraint as an object with a `constraint_type` property. Depending on the constraint type, there may also be additional properties. Note that some constraints are manufacturer- or device-specific. -/// -[DataMember(Name = "code_constraints", IsRequired = false, EmitDefaultValue = false)] -public List? CodeConstraints { get; set; } - -/// -/// Indicates whether the door is open. -/// -[DataMember(Name = "door_open", IsRequired = false, EmitDefaultValue = false)] -public bool? DoorOpen { get; set; } - -/// -/// Indicates whether the device supports native entry events. -/// -[DataMember(Name = "has_native_entry_events", IsRequired = false, EmitDefaultValue = false)] -public bool? HasNativeEntryEvents { get; set; } - -/// -/// Keypad battery status. -/// -[DataMember(Name = "keypad_battery", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesKeypadBattery? KeypadBattery { get; set; } - -/// -/// Indicates whether the lock is locked. -/// -[DataMember(Name = "locked", IsRequired = false, EmitDefaultValue = false)] -public bool? Locked { get; set; } - -/// -/// Maximum number of active access codes that the device supports. -/// -[DataMember(Name = "max_active_codes_supported", IsRequired = false, EmitDefaultValue = false)] -public float? MaxActiveCodesSupported { get; set; } - -/// -/// Time frames that may be requested when creating an offline access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. -/// -[DataMember(Name = "offline_time_frame_options", IsRequired = false, EmitDefaultValue = false)] -public List? OfflineTimeFrameOptions { get; set; } - -/// -/// Time frames that may be requested when creating an online access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. -/// -[DataMember(Name = "online_time_frame_options", IsRequired = false, EmitDefaultValue = false)] -public List? OnlineTimeFrameOptions { get; set; } - -/// -/// Supported code lengths for access codes. -/// -[DataMember(Name = "supported_code_lengths", IsRequired = false, EmitDefaultValue = false)] -public List? SupportedCodeLengths { get; set; } - -/// -/// Indicates whether the device supports a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). -/// -[DataMember(Name = "supports_backup_access_code_pool", IsRequired = false, EmitDefaultValue = false)] -public bool? SupportsBackupAccessCodePool { get; set; } - -/// -/// Active [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[Obsolete("Use `active_thermostat_schedule_id` with `/thermostats/schedules/get` instead.")] -[DataMember(Name = "active_thermostat_schedule", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesActiveThermostatSchedule? ActiveThermostatSchedule { get; set; } - -/// -/// ID of the active [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "active_thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] -public string? ActiveThermostatScheduleId { get; set; } - -/// -/// Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". -/// -[DataMember(Name = "available_climate_preset_modes", IsRequired = false, EmitDefaultValue = false)] -public List? AvailableClimatePresetModes { get; set; } - -/// -/// Available [climate presets](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for the thermostat. -/// -[DataMember(Name = "available_climate_presets", IsRequired = false, EmitDefaultValue = false)] -public List? AvailableClimatePresets { get; set; } - -/// -/// Fan mode settings that the thermostat supports. -/// -[DataMember(Name = "available_fan_mode_settings", IsRequired = false, EmitDefaultValue = false)] -public List? AvailableFanModeSettings { get; set; } - -/// -/// HVAC mode settings that the thermostat supports. -/// -[DataMember(Name = "available_hvac_mode_settings", IsRequired = false, EmitDefaultValue = false)] -public List? AvailableHvacModeSettings { get; set; } - -/// -/// Current climate setting. -/// -[DataMember(Name = "current_climate_setting", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesCurrentClimateSetting? CurrentClimateSetting { get; set; } - -[Obsolete("use fallback_climate_preset_key to specify a fallback climate preset instead.")] -[DataMember(Name = "default_climate_setting", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesDefaultClimateSetting? DefaultClimateSetting { get; set; } - -/// -/// Key of the [fallback climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) for the thermostat. -/// -[DataMember(Name = "fallback_climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string? FallbackClimatePresetKey { get; set; } - -[Obsolete("Use `current_climate_setting.fan_mode_setting` instead.")] -[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public DeviceProperties.FanModeSettingEnum? FanModeSetting { get; set; } - -/// -/// Indicates whether the connected HVAC system is currently cooling, as reported by the thermostat. -/// -[DataMember(Name = "is_cooling", IsRequired = false, EmitDefaultValue = false)] -public bool? IsCooling { get; set; } - -/// -/// Indicates whether the fan in the connected HVAC system is currently running, as reported by the thermostat. -/// -[DataMember(Name = "is_fan_running", IsRequired = false, EmitDefaultValue = false)] -public bool? IsFanRunning { get; set; } - -/// -/// Indicates whether the connected HVAC system is currently heating, as reported by the thermostat. -/// -[DataMember(Name = "is_heating", IsRequired = false, EmitDefaultValue = false)] -public bool? IsHeating { get; set; } - -/// -/// Indicates whether the current thermostat settings differ from the most recent active program or schedule that Seam activated. For this condition to occur, `current_climate_setting.manual_override_allowed` must also be `true`. -/// -[DataMember(Name = "is_temporary_manual_override_active", IsRequired = false, EmitDefaultValue = false)] -public bool? IsTemporaryManualOverrideActive { get; set; } - -/// -/// Maximum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. -/// -[DataMember(Name = "max_cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? MaxCoolingSetPointCelsius { get; set; } - -/// -/// Maximum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. -/// -[DataMember(Name = "max_cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? MaxCoolingSetPointFahrenheit { get; set; } - -/// -/// Maximum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. -/// -[DataMember(Name = "max_heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? MaxHeatingSetPointCelsius { get; set; } - -/// -/// Maximum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. -/// -[DataMember(Name = "max_heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? MaxHeatingSetPointFahrenheit { get; set; } - -/// -/// Maximum number of periods that the thermostat can support per day. For example, if the thermostat supports 4 periods per day, this value is 4. -/// -[DataMember(Name = "max_thermostat_daily_program_periods_per_day", IsRequired = false, EmitDefaultValue = false)] -public float? MaxThermostatDailyProgramPeriodsPerDay { get; set; } - -/// -/// Maximum number of climate presets that the thermostat can support for weekly programming. -/// -[DataMember(Name = "max_unique_climate_presets_per_thermostat_weekly_program", IsRequired = false, EmitDefaultValue = false)] -public float? MaxUniqueClimatePresetsPerThermostatWeeklyProgram { get; set; } - -/// -/// Minimum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. -/// -[DataMember(Name = "min_cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? MinCoolingSetPointCelsius { get; set; } - -/// -/// Minimum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. -/// -[DataMember(Name = "min_cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? MinCoolingSetPointFahrenheit { get; set; } - -/// -/// Minimum [temperature difference](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °C between the cooling and heating set points when in heat-cool (auto) mode. -/// -[DataMember(Name = "min_heating_cooling_delta_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? MinHeatingCoolingDeltaCelsius { get; set; } - -/// -/// Minimum [temperature difference](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °F between the cooling and heating set points when in heat-cool (auto) mode. -/// -[DataMember(Name = "min_heating_cooling_delta_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? MinHeatingCoolingDeltaFahrenheit { get; set; } - -/// -/// Minimum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. -/// -[DataMember(Name = "min_heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? MinHeatingSetPointCelsius { get; set; } - -/// -/// Minimum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. -/// -[DataMember(Name = "min_heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? MinHeatingSetPointFahrenheit { get; set; } - -/// -/// Reported relative humidity, as a value between 0 and 1, inclusive. -/// -[DataMember(Name = "relative_humidity", IsRequired = false, EmitDefaultValue = false)] -public float? RelativeHumidity { get; set; } - -/// -/// Reported temperature in °C. -/// -[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? TemperatureCelsius { get; set; } - -/// -/// Reported temperature in °F. -/// -[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? TemperatureFahrenheit { get; set; } - -/// -/// Current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. -/// -[DataMember(Name = "temperature_threshold", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesTemperatureThreshold? TemperatureThreshold { get; set; } - -/// -/// Precision of the thermostat's period in minutes. For example, if the thermostat supports 15-minute periods, this value is 15. All values are relative to the top of the hour, so for 15 minutes, the periods would be 0, 15, 30, and 45 minutes past the hour. -/// -[DataMember(Name = "thermostat_daily_program_period_precision_minutes", IsRequired = false, EmitDefaultValue = false)] -public float? ThermostatDailyProgramPeriodPrecisionMinutes { get; set; } - -/// -/// Configured [daily programs](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. -/// -[DataMember(Name = "thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] -public List? ThermostatDailyPrograms { get; set; } - -/// -/// Current [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. -/// -[DataMember(Name = "thermostat_weekly_program", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesThermostatWeeklyProgram? ThermostatWeeklyProgram { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAccessoryKeypad_model")] -public class DevicePropertiesAccessoryKeypad -{ -[JsonConstructorAttribute] -protected DevicePropertiesAccessoryKeypad() { } - -public DevicePropertiesAccessoryKeypad(DevicePropertiesAccessoryKeypadBattery? battery = default, bool isConnected = default) -{ -Battery = battery; -IsConnected = isConnected; -} - -/// -/// Keypad battery properties. -/// -[DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAccessoryKeypadBattery? Battery { get; set; } - -/// -/// Indicates if an accessory keypad is connected to the device. -/// -[DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnected { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAccessoryKeypadBattery_model")] -public class DevicePropertiesAccessoryKeypadBattery -{ -[JsonConstructorAttribute] -protected DevicePropertiesAccessoryKeypadBattery() { } - -public DevicePropertiesAccessoryKeypadBattery(float level = default) -{ -Level = level; -} - -[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] -public float Level { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAppearance_model")] -public class DevicePropertiesAppearance -{ -[JsonConstructorAttribute] -protected DevicePropertiesAppearance() { } - -public DevicePropertiesAppearance(string name = default) -{ -Name = name; -} - -/// -/// Name of the device as seen from the provider API and application, not settable through Seam. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesBattery_model")] -public class DevicePropertiesBattery -{ -[JsonConstructorAttribute] -protected DevicePropertiesBattery() { } - -public DevicePropertiesBattery(float level = default, DevicePropertiesBattery.StatusEnum status = default) -{ -Level = level; -Status = status; -} - -/// -/// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "critical")] -Critical = 1, - -[EnumMember(Value = "low")] -Low = 2, - -[EnumMember(Value = "good")] -Good = 3, - -[EnumMember(Value = "full")] -Full = 4, -} - -/// -/// Battery charge level as a value between 0 and 1, inclusive. -/// -[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] -public float Level { get; set; } - -/// -/// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesBattery.StatusEnum Status { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesModel_model")] -public class DevicePropertiesModel -{ -[JsonConstructorAttribute] -protected DevicePropertiesModel() { } - -public DevicePropertiesModel(bool? accessoryKeypadSupported = default, bool? canConnectAccessoryKeypad = default, string displayName = default, bool? hasBuiltInKeypad = default, string manufacturerDisplayName = default, bool? offlineAccessCodesSupported = default, bool? onlineAccessCodesSupported = default) -{ -AccessoryKeypadSupported = accessoryKeypadSupported; -CanConnectAccessoryKeypad = canConnectAccessoryKeypad; -DisplayName = displayName; -HasBuiltInKeypad = hasBuiltInKeypad; -ManufacturerDisplayName = manufacturerDisplayName; -OfflineAccessCodesSupported = offlineAccessCodesSupported; -OnlineAccessCodesSupported = onlineAccessCodesSupported; -} - -[Obsolete("use device.properties.model.can_connect_accessory_keypad")] -[DataMember(Name = "accessory_keypad_supported", IsRequired = false, EmitDefaultValue = false)] -public bool? AccessoryKeypadSupported { get; set; } - -/// -/// Indicates whether the device can connect a accessory keypad. -/// -[DataMember(Name = "can_connect_accessory_keypad", IsRequired = false, EmitDefaultValue = false)] -public bool? CanConnectAccessoryKeypad { get; set; } - -/// -/// Display name of the device model. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Indicates whether the device has a built in accessory keypad. -/// -[DataMember(Name = "has_built_in_keypad", IsRequired = false, EmitDefaultValue = false)] -public bool? HasBuiltInKeypad { get; set; } - -/// -/// Display name that corresponds to the manufacturer-specific terminology for the device. -/// -[DataMember(Name = "manufacturer_display_name", IsRequired = false, EmitDefaultValue = false)] -public string ManufacturerDisplayName { get; set; } - -[Obsolete("use device.can_program_offline_access_codes.")] -[DataMember(Name = "offline_access_codes_supported", IsRequired = false, EmitDefaultValue = false)] -public bool? OfflineAccessCodesSupported { get; set; } - -[Obsolete("use device.can_program_online_access_codes.")] -[DataMember(Name = "online_access_codes_supported", IsRequired = false, EmitDefaultValue = false)] -public bool? OnlineAccessCodesSupported { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAssaAbloyCredentialServiceMetadata_model")] -public class DevicePropertiesAssaAbloyCredentialServiceMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesAssaAbloyCredentialServiceMetadata() { } - -public DevicePropertiesAssaAbloyCredentialServiceMetadata(List? endpoints = default, bool? hasActiveEndpoint = default) -{ -Endpoints = endpoints; -HasActiveEndpoint = hasActiveEndpoint; -} - -/// -/// Endpoints associated with the phone. -/// -[DataMember(Name = "endpoints", IsRequired = false, EmitDefaultValue = false)] -public List? Endpoints { get; set; } - -/// -/// Indicates whether the credential service has active endpoints associated with the phone. -/// -[DataMember(Name = "has_active_endpoint", IsRequired = false, EmitDefaultValue = false)] -public bool? HasActiveEndpoint { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAssaAbloyCredentialServiceMetadataEndpoints_model")] -public class DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints -{ -[JsonConstructorAttribute] -protected DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints() { } - -public DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints(string? endpointId = default, bool? isActive = default) -{ -EndpointId = endpointId; -IsActive = isActive; -} - -/// -/// ID of the associated endpoint. -/// -[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] -public string? EndpointId { get; set; } - -/// -/// Indicated whether the endpoint is active. -/// -[DataMember(Name = "is_active", IsRequired = false, EmitDefaultValue = false)] -public bool? IsActive { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesSaltoSpaceCredentialServiceMetadata_model")] -public class DevicePropertiesSaltoSpaceCredentialServiceMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesSaltoSpaceCredentialServiceMetadata() { } - -public DevicePropertiesSaltoSpaceCredentialServiceMetadata(bool? hasActivePhone = default) -{ -HasActivePhone = hasActivePhone; -} - -/// -/// Indicates whether the credential service has an active associated phone. -/// -[DataMember(Name = "has_active_phone", IsRequired = false, EmitDefaultValue = false)] -public bool? HasActivePhone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAkilesMetadata_model")] -public class DevicePropertiesAkilesMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesAkilesMetadata() { } - -public DevicePropertiesAkilesMetadata(string? gadgetId = default, string? gadgetName = default, string? productName = default) -{ -GadgetId = gadgetId; -GadgetName = gadgetName; -ProductName = productName; -} - -/// -/// Gadget ID for an Akiles device. -/// -[DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] -public string? GadgetId { get; set; } - -/// -/// Gadget name for an Akiles device. -/// -[DataMember(Name = "gadget_name", IsRequired = false, EmitDefaultValue = false)] -public string? GadgetName { get; set; } - -/// -/// Product name for an Akiles device. -/// -[DataMember(Name = "product_name", IsRequired = false, EmitDefaultValue = false)] -public string? ProductName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAqaraMetadata_model")] -public class DevicePropertiesAqaraMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesAqaraMetadata() { } - -public DevicePropertiesAqaraMetadata(string? deviceName = default, string? did = default, string? firmwareVersion = default, string? model = default, float? modelType = default, string? parentDid = default, string? positionId = default, string? timeZone = default) -{ -DeviceName = deviceName; -Did = did; -FirmwareVersion = firmwareVersion; -Model = model; -ModelType = modelType; -ParentDid = parentDid; -PositionId = positionId; -TimeZone = timeZone; -} - -/// -/// Device name for an Aqara device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Device ID (did) for an Aqara device. -/// -[DataMember(Name = "did", IsRequired = false, EmitDefaultValue = false)] -public string? Did { get; set; } - -/// -/// Firmware version for an Aqara device. -/// -[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] -public string? FirmwareVersion { get; set; } - -/// -/// Model identifier for an Aqara device. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -/// -/// Model type for an Aqara device. -/// -[DataMember(Name = "model_type", IsRequired = false, EmitDefaultValue = false)] -public float? ModelType { get; set; } - -/// -/// Parent gateway device ID for an Aqara device. -/// -[DataMember(Name = "parent_did", IsRequired = false, EmitDefaultValue = false)] -public string? ParentDid { get; set; } - -/// -/// Position (room) ID for an Aqara device. -/// -[DataMember(Name = "position_id", IsRequired = false, EmitDefaultValue = false)] -public string? PositionId { get; set; } - -/// -/// Time zone reported for an Aqara device (e.g. GMT-07:00). -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesArloMetadata_model")] -public class DevicePropertiesArloMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesArloMetadata() { } - -public DevicePropertiesArloMetadata(string? deviceId = default, string? deviceName = default, string? firmwareVersion = default, string? hardwareVersion = default, string? modelId = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -FirmwareVersion = firmwareVersion; -HardwareVersion = hardwareVersion; -ModelId = modelId; -} - -/// -/// Device ID reported by Arlo. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name reported by Arlo. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Firmware version reported by Arlo. -/// -[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] -public string? FirmwareVersion { get; set; } - -/// -/// Hardware version reported by Arlo. -/// -[DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] -public string? HardwareVersion { get; set; } - -/// -/// Model ID reported by Arlo. -/// -[DataMember(Name = "model_id", IsRequired = false, EmitDefaultValue = false)] -public string? ModelId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAssaAbloyVostioMetadata_model")] -public class DevicePropertiesAssaAbloyVostioMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesAssaAbloyVostioMetadata() { } - -public DevicePropertiesAssaAbloyVostioMetadata(string? encoderName = default) -{ -EncoderName = encoderName; -} - -/// -/// Encoder name for an ASSA ABLOY Vostio system. -/// -[DataMember(Name = "encoder_name", IsRequired = false, EmitDefaultValue = false)] -public string? EncoderName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAugustMetadata_model")] -public class DevicePropertiesAugustMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesAugustMetadata() { } - -public DevicePropertiesAugustMetadata(bool? hasKeypad = default, string? houseId = default, string? houseName = default, string? keypadBatteryLevel = default, string? lockId = default, string? lockName = default, string? model = default) -{ -HasKeypad = hasKeypad; -HouseId = houseId; -HouseName = houseName; -KeypadBatteryLevel = keypadBatteryLevel; -LockId = lockId; -LockName = lockName; -Model = model; -} - -/// -/// Indicates whether an August device has a keypad. -/// -[DataMember(Name = "has_keypad", IsRequired = false, EmitDefaultValue = false)] -public bool? HasKeypad { get; set; } - -/// -/// House ID for an August device. -/// -[DataMember(Name = "house_id", IsRequired = false, EmitDefaultValue = false)] -public string? HouseId { get; set; } - -/// -/// House name for an August device. -/// -[DataMember(Name = "house_name", IsRequired = false, EmitDefaultValue = false)] -public string? HouseName { get; set; } - -/// -/// Keypad battery level for an August device. -/// -[DataMember(Name = "keypad_battery_level", IsRequired = false, EmitDefaultValue = false)] -public string? KeypadBatteryLevel { get; set; } - -/// -/// Lock ID for an August device. -/// -[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] -public string? LockId { get; set; } - -/// -/// Lock name for an August device. -/// -[DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] -public string? LockName { get; set; } - -/// -/// Model for an August device. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAvigilonAltaMetadata_model")] -public class DevicePropertiesAvigilonAltaMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesAvigilonAltaMetadata() { } - -public DevicePropertiesAvigilonAltaMetadata(string? entryName = default, float? entryRelaysTotalCount = default, string? orgName = default, float? siteId = default, string? siteName = default, float? zoneId = default, string? zoneName = default) -{ -EntryName = entryName; -EntryRelaysTotalCount = entryRelaysTotalCount; -OrgName = orgName; -SiteId = siteId; -SiteName = siteName; -ZoneId = zoneId; -ZoneName = zoneName; -} - -/// -/// Entry name for an Avigilon Alta system. -/// -[DataMember(Name = "entry_name", IsRequired = false, EmitDefaultValue = false)] -public string? EntryName { get; set; } - -/// -/// Total count of entry relays for an Avigilon Alta system. -/// -[DataMember(Name = "entry_relays_total_count", IsRequired = false, EmitDefaultValue = false)] -public float? EntryRelaysTotalCount { get; set; } - -/// -/// Organization name for an Avigilon Alta system. -/// -[DataMember(Name = "org_name", IsRequired = false, EmitDefaultValue = false)] -public string? OrgName { get; set; } - -/// -/// Site ID for an Avigilon Alta system. -/// -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public float? SiteId { get; set; } - -/// -/// Site name for an Avigilon Alta system. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -/// -/// Zone ID for an Avigilon Alta system. -/// -[DataMember(Name = "zone_id", IsRequired = false, EmitDefaultValue = false)] -public float? ZoneId { get; set; } - -/// -/// Zone name for an Avigilon Alta system. -/// -[DataMember(Name = "zone_name", IsRequired = false, EmitDefaultValue = false)] -public string? ZoneName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesBrivoMetadata_model")] -public class DevicePropertiesBrivoMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesBrivoMetadata() { } - -public DevicePropertiesBrivoMetadata(bool? activationEnabled = default, string? deviceName = default) -{ -ActivationEnabled = activationEnabled; -DeviceName = deviceName; -} - -/// -/// Indicates whether the Brivo access point has activation (remote unlock) enabled. -/// -[DataMember(Name = "activation_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? ActivationEnabled { get; set; } - -/// -/// Device name for a Brivo device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesControlbywebMetadata_model")] -public class DevicePropertiesControlbywebMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesControlbywebMetadata() { } - -public DevicePropertiesControlbywebMetadata(string? deviceId = default, string? deviceName = default, string? relayName = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -RelayName = relayName; -} - -/// -/// Device ID for a ControlByWeb device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a ControlByWeb device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Relay name for a ControlByWeb device. -/// -[DataMember(Name = "relay_name", IsRequired = false, EmitDefaultValue = false)] -public string? RelayName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeIhoMetadata_model")] -public class DevicePropertiesDormakabaOracodeIhoMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesDormakabaOracodeIhoMetadata() { } - -public DevicePropertiesDormakabaOracodeIhoMetadata(float? doorId = default, string? doorName = default, string? ianaTimezone = default, List? userLevels = default) -{ -DoorId = doorId; -DoorName = doorName; -IanaTimezone = ianaTimezone; -UserLevels = userLevels; -} - -/// -/// Door ID for a dormakaba Oracode Homeowner's Portal device. -/// -[DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] -public float? DoorId { get; set; } - -/// -/// Name of the door for a dormakaba Oracode Homeowner's Portal device. -/// -[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] -public string? DoorName { get; set; } - -/// -/// IANA time zone for a dormakaba Oracode Homeowner's Portal device. -/// -[DataMember(Name = "iana_timezone", IsRequired = false, EmitDefaultValue = false)] -public string? IanaTimezone { get; set; } - -/// -/// User levels for a dormakaba Oracode Homeowner's Portal device. -/// -[DataMember(Name = "user_levels", IsRequired = false, EmitDefaultValue = false)] -public List? UserLevels { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeIhoMetadataUserLevels_model")] -public class DevicePropertiesDormakabaOracodeIhoMetadataUserLevels -{ -[JsonConstructorAttribute] -protected DevicePropertiesDormakabaOracodeIhoMetadataUserLevels() { } - -public DevicePropertiesDormakabaOracodeIhoMetadataUserLevels(float? userLevel = default, string? userLevelCheckInTime = default, string? userLevelCheckOutTime = default, string? userLevelName = default, string? userLevelType = default) -{ -UserLevel = userLevel; -UserLevelCheckInTime = userLevelCheckInTime; -UserLevelCheckOutTime = userLevelCheckOutTime; -UserLevelName = userLevelName; -UserLevelType = userLevelType; -} - -[DataMember(Name = "user_level", IsRequired = false, EmitDefaultValue = false)] -public float? UserLevel { get; set; } - -[DataMember(Name = "user_level_check_in_time", IsRequired = false, EmitDefaultValue = false)] -public string? UserLevelCheckInTime { get; set; } - -[DataMember(Name = "user_level_check_out_time", IsRequired = false, EmitDefaultValue = false)] -public string? UserLevelCheckOutTime { get; set; } - -[DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] -public string? UserLevelName { get; set; } - -[DataMember(Name = "user_level_type", IsRequired = false, EmitDefaultValue = false)] -public string? UserLevelType { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeMetadata_model")] -public class DevicePropertiesDormakabaOracodeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesDormakabaOracodeMetadata() { } - -public DevicePropertiesDormakabaOracodeMetadata(string? deviceId = default, float? doorId = default, bool? doorIsWireless = default, string? doorName = default, string? ianaTimezone = default, List? predefinedTimeSlots = default, float? siteId = default, string? siteName = default) -{ -DeviceId = deviceId; -DoorId = doorId; -DoorIsWireless = doorIsWireless; -DoorName = doorName; -IanaTimezone = ianaTimezone; -PredefinedTimeSlots = predefinedTimeSlots; -SiteId = siteId; -SiteName = siteName; -} - -/// -/// Device ID for a dormakaba Oracode device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Door ID for a dormakaba Oracode device. -/// -[DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] -public float? DoorId { get; set; } - -/// -/// Indicates whether a door is wireless for a dormakaba Oracode device. -/// -[DataMember(Name = "door_is_wireless", IsRequired = false, EmitDefaultValue = false)] -public bool? DoorIsWireless { get; set; } - -/// -/// Door name for a dormakaba Oracode device. -/// -[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] -public string? DoorName { get; set; } - -/// -/// IANA time zone for a dormakaba Oracode device. -/// -[DataMember(Name = "iana_timezone", IsRequired = false, EmitDefaultValue = false)] -public string? IanaTimezone { get; set; } - -/// -/// Predefined time slots for a dormakaba Oracode device. -/// -[DataMember(Name = "predefined_time_slots", IsRequired = false, EmitDefaultValue = false)] -public List? PredefinedTimeSlots { get; set; } - -/// -/// Site ID for a dormakaba Oracode device. -/// -[Obsolete("Previously marked as \"@DEPRECATED.\"")] -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public float? SiteId { get; set; } - -/// -/// Site name for a dormakaba Oracode device. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots_model")] -public class DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots -{ -[JsonConstructorAttribute] -protected DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots() { } - -public DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots(string? checkInTime = default, string? checkOutTime = default, string? dormakabaOracodeUserLevelId = default, float? dormakabaOracodeUserLevelPrefix = default, bool? is_24Hour = default, bool? isBiweeklyMode = default, bool? isMaster = default, bool? isOneShot = default, string? name = default, float? prefix = default) -{ -CheckInTime = checkInTime; -CheckOutTime = checkOutTime; -DormakabaOracodeUserLevelId = dormakabaOracodeUserLevelId; -DormakabaOracodeUserLevelPrefix = dormakabaOracodeUserLevelPrefix; -Is_24Hour = is_24Hour; -IsBiweeklyMode = isBiweeklyMode; -IsMaster = isMaster; -IsOneShot = isOneShot; -Name = name; -Prefix = prefix; -} - -/// -/// Check in time for a time slot for a dormakaba Oracode device. -/// -[DataMember(Name = "check_in_time", IsRequired = false, EmitDefaultValue = false)] -public string? CheckInTime { get; set; } - -/// -/// Checkout time for a time slot for a dormakaba Oracode device. -/// -[DataMember(Name = "check_out_time", IsRequired = false, EmitDefaultValue = false)] -public string? CheckOutTime { get; set; } - -/// -/// ID of a user level for a dormakaba Oracode device. -/// -[DataMember(Name = "dormakaba_oracode_user_level_id", IsRequired = false, EmitDefaultValue = false)] -public string? DormakabaOracodeUserLevelId { get; set; } - -/// -/// Prefix for a user level for a dormakaba Oracode device. -/// -[DataMember(Name = "dormakaba_oracode_user_level_prefix", IsRequired = false, EmitDefaultValue = false)] -public float? DormakabaOracodeUserLevelPrefix { get; set; } - -/// -/// Indicates whether a time slot for a dormakaba Oracode device is a 24-hour time slot. -/// -[DataMember(Name = "is_24_hour", IsRequired = false, EmitDefaultValue = false)] -public bool? Is_24Hour { get; set; } - -/// -/// Indicates whether a time slot for a dormakaba Oracode device is in biweekly mode. -/// -[DataMember(Name = "is_biweekly_mode", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBiweeklyMode { get; set; } - -/// -/// Indicates whether a time slot for a dormakaba Oracode device is a master time slot. -/// -[DataMember(Name = "is_master", IsRequired = false, EmitDefaultValue = false)] -public bool? IsMaster { get; set; } - -/// -/// Indicates whether a time slot for a dormakaba Oracode device is a one-shot time slot. -/// -[DataMember(Name = "is_one_shot", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOneShot { get; set; } - -/// -/// Name of a time slot for a dormakaba Oracode device. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Prefix for a time slot for a dormakaba Oracode device. -/// -[DataMember(Name = "prefix", IsRequired = false, EmitDefaultValue = false)] -public float? Prefix { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesEcobeeMetadata_model")] -public class DevicePropertiesEcobeeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesEcobeeMetadata() { } - -public DevicePropertiesEcobeeMetadata(string? deviceName = default, string? ecobeeDeviceId = default) -{ -DeviceName = deviceName; -EcobeeDeviceId = ecobeeDeviceId; -} - -/// -/// Device name for an ecobee device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Device ID for an ecobee device. -/// -[DataMember(Name = "ecobee_device_id", IsRequired = false, EmitDefaultValue = false)] -public string? EcobeeDeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesFourSuitesMetadata_model")] -public class DevicePropertiesFourSuitesMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesFourSuitesMetadata() { } - -public DevicePropertiesFourSuitesMetadata(float? deviceId = default, string? deviceName = default, float? recloseDelayInSeconds = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -RecloseDelayInSeconds = recloseDelayInSeconds; -} - -/// -/// Device ID for a 4SUITES device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public float? DeviceId { get; set; } - -/// -/// Device name for a 4SUITES device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Reclose delay, in seconds, for a 4SUITES device. -/// -[DataMember(Name = "reclose_delay_in_seconds", IsRequired = false, EmitDefaultValue = false)] -public float? RecloseDelayInSeconds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesGenieMetadata_model")] -public class DevicePropertiesGenieMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesGenieMetadata() { } - -public DevicePropertiesGenieMetadata(string? deviceName = default, string? doorName = default) -{ -DeviceName = deviceName; -DoorName = doorName; -} - -/// -/// Lock name for a Genie device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Door name for a Genie device. -/// -[DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] -public string? DoorName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesHoneywellResideoMetadata_model")] -public class DevicePropertiesHoneywellResideoMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesHoneywellResideoMetadata() { } - -public DevicePropertiesHoneywellResideoMetadata(string? deviceName = default, string? honeywellResideoDeviceId = default) -{ -DeviceName = deviceName; -HoneywellResideoDeviceId = honeywellResideoDeviceId; -} - -/// -/// Device name for a Honeywell Resideo device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Device ID for a Honeywell Resideo device. -/// -[DataMember(Name = "honeywell_resideo_device_id", IsRequired = false, EmitDefaultValue = false)] -public string? HoneywellResideoDeviceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesIglooMetadata_model")] -public class DevicePropertiesIglooMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesIglooMetadata() { } - -public DevicePropertiesIglooMetadata(string? bridgeId = default, string? deviceId = default, string? model = default) -{ -BridgeId = bridgeId; -DeviceId = deviceId; -Model = model; -} - -/// -/// Bridge ID for an igloo device. -/// -[DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] -public string? BridgeId { get; set; } - -/// -/// Device ID for an igloo device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Model for an igloo device. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesIgloohomeMetadata_model")] -public class DevicePropertiesIgloohomeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesIgloohomeMetadata() { } - -public DevicePropertiesIgloohomeMetadata(string? bridgeId = default, string? bridgeName = default, string? deviceId = default, string? deviceName = default, bool? isAccessoryKeypadLinkedToBridge = default, string? keypadId = default) -{ -BridgeId = bridgeId; -BridgeName = bridgeName; -DeviceId = deviceId; -DeviceName = deviceName; -IsAccessoryKeypadLinkedToBridge = isAccessoryKeypadLinkedToBridge; -KeypadId = keypadId; -} - -/// -/// Bridge ID for an igloohome device. -/// -[DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] -public string? BridgeId { get; set; } - -/// -/// Bridge name for an igloohome device. -/// -[DataMember(Name = "bridge_name", IsRequired = false, EmitDefaultValue = false)] -public string? BridgeName { get; set; } - -/// -/// Device ID for an igloohome device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for an igloohome device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Indicates whether a keypad is linked to a bridge for an igloohome device. -/// -[DataMember(Name = "is_accessory_keypad_linked_to_bridge", IsRequired = false, EmitDefaultValue = false)] -public bool? IsAccessoryKeypadLinkedToBridge { get; set; } - -/// -/// Keypad ID for an igloohome device. -/// -[DataMember(Name = "keypad_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeypadId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesKeynestMetadata_model")] -public class DevicePropertiesKeynestMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesKeynestMetadata() { } - -public DevicePropertiesKeynestMetadata(string? address = default, float? currentOrLastStoreId = default, string? currentStatus = default, string? currentUserCompany = default, string? currentUserEmail = default, string? currentUserName = default, string? currentUserPhoneNumber = default, float? defaultOfficeId = default, string? deviceName = default, float? fobId = default, string? handoverMethod = default, bool? hasPhoto = default, bool? isQuadientLocker = default, string? keyId = default, string? keyNotes = default, string? keynestAppUser = default, string? lastMovement = default, string? propertyId = default, string? propertyPostcode = default, string? statusType = default, string? subscriptionPlan = default) -{ -Address = address; -CurrentOrLastStoreId = currentOrLastStoreId; -CurrentStatus = currentStatus; -CurrentUserCompany = currentUserCompany; -CurrentUserEmail = currentUserEmail; -CurrentUserName = currentUserName; -CurrentUserPhoneNumber = currentUserPhoneNumber; -DefaultOfficeId = defaultOfficeId; -DeviceName = deviceName; -FobId = fobId; -HandoverMethod = handoverMethod; -HasPhoto = hasPhoto; -IsQuadientLocker = isQuadientLocker; -KeyId = keyId; -KeyNotes = keyNotes; -KeynestAppUser = keynestAppUser; -LastMovement = lastMovement; -PropertyId = propertyId; -PropertyPostcode = propertyPostcode; -StatusType = statusType; -SubscriptionPlan = subscriptionPlan; -} - -/// -/// Address for a KeyNest device. -/// -[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] -public string? Address { get; set; } - -/// -/// Current or last store ID for a KeyNest device. -/// -[DataMember(Name = "current_or_last_store_id", IsRequired = false, EmitDefaultValue = false)] -public float? CurrentOrLastStoreId { get; set; } - -/// -/// Current status for a KeyNest device. -/// -[DataMember(Name = "current_status", IsRequired = false, EmitDefaultValue = false)] -public string? CurrentStatus { get; set; } - -/// -/// Current user company for a KeyNest device. -/// -[DataMember(Name = "current_user_company", IsRequired = false, EmitDefaultValue = false)] -public string? CurrentUserCompany { get; set; } - -/// -/// Current user email for a KeyNest device. -/// -[DataMember(Name = "current_user_email", IsRequired = false, EmitDefaultValue = false)] -public string? CurrentUserEmail { get; set; } - -/// -/// Current user name for a KeyNest device. -/// -[DataMember(Name = "current_user_name", IsRequired = false, EmitDefaultValue = false)] -public string? CurrentUserName { get; set; } - -/// -/// Current user phone number for a KeyNest device. -/// -[DataMember(Name = "current_user_phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? CurrentUserPhoneNumber { get; set; } - -/// -/// Default office ID for a KeyNest device. -/// -[DataMember(Name = "default_office_id", IsRequired = false, EmitDefaultValue = false)] -public float? DefaultOfficeId { get; set; } - -/// -/// Device name for a KeyNest device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Fob ID for a KeyNest device. -/// -[DataMember(Name = "fob_id", IsRequired = false, EmitDefaultValue = false)] -public float? FobId { get; set; } - -/// -/// Handover method for a KeyNest device. -/// -[DataMember(Name = "handover_method", IsRequired = false, EmitDefaultValue = false)] -public string? HandoverMethod { get; set; } - -/// -/// Whether the KeyNest device has a photo. -/// -[DataMember(Name = "has_photo", IsRequired = false, EmitDefaultValue = false)] -public bool? HasPhoto { get; set; } - -/// -/// Whether the key is in a locker that does not support the access codes API. -/// -[DataMember(Name = "is_quadient_locker", IsRequired = false, EmitDefaultValue = false)] -public bool? IsQuadientLocker { get; set; } - -/// -/// Key ID for a KeyNest device. -/// -[DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] -public string? KeyId { get; set; } - -/// -/// Key notes for a KeyNest device. -/// -[DataMember(Name = "key_notes", IsRequired = false, EmitDefaultValue = false)] -public string? KeyNotes { get; set; } - -/// -/// KeyNest app user for a KeyNest device. -/// -[DataMember(Name = "keynest_app_user", IsRequired = false, EmitDefaultValue = false)] -public string? KeynestAppUser { get; set; } - -/// -/// Last movement timestamp for a KeyNest device. -/// -[DataMember(Name = "last_movement", IsRequired = false, EmitDefaultValue = false)] -public string? LastMovement { get; set; } - -/// -/// Property ID for a KeyNest device. -/// -[DataMember(Name = "property_id", IsRequired = false, EmitDefaultValue = false)] -public string? PropertyId { get; set; } - -/// -/// Property postcode for a KeyNest device. -/// -[DataMember(Name = "property_postcode", IsRequired = false, EmitDefaultValue = false)] -public string? PropertyPostcode { get; set; } - -/// -/// Status type for a KeyNest device. -/// -[DataMember(Name = "status_type", IsRequired = false, EmitDefaultValue = false)] -public string? StatusType { get; set; } - -/// -/// Subscription plan for a KeyNest device. -/// -[DataMember(Name = "subscription_plan", IsRequired = false, EmitDefaultValue = false)] -public string? SubscriptionPlan { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesKisiMetadata_model")] -public class DevicePropertiesKisiMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesKisiMetadata() { } - -public DevicePropertiesKisiMetadata(string? description = default, float? lockId = default, string? lockName = default, string? placeName = default) -{ -Description = description; -LockId = lockId; -LockName = lockName; -PlaceName = placeName; -} - -/// -/// Description for a Kisi device. -/// -[DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] -public string? Description { get; set; } - -/// -/// Lock ID for a Kisi device. -/// -[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] -public float? LockId { get; set; } - -/// -/// Lock name for a Kisi device. -/// -[DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] -public string? LockName { get; set; } - -/// -/// Place name for a Kisi device. -/// -[DataMember(Name = "place_name", IsRequired = false, EmitDefaultValue = false)] -public string? PlaceName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesKorelockMetadata_model")] -public class DevicePropertiesKorelockMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesKorelockMetadata() { } - -public DevicePropertiesKorelockMetadata(string? deviceId = default, string? deviceName = default, string? firmwareVersion = default, string? locationId = default, string? modelCode = default, string? serialNumber = default, float? wifiSignalStrength = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -FirmwareVersion = firmwareVersion; -LocationId = locationId; -ModelCode = modelCode; -SerialNumber = serialNumber; -WifiSignalStrength = wifiSignalStrength; -} - -/// -/// Device ID for a Korelock device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Korelock device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Firmware version for a Korelock device. -/// -[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] -public string? FirmwareVersion { get; set; } - -/// -/// Location ID for a Korelock device. Required for timebound access codes. -/// -[DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] -public string? LocationId { get; set; } - -/// -/// Model code for a Korelock device. -/// -[DataMember(Name = "model_code", IsRequired = false, EmitDefaultValue = false)] -public string? ModelCode { get; set; } - -/// -/// Serial number for a Korelock device. -/// -[DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] -public string? SerialNumber { get; set; } - -/// -/// WiFi signal strength (0-1) for a Korelock device. -/// -[DataMember(Name = "wifi_signal_strength", IsRequired = false, EmitDefaultValue = false)] -public float? WifiSignalStrength { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesKwiksetMetadata_model")] -public class DevicePropertiesKwiksetMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesKwiksetMetadata() { } - -public DevicePropertiesKwiksetMetadata(string? deviceId = default, string? deviceName = default, string? modelNumber = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -ModelNumber = modelNumber; -} - -/// -/// Device ID for a Kwikset device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Kwikset device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Model number for a Kwikset device. -/// -[DataMember(Name = "model_number", IsRequired = false, EmitDefaultValue = false)] -public string? ModelNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesLocklyMetadata_model")] -public class DevicePropertiesLocklyMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesLocklyMetadata() { } - -public DevicePropertiesLocklyMetadata(string? deviceId = default, string? deviceName = default, string? model = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -Model = model; -} - -/// -/// Device ID for a Lockly device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Lockly device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Model for a Lockly device. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesMinutMetadata_model")] -public class DevicePropertiesMinutMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesMinutMetadata() { } - -public DevicePropertiesMinutMetadata(string? deviceId = default, string? deviceName = default, DevicePropertiesMinutMetadataLatestSensorValues? latestSensorValues = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -LatestSensorValues = latestSensorValues; -} - -/// -/// Device ID for a Minut device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Minut device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Latest sensor values for a Minut device. -/// -[DataMember(Name = "latest_sensor_values", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesMinutMetadataLatestSensorValues? LatestSensorValues { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValues_model")] -public class DevicePropertiesMinutMetadataLatestSensorValues -{ -[JsonConstructorAttribute] -protected DevicePropertiesMinutMetadataLatestSensorValues() { } - -public DevicePropertiesMinutMetadataLatestSensorValues(DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ? accelerometerZ = default, DevicePropertiesMinutMetadataLatestSensorValuesHumidity? humidity = default, DevicePropertiesMinutMetadataLatestSensorValuesPressure? pressure = default, DevicePropertiesMinutMetadataLatestSensorValuesSound? sound = default, DevicePropertiesMinutMetadataLatestSensorValuesTemperature? temperature = default) -{ -AccelerometerZ = accelerometerZ; -Humidity = humidity; -Pressure = pressure; -Sound = sound; -Temperature = temperature; -} - -/// -/// Latest accelerometer Z-axis reading for a Minut device. -/// -[DataMember(Name = "accelerometer_z", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ? AccelerometerZ { get; set; } - -/// -/// Latest humidity reading for a Minut device. -/// -[DataMember(Name = "humidity", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesMinutMetadataLatestSensorValuesHumidity? Humidity { get; set; } - -/// -/// Latest pressure reading for a Minut device. -/// -[DataMember(Name = "pressure", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesMinutMetadataLatestSensorValuesPressure? Pressure { get; set; } - -/// -/// Latest sound reading for a Minut device. -/// -[DataMember(Name = "sound", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesMinutMetadataLatestSensorValuesSound? Sound { get; set; } - -/// -/// Latest temperature reading for a Minut device. -/// -[DataMember(Name = "temperature", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesMinutMetadataLatestSensorValuesTemperature? Temperature { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ_model")] -public class DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ -{ -[JsonConstructorAttribute] -protected DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ() { } - -public DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ(string? time = default, float? value = default) -{ -Time = time; -Value = value; -} - -/// -/// Time of latest accelerometer Z-axis reading for a Minut device. -/// -[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] -public string? Time { get; set; } - -/// -/// Value of latest accelerometer Z-axis reading for a Minut device. -/// -[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] -public float? Value { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesHumidity_model")] -public class DevicePropertiesMinutMetadataLatestSensorValuesHumidity -{ -[JsonConstructorAttribute] -protected DevicePropertiesMinutMetadataLatestSensorValuesHumidity() { } - -public DevicePropertiesMinutMetadataLatestSensorValuesHumidity(string? time = default, float? value = default) -{ -Time = time; -Value = value; -} - -/// -/// Time of latest humidity reading for a Minut device. -/// -[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] -public string? Time { get; set; } - -/// -/// Value of latest humidity reading for a Minut device. -/// -[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] -public float? Value { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesPressure_model")] -public class DevicePropertiesMinutMetadataLatestSensorValuesPressure -{ -[JsonConstructorAttribute] -protected DevicePropertiesMinutMetadataLatestSensorValuesPressure() { } - -public DevicePropertiesMinutMetadataLatestSensorValuesPressure(string? time = default, float? value = default) -{ -Time = time; -Value = value; -} - -/// -/// Time of latest pressure reading for a Minut device. -/// -[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] -public string? Time { get; set; } - -/// -/// Value of latest pressure reading for a Minut device. -/// -[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] -public float? Value { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesSound_model")] -public class DevicePropertiesMinutMetadataLatestSensorValuesSound -{ -[JsonConstructorAttribute] -protected DevicePropertiesMinutMetadataLatestSensorValuesSound() { } - -public DevicePropertiesMinutMetadataLatestSensorValuesSound(string? time = default, float? value = default) -{ -Time = time; -Value = value; -} - -/// -/// Time of latest sound reading for a Minut device. -/// -[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] -public string? Time { get; set; } - -/// -/// Value of latest sound reading for a Minut device. -/// -[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] -public float? Value { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesTemperature_model")] -public class DevicePropertiesMinutMetadataLatestSensorValuesTemperature -{ -[JsonConstructorAttribute] -protected DevicePropertiesMinutMetadataLatestSensorValuesTemperature() { } - -public DevicePropertiesMinutMetadataLatestSensorValuesTemperature(string? time = default, float? value = default) -{ -Time = time; -Value = value; -} - -/// -/// Time of latest temperature reading for a Minut device. -/// -[DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] -public string? Time { get; set; } - -/// -/// Value of latest temperature reading for a Minut device. -/// -[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] -public float? Value { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesNestMetadata_model")] -public class DevicePropertiesNestMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesNestMetadata() { } - -public DevicePropertiesNestMetadata(string? deviceCustomName = default, string? deviceName = default, string? displayName = default, string? nestDeviceId = default, string? nestStructureId = default, string? structureName = default) -{ -DeviceCustomName = deviceCustomName; -DeviceName = deviceName; -DisplayName = displayName; -NestDeviceId = nestDeviceId; -NestStructureId = nestStructureId; -StructureName = structureName; -} - -/// -/// Custom device name for a Google Nest device. The device owner sets this value. -/// -[DataMember(Name = "device_custom_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceCustomName { get; set; } - -/// -/// Device name for a Google Nest device. Google sets this value. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Name of the Google Home room containing the device. The device owner sets this value. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string? DisplayName { get; set; } - -/// -/// Device ID for a Google Nest device. -/// -[DataMember(Name = "nest_device_id", IsRequired = false, EmitDefaultValue = false)] -public string? NestDeviceId { get; set; } - -/// -/// ID of the Google Nest structure containing the device. -/// -[DataMember(Name = "nest_structure_id", IsRequired = false, EmitDefaultValue = false)] -public string? NestStructureId { get; set; } - -/// -/// Name of the Google Nest structure containing the device. The device owner sets this value. -/// -[DataMember(Name = "structure_name", IsRequired = false, EmitDefaultValue = false)] -public string? StructureName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesNoiseawareMetadata_model")] -public class DevicePropertiesNoiseawareMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesNoiseawareMetadata() { } - -public DevicePropertiesNoiseawareMetadata(string? deviceId = default, DevicePropertiesNoiseawareMetadata.DeviceModelEnum? deviceModel = default, string? deviceName = default, float? noiseLevelDecibel = default, float? noiseLevelNrs = default) -{ -DeviceId = deviceId; -DeviceModel = deviceModel; -DeviceName = deviceName; -NoiseLevelDecibel = noiseLevelDecibel; -NoiseLevelNrs = noiseLevelNrs; -} - -/// -/// Device model for a NoiseAware device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceModelEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "indoor")] -Indoor = 1, - -[EnumMember(Value = "outdoor")] -Outdoor = 2, -} - -/// -/// Device ID for a NoiseAware device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device model for a NoiseAware device. -/// -[DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesNoiseawareMetadata.DeviceModelEnum? DeviceModel { get; set; } - -/// -/// Device name for a NoiseAware device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Noise level, in decibels, for a NoiseAware device. -/// -[DataMember(Name = "noise_level_decibel", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseLevelDecibel { get; set; } - -/// -/// Noise level, expressed as a Noise Risk Score (NRS), for a NoiseAware device. -/// -[DataMember(Name = "noise_level_nrs", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseLevelNrs { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesNukiMetadata_model")] -public class DevicePropertiesNukiMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesNukiMetadata() { } - -public DevicePropertiesNukiMetadata(string? deviceId = default, string? deviceName = default, bool? keypad_2Paired = default, bool? keypadBatteryCritical = default, bool? keypadPaired = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -Keypad_2Paired = keypad_2Paired; -KeypadBatteryCritical = keypadBatteryCritical; -KeypadPaired = keypadPaired; -} - -/// -/// Device ID for a Nuki device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Nuki device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Indicates whether keypad 2 is paired for a Nuki device. -/// -[DataMember(Name = "keypad_2_paired", IsRequired = false, EmitDefaultValue = false)] -public bool? Keypad_2Paired { get; set; } - -/// -/// Indicates whether the keypad battery is in a critical state for a Nuki device. -/// -[DataMember(Name = "keypad_battery_critical", IsRequired = false, EmitDefaultValue = false)] -public bool? KeypadBatteryCritical { get; set; } - -/// -/// Indicates whether the keypad is paired for a Nuki device. -/// -[DataMember(Name = "keypad_paired", IsRequired = false, EmitDefaultValue = false)] -public bool? KeypadPaired { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesOmnitecMetadata_model")] -public class DevicePropertiesOmnitecMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesOmnitecMetadata() { } - -public DevicePropertiesOmnitecMetadata(bool? hasGateway = default, string? lockAlias = default, float? lockId = default, string? lockMac = default, string? lockName = default, string? timeZone = default, float? timezoneRawOffsetMs = default) -{ -HasGateway = hasGateway; -LockAlias = lockAlias; -LockId = lockId; -LockMac = lockMac; -LockName = lockName; -TimeZone = timeZone; -TimezoneRawOffsetMs = timezoneRawOffsetMs; -} - -/// -/// Whether the Omnitec lock has a connected gateway for remote operations. -/// -[DataMember(Name = "has_gateway", IsRequired = false, EmitDefaultValue = false)] -public bool? HasGateway { get; set; } - -/// -/// Operator-assigned alias for an Omnitec device. -/// -[DataMember(Name = "lock_alias", IsRequired = false, EmitDefaultValue = false)] -public string? LockAlias { get; set; } - -/// -/// Lock ID for an Omnitec device. -/// -[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] -public float? LockId { get; set; } - -/// -/// Bluetooth MAC address for an Omnitec device. -/// -[DataMember(Name = "lock_mac", IsRequired = false, EmitDefaultValue = false)] -public string? LockMac { get; set; } - -/// -/// Lock name for an Omnitec device. -/// -[DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] -public string? LockName { get; set; } - -/// -/// IANA time zone for the Omnitec device, used to schedule time-bound access codes at the correct local time (accounting for DST). -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -/// -/// Static UTC offset of the Omnitec lock in milliseconds. Does not account for DST. -/// -[DataMember(Name = "timezone_raw_offset_ms", IsRequired = false, EmitDefaultValue = false)] -public float? TimezoneRawOffsetMs { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesReolinkMetadata_model")] -public class DevicePropertiesReolinkMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesReolinkMetadata() { } - -public DevicePropertiesReolinkMetadata(string? firmwareVersion = default, string? hardwareVersion = default, string? model = default) -{ -FirmwareVersion = firmwareVersion; -HardwareVersion = hardwareVersion; -Model = model; -} - -/// -/// Firmware version reported by the camera. -/// -[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] -public string? FirmwareVersion { get; set; } - -/// -/// Hardware version reported by the camera. -/// -[DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] -public string? HardwareVersion { get; set; } - -/// -/// Model reported by the Reolink camera. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesRingMetadata_model")] -public class DevicePropertiesRingMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesRingMetadata() { } - -public DevicePropertiesRingMetadata(string? deviceId = default, string? deviceName = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -} - -/// -/// Device ID for a Ring device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Ring device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesSaltoKsMetadata_model")] -public class DevicePropertiesSaltoKsMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesSaltoKsMetadata() { } - -public DevicePropertiesSaltoKsMetadata(string? batteryLevel = default, string? customerReference = default, bool? hasCustomPinSubscription = default, string? lockId = default, string? lockType = default, string? lockedState = default, string? model = default, string? siteId = default, string? siteName = default) -{ -BatteryLevel = batteryLevel; -CustomerReference = customerReference; -HasCustomPinSubscription = hasCustomPinSubscription; -LockId = lockId; -LockType = lockType; -LockedState = lockedState; -Model = model; -SiteId = siteId; -SiteName = siteName; -} - -/// -/// Battery level for a Salto KS device. -/// -[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] -public string? BatteryLevel { get; set; } - -/// -/// Customer reference for a Salto KS device. -/// -[DataMember(Name = "customer_reference", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerReference { get; set; } - -/// -/// Indicates whether the site has a Salto KS subscription that supports custom PINs. -/// -[DataMember(Name = "has_custom_pin_subscription", IsRequired = false, EmitDefaultValue = false)] -public bool? HasCustomPinSubscription { get; set; } - -/// -/// Lock ID for a Salto KS device. -/// -[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] -public string? LockId { get; set; } - -/// -/// Lock type for a Salto KS device. -/// -[DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] -public string? LockType { get; set; } - -/// -/// Locked state for a Salto KS device. -/// -[DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] -public string? LockedState { get; set; } - -/// -/// Model for a Salto KS device. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -/// -/// Site ID for the Salto KS site to which the device belongs. -/// -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public string? SiteId { get; set; } - -/// -/// Site name for the Salto KS site to which the device belongs. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesSaltoMetadata_model")] -public class DevicePropertiesSaltoMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesSaltoMetadata() { } - -public DevicePropertiesSaltoMetadata(string? batteryLevel = default, string? customerReference = default, string? lockId = default, string? lockType = default, string? lockedState = default, string? model = default, string? siteId = default, string? siteName = default) -{ -BatteryLevel = batteryLevel; -CustomerReference = customerReference; -LockId = lockId; -LockType = lockType; -LockedState = lockedState; -Model = model; -SiteId = siteId; -SiteName = siteName; -} - -/// -/// Battery level for a Salto device. -/// -[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] -public string? BatteryLevel { get; set; } - -/// -/// Customer reference for a Salto device. -/// -[DataMember(Name = "customer_reference", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerReference { get; set; } - -/// -/// Lock ID for a Salto device. -/// -[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] -public string? LockId { get; set; } - -/// -/// Lock type for a Salto device. -/// -[DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] -public string? LockType { get; set; } - -/// -/// Locked state for a Salto device. -/// -[DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] -public string? LockedState { get; set; } - -/// -/// Model for a Salto device. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -/// -/// Site ID for the Salto KS site to which the device belongs. -/// -[DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] -public string? SiteId { get; set; } - -/// -/// Site name for the Salto KS site to which the device belongs. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesSchlageMetadata_model")] -public class DevicePropertiesSchlageMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesSchlageMetadata() { } - -public DevicePropertiesSchlageMetadata(string? deviceId = default, string? deviceName = default, string? model = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -Model = model; -} - -/// -/// Device ID for a Schlage device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Schlage device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Model for a Schlage device. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesSeamBridgeMetadata_model")] -public class DevicePropertiesSeamBridgeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesSeamBridgeMetadata() { } - -public DevicePropertiesSeamBridgeMetadata(float? deviceNum = default, string? name = default, DevicePropertiesSeamBridgeMetadata.UnlockMethodEnum? unlockMethod = default) -{ -DeviceNum = deviceNum; -Name = name; -UnlockMethod = unlockMethod; -} - -/// -/// Unlock method for Seam Bridge. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum UnlockMethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "bridge")] -Bridge = 1, - -[EnumMember(Value = "doorking")] -Doorking = 2, -} - -/// -/// Device number for Seam Bridge. -/// -[DataMember(Name = "device_num", IsRequired = false, EmitDefaultValue = false)] -public float? DeviceNum { get; set; } - -/// -/// Name for Seam Bridge. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Unlock method for Seam Bridge. -/// -[DataMember(Name = "unlock_method", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesSeamBridgeMetadata.UnlockMethodEnum? UnlockMethod { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesSensiMetadata_model")] -public class DevicePropertiesSensiMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesSensiMetadata() { } - -public DevicePropertiesSensiMetadata(string? deviceId = default, string? deviceName = default, bool? dualSetpointsNotSupported = default, string? productType = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -DualSetpointsNotSupported = dualSetpointsNotSupported; -ProductType = productType; -} - -/// -/// Device ID for a Sensi device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Sensi device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Set to true when the device does not support the /dual-setpoints API endpoint. -/// -[DataMember(Name = "dual_setpoints_not_supported", IsRequired = false, EmitDefaultValue = false)] -public bool? DualSetpointsNotSupported { get; set; } - -/// -/// Product type for a Sensi device. -/// -[DataMember(Name = "product_type", IsRequired = false, EmitDefaultValue = false)] -public string? ProductType { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesSmartthingsMetadata_model")] -public class DevicePropertiesSmartthingsMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesSmartthingsMetadata() { } - -public DevicePropertiesSmartthingsMetadata(string? deviceId = default, string? deviceName = default, string? locationId = default, string? model = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -LocationId = locationId; -Model = model; -} - -/// -/// Device ID for a SmartThings device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a SmartThings device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Location ID for a SmartThings device. -/// -[DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] -public string? LocationId { get; set; } - -/// -/// Model for a SmartThings device. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesTadoMetadata_model")] -public class DevicePropertiesTadoMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesTadoMetadata() { } - -public DevicePropertiesTadoMetadata(string? deviceType = default, string? serialNo = default) -{ -DeviceType = deviceType; -SerialNo = serialNo; -} - -/// -/// Device type for a tado° device. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceType { get; set; } - -/// -/// Serial number for a tado° device. -/// -[DataMember(Name = "serial_no", IsRequired = false, EmitDefaultValue = false)] -public string? SerialNo { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesTapoMetadata_model")] -public class DevicePropertiesTapoMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesTapoMetadata() { } - -public DevicePropertiesTapoMetadata(string? firmwareVersion = default, string? hardwareVersion = default, string? model = default) -{ -FirmwareVersion = firmwareVersion; -HardwareVersion = hardwareVersion; -Model = model; -} - -/// -/// Firmware version reported by the camera. -/// -[DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] -public string? FirmwareVersion { get; set; } - -/// -/// Hardware version reported by the camera. -/// -[DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] -public string? HardwareVersion { get; set; } - -/// -/// Model reported by the Tapo camera. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public string? Model { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesTedeeMetadata_model")] -public class DevicePropertiesTedeeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesTedeeMetadata() { } - -public DevicePropertiesTedeeMetadata(float? bridgeId = default, string? bridgeName = default, float? deviceId = default, string? deviceModel = default, string? deviceName = default, float? keypadId = default, string? serialNumber = default) -{ -BridgeId = bridgeId; -BridgeName = bridgeName; -DeviceId = deviceId; -DeviceModel = deviceModel; -DeviceName = deviceName; -KeypadId = keypadId; -SerialNumber = serialNumber; -} - -/// -/// Bridge ID for a Tedee device. -/// -[DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] -public float? BridgeId { get; set; } - -/// -/// Bridge name for a Tedee device. -/// -[DataMember(Name = "bridge_name", IsRequired = false, EmitDefaultValue = false)] -public string? BridgeName { get; set; } - -/// -/// Device ID for a Tedee device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public float? DeviceId { get; set; } - -/// -/// Device model for a Tedee device. -/// -[DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceModel { get; set; } - -/// -/// Device name for a Tedee device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Keypad ID for a Tedee device. -/// -[DataMember(Name = "keypad_id", IsRequired = false, EmitDefaultValue = false)] -public float? KeypadId { get; set; } - -/// -/// Serial number for a Tedee device. -/// -[DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] -public string? SerialNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesTtlockMetadata_model")] -public class DevicePropertiesTtlockMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesTtlockMetadata() { } - -public DevicePropertiesTtlockMetadata(string? featureValue = default, DevicePropertiesTtlockMetadataFeatures? features = default, bool? hasGateway = default, string? lockAlias = default, float? lockId = default, float? timezoneRawOffsetMs = default, List? wirelessKeypads = default) -{ -FeatureValue = featureValue; -Features = features; -HasGateway = hasGateway; -LockAlias = lockAlias; -LockId = lockId; -TimezoneRawOffsetMs = timezoneRawOffsetMs; -WirelessKeypads = wirelessKeypads; -} - -/// -/// Feature value for a TTLock device. -/// -[DataMember(Name = "feature_value", IsRequired = false, EmitDefaultValue = false)] -public string? FeatureValue { get; set; } - -/// -/// Features for a TTLock device. -/// -[DataMember(Name = "features", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesTtlockMetadataFeatures? Features { get; set; } - -/// -/// Indicates whether a TTLock device has a gateway. -/// -[DataMember(Name = "has_gateway", IsRequired = false, EmitDefaultValue = false)] -public bool? HasGateway { get; set; } - -/// -/// Lock alias for a TTLock device. -/// -[DataMember(Name = "lock_alias", IsRequired = false, EmitDefaultValue = false)] -public string? LockAlias { get; set; } - -/// -/// Lock ID for a TTLock device. -/// -[DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] -public float? LockId { get; set; } - -/// -/// Lock-side timezone offset in milliseconds east of UTC, as configured in the TTLock app. Source of truth for the lock's wall-clock interpretation of access code start/end times — a misconfigured value here is the typical cause of customer "codes offset by N hours" reports. Diagnostic only; Seam does not convert times based on this value. -/// -[DataMember(Name = "timezone_raw_offset_ms", IsRequired = false, EmitDefaultValue = false)] -public float? TimezoneRawOffsetMs { get; set; } - -/// -/// Wireless keypads for a TTLock device. -/// -[DataMember(Name = "wireless_keypads", IsRequired = false, EmitDefaultValue = false)] -public List? WirelessKeypads { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesTtlockMetadataFeatures_model")] -public class DevicePropertiesTtlockMetadataFeatures -{ -[JsonConstructorAttribute] -protected DevicePropertiesTtlockMetadataFeatures() { } - -public DevicePropertiesTtlockMetadataFeatures(bool? autoLockTimeConfig = default, bool? incompleteKeyboardPasscode = default, bool? lockCommand = default, bool? passcode = default, bool? passcodeManagement = default, bool? unlockViaGateway = default, bool? wifi = default) -{ -AutoLockTimeConfig = autoLockTimeConfig; -IncompleteKeyboardPasscode = incompleteKeyboardPasscode; -LockCommand = lockCommand; -Passcode = passcode; -PasscodeManagement = passcodeManagement; -UnlockViaGateway = unlockViaGateway; -Wifi = wifi; -} - -/// -/// Indicates whether a TTLock device supports auto-lock time configuration. -/// -[DataMember(Name = "auto_lock_time_config", IsRequired = false, EmitDefaultValue = false)] -public bool? AutoLockTimeConfig { get; set; } - -/// -/// Indicates whether a TTLock device supports an incomplete keyboard passcode. -/// -[DataMember(Name = "incomplete_keyboard_passcode", IsRequired = false, EmitDefaultValue = false)] -public bool? IncompleteKeyboardPasscode { get; set; } - -/// -/// Indicates whether a TTLock device supports the lock command. -/// -[DataMember(Name = "lock_command", IsRequired = false, EmitDefaultValue = false)] -public bool? LockCommand { get; set; } - -/// -/// Indicates whether a TTLock device supports a passcode. -/// -[DataMember(Name = "passcode", IsRequired = false, EmitDefaultValue = false)] -public bool? Passcode { get; set; } - -/// -/// Indicates whether a TTLock device supports passcode management. -/// -[DataMember(Name = "passcode_management", IsRequired = false, EmitDefaultValue = false)] -public bool? PasscodeManagement { get; set; } - -/// -/// Indicates whether a TTLock device supports unlock via gateway. -/// -[DataMember(Name = "unlock_via_gateway", IsRequired = false, EmitDefaultValue = false)] -public bool? UnlockViaGateway { get; set; } - -/// -/// Indicates whether a TTLock device supports Wi-Fi. -/// -[DataMember(Name = "wifi", IsRequired = false, EmitDefaultValue = false)] -public bool? Wifi { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesTtlockMetadataWirelessKeypads_model")] -public class DevicePropertiesTtlockMetadataWirelessKeypads -{ -[JsonConstructorAttribute] -protected DevicePropertiesTtlockMetadataWirelessKeypads() { } - -public DevicePropertiesTtlockMetadataWirelessKeypads(float? wirelessKeypadId = default, string? wirelessKeypadName = default) -{ -WirelessKeypadId = wirelessKeypadId; -WirelessKeypadName = wirelessKeypadName; -} - -/// -/// ID for a wireless keypad for a TTLock device. -/// -[DataMember(Name = "wireless_keypad_id", IsRequired = false, EmitDefaultValue = false)] -public float? WirelessKeypadId { get; set; } - -/// -/// Name for a wireless keypad for a TTLock device. -/// -[DataMember(Name = "wireless_keypad_name", IsRequired = false, EmitDefaultValue = false)] -public string? WirelessKeypadName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesTwoNMetadata_model")] -public class DevicePropertiesTwoNMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesTwoNMetadata() { } - -public DevicePropertiesTwoNMetadata(float? deviceId = default, string? deviceName = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -} - -/// -/// Device ID for a 2N device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public float? DeviceId { get; set; } - -/// -/// Device name for a 2N device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesUltraloqMetadata_model")] -public class DevicePropertiesUltraloqMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesUltraloqMetadata() { } - -public DevicePropertiesUltraloqMetadata(string? deviceId = default, string? deviceName = default, string? deviceType = default, string? timeZone = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -DeviceType = deviceType; -TimeZone = timeZone; -} - -/// -/// Device ID for an Ultraloq device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for an Ultraloq device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Device type for an Ultraloq device. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceType { get; set; } - -/// -/// IANA timezone for the Ultraloq device. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesVisionlineMetadata_model")] -public class DevicePropertiesVisionlineMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesVisionlineMetadata() { } - -public DevicePropertiesVisionlineMetadata(string? encoderId = default) -{ -EncoderId = encoderId; -} - -/// -/// Encoder ID for an ASSA ABLOY Visionline system. -/// -[DataMember(Name = "encoder_id", IsRequired = false, EmitDefaultValue = false)] -public string? EncoderId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesWyzeMetadata_model")] -public class DevicePropertiesWyzeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesWyzeMetadata() { } - -public DevicePropertiesWyzeMetadata(string? deviceId = default, string? deviceInfoModel = default, string? deviceName = default, string? keypadUuid = default, float? lockerStatusHardlock = default, string? productModel = default, string? productName = default, string? productType = default) -{ -DeviceId = deviceId; -DeviceInfoModel = deviceInfoModel; -DeviceName = deviceName; -KeypadUuid = keypadUuid; -LockerStatusHardlock = lockerStatusHardlock; -ProductModel = productModel; -ProductName = productName; -ProductType = productType; -} - -/// -/// Device ID for a Wyze device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device information model for a Wyze device. -/// -[DataMember(Name = "device_info_model", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceInfoModel { get; set; } - -/// -/// Device name for a Wyze device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Keypad UUID for a Wyze device. -/// -[DataMember(Name = "keypad_uuid", IsRequired = false, EmitDefaultValue = false)] -public string? KeypadUuid { get; set; } - -/// -/// Locker status (hardlock) for a Wyze device. -/// -[DataMember(Name = "locker_status_hardlock", IsRequired = false, EmitDefaultValue = false)] -public float? LockerStatusHardlock { get; set; } - -/// -/// Product model for a Wyze device. -/// -[DataMember(Name = "product_model", IsRequired = false, EmitDefaultValue = false)] -public string? ProductModel { get; set; } - -/// -/// Product name for a Wyze device. -/// -[DataMember(Name = "product_name", IsRequired = false, EmitDefaultValue = false)] -public string? ProductName { get; set; } - -/// -/// Product type for a Wyze device. -/// -[DataMember(Name = "product_type", IsRequired = false, EmitDefaultValue = false)] -public string? ProductType { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesYacanMetadata_model")] -public class DevicePropertiesYacanMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesYacanMetadata() { } - -public DevicePropertiesYacanMetadata(string? deviceId = default, string? deviceName = default, string? deviceType = default, string? serialNumber = default) -{ -DeviceId = deviceId; -DeviceName = deviceName; -DeviceType = deviceType; -SerialNumber = serialNumber; -} - -/// -/// Device ID for a Yacan device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Device name for a Yacan device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Device type for a Yacan device. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceType { get; set; } - -/// -/// Serial number for a Yacan device. -/// -[DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] -public string? SerialNumber { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesCodeConstraints_model")] -public class DevicePropertiesCodeConstraints -{ -[JsonConstructorAttribute] -protected DevicePropertiesCodeConstraints() { } - -public DevicePropertiesCodeConstraints(DevicePropertiesCodeConstraints.ConstraintTypeEnum constraintType = default, float? maxLength = default, float? minLength = default) -{ -ConstraintType = constraintType; -MaxLength = maxLength; -MinLength = minLength; -} - -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ConstraintTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "no_zeros")] -NoZeros = 1, - -[EnumMember(Value = "cannot_start_with_12")] -CannotStartWith_12 = 2, - -[EnumMember(Value = "no_triple_consecutive_ints")] -NoTripleConsecutiveInts = 3, - -[EnumMember(Value = "cannot_specify_pin_code")] -CannotSpecifyPinCode = 4, - -[EnumMember(Value = "pin_code_matches_existing_set")] -PinCodeMatchesExistingSet = 5, - -[EnumMember(Value = "start_date_in_future")] -StartDateInFuture = 6, - -[EnumMember(Value = "no_ascending_or_descending_sequence")] -NoAscendingOrDescendingSequence = 7, - -[EnumMember(Value = "at_least_three_unique_digits")] -AtLeastThreeUniqueDigits = 8, - -[EnumMember(Value = "cannot_contain_089")] -CannotContain_089 = 9, - -[EnumMember(Value = "cannot_contain_0789")] -CannotContain_0789 = 10, - -[EnumMember(Value = "unique_first_four_digits")] -UniqueFirstFourDigits = 11, - -[EnumMember(Value = "no_all_same_digits")] -NoAllSameDigits = 12, - -[EnumMember(Value = "name_length")] -NameLength = 13, - -[EnumMember(Value = "name_must_be_unique")] -NameMustBeUnique = 14, -} - -[DataMember(Name = "constraint_type", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesCodeConstraints.ConstraintTypeEnum ConstraintType { get; set; } - -/// -/// Maximum name length constraint for access codes. -/// -[DataMember(Name = "max_length", IsRequired = false, EmitDefaultValue = false)] -public float? MaxLength { get; set; } - -/// -/// Minimum name length constraint for access codes. -/// -[DataMember(Name = "min_length", IsRequired = false, EmitDefaultValue = false)] -public float? MinLength { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesKeypadBattery_model")] -public class DevicePropertiesKeypadBattery -{ -[JsonConstructorAttribute] -protected DevicePropertiesKeypadBattery() { } - -public DevicePropertiesKeypadBattery(float level = default) -{ -Level = level; -} - -/// -/// Keypad battery charge level. -/// -[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] -public float Level { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesOfflineTimeFrameOptions_model")] -public class DevicePropertiesOfflineTimeFrameOptions -{ -[JsonConstructorAttribute] -protected DevicePropertiesOfflineTimeFrameOptions() { } - -public DevicePropertiesOfflineTimeFrameOptions(string displayName = default, string? endDateRecurrenceRule = default, bool? matchingStartEndTime = default, string? maxDuration = default, string? minDuration = default, string? startDateRecurrenceRule = default, List? timePairs = default, string? timeZone = default) -{ -DisplayName = displayName; -EndDateRecurrenceRule = endDateRecurrenceRule; -MatchingStartEndTime = matchingStartEndTime; -MaxDuration = maxDuration; -MinDuration = minDuration; -StartDateRecurrenceRule = startDateRecurrenceRule; -TimePairs = timePairs; -TimeZone = timeZone; -} - -/// -/// Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. -/// -[DataMember(Name = "end_date_recurrence_rule", IsRequired = false, EmitDefaultValue = false)] -public string? EndDateRecurrenceRule { get; set; } - -/// -/// When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. -/// -[DataMember(Name = "matching_start_end_time", IsRequired = false, EmitDefaultValue = false)] -public bool? MatchingStartEndTime { get; set; } - -/// -/// Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. -/// -[DataMember(Name = "max_duration", IsRequired = false, EmitDefaultValue = false)] -public string? MaxDuration { get; set; } - -/// -/// Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. -/// -[DataMember(Name = "min_duration", IsRequired = false, EmitDefaultValue = false)] -public string? MinDuration { get; set; } - -/// -/// iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. -/// -[DataMember(Name = "start_date_recurrence_rule", IsRequired = false, EmitDefaultValue = false)] -public string? StartDateRecurrenceRule { get; set; } - -/// -/// Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. -/// -[DataMember(Name = "time_pairs", IsRequired = false, EmitDefaultValue = false)] -public List? TimePairs { get; set; } - -/// -/// IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesOfflineTimeFrameOptionsTimePairs_model")] -public class DevicePropertiesOfflineTimeFrameOptionsTimePairs -{ -[JsonConstructorAttribute] -protected DevicePropertiesOfflineTimeFrameOptionsTimePairs() { } - -public DevicePropertiesOfflineTimeFrameOptionsTimePairs(string displayName = default, string endTime = default, string startTime = default) -{ -DisplayName = displayName; -EndTime = endTime; -StartTime = startTime; -} - -/// -/// Label for the start/end time pairing. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. -/// -[DataMember(Name = "end_time", IsRequired = false, EmitDefaultValue = false)] -public string EndTime { get; set; } - -/// -/// Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. -/// -[DataMember(Name = "start_time", IsRequired = false, EmitDefaultValue = false)] -public string StartTime { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesOnlineTimeFrameOptions_model")] -public class DevicePropertiesOnlineTimeFrameOptions -{ -[JsonConstructorAttribute] -protected DevicePropertiesOnlineTimeFrameOptions() { } - -public DevicePropertiesOnlineTimeFrameOptions(string displayName = default, string? endDateRecurrenceRule = default, bool? matchingStartEndTime = default, string? maxDuration = default, string? minDuration = default, string? startDateRecurrenceRule = default, List? timePairs = default, string? timeZone = default) -{ -DisplayName = displayName; -EndDateRecurrenceRule = endDateRecurrenceRule; -MatchingStartEndTime = matchingStartEndTime; -MaxDuration = maxDuration; -MinDuration = minDuration; -StartDateRecurrenceRule = startDateRecurrenceRule; -TimePairs = timePairs; -TimeZone = timeZone; -} - -/// -/// Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. -/// -[DataMember(Name = "end_date_recurrence_rule", IsRequired = false, EmitDefaultValue = false)] -public string? EndDateRecurrenceRule { get; set; } - -/// -/// When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. -/// -[DataMember(Name = "matching_start_end_time", IsRequired = false, EmitDefaultValue = false)] -public bool? MatchingStartEndTime { get; set; } - -/// -/// Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. -/// -[DataMember(Name = "max_duration", IsRequired = false, EmitDefaultValue = false)] -public string? MaxDuration { get; set; } - -/// -/// Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. -/// -[DataMember(Name = "min_duration", IsRequired = false, EmitDefaultValue = false)] -public string? MinDuration { get; set; } - -/// -/// iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. -/// -[DataMember(Name = "start_date_recurrence_rule", IsRequired = false, EmitDefaultValue = false)] -public string? StartDateRecurrenceRule { get; set; } - -/// -/// Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. -/// -[DataMember(Name = "time_pairs", IsRequired = false, EmitDefaultValue = false)] -public List? TimePairs { get; set; } - -/// -/// IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesOnlineTimeFrameOptionsTimePairs_model")] -public class DevicePropertiesOnlineTimeFrameOptionsTimePairs -{ -[JsonConstructorAttribute] -protected DevicePropertiesOnlineTimeFrameOptionsTimePairs() { } - -public DevicePropertiesOnlineTimeFrameOptionsTimePairs(string displayName = default, string endTime = default, string startTime = default) -{ -DisplayName = displayName; -EndTime = endTime; -StartTime = startTime; -} - -/// -/// Label for the start/end time pairing. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. -/// -[DataMember(Name = "end_time", IsRequired = false, EmitDefaultValue = false)] -public string EndTime { get; set; } - -/// -/// Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. -/// -[DataMember(Name = "start_time", IsRequired = false, EmitDefaultValue = false)] -public string StartTime { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesActiveThermostatSchedule_model")] -public class DevicePropertiesActiveThermostatSchedule -{ -[JsonConstructorAttribute] -protected DevicePropertiesActiveThermostatSchedule() { } - -public DevicePropertiesActiveThermostatSchedule(string climatePresetKey = default, string createdAt = default, string deviceId = default, string endsAt = default, List errors = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default, string thermostatScheduleId = default, string workspaceId = default) -{ -ClimatePresetKey = climatePresetKey; -CreatedAt = createdAt; -DeviceId = deviceId; -EndsAt = endsAt; -Errors = errors; -IsOverrideAllowed = isOverrideAllowed; -MaxOverridePeriodMinutes = maxOverridePeriodMinutes; -Name = name; -StartsAt = startsAt; -ThermostatScheduleId = thermostatScheduleId; -WorkspaceId = workspaceId; -} - -/// -/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the desired [thermostat](https://www.seam.co/docs/capability-guides/thermostats) device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string EndsAt { get; set; } - -/// -/// Errors associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. -/// -[DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOverrideAllowed { get; set; } - -/// -/// Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[DataMember(Name = "max_override_period_minutes", IsRequired = false, EmitDefaultValue = false)] -public int? MaxOverridePeriodMinutes { get; set; } - -/// -/// User-friendly name to identify the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string StartsAt { get; set; } - -/// -/// ID of the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] -public string ThermostatScheduleId { get; set; } - -/// -/// ID of the workspace that contains the thermostat schedule. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesActiveThermostatScheduleErrors_model")] -public class DevicePropertiesActiveThermostatScheduleErrors -{ -[JsonConstructorAttribute] -protected DevicePropertiesActiveThermostatScheduleErrors() { } - -public DevicePropertiesActiveThermostatScheduleErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAvailableClimatePresets_model")] -public class DevicePropertiesAvailableClimatePresets -{ -[JsonConstructorAttribute] -protected DevicePropertiesAvailableClimatePresets() { } - -public DevicePropertiesAvailableClimatePresets(bool canDelete = default, bool canEdit = default, bool canUseWithThermostatDailyPrograms = default, string climatePresetKey = default, DevicePropertiesAvailableClimatePresets.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string displayName = default, DevicePropertiesAvailableClimatePresetsEcobeeMetadata? ecobeeMetadata = default, DevicePropertiesAvailableClimatePresets.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, DevicePropertiesAvailableClimatePresets.HvacModeSettingEnum? hvacModeSetting = default, bool manualOverrideAllowed = default, string? name = default) -{ -CanDelete = canDelete; -CanEdit = canEdit; -CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; -ClimatePresetKey = climatePresetKey; -ClimatePresetMode = climatePresetMode; -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DisplayName = displayName; -EcobeeMetadata = ecobeeMetadata; -FanModeSetting = fanModeSetting; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -HvacModeSetting = hvacModeSetting; -ManualOverrideAllowed = manualOverrideAllowed; -Name = name; -} - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ClimatePresetModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "home")] -Home = 1, - -[EnumMember(Value = "away")] -Away = 2, - -[EnumMember(Value = "wake")] -Wake = 3, - -[EnumMember(Value = "sleep")] -Sleep = 4, - -[EnumMember(Value = "occupied")] -Occupied = 5, - -[EnumMember(Value = "unoccupied")] -Unoccupied = 6, -} - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum HvacModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, - -[EnumMember(Value = "heat")] -Heat = 2, - -[EnumMember(Value = "cool")] -Cool = 3, - -[EnumMember(Value = "heat_cool")] -HeatCool = 4, - -[EnumMember(Value = "eco")] -Eco = 5, -} - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. -/// -[DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] -public bool CanDelete { get; set; } - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. -/// -[DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] -public bool CanEdit { get; set; } - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. -/// -[DataMember(Name = "can_use_with_thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] -public bool CanUseWithThermostatDailyPrograms { get; set; } - -/// -/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAvailableClimatePresets.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Metadata specific to the Ecobee climate, if applicable. -/// -[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAvailableClimatePresetsEcobeeMetadata? EcobeeMetadata { get; set; } - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAvailableClimatePresets.FanModeSettingEnum? FanModeSetting { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAvailableClimatePresets.HvacModeSettingEnum? HvacModeSetting { get; set; } - -/// -/// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] -[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool ManualOverrideAllowed { get; set; } - -/// -/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesAvailableClimatePresetsEcobeeMetadata_model")] -public class DevicePropertiesAvailableClimatePresetsEcobeeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesAvailableClimatePresetsEcobeeMetadata() { } - -public DevicePropertiesAvailableClimatePresetsEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, DevicePropertiesAvailableClimatePresetsEcobeeMetadata.OwnerEnum? owner = default) -{ -ClimateRef = climateRef; -IsOptimized = isOptimized; -Owner = owner; -} - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum OwnerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "user")] -User = 1, - -[EnumMember(Value = "system")] -System = 2, -} - -/// -/// Reference to the Ecobee climate, if applicable. -/// -[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] -public string? ClimateRef { get; set; } - -/// -/// Indicates if the climate preset is optimized by Ecobee. -/// -[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOptimized { get; set; } - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesAvailableClimatePresetsEcobeeMetadata.OwnerEnum? Owner { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesCurrentClimateSetting_model")] -public class DevicePropertiesCurrentClimateSetting -{ -[JsonConstructorAttribute] -protected DevicePropertiesCurrentClimateSetting() { } - -public DevicePropertiesCurrentClimateSetting(bool? canDelete = default, bool? canEdit = default, bool? canUseWithThermostatDailyPrograms = default, string? climatePresetKey = default, DevicePropertiesCurrentClimateSetting.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string? displayName = default, DevicePropertiesCurrentClimateSettingEcobeeMetadata? ecobeeMetadata = default, DevicePropertiesCurrentClimateSetting.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, DevicePropertiesCurrentClimateSetting.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) -{ -CanDelete = canDelete; -CanEdit = canEdit; -CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; -ClimatePresetKey = climatePresetKey; -ClimatePresetMode = climatePresetMode; -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DisplayName = displayName; -EcobeeMetadata = ecobeeMetadata; -FanModeSetting = fanModeSetting; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -HvacModeSetting = hvacModeSetting; -ManualOverrideAllowed = manualOverrideAllowed; -Name = name; -} - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ClimatePresetModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + /// + /// Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam. + /// + [DataContract(Name = "seamModel_device_model")] + public class Device + { + [JsonConstructorAttribute] + protected Device() { } + + public Device( + bool? canActivateWeeklyProgram = default, + bool? canConfigureAutoLock = default, + bool? canHvacCool = default, + bool? canHvacHeat = default, + bool? canHvacHeatCool = default, + bool? canProgramOfflineAccessCodes = default, + bool? canProgramOnlineAccessCodes = default, + bool? canProgramThermostatProgramsAsDifferentEachDay = default, + bool? canProgramThermostatProgramsAsSameEachDay = default, + bool? canProgramThermostatProgramsAsWeekdayWeekend = default, + bool? canRemotelyLock = default, + bool? canRemotelyUnlock = default, + bool? canRunThermostatPrograms = default, + bool? canSimulateConnection = default, + bool? canSimulateDisconnection = default, + bool? canSimulateHubConnection = default, + bool? canSimulateHubDisconnection = default, + bool? canSimulatePaidSubscription = default, + bool? canSimulateRemoval = default, + bool? canStreamLiveVideo = default, + bool? canTurnOffHvac = default, + bool? canUnlockWithCode = default, + List capabilitiesSupported = default, + string connectedAccountId = default, + string createdAt = default, + object customMetadata = default, + string deviceId = default, + DeviceDeviceManufacturer? deviceManufacturer = default, + DeviceDeviceProvider? deviceProvider = default, + Device.DeviceTypeEnum deviceType = default, + string displayName = default, + List errors = default, + bool isManaged = default, + DeviceLocation? location = default, + string? nickname = default, + DeviceProperties properties = default, + List spaceIds = default, + List warnings = default, + string workspaceId = default + ) + { + CanActivateWeeklyProgram = canActivateWeeklyProgram; + CanConfigureAutoLock = canConfigureAutoLock; + CanHvacCool = canHvacCool; + CanHvacHeat = canHvacHeat; + CanHvacHeatCool = canHvacHeatCool; + CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; + CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; + CanProgramThermostatProgramsAsDifferentEachDay = + canProgramThermostatProgramsAsDifferentEachDay; + CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; + CanProgramThermostatProgramsAsWeekdayWeekend = + canProgramThermostatProgramsAsWeekdayWeekend; + CanRemotelyLock = canRemotelyLock; + CanRemotelyUnlock = canRemotelyUnlock; + CanRunThermostatPrograms = canRunThermostatPrograms; + CanSimulateConnection = canSimulateConnection; + CanSimulateDisconnection = canSimulateDisconnection; + CanSimulateHubConnection = canSimulateHubConnection; + CanSimulateHubDisconnection = canSimulateHubDisconnection; + CanSimulatePaidSubscription = canSimulatePaidSubscription; + CanSimulateRemoval = canSimulateRemoval; + CanStreamLiveVideo = canStreamLiveVideo; + CanTurnOffHvac = canTurnOffHvac; + CanUnlockWithCode = canUnlockWithCode; + CapabilitiesSupported = capabilitiesSupported; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomMetadata = customMetadata; + DeviceId = deviceId; + DeviceManufacturer = deviceManufacturer; + DeviceProvider = deviceProvider; + DeviceType = deviceType; + DisplayName = displayName; + Errors = errors; + IsManaged = isManaged; + Location = location; + Nickname = nickname; + Properties = properties; + SpaceIds = spaceIds; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + /// + /// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CapabilitiesSupportedEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "access_code")] + AccessCode = 1, + + [EnumMember(Value = "lock")] + Lock = 2, + + [EnumMember(Value = "noise_detection")] + NoiseDetection = 3, + + [EnumMember(Value = "thermostat")] + Thermostat = 4, + + [EnumMember(Value = "battery")] + Battery = 5, + + [EnumMember(Value = "phone")] + Phone = 6, + } + + /// + /// Type of the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "akuvox_lock")] + AkuvoxLock = 1, + + [EnumMember(Value = "august_lock")] + AugustLock = 2, + + [EnumMember(Value = "brivo_access_point")] + BrivoAccessPoint = 3, + + [EnumMember(Value = "butterflymx_panel")] + ButterflymxPanel = 4, + + [EnumMember(Value = "avigilon_alta_entry")] + AvigilonAltaEntry = 5, + + [EnumMember(Value = "doorking_lock")] + DoorkingLock = 6, + + [EnumMember(Value = "genie_door")] + GenieDoor = 7, + + [EnumMember(Value = "igloo_lock")] + IglooLock = 8, -[EnumMember(Value = "home")] -Home = 1, + [EnumMember(Value = "linear_lock")] + LinearLock = 9, -[EnumMember(Value = "away")] -Away = 2, + [EnumMember(Value = "lockly_lock")] + LocklyLock = 10, -[EnumMember(Value = "wake")] -Wake = 3, + [EnumMember(Value = "kwikset_lock")] + KwiksetLock = 11, -[EnumMember(Value = "sleep")] -Sleep = 4, + [EnumMember(Value = "nuki_lock")] + NukiLock = 12, -[EnumMember(Value = "occupied")] -Occupied = 5, + [EnumMember(Value = "salto_lock")] + SaltoLock = 13, -[EnumMember(Value = "unoccupied")] -Unoccupied = 6, -} - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum HvacModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, - -[EnumMember(Value = "heat")] -Heat = 2, - -[EnumMember(Value = "cool")] -Cool = 3, - -[EnumMember(Value = "heat_cool")] -HeatCool = 4, - -[EnumMember(Value = "eco")] -Eco = 5, -} - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. -/// -[DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] -public bool? CanDelete { get; set; } - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. -/// -[DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] -public bool? CanEdit { get; set; } - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. -/// -[DataMember(Name = "can_use_with_thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUseWithThermostatDailyPrograms { get; set; } - -/// -/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string? ClimatePresetKey { get; set; } - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesCurrentClimateSetting.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string? DisplayName { get; set; } - -/// -/// Metadata specific to the Ecobee climate, if applicable. -/// -[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesCurrentClimateSettingEcobeeMetadata? EcobeeMetadata { get; set; } - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesCurrentClimateSetting.FanModeSettingEnum? FanModeSetting { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesCurrentClimateSetting.HvacModeSettingEnum? HvacModeSetting { get; set; } - -/// -/// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] -[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? ManualOverrideAllowed { get; set; } - -/// -/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesCurrentClimateSettingEcobeeMetadata_model")] -public class DevicePropertiesCurrentClimateSettingEcobeeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesCurrentClimateSettingEcobeeMetadata() { } - -public DevicePropertiesCurrentClimateSettingEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, DevicePropertiesCurrentClimateSettingEcobeeMetadata.OwnerEnum? owner = default) -{ -ClimateRef = climateRef; -IsOptimized = isOptimized; -Owner = owner; -} - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum OwnerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "user")] -User = 1, - -[EnumMember(Value = "system")] -System = 2, -} - -/// -/// Reference to the Ecobee climate, if applicable. -/// -[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] -public string? ClimateRef { get; set; } - -/// -/// Indicates if the climate preset is optimized by Ecobee. -/// -[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOptimized { get; set; } - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesCurrentClimateSettingEcobeeMetadata.OwnerEnum? Owner { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesDefaultClimateSetting_model")] -public class DevicePropertiesDefaultClimateSetting -{ -[JsonConstructorAttribute] -protected DevicePropertiesDefaultClimateSetting() { } - -public DevicePropertiesDefaultClimateSetting(bool? canDelete = default, bool? canEdit = default, bool? canUseWithThermostatDailyPrograms = default, string? climatePresetKey = default, DevicePropertiesDefaultClimateSetting.ClimatePresetModeEnum? climatePresetMode = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string? displayName = default, DevicePropertiesDefaultClimateSettingEcobeeMetadata? ecobeeMetadata = default, DevicePropertiesDefaultClimateSetting.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, DevicePropertiesDefaultClimateSetting.HvacModeSettingEnum? hvacModeSetting = default, bool? manualOverrideAllowed = default, string? name = default) -{ -CanDelete = canDelete; -CanEdit = canEdit; -CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; -ClimatePresetKey = climatePresetKey; -ClimatePresetMode = climatePresetMode; -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -DisplayName = displayName; -EcobeeMetadata = ecobeeMetadata; -FanModeSetting = fanModeSetting; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -HvacModeSetting = hvacModeSetting; -ManualOverrideAllowed = manualOverrideAllowed; -Name = name; -} - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ClimatePresetModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "home")] -Home = 1, - -[EnumMember(Value = "away")] -Away = 2, - -[EnumMember(Value = "wake")] -Wake = 3, - -[EnumMember(Value = "sleep")] -Sleep = 4, - -[EnumMember(Value = "occupied")] -Occupied = 5, - -[EnumMember(Value = "unoccupied")] -Unoccupied = 6, -} - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum HvacModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, + [EnumMember(Value = "schlage_lock")] + SchlageLock = 14, -[EnumMember(Value = "heat")] -Heat = 2, + [EnumMember(Value = "smartthings_lock")] + SmartthingsLock = 15, -[EnumMember(Value = "cool")] -Cool = 3, + [EnumMember(Value = "wyze_lock")] + WyzeLock = 16, -[EnumMember(Value = "heat_cool")] -HeatCool = 4, + [EnumMember(Value = "yale_lock")] + YaleLock = 17, -[EnumMember(Value = "eco")] -Eco = 5, -} - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. -/// -[DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] -public bool? CanDelete { get; set; } - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. -/// -[DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] -public bool? CanEdit { get; set; } - -/// -/// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. -/// -[DataMember(Name = "can_use_with_thermostat_daily_programs", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUseWithThermostatDailyPrograms { get; set; } - -/// -/// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string? ClimatePresetKey { get; set; } - -/// -/// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. -/// -[DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesDefaultClimateSetting.ClimatePresetModeEnum? ClimatePresetMode { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string? DisplayName { get; set; } - -/// -/// Metadata specific to the Ecobee climate, if applicable. -/// -[DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesDefaultClimateSettingEcobeeMetadata? EcobeeMetadata { get; set; } - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesDefaultClimateSetting.FanModeSettingEnum? FanModeSetting { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesDefaultClimateSetting.HvacModeSettingEnum? HvacModeSetting { get; set; } - -/// -/// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[Obsolete("Use 'thermostat_schedule.is_override_allowed'")] -[DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? ManualOverrideAllowed { get; set; } - -/// -/// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesDefaultClimateSettingEcobeeMetadata_model")] -public class DevicePropertiesDefaultClimateSettingEcobeeMetadata -{ -[JsonConstructorAttribute] -protected DevicePropertiesDefaultClimateSettingEcobeeMetadata() { } - -public DevicePropertiesDefaultClimateSettingEcobeeMetadata(string? climateRef = default, bool? isOptimized = default, DevicePropertiesDefaultClimateSettingEcobeeMetadata.OwnerEnum? owner = default) -{ -ClimateRef = climateRef; -IsOptimized = isOptimized; -Owner = owner; -} - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum OwnerEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "user")] -User = 1, - -[EnumMember(Value = "system")] -System = 2, -} - -/// -/// Reference to the Ecobee climate, if applicable. -/// -[DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] -public string? ClimateRef { get; set; } - -/// -/// Indicates if the climate preset is optimized by Ecobee. -/// -[DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOptimized { get; set; } - -/// -/// Indicates whether the climate preset is owned by the user or the system. -/// -[DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] -public DevicePropertiesDefaultClimateSettingEcobeeMetadata.OwnerEnum? Owner { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesTemperatureThreshold_model")] -public class DevicePropertiesTemperatureThreshold -{ -[JsonConstructorAttribute] -protected DevicePropertiesTemperatureThreshold() { } - -public DevicePropertiesTemperatureThreshold(float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default) -{ -LowerLimitCelsius = lowerLimitCelsius; -LowerLimitFahrenheit = lowerLimitFahrenheit; -UpperLimitCelsius = upperLimitCelsius; -UpperLimitFahrenheit = upperLimitFahrenheit; -} + [EnumMember(Value = "two_n_intercom")] + TwoNIntercom = 18, -/// -/// Lower limit in °C within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. -/// -[DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? LowerLimitCelsius { get; set; } - -/// -/// Lower limit in °F within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. -/// -[DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? LowerLimitFahrenheit { get; set; } - -/// -/// Upper limit in °C within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. -/// -[DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? UpperLimitCelsius { get; set; } - -/// -/// Upper limit in °F within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. -/// -[DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? UpperLimitFahrenheit { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_devicePropertiesThermostatDailyPrograms_model")] -public class DevicePropertiesThermostatDailyPrograms -{ -[JsonConstructorAttribute] -protected DevicePropertiesThermostatDailyPrograms() { } + [EnumMember(Value = "controlbyweb_device")] + ControlbywebDevice = 19, -public DevicePropertiesThermostatDailyPrograms(string createdAt = default, string deviceId = default, string? name = default, List periods = default, string thermostatDailyProgramId = default, string workspaceId = default) -{ -CreatedAt = createdAt; -DeviceId = deviceId; -Name = name; -Periods = periods; -ThermostatDailyProgramId = thermostatDailyProgramId; -WorkspaceId = workspaceId; -} + [EnumMember(Value = "ttlock_lock")] + TtlockLock = 20, -/// -/// Date and time at which the thermostat daily program was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the thermostat device on which the thermostat daily program is configured. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// User-friendly name to identify the thermostat daily program. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Array of thermostat daily program periods. -/// -[DataMember(Name = "periods", IsRequired = false, EmitDefaultValue = false)] -public List Periods { get; set; } - -/// -/// ID of the thermostat daily program. -/// -[DataMember(Name = "thermostat_daily_program_id", IsRequired = false, EmitDefaultValue = false)] -public string ThermostatDailyProgramId { get; set; } - -/// -/// ID of the workspace that contains the thermostat daily program. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "igloohome_lock")] + IgloohomeLock = 21, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "four_suites_door")] + FourSuitesDoor = 22, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "dormakaba_oracode_door")] + DormakabaOracodeDoor = 23, -[DataContract(Name = "seamModel_devicePropertiesThermostatDailyProgramsPeriods_model")] -public class DevicePropertiesThermostatDailyProgramsPeriods -{ -[JsonConstructorAttribute] -protected DevicePropertiesThermostatDailyProgramsPeriods() { } + [EnumMember(Value = "tedee_lock")] + TedeeLock = 24, -public DevicePropertiesThermostatDailyProgramsPeriods(string climatePresetKey = default, string startsAtTime = default) -{ -ClimatePresetKey = climatePresetKey; -StartsAtTime = startsAtTime; -} + [EnumMember(Value = "akiles_lock")] + AkilesLock = 25, -/// -/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } + [EnumMember(Value = "ultraloq_lock")] + UltraloqLock = 26, -/// -/// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] -public string StartsAtTime { get; set; } + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "keyincode_lock")] + KeyincodeLock = 28, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "omnitec_lock")] + OmnitecLock = 29, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "kisi_lock")] + KisiLock = 30, -[DataContract(Name = "seamModel_devicePropertiesThermostatWeeklyProgram_model")] -public class DevicePropertiesThermostatWeeklyProgram -{ -[JsonConstructorAttribute] -protected DevicePropertiesThermostatWeeklyProgram() { } + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, -public DevicePropertiesThermostatWeeklyProgram(string createdAt = default, string? fridayProgramId = default, string? mondayProgramId = default, string? saturdayProgramId = default, string? sundayProgramId = default, string? thursdayProgramId = default, string? tuesdayProgramId = default, string? wednesdayProgramId = default) -{ -CreatedAt = createdAt; -FridayProgramId = fridayProgramId; -MondayProgramId = mondayProgramId; -SaturdayProgramId = saturdayProgramId; -SundayProgramId = sundayProgramId; -ThursdayProgramId = thursdayProgramId; -TuesdayProgramId = tuesdayProgramId; -WednesdayProgramId = wednesdayProgramId; -} + [EnumMember(Value = "keynest_key")] + KeynestKey = 32, -/// -/// Date and time at which the thermostat weekly program was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the thermostat daily program to run on Fridays. -/// -[DataMember(Name = "friday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? FridayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Mondays. -/// -[DataMember(Name = "monday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? MondayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Saturdays. -/// -[DataMember(Name = "saturday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? SaturdayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Sundays. -/// -[DataMember(Name = "sunday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? SundayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Thursdays. -/// -[DataMember(Name = "thursday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? ThursdayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Tuesdays. -/// -[DataMember(Name = "tuesday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? TuesdayProgramId { get; set; } - -/// -/// ID of the thermostat daily program to run on Wednesdays. -/// -[DataMember(Name = "wednesday_program_id", IsRequired = false, EmitDefaultValue = false)] -public string? WednesdayProgramId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "noiseaware_activity_zone")] + NoiseawareActivityZone = 33, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "minut_sensor")] + MinutSensor = 34, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "ecobee_thermostat")] + EcobeeThermostat = 35, + [EnumMember(Value = "nest_thermostat")] + NestThermostat = 36, + + [EnumMember(Value = "honeywell_resideo_thermostat")] + HoneywellResideoThermostat = 37, + + [EnumMember(Value = "tado_thermostat")] + TadoThermostat = 38, + + [EnumMember(Value = "sensi_thermostat")] + SensiThermostat = 39, + + [EnumMember(Value = "smartthings_thermostat")] + SmartthingsThermostat = 40, + + [EnumMember(Value = "ios_phone")] + IosPhone = 41, + + [EnumMember(Value = "android_phone")] + AndroidPhone = 42, + + [EnumMember(Value = "ring_camera")] + RingCamera = 43, + + [EnumMember(Value = "tapo_camera")] + TapoCamera = 44, + + [EnumMember(Value = "arlo_camera")] + ArloCamera = 45, + + [EnumMember(Value = "reolink_camera")] + ReolinkCamera = 46, + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(DeviceErrorsUnrecognized))] + [JsonSubtypes.KnownSubType(typeof(DeviceErrorsBridgeDisconnected), "bridge_disconnected")] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsSubscriptionRequired), + "subscription_required" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsAuxiliaryHeatRunning), + "auxiliary_heat_running" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsMissingDeviceCredentials), + "missing_device_credentials" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsAugustLockNotAuthorized), + "august_lock_not_authorized" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsEmptyBackupAccessCodePool), + "empty_backup_access_code_pool" + )] + [JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceDisconnected), "device_disconnected")] + [JsonSubtypes.KnownSubType(typeof(DeviceErrorsHubDisconnected), "hub_disconnected")] + [JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceRemoved), "device_removed")] + [JsonSubtypes.KnownSubType(typeof(DeviceErrorsDeviceOffline), "device_offline")] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsDormakabaSitesDisconnected), + "dormakaba_sites_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsInsufficientPermissions), + "insufficient_permissions" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceErrorsSaltoKsSubscriptionLimitExceeded), + "salto_ks_subscription_limit_exceeded" + )] + [JsonSubtypes.KnownSubType(typeof(DeviceErrorsAccountDisconnected), "account_disconnected")] + public abstract class DeviceErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_deviceErrorsAccountDisconnected_model")] + public class DeviceErrorsAccountDisconnected : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsAccountDisconnected() { } + + public DeviceErrorsAccountDisconnected( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "account_disconnected"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsSaltoKsSubscriptionLimitExceeded_model")] + public class DeviceErrorsSaltoKsSubscriptionLimitExceeded : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsSaltoKsSubscriptionLimitExceeded() { } + + public DeviceErrorsSaltoKsSubscriptionLimitExceeded( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsInsufficientPermissions_model")] + public class DeviceErrorsInsufficientPermissions : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsInsufficientPermissions() { } + + public DeviceErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsDormakabaSitesDisconnected_model")] + public class DeviceErrorsDormakabaSitesDisconnected : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsDormakabaSitesDisconnected() { } + + public DeviceErrorsDormakabaSitesDisconnected( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsDeviceOffline_model")] + public class DeviceErrorsDeviceOffline : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsDeviceOffline() { } + + public DeviceErrorsDeviceOffline( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_offline"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsDeviceRemoved_model")] + public class DeviceErrorsDeviceRemoved : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsDeviceRemoved() { } + + public DeviceErrorsDeviceRemoved( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_removed"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsHubDisconnected_model")] + public class DeviceErrorsHubDisconnected : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsHubDisconnected() { } + + public DeviceErrorsHubDisconnected( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "hub_disconnected"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsDeviceDisconnected_model")] + public class DeviceErrorsDeviceDisconnected : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsDeviceDisconnected() { } + + public DeviceErrorsDeviceDisconnected( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_disconnected"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsEmptyBackupAccessCodePool_model")] + public class DeviceErrorsEmptyBackupAccessCodePool : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsEmptyBackupAccessCodePool() { } + + public DeviceErrorsEmptyBackupAccessCodePool( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "empty_backup_access_code_pool"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsAugustLockNotAuthorized_model")] + public class DeviceErrorsAugustLockNotAuthorized : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsAugustLockNotAuthorized() { } + + public DeviceErrorsAugustLockNotAuthorized( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "august_lock_not_authorized"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsMissingDeviceCredentials_model")] + public class DeviceErrorsMissingDeviceCredentials : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsMissingDeviceCredentials() { } + + public DeviceErrorsMissingDeviceCredentials( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "missing_device_credentials"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsAuxiliaryHeatRunning_model")] + public class DeviceErrorsAuxiliaryHeatRunning : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsAuxiliaryHeatRunning() { } + + public DeviceErrorsAuxiliaryHeatRunning( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "auxiliary_heat_running"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsSubscriptionRequired_model")] + public class DeviceErrorsSubscriptionRequired : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsSubscriptionRequired() { } + + public DeviceErrorsSubscriptionRequired( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "subscription_required"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsBridgeDisconnected_model")] + public class DeviceErrorsBridgeDisconnected : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsBridgeDisconnected() { } + + public DeviceErrorsBridgeDisconnected( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "bridge_disconnected"; + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceErrorsUnrecognized_model")] + public class DeviceErrorsUnrecognized : DeviceErrors + { + [JsonConstructorAttribute] + protected DeviceErrorsUnrecognized() { } + + public DeviceErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(DeviceWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsMaxAccessCodesReached), + "max_access_codes_reached" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsUnreliableOnlineStatus), + "unreliable_online_status" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsAccessoryKeypadLowBattery), + "accessory_keypad_low_battery" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsAccessoryKeypadSetupRequired), + "accessory_keypad_setup_required" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsKeynestUnsupportedLocker), + "keynest_unsupported_locker" + )] + [JsonSubtypes.KnownSubType(typeof(DeviceWarningsProviderIssue), "provider_issue")] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsHubRequiredForAdditionalCapabilities), + "hub_required_for_additional_capabilities" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsTwoNDeviceMissingTimezone), + "two_n_device_missing_timezone" + )] + [JsonSubtypes.KnownSubType(typeof(DeviceWarningsTimeZoneMismatch), "time_zone_mismatch")] + [JsonSubtypes.KnownSubType(typeof(DeviceWarningsTimeZoneUnknown), "time_zone_unknown")] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsUltraloqTimeZoneUnknown), + "ultraloq_time_zone_unknown" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsLocklyTimeZoneNotConfigured), + "lockly_time_zone_not_configured" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsUnknownIssueWithPhone), + "unknown_issue_with_phone" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsSaltoKsLockAccessCodeSupportRemoved), + "salto_ks_lock_access_code_support_removed" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsSaltoKsSubscriptionLimitAlmostReached), + "salto_ks_subscription_limit_almost_reached" + )] + [JsonSubtypes.KnownSubType(typeof(DeviceWarningsPrivacyMode), "privacy_mode")] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsSaltoKsPrivacyMode), + "salto_ks_privacy_mode" + )] + [JsonSubtypes.KnownSubType(typeof(DeviceWarningsSaltoKsOfficeMode), "salto_ks_office_mode")] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsDeviceHasFlakyConnection), + "device_has_flaky_connection" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsScheduledMaintenanceWindow), + "scheduled_maintenance_window" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsDeviceCommunicationDegraded), + "device_communication_degraded" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsTemperatureThresholdExceeded), + "temperature_threshold_exceeded" + )] + [JsonSubtypes.KnownSubType(typeof(DeviceWarningsPowerSavingMode), "power_saving_mode")] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsTtlockWeakGatewaySignal), + "ttlock_weak_gateway_signal" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsTtlockLockGatewayUnlockingNotEnabled), + "ttlock_lock_gateway_unlocking_not_enabled" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsThirdPartyIntegrationDetected), + "third_party_integration_detected" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsManyActiveBackupCodes), + "many_active_backup_codes" + )] + [JsonSubtypes.KnownSubType( + typeof(DeviceWarningsPartialBackupAccessCodePool), + "partial_backup_access_code_pool" + )] + public abstract class DeviceWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_deviceWarningsPartialBackupAccessCodePool_model")] + public class DeviceWarningsPartialBackupAccessCodePool : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsPartialBackupAccessCodePool() { } + + public DeviceWarningsPartialBackupAccessCodePool( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "partial_backup_access_code_pool"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsManyActiveBackupCodes_model")] + public class DeviceWarningsManyActiveBackupCodes : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsManyActiveBackupCodes() { } + + public DeviceWarningsManyActiveBackupCodes( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "many_active_backup_codes"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsThirdPartyIntegrationDetected_model")] + public class DeviceWarningsThirdPartyIntegrationDetected : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsThirdPartyIntegrationDetected() { } + + public DeviceWarningsThirdPartyIntegrationDetected( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "third_party_integration_detected"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsTtlockLockGatewayUnlockingNotEnabled_model")] + public class DeviceWarningsTtlockLockGatewayUnlockingNotEnabled : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsTtlockLockGatewayUnlockingNotEnabled() { } + + public DeviceWarningsTtlockLockGatewayUnlockingNotEnabled( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "ttlock_lock_gateway_unlocking_not_enabled"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsTtlockWeakGatewaySignal_model")] + public class DeviceWarningsTtlockWeakGatewaySignal : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsTtlockWeakGatewaySignal() { } + + public DeviceWarningsTtlockWeakGatewaySignal( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "ttlock_weak_gateway_signal"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsPowerSavingMode_model")] + public class DeviceWarningsPowerSavingMode : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsPowerSavingMode() { } + + public DeviceWarningsPowerSavingMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "power_saving_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsTemperatureThresholdExceeded_model")] + public class DeviceWarningsTemperatureThresholdExceeded : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsTemperatureThresholdExceeded() { } + + public DeviceWarningsTemperatureThresholdExceeded( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "temperature_threshold_exceeded"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsDeviceCommunicationDegraded_model")] + public class DeviceWarningsDeviceCommunicationDegraded : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsDeviceCommunicationDegraded() { } + + public DeviceWarningsDeviceCommunicationDegraded( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_communication_degraded"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsScheduledMaintenanceWindow_model")] + public class DeviceWarningsScheduledMaintenanceWindow : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsScheduledMaintenanceWindow() { } + + public DeviceWarningsScheduledMaintenanceWindow( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "scheduled_maintenance_window"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsDeviceHasFlakyConnection_model")] + public class DeviceWarningsDeviceHasFlakyConnection : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsDeviceHasFlakyConnection() { } + + public DeviceWarningsDeviceHasFlakyConnection( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_has_flaky_connection"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsSaltoKsOfficeMode_model")] + public class DeviceWarningsSaltoKsOfficeMode : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsSaltoKsOfficeMode() { } + + public DeviceWarningsSaltoKsOfficeMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "salto_ks_office_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsSaltoKsPrivacyMode_model")] + public class DeviceWarningsSaltoKsPrivacyMode : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsSaltoKsPrivacyMode() { } + + public DeviceWarningsSaltoKsPrivacyMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "salto_ks_privacy_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsPrivacyMode_model")] + public class DeviceWarningsPrivacyMode : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsPrivacyMode() { } + + public DeviceWarningsPrivacyMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "privacy_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsSaltoKsSubscriptionLimitAlmostReached_model")] + public class DeviceWarningsSaltoKsSubscriptionLimitAlmostReached : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsSaltoKsSubscriptionLimitAlmostReached() { } + + public DeviceWarningsSaltoKsSubscriptionLimitAlmostReached( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "salto_ks_subscription_limit_almost_reached"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsSaltoKsLockAccessCodeSupportRemoved_model")] + public class DeviceWarningsSaltoKsLockAccessCodeSupportRemoved : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsSaltoKsLockAccessCodeSupportRemoved() { } + + public DeviceWarningsSaltoKsLockAccessCodeSupportRemoved( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "salto_ks_lock_access_code_support_removed"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsUnknownIssueWithPhone_model")] + public class DeviceWarningsUnknownIssueWithPhone : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsUnknownIssueWithPhone() { } + + public DeviceWarningsUnknownIssueWithPhone( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_phone"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsLocklyTimeZoneNotConfigured_model")] + public class DeviceWarningsLocklyTimeZoneNotConfigured : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsLocklyTimeZoneNotConfigured() { } + + public DeviceWarningsLocklyTimeZoneNotConfigured( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "lockly_time_zone_not_configured"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsUltraloqTimeZoneUnknown_model")] + public class DeviceWarningsUltraloqTimeZoneUnknown : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsUltraloqTimeZoneUnknown() { } + + public DeviceWarningsUltraloqTimeZoneUnknown( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "ultraloq_time_zone_unknown"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsTimeZoneUnknown_model")] + public class DeviceWarningsTimeZoneUnknown : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsTimeZoneUnknown() { } + + public DeviceWarningsTimeZoneUnknown( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "time_zone_unknown"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsTimeZoneMismatch_model")] + public class DeviceWarningsTimeZoneMismatch : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsTimeZoneMismatch() { } + + public DeviceWarningsTimeZoneMismatch( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "time_zone_mismatch"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsTwoNDeviceMissingTimezone_model")] + public class DeviceWarningsTwoNDeviceMissingTimezone : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsTwoNDeviceMissingTimezone() { } + + public DeviceWarningsTwoNDeviceMissingTimezone( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "two_n_device_missing_timezone"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsHubRequiredForAdditionalCapabilities_model")] + public class DeviceWarningsHubRequiredForAdditionalCapabilities : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsHubRequiredForAdditionalCapabilities() { } + + public DeviceWarningsHubRequiredForAdditionalCapabilities( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "hub_required_for_additional_capabilities"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsProviderIssue_model")] + public class DeviceWarningsProviderIssue : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsProviderIssue() { } + + public DeviceWarningsProviderIssue( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "provider_issue"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsKeynestUnsupportedLocker_model")] + public class DeviceWarningsKeynestUnsupportedLocker : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsKeynestUnsupportedLocker() { } + + public DeviceWarningsKeynestUnsupportedLocker( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "keynest_unsupported_locker"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsAccessoryKeypadSetupRequired_model")] + public class DeviceWarningsAccessoryKeypadSetupRequired : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsAccessoryKeypadSetupRequired() { } + + public DeviceWarningsAccessoryKeypadSetupRequired( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "accessory_keypad_setup_required"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsAccessoryKeypadLowBattery_model")] + public class DeviceWarningsAccessoryKeypadLowBattery : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsAccessoryKeypadLowBattery() { } + + public DeviceWarningsAccessoryKeypadLowBattery( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "accessory_keypad_low_battery"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsUnreliableOnlineStatus_model")] + public class DeviceWarningsUnreliableOnlineStatus : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsUnreliableOnlineStatus() { } + + public DeviceWarningsUnreliableOnlineStatus( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unreliable_online_status"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsMaxAccessCodesReached_model")] + public class DeviceWarningsMaxAccessCodesReached : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsMaxAccessCodesReached() { } + + public DeviceWarningsMaxAccessCodesReached( + int activeAccessCodeCount = default, + string createdAt = default, + int maxActiveAccessCodeCount = default, + string message = default, + string warningCode = default + ) + { + ActiveAccessCodeCount = activeAccessCodeCount; + CreatedAt = createdAt; + MaxActiveAccessCodeCount = maxActiveAccessCodeCount; + Message = message; + WarningCode = warningCode; + } + + /// + /// Number of active access codes on the device when the warning was set. + /// + [DataMember( + Name = "active_access_code_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int ActiveAccessCodeCount { get; set; } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Maximum number of active access codes supported by the device. + /// + [DataMember( + Name = "max_active_access_code_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int MaxActiveAccessCodeCount { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "max_access_codes_reached"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceWarningsUnrecognized_model")] + public class DeviceWarningsUnrecognized : DeviceWarnings + { + [JsonConstructorAttribute] + protected DeviceWarningsUnrecognized() { } + + public DeviceWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. + /// + [DataMember( + Name = "can_activate_weekly_program", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanActivateWeeklyProgram { get; set; } + + /// + /// Indicates whether the lock supports configuring automatic locking. + /// + [DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanConfigureAutoLock { get; set; } + + /// + /// Indicates whether the thermostat supports cooling. + /// + [DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacCool { get; set; } + + /// + /// Indicates whether the thermostat supports heating. + /// + [DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacHeat { get; set; } + + /// + /// Indicates whether the thermostat supports simultaneous heating and cooling. + /// + [DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacHeatCool { get; set; } + + /// + /// Indicates whether the device supports programming offline access codes. + /// + [DataMember( + Name = "can_program_offline_access_codes", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramOfflineAccessCodes { get; set; } + + /// + /// Indicates whether the device supports programming online access codes. + /// + [DataMember( + Name = "can_program_online_access_codes", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramOnlineAccessCodes { get; set; } + + /// + /// Indicates whether the thermostat supports different climate programs for each day of the week. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_different_each_day", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } + + /// + /// Indicates whether the thermostat supports a single climate program applied to every day. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_same_each_day", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } + + /// + /// Indicates whether the thermostat supports weekday/weekend climate programs. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_weekday_weekend", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } + + /// + /// Indicates whether the device supports remote locking. + /// + [DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanRemotelyLock { get; set; } + + /// + /// Indicates whether the device supports remote unlocking. + /// + [DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanRemotelyUnlock { get; set; } + + /// + /// Indicates whether the thermostat supports running climate programs. + /// + [DataMember( + Name = "can_run_thermostat_programs", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanRunThermostatPrograms { get; set; } + + /// + /// Indicates whether the device supports simulating connection in a sandbox. + /// + [DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] + public bool? CanSimulateConnection { get; set; } + + /// + /// Indicates whether the device supports simulating disconnection in a sandbox. + /// + [DataMember( + Name = "can_simulate_disconnection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateDisconnection { get; set; } + + /// + /// Indicates whether the hub supports simulating connection in a sandbox. + /// + [DataMember( + Name = "can_simulate_hub_connection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateHubConnection { get; set; } + + /// + /// Indicates whether the hub supports simulating disconnection in a sandbox. + /// + [DataMember( + Name = "can_simulate_hub_disconnection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateHubDisconnection { get; set; } + + /// + /// Indicates whether the device supports simulating a paid subscription in a sandbox. + /// + [DataMember( + Name = "can_simulate_paid_subscription", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulatePaidSubscription { get; set; } + + /// + /// Indicates whether the device supports simulating removal in a sandbox. + /// + [DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] + public bool? CanSimulateRemoval { get; set; } + + /// + /// Indicates whether the camera supports streaming live video through a camera live view session. + /// + [DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] + public bool? CanStreamLiveVideo { get; set; } + + /// + /// Indicates whether the thermostat can be turned off. + /// + [DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] + public bool? CanTurnOffHvac { get; set; } + + /// + /// Indicates whether the lock supports unlocking with an access code. + /// + [DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] + public bool? CanUnlockWithCode { get; set; } + + /// + /// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). + /// + [DataMember(Name = "capabilities_supported", IsRequired = false, EmitDefaultValue = false)] + public List CapabilitiesSupported { get; set; } + + /// + /// Unique identifier for the account associated with the device. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the device object was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object CustomMetadata { get; set; } + + /// + /// ID of the device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Manufacturer of the device. Represents the hardware brand, which may differ from the provider. + /// + [DataMember(Name = "device_manufacturer", IsRequired = false, EmitDefaultValue = false)] + public DeviceDeviceManufacturer? DeviceManufacturer { get; set; } + + /// + /// Provider of the device. Represents the third-party service through which the device is controlled. + /// + [DataMember(Name = "device_provider", IsRequired = false, EmitDefaultValue = false)] + public DeviceDeviceProvider? DeviceProvider { get; set; } + + /// + /// Type of the device. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public Device.DeviceTypeEnum DeviceType { get; set; } + + /// + /// Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Location information for the device. + /// + [DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] + public DeviceLocation? Location { get; set; } + + /// + /// Optional nickname to describe the device, settable through Seam. + /// + [DataMember(Name = "nickname", IsRequired = false, EmitDefaultValue = false)] + public string? Nickname { get; set; } + + /// + /// Properties of the device. + /// + [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] + public DeviceProperties Properties { get; set; } + + /// + /// IDs of the spaces the device is in. + /// + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List SpaceIds { get; set; } + + /// + /// Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// Unique identifier for the Seam workspace associated with the device. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceDeviceManufacturer_model")] + public class DeviceDeviceManufacturer + { + [JsonConstructorAttribute] + protected DeviceDeviceManufacturer() { } + + public DeviceDeviceManufacturer( + string displayName = default, + string? imageUrl = default, + string manufacturer = default + ) + { + DisplayName = displayName; + ImageUrl = imageUrl; + Manufacturer = manufacturer; + } + + /// + /// Display name for the manufacturer, such as `August`, `Yale`, `Salto`, and so on. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Image URL for the manufacturer logo. + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string? ImageUrl { get; set; } + + /// + /// Manufacturer identifier, such as `august`, `yale`, `salto`, and so on. + /// + [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] + public string Manufacturer { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceDeviceProvider_model")] + public class DeviceDeviceProvider + { + [JsonConstructorAttribute] + protected DeviceDeviceProvider() { } + + public DeviceDeviceProvider( + string deviceProviderName = default, + string displayName = default, + string? imageUrl = default, + string providerCategory = default + ) + { + DeviceProviderName = deviceProviderName; + DisplayName = displayName; + ImageUrl = imageUrl; + ProviderCategory = providerCategory; + } + + /// + /// Device provider name. Corresponds to the integration type, such as `august`, `schlage`, `yale_access`, and so on. + /// + [DataMember(Name = "device_provider_name", IsRequired = false, EmitDefaultValue = false)] + public string DeviceProviderName { get; set; } + + /// + /// Display name for the device provider type. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Image URL for the device provider. + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string? ImageUrl { get; set; } + + /// + /// Provider category. Indicates the third-party provider type, such as `stable`, for stable integrations, or `internal`, for internal integrations. + /// + [DataMember(Name = "provider_category", IsRequired = false, EmitDefaultValue = false)] + public string ProviderCategory { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceLocation_model")] + public class DeviceLocation + { + [JsonConstructorAttribute] + protected DeviceLocation() { } + + public DeviceLocation( + string? locationName = default, + string? roomName = default, + string? timeZone = default, + string? timezone = default + ) + { + LocationName = locationName; + RoomName = roomName; + TimeZone = timeZone; + Timezone = timezone; + } + + /// + /// Name of the device location. + /// + [DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] + public string? LocationName { get; set; } + + /// + /// Name of the room within the device location, when the provider reports one. + /// + [DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] + public string? RoomName { get; set; } + + /// + /// Time zone of the device location. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + /// + /// Time zone of the device location. + /// + [Obsolete("Use `time_zone` instead.")] + [DataMember(Name = "timezone", IsRequired = false, EmitDefaultValue = false)] + public string? Timezone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_deviceProperties_model")] + public class DeviceProperties + { + [JsonConstructorAttribute] + protected DeviceProperties() { } + + public DeviceProperties( + DevicePropertiesAccessoryKeypad? accessoryKeypad = default, + DevicePropertiesAppearance appearance = default, + DevicePropertiesBattery? battery = default, + float? batteryLevel = default, + List? currentlyTriggeringNoiseThresholdIds = default, + bool? hasDirectPower = default, + string? imageAltText = default, + string? imageUrl = default, + string? manufacturer = default, + DevicePropertiesModel model = default, + string name = default, + float? noiseLevelDecibels = default, + bool? offlineAccessCodesEnabled = default, + bool online = default, + bool? onlineAccessCodesEnabled = default, + string? serialNumber = default, + bool? supportsAccessoryKeypad = default, + bool? supportsOfflineAccessCodes = default, + DevicePropertiesAssaAbloyCredentialServiceMetadata? assaAbloyCredentialServiceMetadata = + default, + DevicePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = + default, + DevicePropertiesAkilesMetadata? akilesMetadata = default, + DevicePropertiesAqaraMetadata? aqaraMetadata = default, + DevicePropertiesArloMetadata? arloMetadata = default, + DevicePropertiesAssaAbloyVostioMetadata? assaAbloyVostioMetadata = default, + DevicePropertiesAugustMetadata? augustMetadata = default, + DevicePropertiesAvigilonAltaMetadata? avigilonAltaMetadata = default, + DevicePropertiesBrivoMetadata? brivoMetadata = default, + DevicePropertiesControlbywebMetadata? controlbywebMetadata = default, + DevicePropertiesDormakabaOracodeIhoMetadata? dormakabaOracodeIhoMetadata = default, + DevicePropertiesDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, + DevicePropertiesEcobeeMetadata? ecobeeMetadata = default, + DevicePropertiesFourSuitesMetadata? fourSuitesMetadata = default, + DevicePropertiesGenieMetadata? genieMetadata = default, + DevicePropertiesHoneywellResideoMetadata? honeywellResideoMetadata = default, + DevicePropertiesIglooMetadata? iglooMetadata = default, + DevicePropertiesIgloohomeMetadata? igloohomeMetadata = default, + DevicePropertiesKeynestMetadata? keynestMetadata = default, + DevicePropertiesKisiMetadata? kisiMetadata = default, + DevicePropertiesKorelockMetadata? korelockMetadata = default, + DevicePropertiesKwiksetMetadata? kwiksetMetadata = default, + DevicePropertiesLocklyMetadata? locklyMetadata = default, + DevicePropertiesMinutMetadata? minutMetadata = default, + DevicePropertiesNestMetadata? nestMetadata = default, + DevicePropertiesNoiseawareMetadata? noiseawareMetadata = default, + DevicePropertiesNukiMetadata? nukiMetadata = default, + DevicePropertiesOmnitecMetadata? omnitecMetadata = default, + DevicePropertiesReolinkMetadata? reolinkMetadata = default, + DevicePropertiesRingMetadata? ringMetadata = default, + DevicePropertiesSaltoKsMetadata? saltoKsMetadata = default, + DevicePropertiesSaltoMetadata? saltoMetadata = default, + DevicePropertiesSchlageMetadata? schlageMetadata = default, + DevicePropertiesSeamBridgeMetadata? seamBridgeMetadata = default, + DevicePropertiesSensiMetadata? sensiMetadata = default, + DevicePropertiesSmartthingsMetadata? smartthingsMetadata = default, + DevicePropertiesTadoMetadata? tadoMetadata = default, + DevicePropertiesTapoMetadata? tapoMetadata = default, + DevicePropertiesTedeeMetadata? tedeeMetadata = default, + DevicePropertiesTtlockMetadata? ttlockMetadata = default, + DevicePropertiesTwoNMetadata? twoNMetadata = default, + DevicePropertiesUltraloqMetadata? ultraloqMetadata = default, + DevicePropertiesVisionlineMetadata? visionlineMetadata = default, + DevicePropertiesWyzeMetadata? wyzeMetadata = default, + DevicePropertiesYacanMetadata? yacanMetadata = default, + float? autoLockDelaySeconds = default, + bool? autoLockEnabled = default, + bool? backupAccessCodePoolEnabled = default, + List? codeConstraints = default, + bool? doorOpen = default, + bool? hasNativeEntryEvents = default, + DevicePropertiesKeypadBattery? keypadBattery = default, + bool? locked = default, + float? maxActiveCodesSupported = default, + List? offlineTimeFrameOptions = default, + List? onlineTimeFrameOptions = default, + List? supportedCodeLengths = default, + bool? supportsBackupAccessCodePool = default, + DevicePropertiesActiveThermostatSchedule? activeThermostatSchedule = default, + string? activeThermostatScheduleId = default, + List? availableClimatePresetModes = + default, + List? availableClimatePresets = default, + List? availableFanModeSettings = default, + List? availableHvacModeSettings = + default, + DevicePropertiesCurrentClimateSetting? currentClimateSetting = default, + DevicePropertiesDefaultClimateSetting? defaultClimateSetting = default, + string? fallbackClimatePresetKey = default, + DeviceProperties.FanModeSettingEnum? fanModeSetting = default, + bool? isCooling = default, + bool? isFanRunning = default, + bool? isHeating = default, + bool? isTemporaryManualOverrideActive = default, + float? maxCoolingSetPointCelsius = default, + float? maxCoolingSetPointFahrenheit = default, + float? maxHeatingSetPointCelsius = default, + float? maxHeatingSetPointFahrenheit = default, + float? maxThermostatDailyProgramPeriodsPerDay = default, + float? maxUniqueClimatePresetsPerThermostatWeeklyProgram = default, + float? minCoolingSetPointCelsius = default, + float? minCoolingSetPointFahrenheit = default, + float? minHeatingCoolingDeltaCelsius = default, + float? minHeatingCoolingDeltaFahrenheit = default, + float? minHeatingSetPointCelsius = default, + float? minHeatingSetPointFahrenheit = default, + float? relativeHumidity = default, + float? temperatureCelsius = default, + float? temperatureFahrenheit = default, + DevicePropertiesTemperatureThreshold? temperatureThreshold = default, + float? thermostatDailyProgramPeriodPrecisionMinutes = default, + List? thermostatDailyPrograms = default, + DevicePropertiesThermostatWeeklyProgram? thermostatWeeklyProgram = default + ) + { + AccessoryKeypad = accessoryKeypad; + Appearance = appearance; + Battery = battery; + BatteryLevel = batteryLevel; + CurrentlyTriggeringNoiseThresholdIds = currentlyTriggeringNoiseThresholdIds; + HasDirectPower = hasDirectPower; + ImageAltText = imageAltText; + ImageUrl = imageUrl; + Manufacturer = manufacturer; + Model = model; + Name = name; + NoiseLevelDecibels = noiseLevelDecibels; + OfflineAccessCodesEnabled = offlineAccessCodesEnabled; + Online = online; + OnlineAccessCodesEnabled = onlineAccessCodesEnabled; + SerialNumber = serialNumber; + SupportsAccessoryKeypad = supportsAccessoryKeypad; + SupportsOfflineAccessCodes = supportsOfflineAccessCodes; + AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; + SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; + AkilesMetadata = akilesMetadata; + AqaraMetadata = aqaraMetadata; + ArloMetadata = arloMetadata; + AssaAbloyVostioMetadata = assaAbloyVostioMetadata; + AugustMetadata = augustMetadata; + AvigilonAltaMetadata = avigilonAltaMetadata; + BrivoMetadata = brivoMetadata; + ControlbywebMetadata = controlbywebMetadata; + DormakabaOracodeIhoMetadata = dormakabaOracodeIhoMetadata; + DormakabaOracodeMetadata = dormakabaOracodeMetadata; + EcobeeMetadata = ecobeeMetadata; + FourSuitesMetadata = fourSuitesMetadata; + GenieMetadata = genieMetadata; + HoneywellResideoMetadata = honeywellResideoMetadata; + IglooMetadata = iglooMetadata; + IgloohomeMetadata = igloohomeMetadata; + KeynestMetadata = keynestMetadata; + KisiMetadata = kisiMetadata; + KorelockMetadata = korelockMetadata; + KwiksetMetadata = kwiksetMetadata; + LocklyMetadata = locklyMetadata; + MinutMetadata = minutMetadata; + NestMetadata = nestMetadata; + NoiseawareMetadata = noiseawareMetadata; + NukiMetadata = nukiMetadata; + OmnitecMetadata = omnitecMetadata; + ReolinkMetadata = reolinkMetadata; + RingMetadata = ringMetadata; + SaltoKsMetadata = saltoKsMetadata; + SaltoMetadata = saltoMetadata; + SchlageMetadata = schlageMetadata; + SeamBridgeMetadata = seamBridgeMetadata; + SensiMetadata = sensiMetadata; + SmartthingsMetadata = smartthingsMetadata; + TadoMetadata = tadoMetadata; + TapoMetadata = tapoMetadata; + TedeeMetadata = tedeeMetadata; + TtlockMetadata = ttlockMetadata; + TwoNMetadata = twoNMetadata; + UltraloqMetadata = ultraloqMetadata; + VisionlineMetadata = visionlineMetadata; + WyzeMetadata = wyzeMetadata; + YacanMetadata = yacanMetadata; + AutoLockDelaySeconds = autoLockDelaySeconds; + AutoLockEnabled = autoLockEnabled; + BackupAccessCodePoolEnabled = backupAccessCodePoolEnabled; + CodeConstraints = codeConstraints; + DoorOpen = doorOpen; + HasNativeEntryEvents = hasNativeEntryEvents; + KeypadBattery = keypadBattery; + Locked = locked; + MaxActiveCodesSupported = maxActiveCodesSupported; + OfflineTimeFrameOptions = offlineTimeFrameOptions; + OnlineTimeFrameOptions = onlineTimeFrameOptions; + SupportedCodeLengths = supportedCodeLengths; + SupportsBackupAccessCodePool = supportsBackupAccessCodePool; + ActiveThermostatSchedule = activeThermostatSchedule; + ActiveThermostatScheduleId = activeThermostatScheduleId; + AvailableClimatePresetModes = availableClimatePresetModes; + AvailableClimatePresets = availableClimatePresets; + AvailableFanModeSettings = availableFanModeSettings; + AvailableHvacModeSettings = availableHvacModeSettings; + CurrentClimateSetting = currentClimateSetting; + DefaultClimateSetting = defaultClimateSetting; + FallbackClimatePresetKey = fallbackClimatePresetKey; + FanModeSetting = fanModeSetting; + IsCooling = isCooling; + IsFanRunning = isFanRunning; + IsHeating = isHeating; + IsTemporaryManualOverrideActive = isTemporaryManualOverrideActive; + MaxCoolingSetPointCelsius = maxCoolingSetPointCelsius; + MaxCoolingSetPointFahrenheit = maxCoolingSetPointFahrenheit; + MaxHeatingSetPointCelsius = maxHeatingSetPointCelsius; + MaxHeatingSetPointFahrenheit = maxHeatingSetPointFahrenheit; + MaxThermostatDailyProgramPeriodsPerDay = maxThermostatDailyProgramPeriodsPerDay; + MaxUniqueClimatePresetsPerThermostatWeeklyProgram = + maxUniqueClimatePresetsPerThermostatWeeklyProgram; + MinCoolingSetPointCelsius = minCoolingSetPointCelsius; + MinCoolingSetPointFahrenheit = minCoolingSetPointFahrenheit; + MinHeatingCoolingDeltaCelsius = minHeatingCoolingDeltaCelsius; + MinHeatingCoolingDeltaFahrenheit = minHeatingCoolingDeltaFahrenheit; + MinHeatingSetPointCelsius = minHeatingSetPointCelsius; + MinHeatingSetPointFahrenheit = minHeatingSetPointFahrenheit; + RelativeHumidity = relativeHumidity; + TemperatureCelsius = temperatureCelsius; + TemperatureFahrenheit = temperatureFahrenheit; + TemperatureThreshold = temperatureThreshold; + ThermostatDailyProgramPeriodPrecisionMinutes = + thermostatDailyProgramPeriodPrecisionMinutes; + ThermostatDailyPrograms = thermostatDailyPrograms; + ThermostatWeeklyProgram = thermostatWeeklyProgram; + } + + /// + /// Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AvailableClimatePresetModesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "home")] + Home = 1, + + [EnumMember(Value = "away")] + Away = 2, + + [EnumMember(Value = "wake")] + Wake = 3, + + [EnumMember(Value = "sleep")] + Sleep = 4, + + [EnumMember(Value = "occupied")] + Occupied = 5, + + [EnumMember(Value = "unoccupied")] + Unoccupied = 6, + } + + /// + /// Fan mode settings that the thermostat supports. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AvailableFanModeSettingsEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// HVAC mode settings that the thermostat supports. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum AvailableHvacModeSettingsEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "heat")] + Heat = 2, + + [EnumMember(Value = "cool")] + Cool = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + + [EnumMember(Value = "eco")] + Eco = 5, + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// Accessory keypad properties and state. + /// + [DataMember(Name = "accessory_keypad", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAccessoryKeypad? AccessoryKeypad { get; set; } + + /// + /// Appearance-related properties, as reported by the device. + /// + [DataMember(Name = "appearance", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAppearance Appearance { get; set; } + + /// + /// Represents the current status of the battery charge level. + /// + [DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesBattery? Battery { get; set; } + + /// + /// Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. + /// + [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] + public float? BatteryLevel { get; set; } + + /// + /// Array of noise threshold IDs that are currently triggering. + /// + [DataMember( + Name = "currently_triggering_noise_threshold_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List? CurrentlyTriggeringNoiseThresholdIds { get; set; } + + /// + /// Indicates whether the device has direct power. + /// + [DataMember(Name = "has_direct_power", IsRequired = false, EmitDefaultValue = false)] + public bool? HasDirectPower { get; set; } + + /// + /// Alt text for the device image. + /// + [DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] + public string? ImageAltText { get; set; } + + /// + /// Image URL for the device. + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string? ImageUrl { get; set; } + + /// + /// Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. + /// + [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] + public string? Manufacturer { get; set; } + + /// + /// Device model-related properties. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesModel Model { get; set; } + + /// + /// Name of the device. + /// + [Obsolete("use device.display_name instead")] + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Indicates current noise level in decibels, if the device supports noise detection. + /// + [DataMember(Name = "noise_level_decibels", IsRequired = false, EmitDefaultValue = false)] + public float? NoiseLevelDecibels { get; set; } + + /// + /// Indicates whether it is currently possible to use offline access codes for the device. + /// + [Obsolete("use device.can_program_offline_access_codes")] + [DataMember( + Name = "offline_access_codes_enabled", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OfflineAccessCodesEnabled { get; set; } + + /// + /// Indicates whether the device is online. + /// + [DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] + public bool Online { get; set; } + + /// + /// Indicates whether it is currently possible to use online access codes for the device. + /// + [Obsolete("use device.can_program_online_access_codes")] + [DataMember( + Name = "online_access_codes_enabled", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OnlineAccessCodesEnabled { get; set; } + + /// + /// Serial number of the device. + /// + [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] + public string? SerialNumber { get; set; } + + [Obsolete("use device.properties.model.can_connect_accessory_keypad")] + [DataMember( + Name = "supports_accessory_keypad", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? SupportsAccessoryKeypad { get; set; } + + [Obsolete("use offline_access_codes_enabled")] + [DataMember( + Name = "supports_offline_access_codes", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? SupportsOfflineAccessCodes { get; set; } + + /// + /// ASSA ABLOY Credential Service metadata for the phone. + /// + [DataMember( + Name = "assa_abloy_credential_service_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public DevicePropertiesAssaAbloyCredentialServiceMetadata? AssaAbloyCredentialServiceMetadata { get; set; } + + /// + /// Salto Space credential service metadata for the phone. + /// + [DataMember( + Name = "salto_space_credential_service_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public DevicePropertiesSaltoSpaceCredentialServiceMetadata? SaltoSpaceCredentialServiceMetadata { get; set; } + + /// + /// Metadata for an Akiles device. + /// + [DataMember(Name = "akiles_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAkilesMetadata? AkilesMetadata { get; set; } + + /// + /// Metadata for an Aqara device. + /// + [DataMember(Name = "aqara_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAqaraMetadata? AqaraMetadata { get; set; } + + /// + /// Metadata for an Arlo camera. + /// + [DataMember(Name = "arlo_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesArloMetadata? ArloMetadata { get; set; } + + /// + /// Metadata for an ASSA ABLOY Vostio system. + /// + [DataMember( + Name = "assa_abloy_vostio_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public DevicePropertiesAssaAbloyVostioMetadata? AssaAbloyVostioMetadata { get; set; } + + /// + /// Metadata for an August device. + /// + [DataMember(Name = "august_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAugustMetadata? AugustMetadata { get; set; } + + /// + /// Metadata for an Avigilon Alta system. + /// + [DataMember(Name = "avigilon_alta_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAvigilonAltaMetadata? AvigilonAltaMetadata { get; set; } + + /// + /// Metadata for a Brivo device. + /// + [DataMember(Name = "brivo_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesBrivoMetadata? BrivoMetadata { get; set; } + + /// + /// Metadata for a ControlByWeb device. + /// + [DataMember(Name = "controlbyweb_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesControlbywebMetadata? ControlbywebMetadata { get; set; } + + /// + /// Metadata for a dormakaba Oracode Homeowner's Portal device. + /// + [DataMember( + Name = "dormakaba_oracode_iho_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public DevicePropertiesDormakabaOracodeIhoMetadata? DormakabaOracodeIhoMetadata { get; set; } + + /// + /// Metadata for a dormakaba Oracode device. + /// + [DataMember( + Name = "dormakaba_oracode_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public DevicePropertiesDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } + + /// + /// Metadata for an ecobee device. + /// + [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesEcobeeMetadata? EcobeeMetadata { get; set; } + + /// + /// Metadata for a 4SUITES device. + /// + [DataMember(Name = "four_suites_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesFourSuitesMetadata? FourSuitesMetadata { get; set; } + + /// + /// Metadata for a Genie device. + /// + [DataMember(Name = "genie_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesGenieMetadata? GenieMetadata { get; set; } + + /// + /// Metadata for a Honeywell Resideo device. + /// + [DataMember( + Name = "honeywell_resideo_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public DevicePropertiesHoneywellResideoMetadata? HoneywellResideoMetadata { get; set; } + + /// + /// Metadata for an igloo device. + /// + [DataMember(Name = "igloo_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesIglooMetadata? IglooMetadata { get; set; } + + /// + /// Metadata for an igloohome device. + /// + [DataMember(Name = "igloohome_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesIgloohomeMetadata? IgloohomeMetadata { get; set; } + + /// + /// Metadata for a KeyNest device. + /// + [DataMember(Name = "keynest_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesKeynestMetadata? KeynestMetadata { get; set; } + + /// + /// Metadata for a Kisi device. + /// + [DataMember(Name = "kisi_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesKisiMetadata? KisiMetadata { get; set; } + + /// + /// Metadata for a Korelock device. + /// + [DataMember(Name = "korelock_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesKorelockMetadata? KorelockMetadata { get; set; } + + /// + /// Metadata for a Kwikset device. + /// + [DataMember(Name = "kwikset_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesKwiksetMetadata? KwiksetMetadata { get; set; } + + /// + /// Metadata for a Lockly device. + /// + [DataMember(Name = "lockly_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesLocklyMetadata? LocklyMetadata { get; set; } + + /// + /// Metadata for a Minut device. + /// + [DataMember(Name = "minut_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesMinutMetadata? MinutMetadata { get; set; } + + /// + /// Metadata for a Google Nest device. + /// + [DataMember(Name = "nest_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesNestMetadata? NestMetadata { get; set; } + + /// + /// Metadata for a NoiseAware device. + /// + [DataMember(Name = "noiseaware_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesNoiseawareMetadata? NoiseawareMetadata { get; set; } + + /// + /// Metadata for a Nuki device. + /// + [DataMember(Name = "nuki_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesNukiMetadata? NukiMetadata { get; set; } + + /// + /// Metadata for an Omnitec device. + /// + [DataMember(Name = "omnitec_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesOmnitecMetadata? OmnitecMetadata { get; set; } + + /// + /// Metadata for a Reolink camera. + /// + [DataMember(Name = "reolink_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesReolinkMetadata? ReolinkMetadata { get; set; } + + /// + /// Metadata for a Ring device. + /// + [DataMember(Name = "ring_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesRingMetadata? RingMetadata { get; set; } + + /// + /// Metadata for a Salto KS device. + /// + [DataMember(Name = "salto_ks_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesSaltoKsMetadata? SaltoKsMetadata { get; set; } + + /// + /// Metada for a Salto device. + /// + [Obsolete("Use `salto_ks_metadata` instead.")] + [DataMember(Name = "salto_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesSaltoMetadata? SaltoMetadata { get; set; } + + /// + /// Metadata for a Schlage device. + /// + [DataMember(Name = "schlage_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesSchlageMetadata? SchlageMetadata { get; set; } + + /// + /// Metadata for Seam Bridge. + /// + [DataMember(Name = "seam_bridge_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesSeamBridgeMetadata? SeamBridgeMetadata { get; set; } + + /// + /// Metadata for a Sensi device. + /// + [DataMember(Name = "sensi_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesSensiMetadata? SensiMetadata { get; set; } + + /// + /// Metadata for a SmartThings device. + /// + [DataMember(Name = "smartthings_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesSmartthingsMetadata? SmartthingsMetadata { get; set; } + + /// + /// Metadata for a tado° device. + /// + [DataMember(Name = "tado_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesTadoMetadata? TadoMetadata { get; set; } + + /// + /// Metadata for a Tapo camera. + /// + [DataMember(Name = "tapo_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesTapoMetadata? TapoMetadata { get; set; } + + /// + /// Metadata for a Tedee device. + /// + [DataMember(Name = "tedee_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesTedeeMetadata? TedeeMetadata { get; set; } + + /// + /// Metadata for a TTLock device. + /// + [DataMember(Name = "ttlock_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesTtlockMetadata? TtlockMetadata { get; set; } + + /// + /// Metadata for a 2N device. + /// + [DataMember(Name = "two_n_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesTwoNMetadata? TwoNMetadata { get; set; } + + /// + /// Metadata for an Ultraloq device. + /// + [DataMember(Name = "ultraloq_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesUltraloqMetadata? UltraloqMetadata { get; set; } + + /// + /// Metadata for an ASSA ABLOY Visionline system. + /// + [DataMember(Name = "visionline_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesVisionlineMetadata? VisionlineMetadata { get; set; } + + /// + /// Metadata for a Wyze device. + /// + [DataMember(Name = "wyze_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesWyzeMetadata? WyzeMetadata { get; set; } + + /// + /// Metadata for a Yacan device. + /// + [DataMember(Name = "yacan_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesYacanMetadata? YacanMetadata { get; set; } + + /// + /// The delay in seconds before the lock automatically locks after being unlocked. + /// + [DataMember(Name = "auto_lock_delay_seconds", IsRequired = false, EmitDefaultValue = false)] + public float? AutoLockDelaySeconds { get; set; } + + /// + /// Indicates whether automatic locking is enabled. + /// + [DataMember(Name = "auto_lock_enabled", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoLockEnabled { get; set; } + + /// + /// Indicates whether the [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) is currently enabled for the device. To disable it, set this to `false` using [/devices/update](https://www.seam.co/docs/api/devices/update). + /// + [DataMember( + Name = "backup_access_code_pool_enabled", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? BackupAccessCodePoolEnabled { get; set; } + + /// + /// Constraints on access codes for the device. Seam represents each constraint as an object with a `constraint_type` property. Depending on the constraint type, there may also be additional properties. Note that some constraints are manufacturer- or device-specific. + /// + [DataMember(Name = "code_constraints", IsRequired = false, EmitDefaultValue = false)] + public List? CodeConstraints { get; set; } + + /// + /// Indicates whether the door is open. + /// + [DataMember(Name = "door_open", IsRequired = false, EmitDefaultValue = false)] + public bool? DoorOpen { get; set; } + + /// + /// Indicates whether the device supports native entry events. + /// + [DataMember(Name = "has_native_entry_events", IsRequired = false, EmitDefaultValue = false)] + public bool? HasNativeEntryEvents { get; set; } + + /// + /// Keypad battery status. + /// + [DataMember(Name = "keypad_battery", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesKeypadBattery? KeypadBattery { get; set; } + + /// + /// Indicates whether the lock is locked. + /// + [DataMember(Name = "locked", IsRequired = false, EmitDefaultValue = false)] + public bool? Locked { get; set; } + + /// + /// Maximum number of active access codes that the device supports. + /// + [DataMember( + Name = "max_active_codes_supported", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MaxActiveCodesSupported { get; set; } + + /// + /// Time frames that may be requested when creating an offline access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. + /// + [DataMember( + Name = "offline_time_frame_options", + IsRequired = false, + EmitDefaultValue = false + )] + public List? OfflineTimeFrameOptions { get; set; } + + /// + /// Time frames that may be requested when creating an online access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. + /// + [DataMember( + Name = "online_time_frame_options", + IsRequired = false, + EmitDefaultValue = false + )] + public List? OnlineTimeFrameOptions { get; set; } + + /// + /// Supported code lengths for access codes. + /// + [DataMember(Name = "supported_code_lengths", IsRequired = false, EmitDefaultValue = false)] + public List? SupportedCodeLengths { get; set; } + + /// + /// Indicates whether the device supports a [backup access code pool](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes). + /// + [DataMember( + Name = "supports_backup_access_code_pool", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? SupportsBackupAccessCodePool { get; set; } + + /// + /// Active [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [Obsolete("Use `active_thermostat_schedule_id` with `/thermostats/schedules/get` instead.")] + [DataMember( + Name = "active_thermostat_schedule", + IsRequired = false, + EmitDefaultValue = false + )] + public DevicePropertiesActiveThermostatSchedule? ActiveThermostatSchedule { get; set; } + + /// + /// ID of the active [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember( + Name = "active_thermostat_schedule_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ActiveThermostatScheduleId { get; set; } + + /// + /// Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". + /// + [DataMember( + Name = "available_climate_preset_modes", + IsRequired = false, + EmitDefaultValue = false + )] + public List? AvailableClimatePresetModes { get; set; } + + /// + /// Available [climate presets](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) for the thermostat. + /// + [DataMember( + Name = "available_climate_presets", + IsRequired = false, + EmitDefaultValue = false + )] + public List? AvailableClimatePresets { get; set; } + + /// + /// Fan mode settings that the thermostat supports. + /// + [DataMember( + Name = "available_fan_mode_settings", + IsRequired = false, + EmitDefaultValue = false + )] + public List? AvailableFanModeSettings { get; set; } + + /// + /// HVAC mode settings that the thermostat supports. + /// + [DataMember( + Name = "available_hvac_mode_settings", + IsRequired = false, + EmitDefaultValue = false + )] + public List? AvailableHvacModeSettings { get; set; } + + /// + /// Current climate setting. + /// + [DataMember(Name = "current_climate_setting", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesCurrentClimateSetting? CurrentClimateSetting { get; set; } + + [Obsolete("use fallback_climate_preset_key to specify a fallback climate preset instead.")] + [DataMember(Name = "default_climate_setting", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesDefaultClimateSetting? DefaultClimateSetting { get; set; } + + /// + /// Key of the [fallback climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) for the thermostat. + /// + [DataMember( + Name = "fallback_climate_preset_key", + IsRequired = false, + EmitDefaultValue = false + )] + public string? FallbackClimatePresetKey { get; set; } + + [Obsolete("Use `current_climate_setting.fan_mode_setting` instead.")] + [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public DeviceProperties.FanModeSettingEnum? FanModeSetting { get; set; } + + /// + /// Indicates whether the connected HVAC system is currently cooling, as reported by the thermostat. + /// + [DataMember(Name = "is_cooling", IsRequired = false, EmitDefaultValue = false)] + public bool? IsCooling { get; set; } + + /// + /// Indicates whether the fan in the connected HVAC system is currently running, as reported by the thermostat. + /// + [DataMember(Name = "is_fan_running", IsRequired = false, EmitDefaultValue = false)] + public bool? IsFanRunning { get; set; } + + /// + /// Indicates whether the connected HVAC system is currently heating, as reported by the thermostat. + /// + [DataMember(Name = "is_heating", IsRequired = false, EmitDefaultValue = false)] + public bool? IsHeating { get; set; } + + /// + /// Indicates whether the current thermostat settings differ from the most recent active program or schedule that Seam activated. For this condition to occur, `current_climate_setting.manual_override_allowed` must also be `true`. + /// + [DataMember( + Name = "is_temporary_manual_override_active", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsTemporaryManualOverrideActive { get; set; } + + /// + /// Maximum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. + /// + [DataMember( + Name = "max_cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MaxCoolingSetPointCelsius { get; set; } + + /// + /// Maximum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. + /// + [DataMember( + Name = "max_cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MaxCoolingSetPointFahrenheit { get; set; } + + /// + /// Maximum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. + /// + [DataMember( + Name = "max_heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MaxHeatingSetPointCelsius { get; set; } + + /// + /// Maximum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. + /// + [DataMember( + Name = "max_heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MaxHeatingSetPointFahrenheit { get; set; } + + /// + /// Maximum number of periods that the thermostat can support per day. For example, if the thermostat supports 4 periods per day, this value is 4. + /// + [DataMember( + Name = "max_thermostat_daily_program_periods_per_day", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MaxThermostatDailyProgramPeriodsPerDay { get; set; } + + /// + /// Maximum number of climate presets that the thermostat can support for weekly programming. + /// + [DataMember( + Name = "max_unique_climate_presets_per_thermostat_weekly_program", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MaxUniqueClimatePresetsPerThermostatWeeklyProgram { get; set; } + + /// + /// Minimum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. + /// + [DataMember( + Name = "min_cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MinCoolingSetPointCelsius { get; set; } + + /// + /// Minimum [cooling set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. + /// + [DataMember( + Name = "min_cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MinCoolingSetPointFahrenheit { get; set; } + + /// + /// Minimum [temperature difference](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °C between the cooling and heating set points when in heat-cool (auto) mode. + /// + [DataMember( + Name = "min_heating_cooling_delta_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MinHeatingCoolingDeltaCelsius { get; set; } + + /// + /// Minimum [temperature difference](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °F between the cooling and heating set points when in heat-cool (auto) mode. + /// + [DataMember( + Name = "min_heating_cooling_delta_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MinHeatingCoolingDeltaFahrenheit { get; set; } + + /// + /// Minimum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. + /// + [DataMember( + Name = "min_heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MinHeatingSetPointCelsius { get; set; } + + /// + /// Minimum [heating set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. + /// + [DataMember( + Name = "min_heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? MinHeatingSetPointFahrenheit { get; set; } + + /// + /// Reported relative humidity, as a value between 0 and 1, inclusive. + /// + [DataMember(Name = "relative_humidity", IsRequired = false, EmitDefaultValue = false)] + public float? RelativeHumidity { get; set; } + + /// + /// Reported temperature in °C. + /// + [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? TemperatureCelsius { get; set; } + + /// + /// Reported temperature in °F. + /// + [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float? TemperatureFahrenheit { get; set; } + + /// + /// Current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + /// + [DataMember(Name = "temperature_threshold", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesTemperatureThreshold? TemperatureThreshold { get; set; } + + /// + /// Precision of the thermostat's period in minutes. For example, if the thermostat supports 15-minute periods, this value is 15. All values are relative to the top of the hour, so for 15 minutes, the periods would be 0, 15, 30, and 45 minutes past the hour. + /// + [DataMember( + Name = "thermostat_daily_program_period_precision_minutes", + IsRequired = false, + EmitDefaultValue = false + )] + public float? ThermostatDailyProgramPeriodPrecisionMinutes { get; set; } + + /// + /// Configured [daily programs](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. + /// + [DataMember( + Name = "thermostat_daily_programs", + IsRequired = false, + EmitDefaultValue = false + )] + public List? ThermostatDailyPrograms { get; set; } + + /// + /// Current [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. + /// + [DataMember( + Name = "thermostat_weekly_program", + IsRequired = false, + EmitDefaultValue = false + )] + public DevicePropertiesThermostatWeeklyProgram? ThermostatWeeklyProgram { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAccessoryKeypad_model")] + public class DevicePropertiesAccessoryKeypad + { + [JsonConstructorAttribute] + protected DevicePropertiesAccessoryKeypad() { } + + public DevicePropertiesAccessoryKeypad( + DevicePropertiesAccessoryKeypadBattery? battery = default, + bool isConnected = default + ) + { + Battery = battery; + IsConnected = isConnected; + } + + /// + /// Keypad battery properties. + /// + [DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAccessoryKeypadBattery? Battery { get; set; } + + /// + /// Indicates if an accessory keypad is connected to the device. + /// + [DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] + public bool IsConnected { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAccessoryKeypadBattery_model")] + public class DevicePropertiesAccessoryKeypadBattery + { + [JsonConstructorAttribute] + protected DevicePropertiesAccessoryKeypadBattery() { } + + public DevicePropertiesAccessoryKeypadBattery(float level = default) + { + Level = level; + } + + [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] + public float Level { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAppearance_model")] + public class DevicePropertiesAppearance + { + [JsonConstructorAttribute] + protected DevicePropertiesAppearance() { } + + public DevicePropertiesAppearance(string name = default) + { + Name = name; + } + + /// + /// Name of the device as seen from the provider API and application, not settable through Seam. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesBattery_model")] + public class DevicePropertiesBattery + { + [JsonConstructorAttribute] + protected DevicePropertiesBattery() { } + + public DevicePropertiesBattery( + float level = default, + DevicePropertiesBattery.StatusEnum status = default + ) + { + Level = level; + Status = status; + } + + /// + /// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "critical")] + Critical = 1, + + [EnumMember(Value = "low")] + Low = 2, + + [EnumMember(Value = "good")] + Good = 3, + + [EnumMember(Value = "full")] + Full = 4, + } + + /// + /// Battery charge level as a value between 0 and 1, inclusive. + /// + [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] + public float Level { get; set; } + + /// + /// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesBattery.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesModel_model")] + public class DevicePropertiesModel + { + [JsonConstructorAttribute] + protected DevicePropertiesModel() { } + + public DevicePropertiesModel( + bool? accessoryKeypadSupported = default, + bool? canConnectAccessoryKeypad = default, + string displayName = default, + bool? hasBuiltInKeypad = default, + string manufacturerDisplayName = default, + bool? offlineAccessCodesSupported = default, + bool? onlineAccessCodesSupported = default + ) + { + AccessoryKeypadSupported = accessoryKeypadSupported; + CanConnectAccessoryKeypad = canConnectAccessoryKeypad; + DisplayName = displayName; + HasBuiltInKeypad = hasBuiltInKeypad; + ManufacturerDisplayName = manufacturerDisplayName; + OfflineAccessCodesSupported = offlineAccessCodesSupported; + OnlineAccessCodesSupported = onlineAccessCodesSupported; + } + + [Obsolete("use device.properties.model.can_connect_accessory_keypad")] + [DataMember( + Name = "accessory_keypad_supported", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AccessoryKeypadSupported { get; set; } + + /// + /// Indicates whether the device can connect a accessory keypad. + /// + [DataMember( + Name = "can_connect_accessory_keypad", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanConnectAccessoryKeypad { get; set; } + + /// + /// Display name of the device model. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Indicates whether the device has a built in accessory keypad. + /// + [DataMember(Name = "has_built_in_keypad", IsRequired = false, EmitDefaultValue = false)] + public bool? HasBuiltInKeypad { get; set; } + + /// + /// Display name that corresponds to the manufacturer-specific terminology for the device. + /// + [DataMember( + Name = "manufacturer_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string ManufacturerDisplayName { get; set; } + + [Obsolete("use device.can_program_offline_access_codes.")] + [DataMember( + Name = "offline_access_codes_supported", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OfflineAccessCodesSupported { get; set; } + + [Obsolete("use device.can_program_online_access_codes.")] + [DataMember( + Name = "online_access_codes_supported", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OnlineAccessCodesSupported { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAssaAbloyCredentialServiceMetadata_model")] + public class DevicePropertiesAssaAbloyCredentialServiceMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesAssaAbloyCredentialServiceMetadata() { } + + public DevicePropertiesAssaAbloyCredentialServiceMetadata( + List? endpoints = default, + bool? hasActiveEndpoint = default + ) + { + Endpoints = endpoints; + HasActiveEndpoint = hasActiveEndpoint; + } + + /// + /// Endpoints associated with the phone. + /// + [DataMember(Name = "endpoints", IsRequired = false, EmitDefaultValue = false)] + public List? Endpoints { get; set; } + + /// + /// Indicates whether the credential service has active endpoints associated with the phone. + /// + [DataMember(Name = "has_active_endpoint", IsRequired = false, EmitDefaultValue = false)] + public bool? HasActiveEndpoint { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_devicePropertiesAssaAbloyCredentialServiceMetadataEndpoints_model" + )] + public class DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints + { + [JsonConstructorAttribute] + protected DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints() { } + + public DevicePropertiesAssaAbloyCredentialServiceMetadataEndpoints( + string? endpointId = default, + bool? isActive = default + ) + { + EndpointId = endpointId; + IsActive = isActive; + } + + /// + /// ID of the associated endpoint. + /// + [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] + public string? EndpointId { get; set; } + + /// + /// Indicated whether the endpoint is active. + /// + [DataMember(Name = "is_active", IsRequired = false, EmitDefaultValue = false)] + public bool? IsActive { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesSaltoSpaceCredentialServiceMetadata_model")] + public class DevicePropertiesSaltoSpaceCredentialServiceMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesSaltoSpaceCredentialServiceMetadata() { } + + public DevicePropertiesSaltoSpaceCredentialServiceMetadata(bool? hasActivePhone = default) + { + HasActivePhone = hasActivePhone; + } + + /// + /// Indicates whether the credential service has an active associated phone. + /// + [DataMember(Name = "has_active_phone", IsRequired = false, EmitDefaultValue = false)] + public bool? HasActivePhone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAkilesMetadata_model")] + public class DevicePropertiesAkilesMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesAkilesMetadata() { } + + public DevicePropertiesAkilesMetadata( + string? gadgetId = default, + string? gadgetName = default, + string? productName = default + ) + { + GadgetId = gadgetId; + GadgetName = gadgetName; + ProductName = productName; + } + + /// + /// Gadget ID for an Akiles device. + /// + [DataMember(Name = "gadget_id", IsRequired = false, EmitDefaultValue = false)] + public string? GadgetId { get; set; } + + /// + /// Gadget name for an Akiles device. + /// + [DataMember(Name = "gadget_name", IsRequired = false, EmitDefaultValue = false)] + public string? GadgetName { get; set; } + + /// + /// Product name for an Akiles device. + /// + [DataMember(Name = "product_name", IsRequired = false, EmitDefaultValue = false)] + public string? ProductName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAqaraMetadata_model")] + public class DevicePropertiesAqaraMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesAqaraMetadata() { } + + public DevicePropertiesAqaraMetadata( + string? deviceName = default, + string? did = default, + string? firmwareVersion = default, + string? model = default, + float? modelType = default, + string? parentDid = default, + string? positionId = default, + string? timeZone = default + ) + { + DeviceName = deviceName; + Did = did; + FirmwareVersion = firmwareVersion; + Model = model; + ModelType = modelType; + ParentDid = parentDid; + PositionId = positionId; + TimeZone = timeZone; + } + + /// + /// Device name for an Aqara device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Device ID (did) for an Aqara device. + /// + [DataMember(Name = "did", IsRequired = false, EmitDefaultValue = false)] + public string? Did { get; set; } + + /// + /// Firmware version for an Aqara device. + /// + [DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] + public string? FirmwareVersion { get; set; } + + /// + /// Model identifier for an Aqara device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + /// + /// Model type for an Aqara device. + /// + [DataMember(Name = "model_type", IsRequired = false, EmitDefaultValue = false)] + public float? ModelType { get; set; } + + /// + /// Parent gateway device ID for an Aqara device. + /// + [DataMember(Name = "parent_did", IsRequired = false, EmitDefaultValue = false)] + public string? ParentDid { get; set; } + + /// + /// Position (room) ID for an Aqara device. + /// + [DataMember(Name = "position_id", IsRequired = false, EmitDefaultValue = false)] + public string? PositionId { get; set; } + + /// + /// Time zone reported for an Aqara device (e.g. GMT-07:00). + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesArloMetadata_model")] + public class DevicePropertiesArloMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesArloMetadata() { } + + public DevicePropertiesArloMetadata( + string? deviceId = default, + string? deviceName = default, + string? firmwareVersion = default, + string? hardwareVersion = default, + string? modelId = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + FirmwareVersion = firmwareVersion; + HardwareVersion = hardwareVersion; + ModelId = modelId; + } + + /// + /// Device ID reported by Arlo. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name reported by Arlo. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Firmware version reported by Arlo. + /// + [DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] + public string? FirmwareVersion { get; set; } + + /// + /// Hardware version reported by Arlo. + /// + [DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] + public string? HardwareVersion { get; set; } + + /// + /// Model ID reported by Arlo. + /// + [DataMember(Name = "model_id", IsRequired = false, EmitDefaultValue = false)] + public string? ModelId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAssaAbloyVostioMetadata_model")] + public class DevicePropertiesAssaAbloyVostioMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesAssaAbloyVostioMetadata() { } + + public DevicePropertiesAssaAbloyVostioMetadata(string? encoderName = default) + { + EncoderName = encoderName; + } + + /// + /// Encoder name for an ASSA ABLOY Vostio system. + /// + [DataMember(Name = "encoder_name", IsRequired = false, EmitDefaultValue = false)] + public string? EncoderName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAugustMetadata_model")] + public class DevicePropertiesAugustMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesAugustMetadata() { } + + public DevicePropertiesAugustMetadata( + bool? hasKeypad = default, + string? houseId = default, + string? houseName = default, + string? keypadBatteryLevel = default, + string? lockId = default, + string? lockName = default, + string? model = default + ) + { + HasKeypad = hasKeypad; + HouseId = houseId; + HouseName = houseName; + KeypadBatteryLevel = keypadBatteryLevel; + LockId = lockId; + LockName = lockName; + Model = model; + } + + /// + /// Indicates whether an August device has a keypad. + /// + [DataMember(Name = "has_keypad", IsRequired = false, EmitDefaultValue = false)] + public bool? HasKeypad { get; set; } + + /// + /// House ID for an August device. + /// + [DataMember(Name = "house_id", IsRequired = false, EmitDefaultValue = false)] + public string? HouseId { get; set; } + + /// + /// House name for an August device. + /// + [DataMember(Name = "house_name", IsRequired = false, EmitDefaultValue = false)] + public string? HouseName { get; set; } + + /// + /// Keypad battery level for an August device. + /// + [DataMember(Name = "keypad_battery_level", IsRequired = false, EmitDefaultValue = false)] + public string? KeypadBatteryLevel { get; set; } + + /// + /// Lock ID for an August device. + /// + [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] + public string? LockId { get; set; } + + /// + /// Lock name for an August device. + /// + [DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] + public string? LockName { get; set; } + + /// + /// Model for an August device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAvigilonAltaMetadata_model")] + public class DevicePropertiesAvigilonAltaMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesAvigilonAltaMetadata() { } + + public DevicePropertiesAvigilonAltaMetadata( + string? entryName = default, + float? entryRelaysTotalCount = default, + string? orgName = default, + float? siteId = default, + string? siteName = default, + float? zoneId = default, + string? zoneName = default + ) + { + EntryName = entryName; + EntryRelaysTotalCount = entryRelaysTotalCount; + OrgName = orgName; + SiteId = siteId; + SiteName = siteName; + ZoneId = zoneId; + ZoneName = zoneName; + } + + /// + /// Entry name for an Avigilon Alta system. + /// + [DataMember(Name = "entry_name", IsRequired = false, EmitDefaultValue = false)] + public string? EntryName { get; set; } + + /// + /// Total count of entry relays for an Avigilon Alta system. + /// + [DataMember( + Name = "entry_relays_total_count", + IsRequired = false, + EmitDefaultValue = false + )] + public float? EntryRelaysTotalCount { get; set; } + + /// + /// Organization name for an Avigilon Alta system. + /// + [DataMember(Name = "org_name", IsRequired = false, EmitDefaultValue = false)] + public string? OrgName { get; set; } + + /// + /// Site ID for an Avigilon Alta system. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public float? SiteId { get; set; } + + /// + /// Site name for an Avigilon Alta system. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + /// + /// Zone ID for an Avigilon Alta system. + /// + [DataMember(Name = "zone_id", IsRequired = false, EmitDefaultValue = false)] + public float? ZoneId { get; set; } + + /// + /// Zone name for an Avigilon Alta system. + /// + [DataMember(Name = "zone_name", IsRequired = false, EmitDefaultValue = false)] + public string? ZoneName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesBrivoMetadata_model")] + public class DevicePropertiesBrivoMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesBrivoMetadata() { } + + public DevicePropertiesBrivoMetadata( + bool? activationEnabled = default, + string? deviceName = default + ) + { + ActivationEnabled = activationEnabled; + DeviceName = deviceName; + } + + /// + /// Indicates whether the Brivo access point has activation (remote unlock) enabled. + /// + [DataMember(Name = "activation_enabled", IsRequired = false, EmitDefaultValue = false)] + public bool? ActivationEnabled { get; set; } + + /// + /// Device name for a Brivo device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesControlbywebMetadata_model")] + public class DevicePropertiesControlbywebMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesControlbywebMetadata() { } + + public DevicePropertiesControlbywebMetadata( + string? deviceId = default, + string? deviceName = default, + string? relayName = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + RelayName = relayName; + } + + /// + /// Device ID for a ControlByWeb device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a ControlByWeb device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Relay name for a ControlByWeb device. + /// + [DataMember(Name = "relay_name", IsRequired = false, EmitDefaultValue = false)] + public string? RelayName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeIhoMetadata_model")] + public class DevicePropertiesDormakabaOracodeIhoMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesDormakabaOracodeIhoMetadata() { } + + public DevicePropertiesDormakabaOracodeIhoMetadata( + float? doorId = default, + string? doorName = default, + string? ianaTimezone = default, + List? userLevels = default + ) + { + DoorId = doorId; + DoorName = doorName; + IanaTimezone = ianaTimezone; + UserLevels = userLevels; + } + + /// + /// Door ID for a dormakaba Oracode Homeowner's Portal device. + /// + [DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] + public float? DoorId { get; set; } + + /// + /// Name of the door for a dormakaba Oracode Homeowner's Portal device. + /// + [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] + public string? DoorName { get; set; } + + /// + /// IANA time zone for a dormakaba Oracode Homeowner's Portal device. + /// + [DataMember(Name = "iana_timezone", IsRequired = false, EmitDefaultValue = false)] + public string? IanaTimezone { get; set; } + + /// + /// User levels for a dormakaba Oracode Homeowner's Portal device. + /// + [DataMember(Name = "user_levels", IsRequired = false, EmitDefaultValue = false)] + public List? UserLevels { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeIhoMetadataUserLevels_model")] + public class DevicePropertiesDormakabaOracodeIhoMetadataUserLevels + { + [JsonConstructorAttribute] + protected DevicePropertiesDormakabaOracodeIhoMetadataUserLevels() { } + + public DevicePropertiesDormakabaOracodeIhoMetadataUserLevels( + float? userLevel = default, + string? userLevelCheckInTime = default, + string? userLevelCheckOutTime = default, + string? userLevelName = default, + string? userLevelType = default + ) + { + UserLevel = userLevel; + UserLevelCheckInTime = userLevelCheckInTime; + UserLevelCheckOutTime = userLevelCheckOutTime; + UserLevelName = userLevelName; + UserLevelType = userLevelType; + } + + [DataMember(Name = "user_level", IsRequired = false, EmitDefaultValue = false)] + public float? UserLevel { get; set; } + + [DataMember( + Name = "user_level_check_in_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UserLevelCheckInTime { get; set; } + + [DataMember( + Name = "user_level_check_out_time", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UserLevelCheckOutTime { get; set; } + + [DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] + public string? UserLevelName { get; set; } + + [DataMember(Name = "user_level_type", IsRequired = false, EmitDefaultValue = false)] + public string? UserLevelType { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesDormakabaOracodeMetadata_model")] + public class DevicePropertiesDormakabaOracodeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesDormakabaOracodeMetadata() { } + + public DevicePropertiesDormakabaOracodeMetadata( + string? deviceId = default, + float? doorId = default, + bool? doorIsWireless = default, + string? doorName = default, + string? ianaTimezone = default, + List? predefinedTimeSlots = + default, + float? siteId = default, + string? siteName = default + ) + { + DeviceId = deviceId; + DoorId = doorId; + DoorIsWireless = doorIsWireless; + DoorName = doorName; + IanaTimezone = ianaTimezone; + PredefinedTimeSlots = predefinedTimeSlots; + SiteId = siteId; + SiteName = siteName; + } + + /// + /// Device ID for a dormakaba Oracode device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Door ID for a dormakaba Oracode device. + /// + [DataMember(Name = "door_id", IsRequired = false, EmitDefaultValue = false)] + public float? DoorId { get; set; } + + /// + /// Indicates whether a door is wireless for a dormakaba Oracode device. + /// + [DataMember(Name = "door_is_wireless", IsRequired = false, EmitDefaultValue = false)] + public bool? DoorIsWireless { get; set; } + + /// + /// Door name for a dormakaba Oracode device. + /// + [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] + public string? DoorName { get; set; } + + /// + /// IANA time zone for a dormakaba Oracode device. + /// + [DataMember(Name = "iana_timezone", IsRequired = false, EmitDefaultValue = false)] + public string? IanaTimezone { get; set; } + + /// + /// Predefined time slots for a dormakaba Oracode device. + /// + [DataMember(Name = "predefined_time_slots", IsRequired = false, EmitDefaultValue = false)] + public List? PredefinedTimeSlots { get; set; } + + /// + /// Site ID for a dormakaba Oracode device. + /// + [Obsolete("Previously marked as \"@DEPRECATED.\"")] + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public float? SiteId { get; set; } + + /// + /// Site name for a dormakaba Oracode device. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_devicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots_model" + )] + public class DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots + { + [JsonConstructorAttribute] + protected DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots() { } + + public DevicePropertiesDormakabaOracodeMetadataPredefinedTimeSlots( + string? checkInTime = default, + string? checkOutTime = default, + string? dormakabaOracodeUserLevelId = default, + float? dormakabaOracodeUserLevelPrefix = default, + bool? is_24Hour = default, + bool? isBiweeklyMode = default, + bool? isMaster = default, + bool? isOneShot = default, + string? name = default, + float? prefix = default + ) + { + CheckInTime = checkInTime; + CheckOutTime = checkOutTime; + DormakabaOracodeUserLevelId = dormakabaOracodeUserLevelId; + DormakabaOracodeUserLevelPrefix = dormakabaOracodeUserLevelPrefix; + Is_24Hour = is_24Hour; + IsBiweeklyMode = isBiweeklyMode; + IsMaster = isMaster; + IsOneShot = isOneShot; + Name = name; + Prefix = prefix; + } + + /// + /// Check in time for a time slot for a dormakaba Oracode device. + /// + [DataMember(Name = "check_in_time", IsRequired = false, EmitDefaultValue = false)] + public string? CheckInTime { get; set; } + + /// + /// Checkout time for a time slot for a dormakaba Oracode device. + /// + [DataMember(Name = "check_out_time", IsRequired = false, EmitDefaultValue = false)] + public string? CheckOutTime { get; set; } + + /// + /// ID of a user level for a dormakaba Oracode device. + /// + [DataMember( + Name = "dormakaba_oracode_user_level_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? DormakabaOracodeUserLevelId { get; set; } + + /// + /// Prefix for a user level for a dormakaba Oracode device. + /// + [DataMember( + Name = "dormakaba_oracode_user_level_prefix", + IsRequired = false, + EmitDefaultValue = false + )] + public float? DormakabaOracodeUserLevelPrefix { get; set; } + + /// + /// Indicates whether a time slot for a dormakaba Oracode device is a 24-hour time slot. + /// + [DataMember(Name = "is_24_hour", IsRequired = false, EmitDefaultValue = false)] + public bool? Is_24Hour { get; set; } + + /// + /// Indicates whether a time slot for a dormakaba Oracode device is in biweekly mode. + /// + [DataMember(Name = "is_biweekly_mode", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBiweeklyMode { get; set; } + + /// + /// Indicates whether a time slot for a dormakaba Oracode device is a master time slot. + /// + [DataMember(Name = "is_master", IsRequired = false, EmitDefaultValue = false)] + public bool? IsMaster { get; set; } + + /// + /// Indicates whether a time slot for a dormakaba Oracode device is a one-shot time slot. + /// + [DataMember(Name = "is_one_shot", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOneShot { get; set; } + + /// + /// Name of a time slot for a dormakaba Oracode device. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Prefix for a time slot for a dormakaba Oracode device. + /// + [DataMember(Name = "prefix", IsRequired = false, EmitDefaultValue = false)] + public float? Prefix { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesEcobeeMetadata_model")] + public class DevicePropertiesEcobeeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesEcobeeMetadata() { } + + public DevicePropertiesEcobeeMetadata( + string? deviceName = default, + string? ecobeeDeviceId = default + ) + { + DeviceName = deviceName; + EcobeeDeviceId = ecobeeDeviceId; + } + + /// + /// Device name for an ecobee device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Device ID for an ecobee device. + /// + [DataMember(Name = "ecobee_device_id", IsRequired = false, EmitDefaultValue = false)] + public string? EcobeeDeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesFourSuitesMetadata_model")] + public class DevicePropertiesFourSuitesMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesFourSuitesMetadata() { } + + public DevicePropertiesFourSuitesMetadata( + float? deviceId = default, + string? deviceName = default, + float? recloseDelayInSeconds = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + RecloseDelayInSeconds = recloseDelayInSeconds; + } + + /// + /// Device ID for a 4SUITES device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public float? DeviceId { get; set; } + + /// + /// Device name for a 4SUITES device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Reclose delay, in seconds, for a 4SUITES device. + /// + [DataMember( + Name = "reclose_delay_in_seconds", + IsRequired = false, + EmitDefaultValue = false + )] + public float? RecloseDelayInSeconds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesGenieMetadata_model")] + public class DevicePropertiesGenieMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesGenieMetadata() { } + + public DevicePropertiesGenieMetadata( + string? deviceName = default, + string? doorName = default + ) + { + DeviceName = deviceName; + DoorName = doorName; + } + + /// + /// Lock name for a Genie device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Door name for a Genie device. + /// + [DataMember(Name = "door_name", IsRequired = false, EmitDefaultValue = false)] + public string? DoorName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesHoneywellResideoMetadata_model")] + public class DevicePropertiesHoneywellResideoMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesHoneywellResideoMetadata() { } + + public DevicePropertiesHoneywellResideoMetadata( + string? deviceName = default, + string? honeywellResideoDeviceId = default + ) + { + DeviceName = deviceName; + HoneywellResideoDeviceId = honeywellResideoDeviceId; + } + + /// + /// Device name for a Honeywell Resideo device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Device ID for a Honeywell Resideo device. + /// + [DataMember( + Name = "honeywell_resideo_device_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? HoneywellResideoDeviceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesIglooMetadata_model")] + public class DevicePropertiesIglooMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesIglooMetadata() { } + + public DevicePropertiesIglooMetadata( + string? bridgeId = default, + string? deviceId = default, + string? model = default + ) + { + BridgeId = bridgeId; + DeviceId = deviceId; + Model = model; + } + + /// + /// Bridge ID for an igloo device. + /// + [DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] + public string? BridgeId { get; set; } + + /// + /// Device ID for an igloo device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Model for an igloo device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesIgloohomeMetadata_model")] + public class DevicePropertiesIgloohomeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesIgloohomeMetadata() { } + + public DevicePropertiesIgloohomeMetadata( + string? bridgeId = default, + string? bridgeName = default, + string? deviceId = default, + string? deviceName = default, + bool? isAccessoryKeypadLinkedToBridge = default, + string? keypadId = default + ) + { + BridgeId = bridgeId; + BridgeName = bridgeName; + DeviceId = deviceId; + DeviceName = deviceName; + IsAccessoryKeypadLinkedToBridge = isAccessoryKeypadLinkedToBridge; + KeypadId = keypadId; + } + + /// + /// Bridge ID for an igloohome device. + /// + [DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] + public string? BridgeId { get; set; } + + /// + /// Bridge name for an igloohome device. + /// + [DataMember(Name = "bridge_name", IsRequired = false, EmitDefaultValue = false)] + public string? BridgeName { get; set; } + + /// + /// Device ID for an igloohome device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for an igloohome device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Indicates whether a keypad is linked to a bridge for an igloohome device. + /// + [DataMember( + Name = "is_accessory_keypad_linked_to_bridge", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsAccessoryKeypadLinkedToBridge { get; set; } + + /// + /// Keypad ID for an igloohome device. + /// + [DataMember(Name = "keypad_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeypadId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesKeynestMetadata_model")] + public class DevicePropertiesKeynestMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesKeynestMetadata() { } + + public DevicePropertiesKeynestMetadata( + string? address = default, + float? currentOrLastStoreId = default, + string? currentStatus = default, + string? currentUserCompany = default, + string? currentUserEmail = default, + string? currentUserName = default, + string? currentUserPhoneNumber = default, + float? defaultOfficeId = default, + string? deviceName = default, + float? fobId = default, + string? handoverMethod = default, + bool? hasPhoto = default, + bool? isQuadientLocker = default, + string? keyId = default, + string? keyNotes = default, + string? keynestAppUser = default, + string? lastMovement = default, + string? propertyId = default, + string? propertyPostcode = default, + string? statusType = default, + string? subscriptionPlan = default + ) + { + Address = address; + CurrentOrLastStoreId = currentOrLastStoreId; + CurrentStatus = currentStatus; + CurrentUserCompany = currentUserCompany; + CurrentUserEmail = currentUserEmail; + CurrentUserName = currentUserName; + CurrentUserPhoneNumber = currentUserPhoneNumber; + DefaultOfficeId = defaultOfficeId; + DeviceName = deviceName; + FobId = fobId; + HandoverMethod = handoverMethod; + HasPhoto = hasPhoto; + IsQuadientLocker = isQuadientLocker; + KeyId = keyId; + KeyNotes = keyNotes; + KeynestAppUser = keynestAppUser; + LastMovement = lastMovement; + PropertyId = propertyId; + PropertyPostcode = propertyPostcode; + StatusType = statusType; + SubscriptionPlan = subscriptionPlan; + } + + /// + /// Address for a KeyNest device. + /// + [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] + public string? Address { get; set; } + + /// + /// Current or last store ID for a KeyNest device. + /// + [DataMember( + Name = "current_or_last_store_id", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CurrentOrLastStoreId { get; set; } + + /// + /// Current status for a KeyNest device. + /// + [DataMember(Name = "current_status", IsRequired = false, EmitDefaultValue = false)] + public string? CurrentStatus { get; set; } + + /// + /// Current user company for a KeyNest device. + /// + [DataMember(Name = "current_user_company", IsRequired = false, EmitDefaultValue = false)] + public string? CurrentUserCompany { get; set; } + + /// + /// Current user email for a KeyNest device. + /// + [DataMember(Name = "current_user_email", IsRequired = false, EmitDefaultValue = false)] + public string? CurrentUserEmail { get; set; } + + /// + /// Current user name for a KeyNest device. + /// + [DataMember(Name = "current_user_name", IsRequired = false, EmitDefaultValue = false)] + public string? CurrentUserName { get; set; } + + /// + /// Current user phone number for a KeyNest device. + /// + [DataMember( + Name = "current_user_phone_number", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CurrentUserPhoneNumber { get; set; } + + /// + /// Default office ID for a KeyNest device. + /// + [DataMember(Name = "default_office_id", IsRequired = false, EmitDefaultValue = false)] + public float? DefaultOfficeId { get; set; } + + /// + /// Device name for a KeyNest device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Fob ID for a KeyNest device. + /// + [DataMember(Name = "fob_id", IsRequired = false, EmitDefaultValue = false)] + public float? FobId { get; set; } + + /// + /// Handover method for a KeyNest device. + /// + [DataMember(Name = "handover_method", IsRequired = false, EmitDefaultValue = false)] + public string? HandoverMethod { get; set; } + + /// + /// Whether the KeyNest device has a photo. + /// + [DataMember(Name = "has_photo", IsRequired = false, EmitDefaultValue = false)] + public bool? HasPhoto { get; set; } + + /// + /// Whether the key is in a locker that does not support the access codes API. + /// + [DataMember(Name = "is_quadient_locker", IsRequired = false, EmitDefaultValue = false)] + public bool? IsQuadientLocker { get; set; } + + /// + /// Key ID for a KeyNest device. + /// + [DataMember(Name = "key_id", IsRequired = false, EmitDefaultValue = false)] + public string? KeyId { get; set; } + + /// + /// Key notes for a KeyNest device. + /// + [DataMember(Name = "key_notes", IsRequired = false, EmitDefaultValue = false)] + public string? KeyNotes { get; set; } + + /// + /// KeyNest app user for a KeyNest device. + /// + [DataMember(Name = "keynest_app_user", IsRequired = false, EmitDefaultValue = false)] + public string? KeynestAppUser { get; set; } + + /// + /// Last movement timestamp for a KeyNest device. + /// + [DataMember(Name = "last_movement", IsRequired = false, EmitDefaultValue = false)] + public string? LastMovement { get; set; } + + /// + /// Property ID for a KeyNest device. + /// + [DataMember(Name = "property_id", IsRequired = false, EmitDefaultValue = false)] + public string? PropertyId { get; set; } + + /// + /// Property postcode for a KeyNest device. + /// + [DataMember(Name = "property_postcode", IsRequired = false, EmitDefaultValue = false)] + public string? PropertyPostcode { get; set; } + + /// + /// Status type for a KeyNest device. + /// + [DataMember(Name = "status_type", IsRequired = false, EmitDefaultValue = false)] + public string? StatusType { get; set; } + + /// + /// Subscription plan for a KeyNest device. + /// + [DataMember(Name = "subscription_plan", IsRequired = false, EmitDefaultValue = false)] + public string? SubscriptionPlan { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesKisiMetadata_model")] + public class DevicePropertiesKisiMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesKisiMetadata() { } + + public DevicePropertiesKisiMetadata( + string? description = default, + float? lockId = default, + string? lockName = default, + string? placeName = default + ) + { + Description = description; + LockId = lockId; + LockName = lockName; + PlaceName = placeName; + } + + /// + /// Description for a Kisi device. + /// + [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] + public string? Description { get; set; } + + /// + /// Lock ID for a Kisi device. + /// + [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] + public float? LockId { get; set; } + + /// + /// Lock name for a Kisi device. + /// + [DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] + public string? LockName { get; set; } + + /// + /// Place name for a Kisi device. + /// + [DataMember(Name = "place_name", IsRequired = false, EmitDefaultValue = false)] + public string? PlaceName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesKorelockMetadata_model")] + public class DevicePropertiesKorelockMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesKorelockMetadata() { } + + public DevicePropertiesKorelockMetadata( + string? deviceId = default, + string? deviceName = default, + string? firmwareVersion = default, + string? locationId = default, + string? modelCode = default, + string? serialNumber = default, + float? wifiSignalStrength = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + FirmwareVersion = firmwareVersion; + LocationId = locationId; + ModelCode = modelCode; + SerialNumber = serialNumber; + WifiSignalStrength = wifiSignalStrength; + } + + /// + /// Device ID for a Korelock device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Korelock device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Firmware version for a Korelock device. + /// + [DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] + public string? FirmwareVersion { get; set; } + + /// + /// Location ID for a Korelock device. Required for timebound access codes. + /// + [DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] + public string? LocationId { get; set; } + + /// + /// Model code for a Korelock device. + /// + [DataMember(Name = "model_code", IsRequired = false, EmitDefaultValue = false)] + public string? ModelCode { get; set; } + + /// + /// Serial number for a Korelock device. + /// + [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] + public string? SerialNumber { get; set; } + + /// + /// WiFi signal strength (0-1) for a Korelock device. + /// + [DataMember(Name = "wifi_signal_strength", IsRequired = false, EmitDefaultValue = false)] + public float? WifiSignalStrength { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesKwiksetMetadata_model")] + public class DevicePropertiesKwiksetMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesKwiksetMetadata() { } + + public DevicePropertiesKwiksetMetadata( + string? deviceId = default, + string? deviceName = default, + string? modelNumber = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + ModelNumber = modelNumber; + } + + /// + /// Device ID for a Kwikset device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Kwikset device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Model number for a Kwikset device. + /// + [DataMember(Name = "model_number", IsRequired = false, EmitDefaultValue = false)] + public string? ModelNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesLocklyMetadata_model")] + public class DevicePropertiesLocklyMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesLocklyMetadata() { } + + public DevicePropertiesLocklyMetadata( + string? deviceId = default, + string? deviceName = default, + string? model = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + Model = model; + } + + /// + /// Device ID for a Lockly device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Lockly device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Model for a Lockly device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesMinutMetadata_model")] + public class DevicePropertiesMinutMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesMinutMetadata() { } + + public DevicePropertiesMinutMetadata( + string? deviceId = default, + string? deviceName = default, + DevicePropertiesMinutMetadataLatestSensorValues? latestSensorValues = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + LatestSensorValues = latestSensorValues; + } + + /// + /// Device ID for a Minut device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Minut device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Latest sensor values for a Minut device. + /// + [DataMember(Name = "latest_sensor_values", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesMinutMetadataLatestSensorValues? LatestSensorValues { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValues_model")] + public class DevicePropertiesMinutMetadataLatestSensorValues + { + [JsonConstructorAttribute] + protected DevicePropertiesMinutMetadataLatestSensorValues() { } + + public DevicePropertiesMinutMetadataLatestSensorValues( + DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ? accelerometerZ = default, + DevicePropertiesMinutMetadataLatestSensorValuesHumidity? humidity = default, + DevicePropertiesMinutMetadataLatestSensorValuesPressure? pressure = default, + DevicePropertiesMinutMetadataLatestSensorValuesSound? sound = default, + DevicePropertiesMinutMetadataLatestSensorValuesTemperature? temperature = default + ) + { + AccelerometerZ = accelerometerZ; + Humidity = humidity; + Pressure = pressure; + Sound = sound; + Temperature = temperature; + } + + /// + /// Latest accelerometer Z-axis reading for a Minut device. + /// + [DataMember(Name = "accelerometer_z", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ? AccelerometerZ { get; set; } + + /// + /// Latest humidity reading for a Minut device. + /// + [DataMember(Name = "humidity", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesMinutMetadataLatestSensorValuesHumidity? Humidity { get; set; } + + /// + /// Latest pressure reading for a Minut device. + /// + [DataMember(Name = "pressure", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesMinutMetadataLatestSensorValuesPressure? Pressure { get; set; } + + /// + /// Latest sound reading for a Minut device. + /// + [DataMember(Name = "sound", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesMinutMetadataLatestSensorValuesSound? Sound { get; set; } + + /// + /// Latest temperature reading for a Minut device. + /// + [DataMember(Name = "temperature", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesMinutMetadataLatestSensorValuesTemperature? Temperature { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ_model" + )] + public class DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ + { + [JsonConstructorAttribute] + protected DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ() { } + + public DevicePropertiesMinutMetadataLatestSensorValuesAccelerometerZ( + string? time = default, + float? value = default + ) + { + Time = time; + Value = value; + } + + /// + /// Time of latest accelerometer Z-axis reading for a Minut device. + /// + [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] + public string? Time { get; set; } + + /// + /// Value of latest accelerometer Z-axis reading for a Minut device. + /// + [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] + public float? Value { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesHumidity_model")] + public class DevicePropertiesMinutMetadataLatestSensorValuesHumidity + { + [JsonConstructorAttribute] + protected DevicePropertiesMinutMetadataLatestSensorValuesHumidity() { } + + public DevicePropertiesMinutMetadataLatestSensorValuesHumidity( + string? time = default, + float? value = default + ) + { + Time = time; + Value = value; + } + + /// + /// Time of latest humidity reading for a Minut device. + /// + [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] + public string? Time { get; set; } + + /// + /// Value of latest humidity reading for a Minut device. + /// + [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] + public float? Value { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesPressure_model")] + public class DevicePropertiesMinutMetadataLatestSensorValuesPressure + { + [JsonConstructorAttribute] + protected DevicePropertiesMinutMetadataLatestSensorValuesPressure() { } + + public DevicePropertiesMinutMetadataLatestSensorValuesPressure( + string? time = default, + float? value = default + ) + { + Time = time; + Value = value; + } + + /// + /// Time of latest pressure reading for a Minut device. + /// + [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] + public string? Time { get; set; } + + /// + /// Value of latest pressure reading for a Minut device. + /// + [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] + public float? Value { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesSound_model")] + public class DevicePropertiesMinutMetadataLatestSensorValuesSound + { + [JsonConstructorAttribute] + protected DevicePropertiesMinutMetadataLatestSensorValuesSound() { } + + public DevicePropertiesMinutMetadataLatestSensorValuesSound( + string? time = default, + float? value = default + ) + { + Time = time; + Value = value; + } + + /// + /// Time of latest sound reading for a Minut device. + /// + [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] + public string? Time { get; set; } + + /// + /// Value of latest sound reading for a Minut device. + /// + [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] + public float? Value { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_devicePropertiesMinutMetadataLatestSensorValuesTemperature_model" + )] + public class DevicePropertiesMinutMetadataLatestSensorValuesTemperature + { + [JsonConstructorAttribute] + protected DevicePropertiesMinutMetadataLatestSensorValuesTemperature() { } + + public DevicePropertiesMinutMetadataLatestSensorValuesTemperature( + string? time = default, + float? value = default + ) + { + Time = time; + Value = value; + } + + /// + /// Time of latest temperature reading for a Minut device. + /// + [DataMember(Name = "time", IsRequired = false, EmitDefaultValue = false)] + public string? Time { get; set; } + + /// + /// Value of latest temperature reading for a Minut device. + /// + [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] + public float? Value { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesNestMetadata_model")] + public class DevicePropertiesNestMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesNestMetadata() { } + + public DevicePropertiesNestMetadata( + string? deviceCustomName = default, + string? deviceName = default, + string? displayName = default, + string? nestDeviceId = default, + string? nestStructureId = default, + string? structureName = default + ) + { + DeviceCustomName = deviceCustomName; + DeviceName = deviceName; + DisplayName = displayName; + NestDeviceId = nestDeviceId; + NestStructureId = nestStructureId; + StructureName = structureName; + } + + /// + /// Custom device name for a Google Nest device. The device owner sets this value. + /// + [DataMember(Name = "device_custom_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceCustomName { get; set; } + + /// + /// Device name for a Google Nest device. Google sets this value. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Name of the Google Home room containing the device. The device owner sets this value. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string? DisplayName { get; set; } + + /// + /// Device ID for a Google Nest device. + /// + [DataMember(Name = "nest_device_id", IsRequired = false, EmitDefaultValue = false)] + public string? NestDeviceId { get; set; } + + /// + /// ID of the Google Nest structure containing the device. + /// + [DataMember(Name = "nest_structure_id", IsRequired = false, EmitDefaultValue = false)] + public string? NestStructureId { get; set; } + + /// + /// Name of the Google Nest structure containing the device. The device owner sets this value. + /// + [DataMember(Name = "structure_name", IsRequired = false, EmitDefaultValue = false)] + public string? StructureName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesNoiseawareMetadata_model")] + public class DevicePropertiesNoiseawareMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesNoiseawareMetadata() { } + + public DevicePropertiesNoiseawareMetadata( + string? deviceId = default, + DevicePropertiesNoiseawareMetadata.DeviceModelEnum? deviceModel = default, + string? deviceName = default, + float? noiseLevelDecibel = default, + float? noiseLevelNrs = default + ) + { + DeviceId = deviceId; + DeviceModel = deviceModel; + DeviceName = deviceName; + NoiseLevelDecibel = noiseLevelDecibel; + NoiseLevelNrs = noiseLevelNrs; + } + + /// + /// Device model for a NoiseAware device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceModelEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "indoor")] + Indoor = 1, + + [EnumMember(Value = "outdoor")] + Outdoor = 2, + } + + /// + /// Device ID for a NoiseAware device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device model for a NoiseAware device. + /// + [DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesNoiseawareMetadata.DeviceModelEnum? DeviceModel { get; set; } + + /// + /// Device name for a NoiseAware device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Noise level, in decibels, for a NoiseAware device. + /// + [DataMember(Name = "noise_level_decibel", IsRequired = false, EmitDefaultValue = false)] + public float? NoiseLevelDecibel { get; set; } + + /// + /// Noise level, expressed as a Noise Risk Score (NRS), for a NoiseAware device. + /// + [DataMember(Name = "noise_level_nrs", IsRequired = false, EmitDefaultValue = false)] + public float? NoiseLevelNrs { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesNukiMetadata_model")] + public class DevicePropertiesNukiMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesNukiMetadata() { } + + public DevicePropertiesNukiMetadata( + string? deviceId = default, + string? deviceName = default, + bool? keypad_2Paired = default, + bool? keypadBatteryCritical = default, + bool? keypadPaired = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + Keypad_2Paired = keypad_2Paired; + KeypadBatteryCritical = keypadBatteryCritical; + KeypadPaired = keypadPaired; + } + + /// + /// Device ID for a Nuki device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Nuki device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Indicates whether keypad 2 is paired for a Nuki device. + /// + [DataMember(Name = "keypad_2_paired", IsRequired = false, EmitDefaultValue = false)] + public bool? Keypad_2Paired { get; set; } + + /// + /// Indicates whether the keypad battery is in a critical state for a Nuki device. + /// + [DataMember(Name = "keypad_battery_critical", IsRequired = false, EmitDefaultValue = false)] + public bool? KeypadBatteryCritical { get; set; } + + /// + /// Indicates whether the keypad is paired for a Nuki device. + /// + [DataMember(Name = "keypad_paired", IsRequired = false, EmitDefaultValue = false)] + public bool? KeypadPaired { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesOmnitecMetadata_model")] + public class DevicePropertiesOmnitecMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesOmnitecMetadata() { } + + public DevicePropertiesOmnitecMetadata( + bool? hasGateway = default, + string? lockAlias = default, + float? lockId = default, + string? lockMac = default, + string? lockName = default, + string? timeZone = default, + float? timezoneRawOffsetMs = default + ) + { + HasGateway = hasGateway; + LockAlias = lockAlias; + LockId = lockId; + LockMac = lockMac; + LockName = lockName; + TimeZone = timeZone; + TimezoneRawOffsetMs = timezoneRawOffsetMs; + } + + /// + /// Whether the Omnitec lock has a connected gateway for remote operations. + /// + [DataMember(Name = "has_gateway", IsRequired = false, EmitDefaultValue = false)] + public bool? HasGateway { get; set; } + + /// + /// Operator-assigned alias for an Omnitec device. + /// + [DataMember(Name = "lock_alias", IsRequired = false, EmitDefaultValue = false)] + public string? LockAlias { get; set; } + + /// + /// Lock ID for an Omnitec device. + /// + [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] + public float? LockId { get; set; } + + /// + /// Bluetooth MAC address for an Omnitec device. + /// + [DataMember(Name = "lock_mac", IsRequired = false, EmitDefaultValue = false)] + public string? LockMac { get; set; } + + /// + /// Lock name for an Omnitec device. + /// + [DataMember(Name = "lock_name", IsRequired = false, EmitDefaultValue = false)] + public string? LockName { get; set; } + + /// + /// IANA time zone for the Omnitec device, used to schedule time-bound access codes at the correct local time (accounting for DST). + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + /// + /// Static UTC offset of the Omnitec lock in milliseconds. Does not account for DST. + /// + [DataMember(Name = "timezone_raw_offset_ms", IsRequired = false, EmitDefaultValue = false)] + public float? TimezoneRawOffsetMs { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesReolinkMetadata_model")] + public class DevicePropertiesReolinkMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesReolinkMetadata() { } + + public DevicePropertiesReolinkMetadata( + string? firmwareVersion = default, + string? hardwareVersion = default, + string? model = default + ) + { + FirmwareVersion = firmwareVersion; + HardwareVersion = hardwareVersion; + Model = model; + } + + /// + /// Firmware version reported by the camera. + /// + [DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] + public string? FirmwareVersion { get; set; } + + /// + /// Hardware version reported by the camera. + /// + [DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] + public string? HardwareVersion { get; set; } + + /// + /// Model reported by the Reolink camera. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesRingMetadata_model")] + public class DevicePropertiesRingMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesRingMetadata() { } + + public DevicePropertiesRingMetadata( + string? deviceId = default, + string? deviceName = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + } + + /// + /// Device ID for a Ring device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Ring device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesSaltoKsMetadata_model")] + public class DevicePropertiesSaltoKsMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesSaltoKsMetadata() { } + + public DevicePropertiesSaltoKsMetadata( + string? batteryLevel = default, + string? customerReference = default, + bool? hasCustomPinSubscription = default, + string? lockId = default, + string? lockType = default, + string? lockedState = default, + string? model = default, + string? siteId = default, + string? siteName = default + ) + { + BatteryLevel = batteryLevel; + CustomerReference = customerReference; + HasCustomPinSubscription = hasCustomPinSubscription; + LockId = lockId; + LockType = lockType; + LockedState = lockedState; + Model = model; + SiteId = siteId; + SiteName = siteName; + } + + /// + /// Battery level for a Salto KS device. + /// + [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] + public string? BatteryLevel { get; set; } + + /// + /// Customer reference for a Salto KS device. + /// + [DataMember(Name = "customer_reference", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerReference { get; set; } + + /// + /// Indicates whether the site has a Salto KS subscription that supports custom PINs. + /// + [DataMember( + Name = "has_custom_pin_subscription", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? HasCustomPinSubscription { get; set; } + + /// + /// Lock ID for a Salto KS device. + /// + [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] + public string? LockId { get; set; } + + /// + /// Lock type for a Salto KS device. + /// + [DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] + public string? LockType { get; set; } + + /// + /// Locked state for a Salto KS device. + /// + [DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] + public string? LockedState { get; set; } + + /// + /// Model for a Salto KS device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + /// + /// Site ID for the Salto KS site to which the device belongs. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public string? SiteId { get; set; } + + /// + /// Site name for the Salto KS site to which the device belongs. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesSaltoMetadata_model")] + public class DevicePropertiesSaltoMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesSaltoMetadata() { } + + public DevicePropertiesSaltoMetadata( + string? batteryLevel = default, + string? customerReference = default, + string? lockId = default, + string? lockType = default, + string? lockedState = default, + string? model = default, + string? siteId = default, + string? siteName = default + ) + { + BatteryLevel = batteryLevel; + CustomerReference = customerReference; + LockId = lockId; + LockType = lockType; + LockedState = lockedState; + Model = model; + SiteId = siteId; + SiteName = siteName; + } + + /// + /// Battery level for a Salto device. + /// + [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] + public string? BatteryLevel { get; set; } + + /// + /// Customer reference for a Salto device. + /// + [DataMember(Name = "customer_reference", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerReference { get; set; } + + /// + /// Lock ID for a Salto device. + /// + [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] + public string? LockId { get; set; } + + /// + /// Lock type for a Salto device. + /// + [DataMember(Name = "lock_type", IsRequired = false, EmitDefaultValue = false)] + public string? LockType { get; set; } + + /// + /// Locked state for a Salto device. + /// + [DataMember(Name = "locked_state", IsRequired = false, EmitDefaultValue = false)] + public string? LockedState { get; set; } + + /// + /// Model for a Salto device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + /// + /// Site ID for the Salto KS site to which the device belongs. + /// + [DataMember(Name = "site_id", IsRequired = false, EmitDefaultValue = false)] + public string? SiteId { get; set; } + + /// + /// Site name for the Salto KS site to which the device belongs. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesSchlageMetadata_model")] + public class DevicePropertiesSchlageMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesSchlageMetadata() { } + + public DevicePropertiesSchlageMetadata( + string? deviceId = default, + string? deviceName = default, + string? model = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + Model = model; + } + + /// + /// Device ID for a Schlage device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Schlage device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Model for a Schlage device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesSeamBridgeMetadata_model")] + public class DevicePropertiesSeamBridgeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesSeamBridgeMetadata() { } + + public DevicePropertiesSeamBridgeMetadata( + float? deviceNum = default, + string? name = default, + DevicePropertiesSeamBridgeMetadata.UnlockMethodEnum? unlockMethod = default + ) + { + DeviceNum = deviceNum; + Name = name; + UnlockMethod = unlockMethod; + } + + /// + /// Unlock method for Seam Bridge. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum UnlockMethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "bridge")] + Bridge = 1, + + [EnumMember(Value = "doorking")] + Doorking = 2, + } + + /// + /// Device number for Seam Bridge. + /// + [DataMember(Name = "device_num", IsRequired = false, EmitDefaultValue = false)] + public float? DeviceNum { get; set; } + + /// + /// Name for Seam Bridge. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Unlock method for Seam Bridge. + /// + [DataMember(Name = "unlock_method", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesSeamBridgeMetadata.UnlockMethodEnum? UnlockMethod { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesSensiMetadata_model")] + public class DevicePropertiesSensiMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesSensiMetadata() { } + + public DevicePropertiesSensiMetadata( + string? deviceId = default, + string? deviceName = default, + bool? dualSetpointsNotSupported = default, + string? productType = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + DualSetpointsNotSupported = dualSetpointsNotSupported; + ProductType = productType; + } + + /// + /// Device ID for a Sensi device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Sensi device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Set to true when the device does not support the /dual-setpoints API endpoint. + /// + [DataMember( + Name = "dual_setpoints_not_supported", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? DualSetpointsNotSupported { get; set; } + + /// + /// Product type for a Sensi device. + /// + [DataMember(Name = "product_type", IsRequired = false, EmitDefaultValue = false)] + public string? ProductType { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesSmartthingsMetadata_model")] + public class DevicePropertiesSmartthingsMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesSmartthingsMetadata() { } + + public DevicePropertiesSmartthingsMetadata( + string? deviceId = default, + string? deviceName = default, + string? locationId = default, + string? model = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + LocationId = locationId; + Model = model; + } + + /// + /// Device ID for a SmartThings device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a SmartThings device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Location ID for a SmartThings device. + /// + [DataMember(Name = "location_id", IsRequired = false, EmitDefaultValue = false)] + public string? LocationId { get; set; } + + /// + /// Model for a SmartThings device. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesTadoMetadata_model")] + public class DevicePropertiesTadoMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesTadoMetadata() { } + + public DevicePropertiesTadoMetadata( + string? deviceType = default, + string? serialNo = default + ) + { + DeviceType = deviceType; + SerialNo = serialNo; + } + + /// + /// Device type for a tado° device. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceType { get; set; } + + /// + /// Serial number for a tado° device. + /// + [DataMember(Name = "serial_no", IsRequired = false, EmitDefaultValue = false)] + public string? SerialNo { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesTapoMetadata_model")] + public class DevicePropertiesTapoMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesTapoMetadata() { } + + public DevicePropertiesTapoMetadata( + string? firmwareVersion = default, + string? hardwareVersion = default, + string? model = default + ) + { + FirmwareVersion = firmwareVersion; + HardwareVersion = hardwareVersion; + Model = model; + } + + /// + /// Firmware version reported by the camera. + /// + [DataMember(Name = "firmware_version", IsRequired = false, EmitDefaultValue = false)] + public string? FirmwareVersion { get; set; } + + /// + /// Hardware version reported by the camera. + /// + [DataMember(Name = "hardware_version", IsRequired = false, EmitDefaultValue = false)] + public string? HardwareVersion { get; set; } + + /// + /// Model reported by the Tapo camera. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public string? Model { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesTedeeMetadata_model")] + public class DevicePropertiesTedeeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesTedeeMetadata() { } + + public DevicePropertiesTedeeMetadata( + float? bridgeId = default, + string? bridgeName = default, + float? deviceId = default, + string? deviceModel = default, + string? deviceName = default, + float? keypadId = default, + string? serialNumber = default + ) + { + BridgeId = bridgeId; + BridgeName = bridgeName; + DeviceId = deviceId; + DeviceModel = deviceModel; + DeviceName = deviceName; + KeypadId = keypadId; + SerialNumber = serialNumber; + } + + /// + /// Bridge ID for a Tedee device. + /// + [DataMember(Name = "bridge_id", IsRequired = false, EmitDefaultValue = false)] + public float? BridgeId { get; set; } + + /// + /// Bridge name for a Tedee device. + /// + [DataMember(Name = "bridge_name", IsRequired = false, EmitDefaultValue = false)] + public string? BridgeName { get; set; } + + /// + /// Device ID for a Tedee device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public float? DeviceId { get; set; } + + /// + /// Device model for a Tedee device. + /// + [DataMember(Name = "device_model", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceModel { get; set; } + + /// + /// Device name for a Tedee device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Keypad ID for a Tedee device. + /// + [DataMember(Name = "keypad_id", IsRequired = false, EmitDefaultValue = false)] + public float? KeypadId { get; set; } + + /// + /// Serial number for a Tedee device. + /// + [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] + public string? SerialNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesTtlockMetadata_model")] + public class DevicePropertiesTtlockMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesTtlockMetadata() { } + + public DevicePropertiesTtlockMetadata( + string? featureValue = default, + DevicePropertiesTtlockMetadataFeatures? features = default, + bool? hasGateway = default, + string? lockAlias = default, + float? lockId = default, + float? timezoneRawOffsetMs = default, + List? wirelessKeypads = default + ) + { + FeatureValue = featureValue; + Features = features; + HasGateway = hasGateway; + LockAlias = lockAlias; + LockId = lockId; + TimezoneRawOffsetMs = timezoneRawOffsetMs; + WirelessKeypads = wirelessKeypads; + } + + /// + /// Feature value for a TTLock device. + /// + [DataMember(Name = "feature_value", IsRequired = false, EmitDefaultValue = false)] + public string? FeatureValue { get; set; } + + /// + /// Features for a TTLock device. + /// + [DataMember(Name = "features", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesTtlockMetadataFeatures? Features { get; set; } + + /// + /// Indicates whether a TTLock device has a gateway. + /// + [DataMember(Name = "has_gateway", IsRequired = false, EmitDefaultValue = false)] + public bool? HasGateway { get; set; } + + /// + /// Lock alias for a TTLock device. + /// + [DataMember(Name = "lock_alias", IsRequired = false, EmitDefaultValue = false)] + public string? LockAlias { get; set; } + + /// + /// Lock ID for a TTLock device. + /// + [DataMember(Name = "lock_id", IsRequired = false, EmitDefaultValue = false)] + public float? LockId { get; set; } + + /// + /// Lock-side timezone offset in milliseconds east of UTC, as configured in the TTLock app. Source of truth for the lock's wall-clock interpretation of access code start/end times — a misconfigured value here is the typical cause of customer "codes offset by N hours" reports. Diagnostic only; Seam does not convert times based on this value. + /// + [DataMember(Name = "timezone_raw_offset_ms", IsRequired = false, EmitDefaultValue = false)] + public float? TimezoneRawOffsetMs { get; set; } + + /// + /// Wireless keypads for a TTLock device. + /// + [DataMember(Name = "wireless_keypads", IsRequired = false, EmitDefaultValue = false)] + public List? WirelessKeypads { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesTtlockMetadataFeatures_model")] + public class DevicePropertiesTtlockMetadataFeatures + { + [JsonConstructorAttribute] + protected DevicePropertiesTtlockMetadataFeatures() { } + + public DevicePropertiesTtlockMetadataFeatures( + bool? autoLockTimeConfig = default, + bool? incompleteKeyboardPasscode = default, + bool? lockCommand = default, + bool? passcode = default, + bool? passcodeManagement = default, + bool? unlockViaGateway = default, + bool? wifi = default + ) + { + AutoLockTimeConfig = autoLockTimeConfig; + IncompleteKeyboardPasscode = incompleteKeyboardPasscode; + LockCommand = lockCommand; + Passcode = passcode; + PasscodeManagement = passcodeManagement; + UnlockViaGateway = unlockViaGateway; + Wifi = wifi; + } + + /// + /// Indicates whether a TTLock device supports auto-lock time configuration. + /// + [DataMember(Name = "auto_lock_time_config", IsRequired = false, EmitDefaultValue = false)] + public bool? AutoLockTimeConfig { get; set; } + + /// + /// Indicates whether a TTLock device supports an incomplete keyboard passcode. + /// + [DataMember( + Name = "incomplete_keyboard_passcode", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IncompleteKeyboardPasscode { get; set; } + + /// + /// Indicates whether a TTLock device supports the lock command. + /// + [DataMember(Name = "lock_command", IsRequired = false, EmitDefaultValue = false)] + public bool? LockCommand { get; set; } + + /// + /// Indicates whether a TTLock device supports a passcode. + /// + [DataMember(Name = "passcode", IsRequired = false, EmitDefaultValue = false)] + public bool? Passcode { get; set; } + + /// + /// Indicates whether a TTLock device supports passcode management. + /// + [DataMember(Name = "passcode_management", IsRequired = false, EmitDefaultValue = false)] + public bool? PasscodeManagement { get; set; } + + /// + /// Indicates whether a TTLock device supports unlock via gateway. + /// + [DataMember(Name = "unlock_via_gateway", IsRequired = false, EmitDefaultValue = false)] + public bool? UnlockViaGateway { get; set; } + + /// + /// Indicates whether a TTLock device supports Wi-Fi. + /// + [DataMember(Name = "wifi", IsRequired = false, EmitDefaultValue = false)] + public bool? Wifi { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesTtlockMetadataWirelessKeypads_model")] + public class DevicePropertiesTtlockMetadataWirelessKeypads + { + [JsonConstructorAttribute] + protected DevicePropertiesTtlockMetadataWirelessKeypads() { } + + public DevicePropertiesTtlockMetadataWirelessKeypads( + float? wirelessKeypadId = default, + string? wirelessKeypadName = default + ) + { + WirelessKeypadId = wirelessKeypadId; + WirelessKeypadName = wirelessKeypadName; + } + + /// + /// ID for a wireless keypad for a TTLock device. + /// + [DataMember(Name = "wireless_keypad_id", IsRequired = false, EmitDefaultValue = false)] + public float? WirelessKeypadId { get; set; } + + /// + /// Name for a wireless keypad for a TTLock device. + /// + [DataMember(Name = "wireless_keypad_name", IsRequired = false, EmitDefaultValue = false)] + public string? WirelessKeypadName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesTwoNMetadata_model")] + public class DevicePropertiesTwoNMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesTwoNMetadata() { } + + public DevicePropertiesTwoNMetadata(float? deviceId = default, string? deviceName = default) + { + DeviceId = deviceId; + DeviceName = deviceName; + } + + /// + /// Device ID for a 2N device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public float? DeviceId { get; set; } + + /// + /// Device name for a 2N device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesUltraloqMetadata_model")] + public class DevicePropertiesUltraloqMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesUltraloqMetadata() { } + + public DevicePropertiesUltraloqMetadata( + string? deviceId = default, + string? deviceName = default, + string? deviceType = default, + string? timeZone = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + DeviceType = deviceType; + TimeZone = timeZone; + } + + /// + /// Device ID for an Ultraloq device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for an Ultraloq device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Device type for an Ultraloq device. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceType { get; set; } + + /// + /// IANA timezone for the Ultraloq device. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesVisionlineMetadata_model")] + public class DevicePropertiesVisionlineMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesVisionlineMetadata() { } + + public DevicePropertiesVisionlineMetadata(string? encoderId = default) + { + EncoderId = encoderId; + } + + /// + /// Encoder ID for an ASSA ABLOY Visionline system. + /// + [DataMember(Name = "encoder_id", IsRequired = false, EmitDefaultValue = false)] + public string? EncoderId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesWyzeMetadata_model")] + public class DevicePropertiesWyzeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesWyzeMetadata() { } + + public DevicePropertiesWyzeMetadata( + string? deviceId = default, + string? deviceInfoModel = default, + string? deviceName = default, + string? keypadUuid = default, + float? lockerStatusHardlock = default, + string? productModel = default, + string? productName = default, + string? productType = default + ) + { + DeviceId = deviceId; + DeviceInfoModel = deviceInfoModel; + DeviceName = deviceName; + KeypadUuid = keypadUuid; + LockerStatusHardlock = lockerStatusHardlock; + ProductModel = productModel; + ProductName = productName; + ProductType = productType; + } + + /// + /// Device ID for a Wyze device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device information model for a Wyze device. + /// + [DataMember(Name = "device_info_model", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceInfoModel { get; set; } + + /// + /// Device name for a Wyze device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Keypad UUID for a Wyze device. + /// + [DataMember(Name = "keypad_uuid", IsRequired = false, EmitDefaultValue = false)] + public string? KeypadUuid { get; set; } + + /// + /// Locker status (hardlock) for a Wyze device. + /// + [DataMember(Name = "locker_status_hardlock", IsRequired = false, EmitDefaultValue = false)] + public float? LockerStatusHardlock { get; set; } + + /// + /// Product model for a Wyze device. + /// + [DataMember(Name = "product_model", IsRequired = false, EmitDefaultValue = false)] + public string? ProductModel { get; set; } + + /// + /// Product name for a Wyze device. + /// + [DataMember(Name = "product_name", IsRequired = false, EmitDefaultValue = false)] + public string? ProductName { get; set; } + + /// + /// Product type for a Wyze device. + /// + [DataMember(Name = "product_type", IsRequired = false, EmitDefaultValue = false)] + public string? ProductType { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesYacanMetadata_model")] + public class DevicePropertiesYacanMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesYacanMetadata() { } + + public DevicePropertiesYacanMetadata( + string? deviceId = default, + string? deviceName = default, + string? deviceType = default, + string? serialNumber = default + ) + { + DeviceId = deviceId; + DeviceName = deviceName; + DeviceType = deviceType; + SerialNumber = serialNumber; + } + + /// + /// Device ID for a Yacan device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Device name for a Yacan device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Device type for a Yacan device. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceType { get; set; } + + /// + /// Serial number for a Yacan device. + /// + [DataMember(Name = "serial_number", IsRequired = false, EmitDefaultValue = false)] + public string? SerialNumber { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesCodeConstraints_model")] + public class DevicePropertiesCodeConstraints + { + [JsonConstructorAttribute] + protected DevicePropertiesCodeConstraints() { } + + public DevicePropertiesCodeConstraints( + DevicePropertiesCodeConstraints.ConstraintTypeEnum constraintType = default, + float? maxLength = default, + float? minLength = default + ) + { + ConstraintType = constraintType; + MaxLength = maxLength; + MinLength = minLength; + } + + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ConstraintTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "no_zeros")] + NoZeros = 1, + + [EnumMember(Value = "cannot_start_with_12")] + CannotStartWith_12 = 2, + + [EnumMember(Value = "no_triple_consecutive_ints")] + NoTripleConsecutiveInts = 3, + + [EnumMember(Value = "cannot_specify_pin_code")] + CannotSpecifyPinCode = 4, + + [EnumMember(Value = "pin_code_matches_existing_set")] + PinCodeMatchesExistingSet = 5, + + [EnumMember(Value = "start_date_in_future")] + StartDateInFuture = 6, + + [EnumMember(Value = "no_ascending_or_descending_sequence")] + NoAscendingOrDescendingSequence = 7, + + [EnumMember(Value = "at_least_three_unique_digits")] + AtLeastThreeUniqueDigits = 8, + + [EnumMember(Value = "cannot_contain_089")] + CannotContain_089 = 9, + + [EnumMember(Value = "cannot_contain_0789")] + CannotContain_0789 = 10, + + [EnumMember(Value = "unique_first_four_digits")] + UniqueFirstFourDigits = 11, + + [EnumMember(Value = "no_all_same_digits")] + NoAllSameDigits = 12, + + [EnumMember(Value = "name_length")] + NameLength = 13, + + [EnumMember(Value = "name_must_be_unique")] + NameMustBeUnique = 14, + } + + [DataMember(Name = "constraint_type", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesCodeConstraints.ConstraintTypeEnum ConstraintType { get; set; } + + /// + /// Maximum name length constraint for access codes. + /// + [DataMember(Name = "max_length", IsRequired = false, EmitDefaultValue = false)] + public float? MaxLength { get; set; } + + /// + /// Minimum name length constraint for access codes. + /// + [DataMember(Name = "min_length", IsRequired = false, EmitDefaultValue = false)] + public float? MinLength { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesKeypadBattery_model")] + public class DevicePropertiesKeypadBattery + { + [JsonConstructorAttribute] + protected DevicePropertiesKeypadBattery() { } + + public DevicePropertiesKeypadBattery(float level = default) + { + Level = level; + } + + /// + /// Keypad battery charge level. + /// + [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] + public float Level { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesOfflineTimeFrameOptions_model")] + public class DevicePropertiesOfflineTimeFrameOptions + { + [JsonConstructorAttribute] + protected DevicePropertiesOfflineTimeFrameOptions() { } + + public DevicePropertiesOfflineTimeFrameOptions( + string displayName = default, + string? endDateRecurrenceRule = default, + bool? matchingStartEndTime = default, + string? maxDuration = default, + string? minDuration = default, + string? startDateRecurrenceRule = default, + List? timePairs = default, + string? timeZone = default + ) + { + DisplayName = displayName; + EndDateRecurrenceRule = endDateRecurrenceRule; + MatchingStartEndTime = matchingStartEndTime; + MaxDuration = maxDuration; + MinDuration = minDuration; + StartDateRecurrenceRule = startDateRecurrenceRule; + TimePairs = timePairs; + TimeZone = timeZone; + } + + /// + /// Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. + /// + [DataMember( + Name = "end_date_recurrence_rule", + IsRequired = false, + EmitDefaultValue = false + )] + public string? EndDateRecurrenceRule { get; set; } + + /// + /// When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. + /// + [DataMember(Name = "matching_start_end_time", IsRequired = false, EmitDefaultValue = false)] + public bool? MatchingStartEndTime { get; set; } + + /// + /// Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. + /// + [DataMember(Name = "max_duration", IsRequired = false, EmitDefaultValue = false)] + public string? MaxDuration { get; set; } + + /// + /// Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. + /// + [DataMember(Name = "min_duration", IsRequired = false, EmitDefaultValue = false)] + public string? MinDuration { get; set; } + + /// + /// iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. + /// + [DataMember( + Name = "start_date_recurrence_rule", + IsRequired = false, + EmitDefaultValue = false + )] + public string? StartDateRecurrenceRule { get; set; } + + /// + /// Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. + /// + [DataMember(Name = "time_pairs", IsRequired = false, EmitDefaultValue = false)] + public List? TimePairs { get; set; } + + /// + /// IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesOfflineTimeFrameOptionsTimePairs_model")] + public class DevicePropertiesOfflineTimeFrameOptionsTimePairs + { + [JsonConstructorAttribute] + protected DevicePropertiesOfflineTimeFrameOptionsTimePairs() { } + + public DevicePropertiesOfflineTimeFrameOptionsTimePairs( + string displayName = default, + string endTime = default, + string startTime = default + ) + { + DisplayName = displayName; + EndTime = endTime; + StartTime = startTime; + } + + /// + /// Label for the start/end time pairing. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. + /// + [DataMember(Name = "end_time", IsRequired = false, EmitDefaultValue = false)] + public string EndTime { get; set; } + + /// + /// Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. + /// + [DataMember(Name = "start_time", IsRequired = false, EmitDefaultValue = false)] + public string StartTime { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesOnlineTimeFrameOptions_model")] + public class DevicePropertiesOnlineTimeFrameOptions + { + [JsonConstructorAttribute] + protected DevicePropertiesOnlineTimeFrameOptions() { } + + public DevicePropertiesOnlineTimeFrameOptions( + string displayName = default, + string? endDateRecurrenceRule = default, + bool? matchingStartEndTime = default, + string? maxDuration = default, + string? minDuration = default, + string? startDateRecurrenceRule = default, + List? timePairs = default, + string? timeZone = default + ) + { + DisplayName = displayName; + EndDateRecurrenceRule = endDateRecurrenceRule; + MatchingStartEndTime = matchingStartEndTime; + MaxDuration = maxDuration; + MinDuration = minDuration; + StartDateRecurrenceRule = startDateRecurrenceRule; + TimePairs = timePairs; + TimeZone = timeZone; + } + + /// + /// Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. + /// + [DataMember( + Name = "end_date_recurrence_rule", + IsRequired = false, + EmitDefaultValue = false + )] + public string? EndDateRecurrenceRule { get; set; } + + /// + /// When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. + /// + [DataMember(Name = "matching_start_end_time", IsRequired = false, EmitDefaultValue = false)] + public bool? MatchingStartEndTime { get; set; } + + /// + /// Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. + /// + [DataMember(Name = "max_duration", IsRequired = false, EmitDefaultValue = false)] + public string? MaxDuration { get; set; } + + /// + /// Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. + /// + [DataMember(Name = "min_duration", IsRequired = false, EmitDefaultValue = false)] + public string? MinDuration { get; set; } + + /// + /// iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. + /// + [DataMember( + Name = "start_date_recurrence_rule", + IsRequired = false, + EmitDefaultValue = false + )] + public string? StartDateRecurrenceRule { get; set; } + + /// + /// Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. + /// + [DataMember(Name = "time_pairs", IsRequired = false, EmitDefaultValue = false)] + public List? TimePairs { get; set; } + + /// + /// IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesOnlineTimeFrameOptionsTimePairs_model")] + public class DevicePropertiesOnlineTimeFrameOptionsTimePairs + { + [JsonConstructorAttribute] + protected DevicePropertiesOnlineTimeFrameOptionsTimePairs() { } + + public DevicePropertiesOnlineTimeFrameOptionsTimePairs( + string displayName = default, + string endTime = default, + string startTime = default + ) + { + DisplayName = displayName; + EndTime = endTime; + StartTime = startTime; + } + + /// + /// Label for the start/end time pairing. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. + /// + [DataMember(Name = "end_time", IsRequired = false, EmitDefaultValue = false)] + public string EndTime { get; set; } + + /// + /// Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. + /// + [DataMember(Name = "start_time", IsRequired = false, EmitDefaultValue = false)] + public string StartTime { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesActiveThermostatSchedule_model")] + public class DevicePropertiesActiveThermostatSchedule + { + [JsonConstructorAttribute] + protected DevicePropertiesActiveThermostatSchedule() { } + + public DevicePropertiesActiveThermostatSchedule( + string climatePresetKey = default, + string createdAt = default, + string deviceId = default, + string endsAt = default, + List errors = default, + bool? isOverrideAllowed = default, + int? maxOverridePeriodMinutes = default, + string? name = default, + string startsAt = default, + string thermostatScheduleId = default, + string workspaceId = default + ) + { + ClimatePresetKey = climatePresetKey; + CreatedAt = createdAt; + DeviceId = deviceId; + EndsAt = endsAt; + Errors = errors; + IsOverrideAllowed = isOverrideAllowed; + MaxOverridePeriodMinutes = maxOverridePeriodMinutes; + Name = name; + StartsAt = startsAt; + ThermostatScheduleId = thermostatScheduleId; + WorkspaceId = workspaceId; + } + + /// + /// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the desired [thermostat](https://www.seam.co/docs/capability-guides/thermostats) device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string EndsAt { get; set; } + + /// + /// Errors associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. + /// + [DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOverrideAllowed { get; set; } + + /// + /// Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [DataMember( + Name = "max_override_period_minutes", + IsRequired = false, + EmitDefaultValue = false + )] + public int? MaxOverridePeriodMinutes { get; set; } + + /// + /// User-friendly name to identify the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string StartsAt { get; set; } + + /// + /// ID of the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] + public string ThermostatScheduleId { get; set; } + + /// + /// ID of the workspace that contains the thermostat schedule. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesActiveThermostatScheduleErrors_model")] + public class DevicePropertiesActiveThermostatScheduleErrors + { + [JsonConstructorAttribute] + protected DevicePropertiesActiveThermostatScheduleErrors() { } + + public DevicePropertiesActiveThermostatScheduleErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAvailableClimatePresets_model")] + public class DevicePropertiesAvailableClimatePresets + { + [JsonConstructorAttribute] + protected DevicePropertiesAvailableClimatePresets() { } + + public DevicePropertiesAvailableClimatePresets( + bool canDelete = default, + bool canEdit = default, + bool canUseWithThermostatDailyPrograms = default, + string climatePresetKey = default, + DevicePropertiesAvailableClimatePresets.ClimatePresetModeEnum? climatePresetMode = + default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string displayName = default, + DevicePropertiesAvailableClimatePresetsEcobeeMetadata? ecobeeMetadata = default, + DevicePropertiesAvailableClimatePresets.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + DevicePropertiesAvailableClimatePresets.HvacModeSettingEnum? hvacModeSetting = default, + bool manualOverrideAllowed = default, + string? name = default + ) + { + CanDelete = canDelete; + CanEdit = canEdit; + CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; + ClimatePresetKey = climatePresetKey; + ClimatePresetMode = climatePresetMode; + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DisplayName = displayName; + EcobeeMetadata = ecobeeMetadata; + FanModeSetting = fanModeSetting; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + HvacModeSetting = hvacModeSetting; + ManualOverrideAllowed = manualOverrideAllowed; + Name = name; + } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ClimatePresetModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "home")] + Home = 1, + + [EnumMember(Value = "away")] + Away = 2, + + [EnumMember(Value = "wake")] + Wake = 3, + + [EnumMember(Value = "sleep")] + Sleep = 4, + + [EnumMember(Value = "occupied")] + Occupied = 5, + + [EnumMember(Value = "unoccupied")] + Unoccupied = 6, + } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum HvacModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "heat")] + Heat = 2, + + [EnumMember(Value = "cool")] + Cool = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + + [EnumMember(Value = "eco")] + Eco = 5, + } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. + /// + [DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] + public bool CanDelete { get; set; } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. + /// + [DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] + public bool CanEdit { get; set; } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. + /// + [DataMember( + Name = "can_use_with_thermostat_daily_programs", + IsRequired = false, + EmitDefaultValue = false + )] + public bool CanUseWithThermostatDailyPrograms { get; set; } + + /// + /// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAvailableClimatePresets.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Metadata specific to the Ecobee climate, if applicable. + /// + [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAvailableClimatePresetsEcobeeMetadata? EcobeeMetadata { get; set; } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAvailableClimatePresets.FanModeSettingEnum? FanModeSetting { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAvailableClimatePresets.HvacModeSettingEnum? HvacModeSetting { get; set; } + + /// + /// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] + [DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] + public bool ManualOverrideAllowed { get; set; } + + /// + /// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesAvailableClimatePresetsEcobeeMetadata_model")] + public class DevicePropertiesAvailableClimatePresetsEcobeeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesAvailableClimatePresetsEcobeeMetadata() { } + + public DevicePropertiesAvailableClimatePresetsEcobeeMetadata( + string? climateRef = default, + bool? isOptimized = default, + DevicePropertiesAvailableClimatePresetsEcobeeMetadata.OwnerEnum? owner = default + ) + { + ClimateRef = climateRef; + IsOptimized = isOptimized; + Owner = owner; + } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum OwnerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "user")] + User = 1, + + [EnumMember(Value = "system")] + System = 2, + } + + /// + /// Reference to the Ecobee climate, if applicable. + /// + [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] + public string? ClimateRef { get; set; } + + /// + /// Indicates if the climate preset is optimized by Ecobee. + /// + [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOptimized { get; set; } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesAvailableClimatePresetsEcobeeMetadata.OwnerEnum? Owner { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesCurrentClimateSetting_model")] + public class DevicePropertiesCurrentClimateSetting + { + [JsonConstructorAttribute] + protected DevicePropertiesCurrentClimateSetting() { } + + public DevicePropertiesCurrentClimateSetting( + bool? canDelete = default, + bool? canEdit = default, + bool? canUseWithThermostatDailyPrograms = default, + string? climatePresetKey = default, + DevicePropertiesCurrentClimateSetting.ClimatePresetModeEnum? climatePresetMode = + default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string? displayName = default, + DevicePropertiesCurrentClimateSettingEcobeeMetadata? ecobeeMetadata = default, + DevicePropertiesCurrentClimateSetting.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + DevicePropertiesCurrentClimateSetting.HvacModeSettingEnum? hvacModeSetting = default, + bool? manualOverrideAllowed = default, + string? name = default + ) + { + CanDelete = canDelete; + CanEdit = canEdit; + CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; + ClimatePresetKey = climatePresetKey; + ClimatePresetMode = climatePresetMode; + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DisplayName = displayName; + EcobeeMetadata = ecobeeMetadata; + FanModeSetting = fanModeSetting; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + HvacModeSetting = hvacModeSetting; + ManualOverrideAllowed = manualOverrideAllowed; + Name = name; + } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ClimatePresetModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "home")] + Home = 1, + + [EnumMember(Value = "away")] + Away = 2, + + [EnumMember(Value = "wake")] + Wake = 3, + + [EnumMember(Value = "sleep")] + Sleep = 4, + + [EnumMember(Value = "occupied")] + Occupied = 5, + + [EnumMember(Value = "unoccupied")] + Unoccupied = 6, + } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum HvacModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "heat")] + Heat = 2, + + [EnumMember(Value = "cool")] + Cool = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + + [EnumMember(Value = "eco")] + Eco = 5, + } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. + /// + [DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] + public bool? CanDelete { get; set; } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. + /// + [DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] + public bool? CanEdit { get; set; } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. + /// + [DataMember( + Name = "can_use_with_thermostat_daily_programs", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanUseWithThermostatDailyPrograms { get; set; } + + /// + /// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string? ClimatePresetKey { get; set; } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesCurrentClimateSetting.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string? DisplayName { get; set; } + + /// + /// Metadata specific to the Ecobee climate, if applicable. + /// + [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesCurrentClimateSettingEcobeeMetadata? EcobeeMetadata { get; set; } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesCurrentClimateSetting.FanModeSettingEnum? FanModeSetting { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesCurrentClimateSetting.HvacModeSettingEnum? HvacModeSetting { get; set; } + + /// + /// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] + [DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] + public bool? ManualOverrideAllowed { get; set; } + + /// + /// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesCurrentClimateSettingEcobeeMetadata_model")] + public class DevicePropertiesCurrentClimateSettingEcobeeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesCurrentClimateSettingEcobeeMetadata() { } + + public DevicePropertiesCurrentClimateSettingEcobeeMetadata( + string? climateRef = default, + bool? isOptimized = default, + DevicePropertiesCurrentClimateSettingEcobeeMetadata.OwnerEnum? owner = default + ) + { + ClimateRef = climateRef; + IsOptimized = isOptimized; + Owner = owner; + } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum OwnerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "user")] + User = 1, + + [EnumMember(Value = "system")] + System = 2, + } + + /// + /// Reference to the Ecobee climate, if applicable. + /// + [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] + public string? ClimateRef { get; set; } + + /// + /// Indicates if the climate preset is optimized by Ecobee. + /// + [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOptimized { get; set; } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesCurrentClimateSettingEcobeeMetadata.OwnerEnum? Owner { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesDefaultClimateSetting_model")] + public class DevicePropertiesDefaultClimateSetting + { + [JsonConstructorAttribute] + protected DevicePropertiesDefaultClimateSetting() { } + + public DevicePropertiesDefaultClimateSetting( + bool? canDelete = default, + bool? canEdit = default, + bool? canUseWithThermostatDailyPrograms = default, + string? climatePresetKey = default, + DevicePropertiesDefaultClimateSetting.ClimatePresetModeEnum? climatePresetMode = + default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string? displayName = default, + DevicePropertiesDefaultClimateSettingEcobeeMetadata? ecobeeMetadata = default, + DevicePropertiesDefaultClimateSetting.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + DevicePropertiesDefaultClimateSetting.HvacModeSettingEnum? hvacModeSetting = default, + bool? manualOverrideAllowed = default, + string? name = default + ) + { + CanDelete = canDelete; + CanEdit = canEdit; + CanUseWithThermostatDailyPrograms = canUseWithThermostatDailyPrograms; + ClimatePresetKey = climatePresetKey; + ClimatePresetMode = climatePresetMode; + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + DisplayName = displayName; + EcobeeMetadata = ecobeeMetadata; + FanModeSetting = fanModeSetting; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + HvacModeSetting = hvacModeSetting; + ManualOverrideAllowed = manualOverrideAllowed; + Name = name; + } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ClimatePresetModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "home")] + Home = 1, + + [EnumMember(Value = "away")] + Away = 2, + + [EnumMember(Value = "wake")] + Wake = 3, + + [EnumMember(Value = "sleep")] + Sleep = 4, + + [EnumMember(Value = "occupied")] + Occupied = 5, + + [EnumMember(Value = "unoccupied")] + Unoccupied = 6, + } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum HvacModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "heat")] + Heat = 2, + + [EnumMember(Value = "cool")] + Cool = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + + [EnumMember(Value = "eco")] + Eco = 5, + } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. + /// + [DataMember(Name = "can_delete", IsRequired = false, EmitDefaultValue = false)] + public bool? CanDelete { get; set; } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. + /// + [DataMember(Name = "can_edit", IsRequired = false, EmitDefaultValue = false)] + public bool? CanEdit { get; set; } + + /// + /// Indicates whether the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. + /// + [DataMember( + Name = "can_use_with_thermostat_daily_programs", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanUseWithThermostatDailyPrograms { get; set; } + + /// + /// Unique key to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string? ClimatePresetKey { get; set; } + + /// + /// The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + /// + [DataMember(Name = "climate_preset_mode", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesDefaultClimateSetting.ClimatePresetModeEnum? ClimatePresetMode { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// Display name for the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string? DisplayName { get; set; } + + /// + /// Metadata specific to the Ecobee climate, if applicable. + /// + [DataMember(Name = "ecobee_metadata", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesDefaultClimateSettingEcobeeMetadata? EcobeeMetadata { get; set; } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesDefaultClimateSetting.FanModeSettingEnum? FanModeSetting { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesDefaultClimateSetting.HvacModeSettingEnum? HvacModeSetting { get; set; } + + /// + /// Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [Obsolete("Use 'thermostat_schedule.is_override_allowed'")] + [DataMember(Name = "manual_override_allowed", IsRequired = false, EmitDefaultValue = false)] + public bool? ManualOverrideAllowed { get; set; } + + /// + /// User-friendly name to identify the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesDefaultClimateSettingEcobeeMetadata_model")] + public class DevicePropertiesDefaultClimateSettingEcobeeMetadata + { + [JsonConstructorAttribute] + protected DevicePropertiesDefaultClimateSettingEcobeeMetadata() { } + + public DevicePropertiesDefaultClimateSettingEcobeeMetadata( + string? climateRef = default, + bool? isOptimized = default, + DevicePropertiesDefaultClimateSettingEcobeeMetadata.OwnerEnum? owner = default + ) + { + ClimateRef = climateRef; + IsOptimized = isOptimized; + Owner = owner; + } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum OwnerEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "user")] + User = 1, + + [EnumMember(Value = "system")] + System = 2, + } + + /// + /// Reference to the Ecobee climate, if applicable. + /// + [DataMember(Name = "climate_ref", IsRequired = false, EmitDefaultValue = false)] + public string? ClimateRef { get; set; } + + /// + /// Indicates if the climate preset is optimized by Ecobee. + /// + [DataMember(Name = "is_optimized", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOptimized { get; set; } + + /// + /// Indicates whether the climate preset is owned by the user or the system. + /// + [DataMember(Name = "owner", IsRequired = false, EmitDefaultValue = false)] + public DevicePropertiesDefaultClimateSettingEcobeeMetadata.OwnerEnum? Owner { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesTemperatureThreshold_model")] + public class DevicePropertiesTemperatureThreshold + { + [JsonConstructorAttribute] + protected DevicePropertiesTemperatureThreshold() { } + + public DevicePropertiesTemperatureThreshold( + float? lowerLimitCelsius = default, + float? lowerLimitFahrenheit = default, + float? upperLimitCelsius = default, + float? upperLimitFahrenheit = default + ) + { + LowerLimitCelsius = lowerLimitCelsius; + LowerLimitFahrenheit = lowerLimitFahrenheit; + UpperLimitCelsius = upperLimitCelsius; + UpperLimitFahrenheit = upperLimitFahrenheit; + } + + /// + /// Lower limit in °C within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + /// + [DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? LowerLimitCelsius { get; set; } + + /// + /// Lower limit in °F within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + /// + [DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float? LowerLimitFahrenheit { get; set; } + + /// + /// Upper limit in °C within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + /// + [DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? UpperLimitCelsius { get; set; } + + /// + /// Upper limit in °F within the current [temperature threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + /// + [DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float? UpperLimitFahrenheit { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesThermostatDailyPrograms_model")] + public class DevicePropertiesThermostatDailyPrograms + { + [JsonConstructorAttribute] + protected DevicePropertiesThermostatDailyPrograms() { } + + public DevicePropertiesThermostatDailyPrograms( + string createdAt = default, + string deviceId = default, + string? name = default, + List periods = default, + string thermostatDailyProgramId = default, + string workspaceId = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Name = name; + Periods = periods; + ThermostatDailyProgramId = thermostatDailyProgramId; + WorkspaceId = workspaceId; + } + + /// + /// Date and time at which the thermostat daily program was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the thermostat device on which the thermostat daily program is configured. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// User-friendly name to identify the thermostat daily program. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Array of thermostat daily program periods. + /// + [DataMember(Name = "periods", IsRequired = false, EmitDefaultValue = false)] + public List Periods { get; set; } + + /// + /// ID of the thermostat daily program. + /// + [DataMember( + Name = "thermostat_daily_program_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string ThermostatDailyProgramId { get; set; } + + /// + /// ID of the workspace that contains the thermostat daily program. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesThermostatDailyProgramsPeriods_model")] + public class DevicePropertiesThermostatDailyProgramsPeriods + { + [JsonConstructorAttribute] + protected DevicePropertiesThermostatDailyProgramsPeriods() { } + + public DevicePropertiesThermostatDailyProgramsPeriods( + string climatePresetKey = default, + string startsAtTime = default + ) + { + ClimatePresetKey = climatePresetKey; + StartsAtTime = startsAtTime; + } + + /// + /// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] + public string StartsAtTime { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_devicePropertiesThermostatWeeklyProgram_model")] + public class DevicePropertiesThermostatWeeklyProgram + { + [JsonConstructorAttribute] + protected DevicePropertiesThermostatWeeklyProgram() { } + + public DevicePropertiesThermostatWeeklyProgram( + string createdAt = default, + string? fridayProgramId = default, + string? mondayProgramId = default, + string? saturdayProgramId = default, + string? sundayProgramId = default, + string? thursdayProgramId = default, + string? tuesdayProgramId = default, + string? wednesdayProgramId = default + ) + { + CreatedAt = createdAt; + FridayProgramId = fridayProgramId; + MondayProgramId = mondayProgramId; + SaturdayProgramId = saturdayProgramId; + SundayProgramId = sundayProgramId; + ThursdayProgramId = thursdayProgramId; + TuesdayProgramId = tuesdayProgramId; + WednesdayProgramId = wednesdayProgramId; + } + + /// + /// Date and time at which the thermostat weekly program was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the thermostat daily program to run on Fridays. + /// + [DataMember(Name = "friday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? FridayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Mondays. + /// + [DataMember(Name = "monday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? MondayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Saturdays. + /// + [DataMember(Name = "saturday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? SaturdayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Sundays. + /// + [DataMember(Name = "sunday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? SundayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Thursdays. + /// + [DataMember(Name = "thursday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? ThursdayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Tuesdays. + /// + [DataMember(Name = "tuesday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? TuesdayProgramId { get; set; } + + /// + /// ID of the thermostat daily program to run on Wednesdays. + /// + [DataMember(Name = "wednesday_program_id", IsRequired = false, EmitDefaultValue = false)] + public string? WednesdayProgramId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/DeviceProvider.cs b/src/Seam/Model/DeviceProvider.cs index d006f193..8c034f6a 100644 --- a/src/Seam/Model/DeviceProvider.cs +++ b/src/Seam/Model/DeviceProvider.cs @@ -8,464 +8,536 @@ namespace Seam.Model { -[DataContract(Name = "seamModel_deviceProvider_model")] -public class DeviceProvider -{ -[JsonConstructorAttribute] -protected DeviceProvider() { } - -public DeviceProvider(bool? canActivateWeeklyProgram = default, bool? canConfigureAutoLock = default, bool? canHvacCool = default, bool? canHvacHeat = default, bool? canHvacHeatCool = default, bool? canProgramOfflineAccessCodes = default, bool? canProgramOnlineAccessCodes = default, bool? canProgramThermostatProgramsAsDifferentEachDay = default, bool? canProgramThermostatProgramsAsSameEachDay = default, bool? canProgramThermostatProgramsAsWeekdayWeekend = default, bool? canRemotelyLock = default, bool? canRemotelyUnlock = default, bool? canRunThermostatPrograms = default, bool? canSimulateConnection = default, bool? canSimulateDisconnection = default, bool? canSimulateHubConnection = default, bool? canSimulateHubDisconnection = default, bool? canSimulatePaidSubscription = default, bool? canSimulateRemoval = default, bool? canStreamLiveVideo = default, bool? canTurnOffHvac = default, bool? canUnlockWithCode = default, DeviceProvider.DeviceProviderNameEnum deviceProviderName = default, string displayName = default, string imageUrl = default, List providerCategories = default) -{ -CanActivateWeeklyProgram = canActivateWeeklyProgram; -CanConfigureAutoLock = canConfigureAutoLock; -CanHvacCool = canHvacCool; -CanHvacHeat = canHvacHeat; -CanHvacHeatCool = canHvacHeatCool; -CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; -CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; -CanProgramThermostatProgramsAsDifferentEachDay = canProgramThermostatProgramsAsDifferentEachDay; -CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; -CanProgramThermostatProgramsAsWeekdayWeekend = canProgramThermostatProgramsAsWeekdayWeekend; -CanRemotelyLock = canRemotelyLock; -CanRemotelyUnlock = canRemotelyUnlock; -CanRunThermostatPrograms = canRunThermostatPrograms; -CanSimulateConnection = canSimulateConnection; -CanSimulateDisconnection = canSimulateDisconnection; -CanSimulateHubConnection = canSimulateHubConnection; -CanSimulateHubDisconnection = canSimulateHubDisconnection; -CanSimulatePaidSubscription = canSimulatePaidSubscription; -CanSimulateRemoval = canSimulateRemoval; -CanStreamLiveVideo = canStreamLiveVideo; -CanTurnOffHvac = canTurnOffHvac; -CanUnlockWithCode = canUnlockWithCode; -DeviceProviderName = deviceProviderName; -DisplayName = displayName; -ImageUrl = imageUrl; -ProviderCategories = providerCategories; -} - -/// -/// Name of the device provider. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceProviderNameEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "hotek")] -Hotek = 1, - -[EnumMember(Value = "dormakaba_community")] -DormakabaCommunity = 2, - -[EnumMember(Value = "legic_connect")] -LegicConnect = 3, - -[EnumMember(Value = "akuvox")] -Akuvox = 4, - -[EnumMember(Value = "august")] -August = 5, - -[EnumMember(Value = "avigilon_alta")] -AvigilonAlta = 6, - -[EnumMember(Value = "brivo")] -Brivo = 7, - -[EnumMember(Value = "butterflymx")] -Butterflymx = 8, - -[EnumMember(Value = "schlage")] -Schlage = 9, - -[EnumMember(Value = "smartthings")] -Smartthings = 10, - -[EnumMember(Value = "yale")] -Yale = 11, - -[EnumMember(Value = "genie")] -Genie = 12, - -[EnumMember(Value = "doorking")] -Doorking = 13, - -[EnumMember(Value = "salto")] -Salto = 14, - -[EnumMember(Value = "salto_ks")] -SaltoKs = 15, + [DataContract(Name = "seamModel_deviceProvider_model")] + public class DeviceProvider + { + [JsonConstructorAttribute] + protected DeviceProvider() { } + + public DeviceProvider( + bool? canActivateWeeklyProgram = default, + bool? canConfigureAutoLock = default, + bool? canHvacCool = default, + bool? canHvacHeat = default, + bool? canHvacHeatCool = default, + bool? canProgramOfflineAccessCodes = default, + bool? canProgramOnlineAccessCodes = default, + bool? canProgramThermostatProgramsAsDifferentEachDay = default, + bool? canProgramThermostatProgramsAsSameEachDay = default, + bool? canProgramThermostatProgramsAsWeekdayWeekend = default, + bool? canRemotelyLock = default, + bool? canRemotelyUnlock = default, + bool? canRunThermostatPrograms = default, + bool? canSimulateConnection = default, + bool? canSimulateDisconnection = default, + bool? canSimulateHubConnection = default, + bool? canSimulateHubDisconnection = default, + bool? canSimulatePaidSubscription = default, + bool? canSimulateRemoval = default, + bool? canStreamLiveVideo = default, + bool? canTurnOffHvac = default, + bool? canUnlockWithCode = default, + DeviceProvider.DeviceProviderNameEnum deviceProviderName = default, + string displayName = default, + string imageUrl = default, + List providerCategories = default + ) + { + CanActivateWeeklyProgram = canActivateWeeklyProgram; + CanConfigureAutoLock = canConfigureAutoLock; + CanHvacCool = canHvacCool; + CanHvacHeat = canHvacHeat; + CanHvacHeatCool = canHvacHeatCool; + CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; + CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; + CanProgramThermostatProgramsAsDifferentEachDay = + canProgramThermostatProgramsAsDifferentEachDay; + CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; + CanProgramThermostatProgramsAsWeekdayWeekend = + canProgramThermostatProgramsAsWeekdayWeekend; + CanRemotelyLock = canRemotelyLock; + CanRemotelyUnlock = canRemotelyUnlock; + CanRunThermostatPrograms = canRunThermostatPrograms; + CanSimulateConnection = canSimulateConnection; + CanSimulateDisconnection = canSimulateDisconnection; + CanSimulateHubConnection = canSimulateHubConnection; + CanSimulateHubDisconnection = canSimulateHubDisconnection; + CanSimulatePaidSubscription = canSimulatePaidSubscription; + CanSimulateRemoval = canSimulateRemoval; + CanStreamLiveVideo = canStreamLiveVideo; + CanTurnOffHvac = canTurnOffHvac; + CanUnlockWithCode = canUnlockWithCode; + DeviceProviderName = deviceProviderName; + DisplayName = displayName; + ImageUrl = imageUrl; + ProviderCategories = providerCategories; + } + + /// + /// Name of the device provider. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceProviderNameEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "hotek")] + Hotek = 1, + + [EnumMember(Value = "dormakaba_community")] + DormakabaCommunity = 2, + + [EnumMember(Value = "legic_connect")] + LegicConnect = 3, + + [EnumMember(Value = "akuvox")] + Akuvox = 4, + + [EnumMember(Value = "august")] + August = 5, + + [EnumMember(Value = "avigilon_alta")] + AvigilonAlta = 6, + + [EnumMember(Value = "brivo")] + Brivo = 7, + + [EnumMember(Value = "butterflymx")] + Butterflymx = 8, + + [EnumMember(Value = "schlage")] + Schlage = 9, + + [EnumMember(Value = "smartthings")] + Smartthings = 10, + + [EnumMember(Value = "yale")] + Yale = 11, + + [EnumMember(Value = "genie")] + Genie = 12, + + [EnumMember(Value = "doorking")] + Doorking = 13, + + [EnumMember(Value = "salto")] + Salto = 14, + + [EnumMember(Value = "salto_ks")] + SaltoKs = 15, -[EnumMember(Value = "salto_ks_accept")] -SaltoKsAccept = 16, + [EnumMember(Value = "salto_ks_accept")] + SaltoKsAccept = 16, -[EnumMember(Value = "lockly")] -Lockly = 17, + [EnumMember(Value = "lockly")] + Lockly = 17, -[EnumMember(Value = "ttlock")] -Ttlock = 18, + [EnumMember(Value = "ttlock")] + Ttlock = 18, -[EnumMember(Value = "linear")] -Linear = 19, + [EnumMember(Value = "linear")] + Linear = 19, -[EnumMember(Value = "noiseaware")] -Noiseaware = 20, + [EnumMember(Value = "noiseaware")] + Noiseaware = 20, -[EnumMember(Value = "nuki")] -Nuki = 21, + [EnumMember(Value = "nuki")] + Nuki = 21, -[EnumMember(Value = "igloo")] -Igloo = 22, + [EnumMember(Value = "igloo")] + Igloo = 22, -[EnumMember(Value = "kwikset")] -Kwikset = 23, + [EnumMember(Value = "kwikset")] + Kwikset = 23, -[EnumMember(Value = "minut")] -Minut = 24, + [EnumMember(Value = "minut")] + Minut = 24, -[EnumMember(Value = "my_2n")] -My_2n = 25, + [EnumMember(Value = "my_2n")] + My_2n = 25, -[EnumMember(Value = "controlbyweb")] -Controlbyweb = 26, + [EnumMember(Value = "controlbyweb")] + Controlbyweb = 26, -[EnumMember(Value = "nest")] -Nest = 27, + [EnumMember(Value = "nest")] + Nest = 27, -[EnumMember(Value = "igloohome")] -Igloohome = 28, + [EnumMember(Value = "igloohome")] + Igloohome = 28, -[EnumMember(Value = "ecobee")] -Ecobee = 29, + [EnumMember(Value = "ecobee")] + Ecobee = 29, -[EnumMember(Value = "four_suites")] -FourSuites = 30, + [EnumMember(Value = "four_suites")] + FourSuites = 30, -[EnumMember(Value = "dormakaba_oracode")] -DormakabaOracode = 31, + [EnumMember(Value = "dormakaba_oracode")] + DormakabaOracode = 31, -[EnumMember(Value = "dormakaba_oracode_iho")] -DormakabaOracodeIho = 32, + [EnumMember(Value = "dormakaba_oracode_iho")] + DormakabaOracodeIho = 32, -[EnumMember(Value = "pti")] -Pti = 33, + [EnumMember(Value = "pti")] + Pti = 33, -[EnumMember(Value = "wyze")] -Wyze = 34, + [EnumMember(Value = "wyze")] + Wyze = 34, -[EnumMember(Value = "seam_passport")] -SeamPassport = 35, + [EnumMember(Value = "seam_passport")] + SeamPassport = 35, -[EnumMember(Value = "visionline")] -Visionline = 36, + [EnumMember(Value = "visionline")] + Visionline = 36, -[EnumMember(Value = "assa_abloy_credential_service")] -AssaAbloyCredentialService = 37, + [EnumMember(Value = "assa_abloy_credential_service")] + AssaAbloyCredentialService = 37, -[EnumMember(Value = "tedee")] -Tedee = 38, + [EnumMember(Value = "tedee")] + Tedee = 38, -[EnumMember(Value = "honeywell_resideo")] -HoneywellResideo = 39, + [EnumMember(Value = "honeywell_resideo")] + HoneywellResideo = 39, -[EnumMember(Value = "first_alert")] -FirstAlert = 40, + [EnumMember(Value = "first_alert")] + FirstAlert = 40, -[EnumMember(Value = "latch")] -Latch = 41, + [EnumMember(Value = "latch")] + Latch = 41, -[EnumMember(Value = "akiles")] -Akiles = 42, + [EnumMember(Value = "akiles")] + Akiles = 42, -[EnumMember(Value = "assa_abloy_vostio")] -AssaAbloyVostio = 43, + [EnumMember(Value = "assa_abloy_vostio")] + AssaAbloyVostio = 43, -[EnumMember(Value = "assa_abloy_vostio_credential_service")] -AssaAbloyVostioCredentialService = 44, + [EnumMember(Value = "assa_abloy_vostio_credential_service")] + AssaAbloyVostioCredentialService = 44, -[EnumMember(Value = "tado")] -Tado = 45, + [EnumMember(Value = "tado")] + Tado = 45, -[EnumMember(Value = "salto_space")] -SaltoSpace = 46, + [EnumMember(Value = "salto_space")] + SaltoSpace = 46, -[EnumMember(Value = "sensi")] -Sensi = 47, + [EnumMember(Value = "sensi")] + Sensi = 47, -[EnumMember(Value = "keynest")] -Keynest = 48, + [EnumMember(Value = "keynest")] + Keynest = 48, -[EnumMember(Value = "korelock")] -Korelock = 49, + [EnumMember(Value = "korelock")] + Korelock = 49, -[EnumMember(Value = "keyincode")] -Keyincode = 50, + [EnumMember(Value = "keyincode")] + Keyincode = 50, -[EnumMember(Value = "dormakaba_ambiance")] -DormakabaAmbiance = 51, + [EnumMember(Value = "dormakaba_ambiance")] + DormakabaAmbiance = 51, -[EnumMember(Value = "ultraloq")] -Ultraloq = 52, + [EnumMember(Value = "ultraloq")] + Ultraloq = 52, -[EnumMember(Value = "yacan")] -Yacan = 53, + [EnumMember(Value = "yacan")] + Yacan = 53, -[EnumMember(Value = "dusaw")] -Dusaw = 54, + [EnumMember(Value = "dusaw")] + Dusaw = 54, -[EnumMember(Value = "sifely")] -Sifely = 55, + [EnumMember(Value = "sifely")] + Sifely = 55, -[EnumMember(Value = "thirty_three_lock")] -ThirtyThreeLock = 56, + [EnumMember(Value = "thirty_three_lock")] + ThirtyThreeLock = 56, -[EnumMember(Value = "ring")] -Ring = 57, + [EnumMember(Value = "ring")] + Ring = 57, -[EnumMember(Value = "tapo")] -Tapo = 58, + [EnumMember(Value = "tapo")] + Tapo = 58, -[EnumMember(Value = "arlo")] -Arlo = 59, + [EnumMember(Value = "arlo")] + Arlo = 59, -[EnumMember(Value = "reolink")] -Reolink = 60, + [EnumMember(Value = "reolink")] + Reolink = 60, -[EnumMember(Value = "ical")] -Ical = 61, + [EnumMember(Value = "ical")] + Ical = 61, -[EnumMember(Value = "lodgify")] -Lodgify = 62, + [EnumMember(Value = "lodgify")] + Lodgify = 62, -[EnumMember(Value = "hostaway")] -Hostaway = 63, + [EnumMember(Value = "hostaway")] + Hostaway = 63, -[EnumMember(Value = "guesty")] -Guesty = 64, + [EnumMember(Value = "guesty")] + Guesty = 64, -[EnumMember(Value = "acuity_scheduling")] -AcuityScheduling = 65, + [EnumMember(Value = "acuity_scheduling")] + AcuityScheduling = 65, -[EnumMember(Value = "omnitec")] -Omnitec = 66, + [EnumMember(Value = "omnitec")] + Omnitec = 66, -[EnumMember(Value = "kisi")] -Kisi = 67, + [EnumMember(Value = "kisi")] + Kisi = 67, -[EnumMember(Value = "aqara")] -Aqara = 68, -} - -/// -/// List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ProviderCategoriesEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "stable")] -Stable = 1, - -[EnumMember(Value = "consumer_smartlocks")] -ConsumerSmartlocks = 2, - -[EnumMember(Value = "beta")] -Beta = 3, - -[EnumMember(Value = "thermostats")] -Thermostats = 4, - -[EnumMember(Value = "noise_sensors")] -NoiseSensors = 5, - -[EnumMember(Value = "access_control_systems")] -AccessControlSystems = 6, - -[EnumMember(Value = "cameras")] -Cameras = 7, - -[EnumMember(Value = "connectors")] -Connectors = 8, -} - -/// -/// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. -/// -[DataMember(Name = "can_activate_weekly_program", IsRequired = false, EmitDefaultValue = false)] -public bool? CanActivateWeeklyProgram { get; set; } - -/// -/// Indicates whether the lock supports configuring automatic locking. -/// -[DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanConfigureAutoLock { get; set; } - -/// -/// Indicates whether the thermostat supports cooling. -/// -[DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacCool { get; set; } - -/// -/// Indicates whether the thermostat supports heating. -/// -[DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacHeat { get; set; } - -/// -/// Indicates whether the thermostat supports simultaneous heating and cooling. -/// -[DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacHeatCool { get; set; } - -/// -/// Indicates whether the device supports programming offline access codes. -/// -[DataMember(Name = "can_program_offline_access_codes", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramOfflineAccessCodes { get; set; } - -/// -/// Indicates whether the device supports programming online access codes. -/// -[DataMember(Name = "can_program_online_access_codes", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramOnlineAccessCodes { get; set; } - -/// -/// Indicates whether the thermostat supports different climate programs for each day of the week. -/// -[DataMember(Name = "can_program_thermostat_programs_as_different_each_day", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } - -/// -/// Indicates whether the thermostat supports a single climate program applied to every day. -/// -[DataMember(Name = "can_program_thermostat_programs_as_same_each_day", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } - -/// -/// Indicates whether the thermostat supports weekday/weekend climate programs. -/// -[DataMember(Name = "can_program_thermostat_programs_as_weekday_weekend", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } - -/// -/// Indicates whether the device supports remote locking. -/// -[DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRemotelyLock { get; set; } - -/// -/// Indicates whether the device supports remote unlocking. -/// -[DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRemotelyUnlock { get; set; } - -/// -/// Indicates whether the thermostat supports running climate programs. -/// -[DataMember(Name = "can_run_thermostat_programs", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRunThermostatPrograms { get; set; } - -/// -/// Indicates whether the device supports simulating connection in a sandbox. -/// -[DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateConnection { get; set; } - -/// -/// Indicates whether the device supports simulating disconnection in a sandbox. -/// -[DataMember(Name = "can_simulate_disconnection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateDisconnection { get; set; } - -/// -/// Indicates whether the hub supports simulating connection in a sandbox. -/// -[DataMember(Name = "can_simulate_hub_connection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateHubConnection { get; set; } - -/// -/// Indicates whether the hub supports simulating disconnection in a sandbox. -/// -[DataMember(Name = "can_simulate_hub_disconnection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateHubDisconnection { get; set; } - -/// -/// Indicates whether the device supports simulating a paid subscription in a sandbox. -/// -[DataMember(Name = "can_simulate_paid_subscription", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulatePaidSubscription { get; set; } - -/// -/// Indicates whether the device supports simulating removal in a sandbox. -/// -[DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateRemoval { get; set; } - -/// -/// Indicates whether the camera supports streaming live video through a camera live view session. -/// -[DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] -public bool? CanStreamLiveVideo { get; set; } - -/// -/// Indicates whether the thermostat can be turned off. -/// -[DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] -public bool? CanTurnOffHvac { get; set; } - -/// -/// Indicates whether the lock supports unlocking with an access code. -/// -[DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUnlockWithCode { get; set; } - -/// -/// Name of the device provider. -/// -[DataMember(Name = "device_provider_name", IsRequired = false, EmitDefaultValue = false)] -public DeviceProvider.DeviceProviderNameEnum DeviceProviderName { get; set; } - -/// -/// Display name for the device provider. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Image URL for the device provider. -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string ImageUrl { get; set; } - -/// -/// List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. -/// -[DataMember(Name = "provider_categories", IsRequired = false, EmitDefaultValue = false)] -public List ProviderCategories { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} + [EnumMember(Value = "aqara")] + Aqara = 68, + } + /// + /// List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ProviderCategoriesEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "stable")] + Stable = 1, + + [EnumMember(Value = "consumer_smartlocks")] + ConsumerSmartlocks = 2, + + [EnumMember(Value = "beta")] + Beta = 3, + + [EnumMember(Value = "thermostats")] + Thermostats = 4, + + [EnumMember(Value = "noise_sensors")] + NoiseSensors = 5, + + [EnumMember(Value = "access_control_systems")] + AccessControlSystems = 6, + + [EnumMember(Value = "cameras")] + Cameras = 7, + + [EnumMember(Value = "connectors")] + Connectors = 8, + } + + /// + /// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. + /// + [DataMember( + Name = "can_activate_weekly_program", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanActivateWeeklyProgram { get; set; } + + /// + /// Indicates whether the lock supports configuring automatic locking. + /// + [DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanConfigureAutoLock { get; set; } + + /// + /// Indicates whether the thermostat supports cooling. + /// + [DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacCool { get; set; } + + /// + /// Indicates whether the thermostat supports heating. + /// + [DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacHeat { get; set; } + + /// + /// Indicates whether the thermostat supports simultaneous heating and cooling. + /// + [DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacHeatCool { get; set; } + + /// + /// Indicates whether the device supports programming offline access codes. + /// + [DataMember( + Name = "can_program_offline_access_codes", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramOfflineAccessCodes { get; set; } + + /// + /// Indicates whether the device supports programming online access codes. + /// + [DataMember( + Name = "can_program_online_access_codes", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramOnlineAccessCodes { get; set; } + + /// + /// Indicates whether the thermostat supports different climate programs for each day of the week. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_different_each_day", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } + + /// + /// Indicates whether the thermostat supports a single climate program applied to every day. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_same_each_day", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } + + /// + /// Indicates whether the thermostat supports weekday/weekend climate programs. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_weekday_weekend", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } + + /// + /// Indicates whether the device supports remote locking. + /// + [DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanRemotelyLock { get; set; } + + /// + /// Indicates whether the device supports remote unlocking. + /// + [DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanRemotelyUnlock { get; set; } + + /// + /// Indicates whether the thermostat supports running climate programs. + /// + [DataMember( + Name = "can_run_thermostat_programs", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanRunThermostatPrograms { get; set; } + + /// + /// Indicates whether the device supports simulating connection in a sandbox. + /// + [DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] + public bool? CanSimulateConnection { get; set; } + + /// + /// Indicates whether the device supports simulating disconnection in a sandbox. + /// + [DataMember( + Name = "can_simulate_disconnection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateDisconnection { get; set; } + + /// + /// Indicates whether the hub supports simulating connection in a sandbox. + /// + [DataMember( + Name = "can_simulate_hub_connection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateHubConnection { get; set; } + + /// + /// Indicates whether the hub supports simulating disconnection in a sandbox. + /// + [DataMember( + Name = "can_simulate_hub_disconnection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateHubDisconnection { get; set; } + + /// + /// Indicates whether the device supports simulating a paid subscription in a sandbox. + /// + [DataMember( + Name = "can_simulate_paid_subscription", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulatePaidSubscription { get; set; } + + /// + /// Indicates whether the device supports simulating removal in a sandbox. + /// + [DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] + public bool? CanSimulateRemoval { get; set; } + + /// + /// Indicates whether the camera supports streaming live video through a camera live view session. + /// + [DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] + public bool? CanStreamLiveVideo { get; set; } + + /// + /// Indicates whether the thermostat can be turned off. + /// + [DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] + public bool? CanTurnOffHvac { get; set; } + + /// + /// Indicates whether the lock supports unlocking with an access code. + /// + [DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] + public bool? CanUnlockWithCode { get; set; } + + /// + /// Name of the device provider. + /// + [DataMember(Name = "device_provider_name", IsRequired = false, EmitDefaultValue = false)] + public DeviceProvider.DeviceProviderNameEnum DeviceProviderName { get; set; } + + /// + /// Display name for the device provider. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Image URL for the device provider. + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string ImageUrl { get; set; } + + /// + /// List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. + /// + [DataMember(Name = "provider_categories", IsRequired = false, EmitDefaultValue = false)] + public List ProviderCategories { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/Event.cs b/src/Seam/Model/Event.cs index b172a91e..51eadd08 100644 --- a/src/Seam/Model/Event.cs +++ b/src/Seam/Model/Event.cs @@ -8,15673 +8,17947 @@ namespace Seam.Model { -[JsonConverter(typeof(JsonSubtypes), "event_type")] -[JsonSubtypes.FallBackSubType(typeof(EventUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(EventSpaceDeleted), "space.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventSpaceCreated), "space.created")] -[JsonSubtypes.KnownSubType(typeof(EventSpaceDeviceMembershipChanged), "space.device_membership_changed")] -[JsonSubtypes.KnownSubType(typeof(EventPhoneDeactivated), "phone.deactivated")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceDoorbellRang), "device.doorbell_rang")] -[JsonSubtypes.KnownSubType(typeof(EventCameraActivated), "camera.activated")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceNameChanged), "device.name_changed")] -[JsonSubtypes.KnownSubType(typeof(EventThermostatTemperatureChanged), "thermostat.temperature_changed")] -[JsonSubtypes.KnownSubType(typeof(EventThermostatTemperatureReachedSetPoint), "thermostat.temperature_reached_set_point")] -[JsonSubtypes.KnownSubType(typeof(EventThermostatTemperatureThresholdNoLongerExceeded), "thermostat.temperature_threshold_no_longer_exceeded")] -[JsonSubtypes.KnownSubType(typeof(EventThermostatTemperatureThresholdExceeded), "thermostat.temperature_threshold_exceeded")] -[JsonSubtypes.KnownSubType(typeof(EventThermostatManuallyAdjusted), "thermostat.manually_adjusted")] -[JsonSubtypes.KnownSubType(typeof(EventThermostatClimatePresetActivated), "thermostat.climate_preset_activated")] -[JsonSubtypes.KnownSubType(typeof(EventLockAccessDenied), "lock.access_denied")] -[JsonSubtypes.KnownSubType(typeof(EventLockUnlocked), "lock.unlocked")] -[JsonSubtypes.KnownSubType(typeof(EventLockLocked), "lock.locked")] -[JsonSubtypes.KnownSubType(typeof(EventNoiseSensorNoiseThresholdTriggered), "noise_sensor.noise_threshold_triggered")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceAccessoryKeypadDisconnected), "device.accessory_keypad_disconnected")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceAccessoryKeypadConnected), "device.accessory_keypad_connected")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceErrorSubscriptionRequiredResolved), "device.error.subscription_required.resolved")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceErrorSubscriptionRequired), "device.error.subscription_required")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceConnectionStabilized), "device.connection_stabilized")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceConnectionBecameFlaky), "device.connection_became_flaky")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceSaltoPrivacyModeDeactivated), "device.salto.privacy_mode_deactivated")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceSaltoPrivacyModeActivated), "device.salto.privacy_mode_activated")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceThirdPartyIntegrationNoLongerDetected), "device.third_party_integration_no_longer_detected")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceThirdPartyIntegrationDetected), "device.third_party_integration_detected")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceDeleted), "device.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceRemoved), "device.removed")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceBatteryStatusChanged), "device.battery_status_changed")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceLowBattery), "device.low_battery")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceTampered), "device.tampered")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceUnmanagedDisconnected), "device.unmanaged.disconnected")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceDisconnected), "device.disconnected")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceUnmanagedConnected), "device.unmanaged.connected")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceUnmanagedConvertedToManaged), "device.unmanaged.converted_to_managed")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceConvertedToUnmanaged), "device.converted_to_unmanaged")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceAdded), "device.added")] -[JsonSubtypes.KnownSubType(typeof(EventDeviceConnected), "device.connected")] -[JsonSubtypes.KnownSubType(typeof(EventConnectWebviewLoginFailed), "connect_webview.login_failed")] -[JsonSubtypes.KnownSubType(typeof(EventConnectWebviewLoginSucceeded), "connect_webview.login_succeeded")] -[JsonSubtypes.KnownSubType(typeof(EventActionAttemptSimulateManualLockViaKeypadFailed), "action_attempt.simulate_manual_lock_via_keypad.failed")] -[JsonSubtypes.KnownSubType(typeof(EventActionAttemptSimulateManualLockViaKeypadSucceeded), "action_attempt.simulate_manual_lock_via_keypad.succeeded")] -[JsonSubtypes.KnownSubType(typeof(EventActionAttemptSimulateKeypadCodeEntryFailed), "action_attempt.simulate_keypad_code_entry.failed")] -[JsonSubtypes.KnownSubType(typeof(EventActionAttemptSimulateKeypadCodeEntrySucceeded), "action_attempt.simulate_keypad_code_entry.succeeded")] -[JsonSubtypes.KnownSubType(typeof(EventActionAttemptUnlockDoorFailed), "action_attempt.unlock_door.failed")] -[JsonSubtypes.KnownSubType(typeof(EventActionAttemptUnlockDoorSucceeded), "action_attempt.unlock_door.succeeded")] -[JsonSubtypes.KnownSubType(typeof(EventActionAttemptLockDoorFailed), "action_attempt.lock_door.failed")] -[JsonSubtypes.KnownSubType(typeof(EventActionAttemptLockDoorSucceeded), "action_attempt.lock_door.succeeded")] -[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountReauthorizationRequested), "connected_account.reauthorization_requested")] -[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountCompletedFirstSyncAfterReconnection), "connected_account.completed_first_sync_after_reconnection")] -[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountDeleted), "connected_account.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountCompletedFirstSync), "connected_account.completed_first_sync")] -[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountDisconnected), "connected_account.disconnected")] -[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountSuccessfulLogin), "connected_account.successful_login")] -[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountCreated), "connected_account.created")] -[JsonSubtypes.KnownSubType(typeof(EventConnectedAccountConnected), "connected_account.connected")] -[JsonSubtypes.KnownSubType(typeof(EventClientSessionDeleted), "client_session.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventAcsEntranceRemoved), "acs_entrance.removed")] -[JsonSubtypes.KnownSubType(typeof(EventAcsEntranceAdded), "acs_entrance.added")] -[JsonSubtypes.KnownSubType(typeof(EventAcsAccessGroupDeleted), "acs_access_group.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventAcsEncoderRemoved), "acs_encoder.removed")] -[JsonSubtypes.KnownSubType(typeof(EventAcsEncoderAdded), "acs_encoder.added")] -[JsonSubtypes.KnownSubType(typeof(EventAcsUserDeleted), "acs_user.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventAcsUserCreated), "acs_user.created")] -[JsonSubtypes.KnownSubType(typeof(EventAcsCredentialInvalidated), "acs_credential.invalidated")] -[JsonSubtypes.KnownSubType(typeof(EventAcsCredentialReissued), "acs_credential.reissued")] -[JsonSubtypes.KnownSubType(typeof(EventAcsCredentialIssued), "acs_credential.issued")] -[JsonSubtypes.KnownSubType(typeof(EventAcsCredentialDeleted), "acs_credential.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventAcsSystemDisconnected), "acs_system.disconnected")] -[JsonSubtypes.KnownSubType(typeof(EventAcsSystemAdded), "acs_system.added")] -[JsonSubtypes.KnownSubType(typeof(EventAcsSystemConnected), "acs_system.connected")] -[JsonSubtypes.KnownSubType(typeof(EventAccessMethodFailedToIssue), "access_method.failed_to_issue")] -[JsonSubtypes.KnownSubType(typeof(EventAccessMethodDelayInIssuing), "access_method.delay_in_issuing")] -[JsonSubtypes.KnownSubType(typeof(EventAccessMethodCreated), "access_method.created")] -[JsonSubtypes.KnownSubType(typeof(EventAccessMethodReissued), "access_method.reissued")] -[JsonSubtypes.KnownSubType(typeof(EventAccessMethodDeleted), "access_method.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventAccessMethodCardEncodingRequired), "access_method.card_encoding_required")] -[JsonSubtypes.KnownSubType(typeof(EventAccessMethodRevoked), "access_method.revoked")] -[JsonSubtypes.KnownSubType(typeof(EventAccessMethodIssued), "access_method.issued")] -[JsonSubtypes.KnownSubType(typeof(EventAccessGrantCouldNotCreateRequestedAccessMethods), "access_grant.could_not_create_requested_access_methods")] -[JsonSubtypes.KnownSubType(typeof(EventAccessGrantAccessTimesChanged), "access_grant.access_times_changed")] -[JsonSubtypes.KnownSubType(typeof(EventAccessGrantAccessToDoorLost), "access_grant.access_to_door_lost")] -[JsonSubtypes.KnownSubType(typeof(EventAccessGrantAccessGrantedToDoor), "access_grant.access_granted_to_door")] -[JsonSubtypes.KnownSubType(typeof(EventAccessGrantAccessGrantedToAllDoors), "access_grant.access_granted_to_all_doors")] -[JsonSubtypes.KnownSubType(typeof(EventAccessGrantDeleted), "access_grant.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventAccessGrantCreated), "access_grant.created")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeUnmanagedRemoved), "access_code.unmanaged.removed")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeUnmanagedCreated), "access_code.unmanaged.created")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeUnmanagedFailedToConvertToManaged), "access_code.unmanaged.failed_to_convert_to_managed")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeUnmanagedConvertedToManaged), "access_code.unmanaged.converted_to_managed")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeBackupAccessCodePulled), "access_code.backup_access_code_pulled")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeDeletedExternalToSeam), "access_code.deleted_external_to_seam")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeModifiedExternalToSeam), "access_code.modified_external_to_seam")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeFailedToRemoveFromDevice), "access_code.failed_to_remove_from_device")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeDelayInRemovingFromDevice), "access_code.delay_in_removing_from_device")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeDeleted), "access_code.deleted")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeFailedToSetOnDevice), "access_code.failed_to_set_on_device")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeDelayInSettingOnDevice), "access_code.delay_in_setting_on_device")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeRemovedFromDevice), "access_code.removed_from_device")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeSetOnDevice), "access_code.set_on_device")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeScheduledOnDevice), "access_code.scheduled_on_device")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeMutationsRequested), "access_code.mutations_requested")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeTimeFrameChanged), "access_code.time_frame_changed")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeCodeChanged), "access_code.code_changed")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeNameChanged), "access_code.name_changed")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeChanged), "access_code.changed")] -[JsonSubtypes.KnownSubType(typeof(EventAccessCodeCreated), "access_code.created")] -public abstract class Event -{ -public abstract string EventType { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string? EventDescription { get; set; } - -public abstract string EventId { get; set; } - -public abstract string OccurredAt { get; set; } - -public abstract string WorkspaceId { get; set; } - -public abstract override string ToString(); -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was created. -/// -[DataContract(Name = "seamModel_eventAccessCodeCreated_model")] -public class EventAccessCodeCreated : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeCreated() { } - -public EventAccessCodeCreated(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.created"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed. -/// -[DataContract(Name = "seamModel_eventAccessCodeChanged_model")] -public class EventAccessCodeChanged : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeChanged() { } - -public EventAccessCodeChanged(string accessCodeId = default, string? changeReason = default, List? changedProperties = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ChangeReason = changeReason; -ChangedProperties = changedProperties; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Human-readable reason for the change (e.g. `ongoing code auto-renewed`). -/// -[DataMember(Name = "change_reason", IsRequired = false, EmitDefaultValue = false)] -public string? ChangeReason { get; set; } - -/// -/// List of properties that changed on the access code. -/// -[DataMember(Name = "changed_properties", IsRequired = false, EmitDefaultValue = false)] -public List? ChangedProperties { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.changed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeChangedChangedProperties_model")] -public class EventAccessCodeChangedChangedProperties -{ -[JsonConstructorAttribute] -protected EventAccessCodeChangedChangedProperties() { } - -public EventAccessCodeChangedChangedProperties(string? from = default, string property = default, string? to = default) -{ -From = from; -Property = property; -To = to; -} - -/// -/// Previous value of the property, or null if not set. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public string? From { get; set; } - -/// -/// Name of the property that changed (e.g. `code`). -/// -[DataMember(Name = "property", IsRequired = false, EmitDefaultValue = false)] -public string Property { get; set; } - -/// -/// New value of the property, or null if cleared. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public string? To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The name of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. -/// -[DataContract(Name = "seamModel_eventAccessCodeNameChanged_model")] -public class EventAccessCodeNameChanged : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeNameChanged() { } - -public EventAccessCodeNameChanged(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string description = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, EventAccessCodeNameChangedFrom from = default, string occurredAt = default, EventAccessCodeNameChangedTo to = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -Description = description; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -From = from; -OccurredAt = occurredAt; -To = to; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the change and its source. -/// -[DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] -public string Description { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.name_changed"; - -/// -/// Previous access code name configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public EventAccessCodeNameChangedFrom From { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// New access code name configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public EventAccessCodeNameChangedTo To { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeNameChangedFrom_model")] -public class EventAccessCodeNameChangedFrom -{ -[JsonConstructorAttribute] -protected EventAccessCodeNameChangedFrom() { } - -public EventAccessCodeNameChangedFrom(string? name = default) -{ -Name = name; -} - -/// -/// Previous name of the access code. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeNameChangedTo_model")] -public class EventAccessCodeNameChangedTo -{ -[JsonConstructorAttribute] -protected EventAccessCodeNameChangedTo() { } - -public EventAccessCodeNameChangedTo(string? name = default) -{ -Name = name; -} - -/// -/// New name of the access code. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The pin code of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. -/// -[DataContract(Name = "seamModel_eventAccessCodeCodeChanged_model")] -public class EventAccessCodeCodeChanged : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeCodeChanged() { } - -public EventAccessCodeCodeChanged(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string description = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, EventAccessCodeCodeChangedFrom from = default, string occurredAt = default, EventAccessCodeCodeChangedTo to = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -Description = description; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -From = from; -OccurredAt = occurredAt; -To = to; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the change and its source. -/// -[DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] -public string Description { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.code_changed"; - -/// -/// Previous pin code configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public EventAccessCodeCodeChangedFrom From { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// New pin code configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public EventAccessCodeCodeChangedTo To { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeCodeChangedFrom_model")] -public class EventAccessCodeCodeChangedFrom -{ -[JsonConstructorAttribute] -protected EventAccessCodeCodeChangedFrom() { } - -public EventAccessCodeCodeChangedFrom(string? code = default) -{ -Code = code; -} - -/// -/// Previous pin code. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeCodeChangedTo_model")] -public class EventAccessCodeCodeChangedTo -{ -[JsonConstructorAttribute] -protected EventAccessCodeCodeChangedTo() { } - -public EventAccessCodeCodeChangedTo(string? code = default) -{ -Code = code; -} - -/// -/// New pin code. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The time frame of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. -/// -[DataContract(Name = "seamModel_eventAccessCodeTimeFrameChanged_model")] -public class EventAccessCodeTimeFrameChanged : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeTimeFrameChanged() { } - -public EventAccessCodeTimeFrameChanged(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string description = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, EventAccessCodeTimeFrameChangedFrom from = default, string occurredAt = default, EventAccessCodeTimeFrameChangedTo to = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -Description = description; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -From = from; -OccurredAt = occurredAt; -To = to; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the change and its source. -/// -[DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] -public string Description { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.time_frame_changed"; - -/// -/// Previous time frame configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public EventAccessCodeTimeFrameChangedFrom From { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// New time frame configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public EventAccessCodeTimeFrameChangedTo To { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeTimeFrameChangedFrom_model")] -public class EventAccessCodeTimeFrameChangedFrom -{ -[JsonConstructorAttribute] -protected EventAccessCodeTimeFrameChangedFrom() { } - -public EventAccessCodeTimeFrameChangedFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Previous end time. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Previous start time. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeTimeFrameChangedTo_model")] -public class EventAccessCodeTimeFrameChangedTo -{ -[JsonConstructorAttribute] -protected EventAccessCodeTimeFrameChangedTo() { } - -public EventAccessCodeTimeFrameChangedTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// New end time. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// New start time. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Mutations were requested on an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). This event fires at request time, before the change is confirmed on the device. -/// -[DataContract(Name = "seamModel_eventAccessCodeMutationsRequested_model")] -public class EventAccessCodeMutationsRequested : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeMutationsRequested() { } - -public EventAccessCodeMutationsRequested(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, List requestedMutations = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -RequestedMutations = requestedMutations; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.mutations_requested"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Array of mutations requested on the access code, each containing the mutation type and from/to values. -/// -[DataMember(Name = "requested_mutations", IsRequired = false, EmitDefaultValue = false)] -public List RequestedMutations { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeMutationsRequestedRequestedMutations_model")] -public class EventAccessCodeMutationsRequestedRequestedMutations -{ -[JsonConstructorAttribute] -protected EventAccessCodeMutationsRequestedRequestedMutations() { } - -public EventAccessCodeMutationsRequestedRequestedMutations(object? from = default, EventAccessCodeMutationsRequestedRequestedMutations.MutationCodeEnum mutationCode = default, object? to = default) -{ -From = from; -MutationCode = mutationCode; -To = to; -} - -/// -/// Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum MutationCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "updating_name")] -UpdatingName = 1, - -[EnumMember(Value = "updating_code")] -UpdatingCode = 2, - -[EnumMember(Value = "updating_time_frame")] -UpdatingTimeFrame = 3, - -[EnumMember(Value = "deleting")] -Deleting = 4, - -[EnumMember(Value = "creating")] -Creating = 5, - -[EnumMember(Value = "deferring_creation")] -DeferringCreation = 6, -} - -/// -/// Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public object? From { get; set; } - -/// -/// Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. -/// -[DataMember(Name = "mutation_code", IsRequired = false, EmitDefaultValue = false)] -public EventAccessCodeMutationsRequestedRequestedMutations.MutationCodeEnum MutationCode { get; set; } - -/// -/// New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public object? To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) on a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeScheduledOnDevice_model")] -public class EventAccessCodeScheduledOnDevice : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeScheduledOnDevice() { } - -public EventAccessCodeScheduledOnDevice(string accessCodeId = default, string code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -Code = code; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Code for the affected access code. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string Code { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.scheduled_on_device"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was set on a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeSetOnDevice_model")] -public class EventAccessCodeSetOnDevice : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeSetOnDevice() { } - -public EventAccessCodeSetOnDevice(string accessCodeId = default, string code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -Code = code; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Code for the affected access code. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string Code { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.set_on_device"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was removed from a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeRemovedFromDevice_model")] -public class EventAccessCodeRemovedFromDevice : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeRemovedFromDevice() { } - -public EventAccessCodeRemovedFromDevice(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.removed_from_device"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// There was an unusually long delay in setting an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) on a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDevice_model")] -public class EventAccessCodeDelayInSettingOnDevice : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInSettingOnDevice() { } - -public EventAccessCodeDelayInSettingOnDevice(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeErrors = accessCodeErrors; -AccessCodeId = accessCodeId; -AccessCodeWarnings = accessCodeWarnings; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Errors associated with the access code. -/// -[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeErrors { get; set; } - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Warnings associated with the access code. -/// -[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeWarnings { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.delay_in_setting_on_device"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceAccessCodeErrors_model")] -public class EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors() { } - -public EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings_model")] -public class EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings() { } - -public EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors_model")] -public class EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors() { } - -public EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings_model")] -public class EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings() { } - -public EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceDeviceErrors_model")] -public class EventAccessCodeDelayInSettingOnDeviceDeviceErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInSettingOnDeviceDeviceErrors() { } - -public EventAccessCodeDelayInSettingOnDeviceDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceDeviceWarnings_model")] -public class EventAccessCodeDelayInSettingOnDeviceDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInSettingOnDeviceDeviceWarnings() { } - -public EventAccessCodeDelayInSettingOnDeviceDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) failed to be set on a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDevice_model")] -public class EventAccessCodeFailedToSetOnDevice : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToSetOnDevice() { } - -public EventAccessCodeFailedToSetOnDevice(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeErrors = accessCodeErrors; -AccessCodeId = accessCodeId; -AccessCodeWarnings = accessCodeWarnings; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Errors associated with the access code. -/// -[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeErrors { get; set; } - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Warnings associated with the access code. -/// -[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeWarnings { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.failed_to_set_on_device"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceAccessCodeErrors_model")] -public class EventAccessCodeFailedToSetOnDeviceAccessCodeErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToSetOnDeviceAccessCodeErrors() { } - -public EventAccessCodeFailedToSetOnDeviceAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceAccessCodeWarnings_model")] -public class EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings() { } - -public EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceConnectedAccountErrors_model")] -public class EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors() { } - -public EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings_model")] -public class EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings() { } - -public EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceDeviceErrors_model")] -public class EventAccessCodeFailedToSetOnDeviceDeviceErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToSetOnDeviceDeviceErrors() { } - -public EventAccessCodeFailedToSetOnDeviceDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceDeviceWarnings_model")] -public class EventAccessCodeFailedToSetOnDeviceDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToSetOnDeviceDeviceWarnings() { } - -public EventAccessCodeFailedToSetOnDeviceDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was deleted. -/// -[DataContract(Name = "seamModel_eventAccessCodeDeleted_model")] -public class EventAccessCodeDeleted : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeDeleted() { } - -public EventAccessCodeDeleted(string accessCodeId = default, string? code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -Code = code; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Code for the affected access code. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// There was an unusually long delay in removing an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) from a device. -/// -[Obsolete("Seam no longer emits this event. Use `access_code.failed_to_remove_from_device` instead.")] -[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDevice_model")] -public class EventAccessCodeDelayInRemovingFromDevice : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInRemovingFromDevice() { } - -public EventAccessCodeDelayInRemovingFromDevice(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeErrors = accessCodeErrors; -AccessCodeId = accessCodeId; -AccessCodeWarnings = accessCodeWarnings; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Errors associated with the access code. -/// -[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeErrors { get; set; } - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Warnings associated with the access code. -/// -[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeWarnings { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.delay_in_removing_from_device"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors_model")] -public class EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors() { } - -public EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings_model")] -public class EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings() { } - -public EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors_model")] -public class EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors() { } - -public EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings_model")] -public class EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings() { } - -public EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceDeviceErrors_model")] -public class EventAccessCodeDelayInRemovingFromDeviceDeviceErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInRemovingFromDeviceDeviceErrors() { } - -public EventAccessCodeDelayInRemovingFromDeviceDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceDeviceWarnings_model")] -public class EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings() { } - -public EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) failed to be removed from a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDevice_model")] -public class EventAccessCodeFailedToRemoveFromDevice : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToRemoveFromDevice() { } - -public EventAccessCodeFailedToRemoveFromDevice(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeErrors = accessCodeErrors; -AccessCodeId = accessCodeId; -AccessCodeWarnings = accessCodeWarnings; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Errors associated with the access code. -/// -[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeErrors { get; set; } - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Warnings associated with the access code. -/// -[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeWarnings { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.failed_to_remove_from_device"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors_model")] -public class EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors() { } - -public EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings_model")] -public class EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings() { } - -public EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors_model")] -public class EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors() { } - -public EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings_model")] -public class EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings() { } - -public EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceDeviceErrors_model")] -public class EventAccessCodeFailedToRemoveFromDeviceDeviceErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToRemoveFromDeviceDeviceErrors() { } - -public EventAccessCodeFailedToRemoveFromDeviceDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceDeviceWarnings_model")] -public class EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings() { } - -public EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was modified outside of Seam. -/// -[DataContract(Name = "seamModel_eventAccessCodeModifiedExternalToSeam_model")] -public class EventAccessCodeModifiedExternalToSeam : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeModifiedExternalToSeam() { } - -public EventAccessCodeModifiedExternalToSeam(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.modified_external_to_seam"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was deleted outside of Seam. -/// -[DataContract(Name = "seamModel_eventAccessCodeDeletedExternalToSeam_model")] -public class EventAccessCodeDeletedExternalToSeam : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeDeletedExternalToSeam() { } - -public EventAccessCodeDeletedExternalToSeam(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.deleted_external_to_seam"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [backup access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) was pulled from the backup access code pool and set on a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeBackupAccessCodePulled_model")] -public class EventAccessCodeBackupAccessCodePulled : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeBackupAccessCodePulled() { } - -public EventAccessCodeBackupAccessCodePulled(string accessCodeId = default, string backupAccessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -BackupAccessCodeId = backupAccessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// ID of the backup access code that was pulled from the pool. -/// -[DataMember(Name = "backup_access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string BackupAccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.backup_access_code_pulled"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was converted successfully to a managed access code. -/// -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedConvertedToManaged_model")] -public class EventAccessCodeUnmanagedConvertedToManaged : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedConvertedToManaged() { } - -public EventAccessCodeUnmanagedConvertedToManaged(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.unmanaged.converted_to_managed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) failed to be converted to a managed access code. -/// -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManaged_model")] -public class EventAccessCodeUnmanagedFailedToConvertToManaged : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedFailedToConvertToManaged() { } - -public EventAccessCodeUnmanagedFailedToConvertToManaged(List accessCodeErrors = default, string accessCodeId = default, List accessCodeWarnings = default, object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeErrors = accessCodeErrors; -AccessCodeId = accessCodeId; -AccessCodeWarnings = accessCodeWarnings; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Errors associated with the access code. -/// -[DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeErrors { get; set; } - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Warnings associated with the access code. -/// -[DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] -public List AccessCodeWarnings { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.unmanaged.failed_to_convert_to_managed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors_model")] -public class EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors() { } - -public EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings_model")] -public class EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings() { } - -public EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors_model")] -public class EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors() { } - -public EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings_model")] -public class EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings() { } - -public EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors_model")] -public class EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors() { } - -public EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings_model")] -public class EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings() { } - -public EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was created on a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedCreated_model")] -public class EventAccessCodeUnmanagedCreated : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedCreated() { } - -public EventAccessCodeUnmanagedCreated(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.unmanaged.created"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was removed from a device. -/// -[DataContract(Name = "seamModel_eventAccessCodeUnmanagedRemoved_model")] -public class EventAccessCodeUnmanagedRemoved : Event -{ -[JsonConstructorAttribute] -protected EventAccessCodeUnmanagedRemoved() { } - -public EventAccessCodeUnmanagedRemoved(string accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the affected access code. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the device associated with the affected access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_code.unmanaged.removed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An Access Grant was created. -/// -[DataContract(Name = "seamModel_eventAccessGrantCreated_model")] -public class EventAccessGrantCreated : Event -{ -[JsonConstructorAttribute] -protected EventAccessGrantCreated() { } - -public EventAccessGrantCreated(string accessGrantId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_grant.created"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An Access Grant was deleted. -/// -[DataContract(Name = "seamModel_eventAccessGrantDeleted_model")] -public class EventAccessGrantDeleted : Event -{ -[JsonConstructorAttribute] -protected EventAccessGrantDeleted() { } - -public EventAccessGrantDeleted(string accessGrantId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_grant.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// All access requested for an Access Grant was successfully granted. -/// -[DataContract(Name = "seamModel_eventAccessGrantAccessGrantedToAllDoors_model")] -public class EventAccessGrantAccessGrantedToAllDoors : Event -{ -[JsonConstructorAttribute] -protected EventAccessGrantAccessGrantedToAllDoors() { } - -public EventAccessGrantAccessGrantedToAllDoors(string accessGrantId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_grant.access_granted_to_all_doors"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Access requested as part of an Access Grant to a particular door was successfully granted. -/// -[DataContract(Name = "seamModel_eventAccessGrantAccessGrantedToDoor_model")] -public class EventAccessGrantAccessGrantedToDoor : Event -{ -[JsonConstructorAttribute] -protected EventAccessGrantAccessGrantedToDoor() { } - -public EventAccessGrantAccessGrantedToDoor(string accessGrantId = default, string acsEntranceId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -AcsEntranceId = acsEntranceId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// ID of the affected [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_grant.access_granted_to_door"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Access to a particular door that was requested as part of an Access Grant was lost. -/// -[DataContract(Name = "seamModel_eventAccessGrantAccessToDoorLost_model")] -public class EventAccessGrantAccessToDoorLost : Event -{ -[JsonConstructorAttribute] -protected EventAccessGrantAccessToDoorLost() { } - -public EventAccessGrantAccessToDoorLost(string accessGrantId = default, string acsEntranceId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -AcsEntranceId = acsEntranceId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// ID of the affected [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_grant.access_to_door_lost"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An Access Grant's start or end time was changed. -/// -[DataContract(Name = "seamModel_eventAccessGrantAccessTimesChanged_model")] -public class EventAccessGrantAccessTimesChanged : Event -{ -[JsonConstructorAttribute] -protected EventAccessGrantAccessTimesChanged() { } - -public EventAccessGrantAccessTimesChanged(string accessGrantId = default, string? accessGrantKey = default, string createdAt = default, string? endsAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string? startsAt = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -AccessGrantKey = accessGrantKey; -CreatedAt = createdAt; -EndsAt = endsAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -StartsAt = startsAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// Key of the affected Access Grant (if present). -/// -[DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] -public string? AccessGrantKey { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The new end time for the access grant. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_grant.access_times_changed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// The new start time for the access grant. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// One or more requested access methods could not be created for an Access Grant. -/// -[DataContract(Name = "seamModel_eventAccessGrantCouldNotCreateRequestedAccessMethods_model")] -public class EventAccessGrantCouldNotCreateRequestedAccessMethods : Event -{ -[JsonConstructorAttribute] -protected EventAccessGrantCouldNotCreateRequestedAccessMethods() { } - -public EventAccessGrantCouldNotCreateRequestedAccessMethods(string accessGrantId = default, string createdAt = default, string errorMessage = default, string? eventDescription = default, string eventId = default, string eventType = default, List? missingDeviceIds = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -CreatedAt = createdAt; -ErrorMessage = errorMessage; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -MissingDeviceIds = missingDeviceIds; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Description of why the access methods could not be created. -/// -[DataMember(Name = "error_message", IsRequired = false, EmitDefaultValue = false)] -public string ErrorMessage { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_grant.could_not_create_requested_access_methods"; - -/// -/// IDs of the devices that did not receive a requested access method. Use these to identify which specific devices failed without having to fetch the Access Grant. -/// -[DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? MissingDeviceIds { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An access method was issued. -/// -[DataContract(Name = "seamModel_eventAccessMethodIssued_model")] -public class EventAccessMethodIssued : Event -{ -[JsonConstructorAttribute] -protected EventAccessMethodIssued() { } - -public EventAccessMethodIssued(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string? code = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, bool? isBackupCode = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -AccessMethodId = accessMethodId; -Code = code; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -IsBackupCode = isBackupCode; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// IDs of the access grants associated with this access method. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrantIds { get; set; } - -/// -/// Keys of the access grants associated with this access method (if present). -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// ID of the affected access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// The actual PIN code for code access methods (only present when mode is 'code'). -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_method.issued"; - -/// -/// Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). -/// -[DataMember(Name = "is_backup_code", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBackupCode { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An access method was revoked. -/// -[DataContract(Name = "seamModel_eventAccessMethodRevoked_model")] -public class EventAccessMethodRevoked : Event -{ -[JsonConstructorAttribute] -protected EventAccessMethodRevoked() { } - -public EventAccessMethodRevoked(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -AccessMethodId = accessMethodId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// IDs of the access grants associated with this access method. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrantIds { get; set; } - -/// -/// Keys of the access grants associated with this access method (if present). -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// ID of the affected access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_method.revoked"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An access method representing a physical card requires encoding. -/// -[DataContract(Name = "seamModel_eventAccessMethodCardEncodingRequired_model")] -public class EventAccessMethodCardEncodingRequired : Event -{ -[JsonConstructorAttribute] -protected EventAccessMethodCardEncodingRequired() { } - -public EventAccessMethodCardEncodingRequired(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -AccessMethodId = accessMethodId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// IDs of the access grants associated with this access method. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrantIds { get; set; } - -/// -/// Keys of the access grants associated with this access method (if present). -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// ID of the affected access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_method.card_encoding_required"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An access method was deleted. -/// -[DataContract(Name = "seamModel_eventAccessMethodDeleted_model")] -public class EventAccessMethodDeleted : Event -{ -[JsonConstructorAttribute] -protected EventAccessMethodDeleted() { } - -public EventAccessMethodDeleted(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -AccessMethodId = accessMethodId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// IDs of the access grants associated with this access method. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrantIds { get; set; } - -/// -/// Keys of the access grants associated with this access method (if present). -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// ID of the affected access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_method.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An access method was reissued. -/// -[DataContract(Name = "seamModel_eventAccessMethodReissued_model")] -public class EventAccessMethodReissued : Event -{ -[JsonConstructorAttribute] -protected EventAccessMethodReissued() { } - -public EventAccessMethodReissued(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string? code = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, bool? isBackupCode = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -AccessMethodId = accessMethodId; -Code = code; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -IsBackupCode = isBackupCode; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// IDs of the access grants associated with this access method. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrantIds { get; set; } - -/// -/// Keys of the access grants associated with this access method (if present). -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// ID of the affected access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// The actual PIN code for code access methods (only present when mode is 'code'). -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_method.reissued"; - -/// -/// Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). -/// -[DataMember(Name = "is_backup_code", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBackupCode { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An access method was created. -/// -[DataContract(Name = "seamModel_eventAccessMethodCreated_model")] -public class EventAccessMethodCreated : Event -{ -[JsonConstructorAttribute] -protected EventAccessMethodCreated() { } - -public EventAccessMethodCreated(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -AccessMethodId = accessMethodId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// IDs of the access grants associated with this access method. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrantIds { get; set; } - -/// -/// Keys of the access grants associated with this access method (if present). -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// ID of the affected access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_method.created"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Seam has not yet issued this access method, even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and the accompanying `delay_in_issuing` warning clears automatically once issuance succeeds. -/// -[DataContract(Name = "seamModel_eventAccessMethodDelayInIssuing_model")] -public class EventAccessMethodDelayInIssuing : Event -{ -[JsonConstructorAttribute] -protected EventAccessMethodDelayInIssuing() { } - -public EventAccessMethodDelayInIssuing(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -AccessMethodId = accessMethodId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// IDs of the access grants associated with this access method. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrantIds { get; set; } - -/// -/// Keys of the access grants associated with this access method (if present). -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// ID of the affected access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_method.delay_in_issuing"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Seam was unable to issue this access method before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and the accompanying `failed_to_issue` error clears automatically if the access method is eventually issued. -/// -[DataContract(Name = "seamModel_eventAccessMethodFailedToIssue_model")] -public class EventAccessMethodFailedToIssue : Event -{ -[JsonConstructorAttribute] -protected EventAccessMethodFailedToIssue() { } - -public EventAccessMethodFailedToIssue(List accessGrantIds = default, List? accessGrantKeys = default, string accessMethodId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessGrantIds = accessGrantIds; -AccessGrantKeys = accessGrantKeys; -AccessMethodId = accessMethodId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// IDs of the access grants associated with this access method. -/// -[DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessGrantIds { get; set; } - -/// -/// Keys of the access grants associated with this access method (if present). -/// -[DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] -public List? AccessGrantKeys { get; set; } - -/// -/// ID of the affected access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "access_method.failed_to_issue"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was connected. -/// -[DataContract(Name = "seamModel_eventAcsSystemConnected_model")] -public class EventAcsSystemConnected : Event -{ -[JsonConstructorAttribute] -protected EventAcsSystemConnected() { } - -public EventAcsSystemConnected(string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_system.connected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was added. -/// -[DataContract(Name = "seamModel_eventAcsSystemAdded_model")] -public class EventAcsSystemAdded : Event -{ -[JsonConstructorAttribute] -protected EventAcsSystemAdded() { } - -public EventAcsSystemAdded(string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_system.added"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was disconnected. -/// -[DataContract(Name = "seamModel_eventAcsSystemDisconnected_model")] -public class EventAcsSystemDisconnected : Event -{ -[JsonConstructorAttribute] -protected EventAcsSystemDisconnected() { } - -public EventAcsSystemDisconnected(List acsSystemErrors = default, string acsSystemId = default, List acsSystemWarnings = default, List connectedAccountErrors = default, string? connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsSystemErrors = acsSystemErrors; -AcsSystemId = acsSystemId; -AcsSystemWarnings = acsSystemWarnings; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Errors associated with the access control system. -/// -[DataMember(Name = "acs_system_errors", IsRequired = false, EmitDefaultValue = false)] -public List AcsSystemErrors { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// Warnings associated with the access control system. -/// -[DataMember(Name = "acs_system_warnings", IsRequired = false, EmitDefaultValue = false)] -public List AcsSystemWarnings { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_system.disconnected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAcsSystemDisconnectedAcsSystemErrors_model")] -public class EventAcsSystemDisconnectedAcsSystemErrors -{ -[JsonConstructorAttribute] -protected EventAcsSystemDisconnectedAcsSystemErrors() { } - -public EventAcsSystemDisconnectedAcsSystemErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAcsSystemDisconnectedAcsSystemWarnings_model")] -public class EventAcsSystemDisconnectedAcsSystemWarnings -{ -[JsonConstructorAttribute] -protected EventAcsSystemDisconnectedAcsSystemWarnings() { } - -public EventAcsSystemDisconnectedAcsSystemWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAcsSystemDisconnectedConnectedAccountErrors_model")] -public class EventAcsSystemDisconnectedConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventAcsSystemDisconnectedConnectedAccountErrors() { } - -public EventAcsSystemDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventAcsSystemDisconnectedConnectedAccountWarnings_model")] -public class EventAcsSystemDisconnectedConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventAcsSystemDisconnectedConnectedAccountWarnings() { } - -public EventAcsSystemDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was deleted. -/// -[DataContract(Name = "seamModel_eventAcsCredentialDeleted_model")] -public class EventAcsCredentialDeleted : Event -{ -[JsonConstructorAttribute] -protected EventAcsCredentialDeleted() { } - -public EventAcsCredentialDeleted(string acsCredentialId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsCredentialId = acsCredentialId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected credential. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_credential.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was issued. -/// -[DataContract(Name = "seamModel_eventAcsCredentialIssued_model")] -public class EventAcsCredentialIssued : Event -{ -[JsonConstructorAttribute] -protected EventAcsCredentialIssued() { } - -public EventAcsCredentialIssued(string acsCredentialId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsCredentialId = acsCredentialId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected credential. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_credential.issued"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was reissued. -/// -[DataContract(Name = "seamModel_eventAcsCredentialReissued_model")] -public class EventAcsCredentialReissued : Event -{ -[JsonConstructorAttribute] -protected EventAcsCredentialReissued() { } - -public EventAcsCredentialReissued(string acsCredentialId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsCredentialId = acsCredentialId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected credential. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_credential.reissued"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was invalidated. That is, the credential cannot be used anymore. -/// -[DataContract(Name = "seamModel_eventAcsCredentialInvalidated_model")] -public class EventAcsCredentialInvalidated : Event -{ -[JsonConstructorAttribute] -protected EventAcsCredentialInvalidated() { } - -public EventAcsCredentialInvalidated(string acsCredentialId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsCredentialId = acsCredentialId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected credential. -/// -[DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsCredentialId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_credential.invalidated"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was created. -/// -[DataContract(Name = "seamModel_eventAcsUserCreated_model")] -public class EventAcsUserCreated : Event -{ -[JsonConstructorAttribute] -protected EventAcsUserCreated() { } - -public EventAcsUserCreated(string acsSystemId = default, string acsUserId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the affected access system user. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsUserId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_user.created"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was deleted. -/// -[DataContract(Name = "seamModel_eventAcsUserDeleted_model")] -public class EventAcsUserDeleted : Event -{ -[JsonConstructorAttribute] -protected EventAcsUserDeleted() { } - -public EventAcsUserDeleted(string acsSystemId = default, string acsUserId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the affected access system user. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsUserId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_user.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was added. -/// -[DataContract(Name = "seamModel_eventAcsEncoderAdded_model")] -public class EventAcsEncoderAdded : Event -{ -[JsonConstructorAttribute] -protected EventAcsEncoderAdded() { } - -public EventAcsEncoderAdded(string acsEncoderId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsEncoderId = acsEncoderId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected encoder. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_encoder.added"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was removed. -/// -[DataContract(Name = "seamModel_eventAcsEncoderRemoved_model")] -public class EventAcsEncoderRemoved : Event -{ -[JsonConstructorAttribute] -protected EventAcsEncoderRemoved() { } - -public EventAcsEncoderRemoved(string acsEncoderId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsEncoderId = acsEncoderId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected encoder. -/// -[DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsEncoderId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_encoder.removed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An ACS access group was deleted. -/// -[DataContract(Name = "seamModel_eventAcsAccessGroupDeleted_model")] -public class EventAcsAccessGroupDeleted : Event -{ -[JsonConstructorAttribute] -protected EventAcsAccessGroupDeleted() { } - -public EventAcsAccessGroupDeleted(string acsAccessGroupId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsAccessGroupId = acsAccessGroupId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected access group. -/// -[DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsAccessGroupId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_access_group.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was added. -/// -[DataContract(Name = "seamModel_eventAcsEntranceAdded_model")] -public class EventAcsEntranceAdded : Event -{ -[JsonConstructorAttribute] -protected EventAcsEntranceAdded() { } - -public EventAcsEntranceAdded(string acsEntranceId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsEntranceId = acsEntranceId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected entrance. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_entrance.added"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was removed. -/// -[DataContract(Name = "seamModel_eventAcsEntranceRemoved_model")] -public class EventAcsEntranceRemoved : Event -{ -[JsonConstructorAttribute] -protected EventAcsEntranceRemoved() { } - -public EventAcsEntranceRemoved(string acsEntranceId = default, string acsSystemId = default, string? connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AcsEntranceId = acsEntranceId; -AcsSystemId = acsSystemId; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected entrance. -/// -[DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsEntranceId { get; set; } - -/// -/// ID of the access system. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public string AcsSystemId { get; set; } - -/// -/// ID of the connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "acs_entrance.removed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A client session was deleted. -/// -[DataContract(Name = "seamModel_eventClientSessionDeleted_model")] -public class EventClientSessionDeleted : Event -{ -[JsonConstructorAttribute] -protected EventClientSessionDeleted() { } - -public EventClientSessionDeleted(string clientSessionId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ClientSessionId = clientSessionId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected client session. -/// -[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] -public string ClientSessionId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "client_session.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A connected account was connected for the first time or was reconnected after being disconnected. -/// -[DataContract(Name = "seamModel_eventConnectedAccountConnected_model")] -public class EventConnectedAccountConnected : Event -{ -[JsonConstructorAttribute] -protected EventConnectedAccountConnected() { } - -public EventConnectedAccountConnected(string? connectWebviewId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the Connect Webview associated with the event. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectWebviewId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the affected connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with this connected account, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connected_account.connected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A connected account was created. -/// -[DataContract(Name = "seamModel_eventConnectedAccountCreated_model")] -public class EventConnectedAccountCreated : Event -{ -[JsonConstructorAttribute] -protected EventConnectedAccountCreated() { } - -public EventConnectedAccountCreated(string connectWebviewId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the Connect Webview associated with the event. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectWebviewId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the affected connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connected_account.created"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A connected account had a successful login using a Connect Webview. -/// -[Obsolete("Use `connect_webview.login_succeeded`.")] -[DataContract(Name = "seamModel_eventConnectedAccountSuccessfulLogin_model")] -public class EventConnectedAccountSuccessfulLogin : Event -{ -[JsonConstructorAttribute] -protected EventConnectedAccountSuccessfulLogin() { } - -public EventConnectedAccountSuccessfulLogin(string connectWebviewId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the Connect Webview associated with the event. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectWebviewId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the affected connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connected_account.successful_login"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A connected account was disconnected. -/// -[DataContract(Name = "seamModel_eventConnectedAccountDisconnected_model")] -public class EventConnectedAccountDisconnected : Event -{ -[JsonConstructorAttribute] -protected EventConnectedAccountDisconnected() { } - -public EventConnectedAccountDisconnected(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the affected connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connected_account.disconnected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventConnectedAccountDisconnectedConnectedAccountErrors_model")] -public class EventConnectedAccountDisconnectedConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventConnectedAccountDisconnectedConnectedAccountErrors() { } - -public EventConnectedAccountDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventConnectedAccountDisconnectedConnectedAccountWarnings_model")] -public class EventConnectedAccountDisconnectedConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventConnectedAccountDisconnectedConnectedAccountWarnings() { } - -public EventConnectedAccountDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A connected account completed the first sync with Seam, and the corresponding devices or systems are now available. -/// -[DataContract(Name = "seamModel_eventConnectedAccountCompletedFirstSync_model")] -public class EventConnectedAccountCompletedFirstSync : Event -{ -[JsonConstructorAttribute] -protected EventConnectedAccountCompletedFirstSync() { } - -public EventConnectedAccountCompletedFirstSync(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the affected connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connected_account.completed_first_sync"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A connected account was deleted. -/// -[DataContract(Name = "seamModel_eventConnectedAccountDeleted_model")] -public class EventConnectedAccountDeleted : Event -{ -[JsonConstructorAttribute] -protected EventConnectedAccountDeleted() { } - -public EventConnectedAccountDeleted(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the affected connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with this connected account, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connected_account.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A connected account completed the first sync after reconnection with Seam, and the corresponding devices or systems are now available. -/// -[DataContract(Name = "seamModel_eventConnectedAccountCompletedFirstSyncAfterReconnection_model")] -public class EventConnectedAccountCompletedFirstSyncAfterReconnection : Event -{ -[JsonConstructorAttribute] -protected EventConnectedAccountCompletedFirstSyncAfterReconnection() { } - -public EventConnectedAccountCompletedFirstSyncAfterReconnection(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the affected connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connected_account.completed_first_sync_after_reconnection"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A connected account requires reauthorization using a new Connect Webview. The account is still connected, but cannot access new features. Delaying reauthorization too long will eventually cause the Connected Account to become disconnected. -/// -[DataContract(Name = "seamModel_eventConnectedAccountReauthorizationRequested_model")] -public class EventConnectedAccountReauthorizationRequested : Event -{ -[JsonConstructorAttribute] -protected EventConnectedAccountReauthorizationRequested() { } - -public EventConnectedAccountReauthorizationRequested(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the affected connected account. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connected_account.reauthorization_requested"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventConnectedAccountReauthorizationRequestedConnectedAccountErrors_model")] -public class EventConnectedAccountReauthorizationRequestedConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventConnectedAccountReauthorizationRequestedConnectedAccountErrors() { } - -public EventConnectedAccountReauthorizationRequestedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventConnectedAccountReauthorizationRequestedConnectedAccountWarnings_model")] -public class EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings() { } - -public EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A lock door action attempt succeeded. -/// -[DataContract(Name = "seamModel_eventActionAttemptLockDoorSucceeded_model")] -public class EventActionAttemptLockDoorSucceeded : Event -{ -[JsonConstructorAttribute] -protected EventActionAttemptLockDoorSucceeded() { } - -public EventActionAttemptLockDoorSucceeded(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Status = status; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -/// -/// Type of the action. -/// -[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] -public string ActionType { get; set; } - -/// -/// ID of the connected account associated with the action attempt, if applicable. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device associated with the action attempt, if applicable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "action_attempt.lock_door.succeeded"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Status of the action. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public string Status { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A lock door action attempt failed. -/// -[DataContract(Name = "seamModel_eventActionAttemptLockDoorFailed_model")] -public class EventActionAttemptLockDoorFailed : Event -{ -[JsonConstructorAttribute] -protected EventActionAttemptLockDoorFailed() { } - -public EventActionAttemptLockDoorFailed(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Status = status; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -/// -/// Type of the action. -/// -[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] -public string ActionType { get; set; } - -/// -/// ID of the connected account associated with the action attempt, if applicable. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device associated with the action attempt, if applicable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "action_attempt.lock_door.failed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Status of the action. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public string Status { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An unlock door action attempt succeeded. -/// -[DataContract(Name = "seamModel_eventActionAttemptUnlockDoorSucceeded_model")] -public class EventActionAttemptUnlockDoorSucceeded : Event -{ -[JsonConstructorAttribute] -protected EventActionAttemptUnlockDoorSucceeded() { } - -public EventActionAttemptUnlockDoorSucceeded(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Status = status; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -/// -/// Type of the action. -/// -[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] -public string ActionType { get; set; } - -/// -/// ID of the connected account associated with the action attempt, if applicable. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device associated with the action attempt, if applicable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "action_attempt.unlock_door.succeeded"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Status of the action. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public string Status { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An unlock door action attempt failed. -/// -[DataContract(Name = "seamModel_eventActionAttemptUnlockDoorFailed_model")] -public class EventActionAttemptUnlockDoorFailed : Event -{ -[JsonConstructorAttribute] -protected EventActionAttemptUnlockDoorFailed() { } - -public EventActionAttemptUnlockDoorFailed(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Status = status; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -/// -/// Type of the action. -/// -[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] -public string ActionType { get; set; } - -/// -/// ID of the connected account associated with the action attempt, if applicable. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device associated with the action attempt, if applicable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "action_attempt.unlock_door.failed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Status of the action. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public string Status { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A simulate keypad code entry action attempt succeeded. -/// -[DataContract(Name = "seamModel_eventActionAttemptSimulateKeypadCodeEntrySucceeded_model")] -public class EventActionAttemptSimulateKeypadCodeEntrySucceeded : Event -{ -[JsonConstructorAttribute] -protected EventActionAttemptSimulateKeypadCodeEntrySucceeded() { } - -public EventActionAttemptSimulateKeypadCodeEntrySucceeded(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Status = status; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -/// -/// Type of the action. -/// -[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] -public string ActionType { get; set; } - -/// -/// ID of the connected account associated with the action attempt, if applicable. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device associated with the action attempt, if applicable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "action_attempt.simulate_keypad_code_entry.succeeded"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Status of the action. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public string Status { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A simulate keypad code entry action attempt failed. -/// -[DataContract(Name = "seamModel_eventActionAttemptSimulateKeypadCodeEntryFailed_model")] -public class EventActionAttemptSimulateKeypadCodeEntryFailed : Event -{ -[JsonConstructorAttribute] -protected EventActionAttemptSimulateKeypadCodeEntryFailed() { } - -public EventActionAttemptSimulateKeypadCodeEntryFailed(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Status = status; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -/// -/// Type of the action. -/// -[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] -public string ActionType { get; set; } - -/// -/// ID of the connected account associated with the action attempt, if applicable. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device associated with the action attempt, if applicable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "action_attempt.simulate_keypad_code_entry.failed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Status of the action. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public string Status { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A simulate manual lock via keypad action attempt succeeded. -/// -[DataContract(Name = "seamModel_eventActionAttemptSimulateManualLockViaKeypadSucceeded_model")] -public class EventActionAttemptSimulateManualLockViaKeypadSucceeded : Event -{ -[JsonConstructorAttribute] -protected EventActionAttemptSimulateManualLockViaKeypadSucceeded() { } - -public EventActionAttemptSimulateManualLockViaKeypadSucceeded(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Status = status; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -/// -/// Type of the action. -/// -[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] -public string ActionType { get; set; } - -/// -/// ID of the connected account associated with the action attempt, if applicable. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device associated with the action attempt, if applicable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "action_attempt.simulate_manual_lock_via_keypad.succeeded"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Status of the action. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public string Status { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A simulate manual lock via keypad action attempt failed. -/// -[DataContract(Name = "seamModel_eventActionAttemptSimulateManualLockViaKeypadFailed_model")] -public class EventActionAttemptSimulateManualLockViaKeypadFailed : Event -{ -[JsonConstructorAttribute] -protected EventActionAttemptSimulateManualLockViaKeypadFailed() { } - -public EventActionAttemptSimulateManualLockViaKeypadFailed(string actionAttemptId = default, string actionType = default, string? connectedAccountId = default, string createdAt = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string status = default, string workspaceId = default) -{ -ActionAttemptId = actionAttemptId; -ActionType = actionType; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Status = status; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected action attempt. -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string ActionAttemptId { get; set; } - -/// -/// Type of the action. -/// -[DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] -public string ActionType { get; set; } - -/// -/// ID of the connected account associated with the action attempt, if applicable. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device associated with the action attempt, if applicable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "action_attempt.simulate_manual_lock_via_keypad.failed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Status of the action. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public string Status { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A Connect Webview login succeeded. -/// -[DataContract(Name = "seamModel_eventConnectWebviewLoginSucceeded_model")] -public class EventConnectWebviewLoginSucceeded : Event -{ -[JsonConstructorAttribute] -protected EventConnectWebviewLoginSucceeded() { } - -public EventConnectWebviewLoginSucceeded(string connectWebviewId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectWebviewId = connectWebviewId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Connect Webview. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectWebviewId { get; set; } - -/// -/// Custom metadata of the connected account; present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with this connect webview, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connect_webview.login_succeeded"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A Connect Webview login failed. -/// -[DataContract(Name = "seamModel_eventConnectWebviewLoginFailed_model")] -public class EventConnectWebviewLoginFailed : Event -{ -[JsonConstructorAttribute] -protected EventConnectWebviewLoginFailed() { } - -public EventConnectWebviewLoginFailed(string connectWebviewId = default, string createdAt = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectWebviewId = connectWebviewId; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// ID of the affected Connect Webview. -/// -[DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectWebviewId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "connect_webview.login_failed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The status of a device changed from offline to online. That is, the `device.properties.online` property changed from `false` to `true`. Note that some devices operate entirely in offline mode, so Seam never emits a `device.connected` event for these devices. -/// -[DataContract(Name = "seamModel_eventDeviceConnected_model")] -public class EventDeviceConnected : Event -{ -[JsonConstructorAttribute] -protected EventDeviceConnected() { } - -public EventDeviceConnected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.connected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A device was added to Seam or was re-added to Seam after having been removed. -/// -[DataContract(Name = "seamModel_eventDeviceAdded_model")] -public class EventDeviceAdded : Event -{ -[JsonConstructorAttribute] -protected EventDeviceAdded() { } - -public EventDeviceAdded(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.added"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A managed device was successfully converted to an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). -/// -[DataContract(Name = "seamModel_eventDeviceConvertedToUnmanaged_model")] -public class EventDeviceConvertedToUnmanaged : Event -{ -[JsonConstructorAttribute] -protected EventDeviceConvertedToUnmanaged() { } - -public EventDeviceConvertedToUnmanaged(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.converted_to_unmanaged"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) was successfully converted to a managed device. -/// -[DataContract(Name = "seamModel_eventDeviceUnmanagedConvertedToManaged_model")] -public class EventDeviceUnmanagedConvertedToManaged : Event -{ -[JsonConstructorAttribute] -protected EventDeviceUnmanagedConvertedToManaged() { } - -public EventDeviceUnmanagedConvertedToManaged(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.unmanaged.converted_to_managed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The status of an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) changed from offline to online. That is, the `device.properties.online` property changed from `false` to `true`. -/// -[DataContract(Name = "seamModel_eventDeviceUnmanagedConnected_model")] -public class EventDeviceUnmanagedConnected : Event -{ -[JsonConstructorAttribute] -protected EventDeviceUnmanagedConnected() { } - -public EventDeviceUnmanagedConnected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.unmanaged.connected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The status of a device changed from online to offline. That is, the `device.properties.online` property changed from `true` to `false`. -/// -[DataContract(Name = "seamModel_eventDeviceDisconnected_model")] -public class EventDeviceDisconnected : Event -{ -[JsonConstructorAttribute] -protected EventDeviceDisconnected() { } - -public EventDeviceDisconnected(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, EventDeviceDisconnected.ErrorCodeEnum errorCode = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -ErrorCode = errorCode; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Error code associated with the disconnection event, if any. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ErrorCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "account_disconnected")] -AccountDisconnected = 1, - -[EnumMember(Value = "hub_disconnected")] -HubDisconnected = 2, - -[EnumMember(Value = "device_disconnected")] -DeviceDisconnected = 3, -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Error code associated with the disconnection event, if any. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public EventDeviceDisconnected.ErrorCodeEnum ErrorCode { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.disconnected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceDisconnectedConnectedAccountErrors_model")] -public class EventDeviceDisconnectedConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventDeviceDisconnectedConnectedAccountErrors() { } - -public EventDeviceDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceDisconnectedConnectedAccountWarnings_model")] -public class EventDeviceDisconnectedConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceDisconnectedConnectedAccountWarnings() { } - -public EventDeviceDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceDisconnectedDeviceErrors_model")] -public class EventDeviceDisconnectedDeviceErrors -{ -[JsonConstructorAttribute] -protected EventDeviceDisconnectedDeviceErrors() { } - -public EventDeviceDisconnectedDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceDisconnectedDeviceWarnings_model")] -public class EventDeviceDisconnectedDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceDisconnectedDeviceWarnings() { } - -public EventDeviceDisconnectedDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The status of an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) changed from online to offline. That is, the `device.properties.online` property changed from `true` to `false`. -/// -[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnected_model")] -public class EventDeviceUnmanagedDisconnected : Event -{ -[JsonConstructorAttribute] -protected EventDeviceUnmanagedDisconnected() { } - -public EventDeviceUnmanagedDisconnected(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, EventDeviceUnmanagedDisconnected.ErrorCodeEnum errorCode = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -ErrorCode = errorCode; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Error code associated with the disconnection event, if any. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ErrorCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "account_disconnected")] -AccountDisconnected = 1, - -[EnumMember(Value = "hub_disconnected")] -HubDisconnected = 2, - -[EnumMember(Value = "device_disconnected")] -DeviceDisconnected = 3, -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Error code associated with the disconnection event, if any. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public EventDeviceUnmanagedDisconnected.ErrorCodeEnum ErrorCode { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.unmanaged.disconnected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedConnectedAccountErrors_model")] -public class EventDeviceUnmanagedDisconnectedConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventDeviceUnmanagedDisconnectedConnectedAccountErrors() { } - -public EventDeviceUnmanagedDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedConnectedAccountWarnings_model")] -public class EventDeviceUnmanagedDisconnectedConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceUnmanagedDisconnectedConnectedAccountWarnings() { } - -public EventDeviceUnmanagedDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedDeviceErrors_model")] -public class EventDeviceUnmanagedDisconnectedDeviceErrors -{ -[JsonConstructorAttribute] -protected EventDeviceUnmanagedDisconnectedDeviceErrors() { } - -public EventDeviceUnmanagedDisconnectedDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedDeviceWarnings_model")] -public class EventDeviceUnmanagedDisconnectedDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceUnmanagedDisconnectedDeviceWarnings() { } - -public EventDeviceUnmanagedDisconnectedDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A device detected that it was tampered with, for example, opened or moved. -/// -[DataContract(Name = "seamModel_eventDeviceTampered_model")] -public class EventDeviceTampered : Event -{ -[JsonConstructorAttribute] -protected EventDeviceTampered() { } - -public EventDeviceTampered(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.tampered"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A device battery level dropped below the low threshold. -/// -[DataContract(Name = "seamModel_eventDeviceLowBattery_model")] -public class EventDeviceLowBattery : Event -{ -[JsonConstructorAttribute] -protected EventDeviceLowBattery() { } - -public EventDeviceLowBattery(float? accessoryKeypadBatteryLevel = default, float batteryLevel = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, float? deviceBatteryLevel = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -AccessoryKeypadBatteryLevel = accessoryKeypadBatteryLevel; -BatteryLevel = batteryLevel; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceBatteryLevel = deviceBatteryLevel; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known. -/// -[DataMember(Name = "accessory_keypad_battery_level", IsRequired = false, EmitDefaultValue = false)] -public float? AccessoryKeypadBatteryLevel { get; set; } - -/// -/// Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event. -/// -[Obsolete("Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.")] -[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] -public float BatteryLevel { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Number in the range 0 to 1.0 indicating the affected device's own battery level, when known. -/// -[DataMember(Name = "device_battery_level", IsRequired = false, EmitDefaultValue = false)] -public float? DeviceBatteryLevel { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.low_battery"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A device battery status changed since the last `battery_status_changed` event. -/// -[DataContract(Name = "seamModel_eventDeviceBatteryStatusChanged_model")] -public class EventDeviceBatteryStatusChanged : Event -{ -[JsonConstructorAttribute] -protected EventDeviceBatteryStatusChanged() { } - -public EventDeviceBatteryStatusChanged(float batteryLevel = default, EventDeviceBatteryStatusChanged.BatteryStatusEnum batteryStatus = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -BatteryLevel = batteryLevel; -BatteryStatus = batteryStatus; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Battery status of the affected device, calculated from the numeric `battery_level` value. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum BatteryStatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "critical")] -Critical = 1, - -[EnumMember(Value = "low")] -Low = 2, - -[EnumMember(Value = "good")] -Good = 3, - -[EnumMember(Value = "full")] -Full = 4, -} - -/// -/// Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. -/// -[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] -public float BatteryLevel { get; set; } - -/// -/// Battery status of the affected device, calculated from the numeric `battery_level` value. -/// -[DataMember(Name = "battery_status", IsRequired = false, EmitDefaultValue = false)] -public EventDeviceBatteryStatusChanged.BatteryStatusEnum BatteryStatus { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.battery_status_changed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A device was removed externally from the connected account. -/// -[DataContract(Name = "seamModel_eventDeviceRemoved_model")] -public class EventDeviceRemoved : Event -{ -[JsonConstructorAttribute] -protected EventDeviceRemoved() { } - -public EventDeviceRemoved(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.removed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A device was deleted. -/// -[DataContract(Name = "seamModel_eventDeviceDeleted_model")] -public class EventDeviceDeleted : Event -{ -[JsonConstructorAttribute] -protected EventDeviceDeleted() { } - -public EventDeviceDeleted(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? deviceName = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -DeviceName = deviceName; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Name of the deleted device, captured at deletion time. The device record no longer exists when this event fires, so the name is preserved here. Null when the device had no resolvable name. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceName { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Seam detected that a device is using a third-party integration that will interfere with Seam device management. -/// -[DataContract(Name = "seamModel_eventDeviceThirdPartyIntegrationDetected_model")] -public class EventDeviceThirdPartyIntegrationDetected : Event -{ -[JsonConstructorAttribute] -protected EventDeviceThirdPartyIntegrationDetected() { } - -public EventDeviceThirdPartyIntegrationDetected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.third_party_integration_detected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Seam detected that a device is no longer using a third-party integration that was interfering with Seam device management. -/// -[DataContract(Name = "seamModel_eventDeviceThirdPartyIntegrationNoLongerDetected_model")] -public class EventDeviceThirdPartyIntegrationNoLongerDetected : Event -{ -[JsonConstructorAttribute] -protected EventDeviceThirdPartyIntegrationNoLongerDetected() { } - -public EventDeviceThirdPartyIntegrationNoLongerDetected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.third_party_integration_no_longer_detected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [Salto device](https://www.seam.co/docs/device-and-system-integration-guides/salto-locks) activated privacy mode. -/// -[DataContract(Name = "seamModel_eventDeviceSaltoPrivacyModeActivated_model")] -public class EventDeviceSaltoPrivacyModeActivated : Event -{ -[JsonConstructorAttribute] -protected EventDeviceSaltoPrivacyModeActivated() { } - -public EventDeviceSaltoPrivacyModeActivated(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.salto.privacy_mode_activated"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [Salto device](https://www.seam.co/docs/device-and-system-integration-guides/salto-locks) deactivated privacy mode. -/// -[DataContract(Name = "seamModel_eventDeviceSaltoPrivacyModeDeactivated_model")] -public class EventDeviceSaltoPrivacyModeDeactivated : Event -{ -[JsonConstructorAttribute] -protected EventDeviceSaltoPrivacyModeDeactivated() { } - -public EventDeviceSaltoPrivacyModeDeactivated(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.salto.privacy_mode_deactivated"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Seam detected a flaky device connection. -/// -[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlaky_model")] -public class EventDeviceConnectionBecameFlaky : Event -{ -[JsonConstructorAttribute] -protected EventDeviceConnectionBecameFlaky() { } - -public EventDeviceConnectionBecameFlaky(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.connection_became_flaky"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyConnectedAccountErrors_model")] -public class EventDeviceConnectionBecameFlakyConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventDeviceConnectionBecameFlakyConnectedAccountErrors() { } - -public EventDeviceConnectionBecameFlakyConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyConnectedAccountWarnings_model")] -public class EventDeviceConnectionBecameFlakyConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceConnectionBecameFlakyConnectedAccountWarnings() { } - -public EventDeviceConnectionBecameFlakyConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyDeviceErrors_model")] -public class EventDeviceConnectionBecameFlakyDeviceErrors -{ -[JsonConstructorAttribute] -protected EventDeviceConnectionBecameFlakyDeviceErrors() { } - -public EventDeviceConnectionBecameFlakyDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyDeviceWarnings_model")] -public class EventDeviceConnectionBecameFlakyDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceConnectionBecameFlakyDeviceWarnings() { } - -public EventDeviceConnectionBecameFlakyDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Seam detected that a previously-flaky device connection stabilized. -/// -[DataContract(Name = "seamModel_eventDeviceConnectionStabilized_model")] -public class EventDeviceConnectionStabilized : Event -{ -[JsonConstructorAttribute] -protected EventDeviceConnectionStabilized() { } - -public EventDeviceConnectionStabilized(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.connection_stabilized"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A third-party subscription is required to use all device features. -/// -[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequired_model")] -public class EventDeviceErrorSubscriptionRequired : Event -{ -[JsonConstructorAttribute] -protected EventDeviceErrorSubscriptionRequired() { } - -public EventDeviceErrorSubscriptionRequired(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.error.subscription_required"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredConnectedAccountErrors_model")] -public class EventDeviceErrorSubscriptionRequiredConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventDeviceErrorSubscriptionRequiredConnectedAccountErrors() { } - -public EventDeviceErrorSubscriptionRequiredConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredConnectedAccountWarnings_model")] -public class EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings() { } - -public EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredDeviceErrors_model")] -public class EventDeviceErrorSubscriptionRequiredDeviceErrors -{ -[JsonConstructorAttribute] -protected EventDeviceErrorSubscriptionRequiredDeviceErrors() { } - -public EventDeviceErrorSubscriptionRequiredDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredDeviceWarnings_model")] -public class EventDeviceErrorSubscriptionRequiredDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceErrorSubscriptionRequiredDeviceWarnings() { } - -public EventDeviceErrorSubscriptionRequiredDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A third-party subscription is active or no longer required to use all device features. -/// -[DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredResolved_model")] -public class EventDeviceErrorSubscriptionRequiredResolved : Event -{ -[JsonConstructorAttribute] -protected EventDeviceErrorSubscriptionRequiredResolved() { } - -public EventDeviceErrorSubscriptionRequiredResolved(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.error.subscription_required.resolved"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An accessory keypad was connected to a device. -/// -[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadConnected_model")] -public class EventDeviceAccessoryKeypadConnected : Event -{ -[JsonConstructorAttribute] -protected EventDeviceAccessoryKeypadConnected() { } - -public EventDeviceAccessoryKeypadConnected(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.accessory_keypad_connected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// An accessory keypad was disconnected from a device. -/// -[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnected_model")] -public class EventDeviceAccessoryKeypadDisconnected : Event -{ -[JsonConstructorAttribute] -protected EventDeviceAccessoryKeypadDisconnected() { } - -public EventDeviceAccessoryKeypadDisconnected(object? connectedAccountCustomMetadata = default, List connectedAccountErrors = default, string connectedAccountId = default, List connectedAccountWarnings = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, List deviceErrors = default, string deviceId = default, List deviceWarnings = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountErrors = connectedAccountErrors; -ConnectedAccountId = connectedAccountId; -ConnectedAccountWarnings = connectedAccountWarnings; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceErrors = deviceErrors; -DeviceId = deviceId; -DeviceWarnings = deviceWarnings; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// Errors associated with the connected account. -/// -[DataMember(Name = "connected_account_errors", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountErrors { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Warnings associated with the connected account. -/// -[DataMember(Name = "connected_account_warnings", IsRequired = false, EmitDefaultValue = false)] -public List ConnectedAccountWarnings { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// Errors associated with the device. -/// -[DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] -public List DeviceErrors { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Warnings associated with the device. -/// -[DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] -public List DeviceWarnings { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.accessory_keypad_disconnected"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors_model")] -public class EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors -{ -[JsonConstructorAttribute] -protected EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors() { } - -public EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings_model")] -public class EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings() { } - -public EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedDeviceErrors_model")] -public class EventDeviceAccessoryKeypadDisconnectedDeviceErrors -{ -[JsonConstructorAttribute] -protected EventDeviceAccessoryKeypadDisconnectedDeviceErrors() { } - -public EventDeviceAccessoryKeypadDisconnectedDeviceErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedDeviceWarnings_model")] -public class EventDeviceAccessoryKeypadDisconnectedDeviceWarnings -{ -[JsonConstructorAttribute] -protected EventDeviceAccessoryKeypadDisconnectedDeviceWarnings() { } - -public EventDeviceAccessoryKeypadDisconnectedDeviceWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Extended periods of noise or noise exceeding a [threshold](https://www.seam.co/docs/capability-guides/noise-sensors#what-is-a-threshold) were detected. -/// -[DataContract(Name = "seamModel_eventNoiseSensorNoiseThresholdTriggered_model")] -public class EventNoiseSensorNoiseThresholdTriggered : Event -{ -[JsonConstructorAttribute] -protected EventNoiseSensorNoiseThresholdTriggered() { } - -public EventNoiseSensorNoiseThresholdTriggered(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, object? minutMetadata = default, float? noiseLevelDecibels = default, float? noiseLevelNrs = default, string? noiseThresholdId = default, string? noiseThresholdName = default, object? noiseawareMetadata = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -MinutMetadata = minutMetadata; -NoiseLevelDecibels = noiseLevelDecibels; -NoiseLevelNrs = noiseLevelNrs; -NoiseThresholdId = noiseThresholdId; -NoiseThresholdName = noiseThresholdName; -NoiseawareMetadata = noiseawareMetadata; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "noise_sensor.noise_threshold_triggered"; - -/// -/// Metadata from Minut. -/// -[DataMember(Name = "minut_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? MinutMetadata { get; set; } - -/// -/// Detected noise level in decibels. -/// -[DataMember(Name = "noise_level_decibels", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseLevelDecibels { get; set; } - -/// -/// Detected noise level in Noiseaware Noise Risk Score (NRS). -/// -[DataMember(Name = "noise_level_nrs", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseLevelNrs { get; set; } - -/// -/// ID of the noise threshold that was triggered. -/// -[DataMember(Name = "noise_threshold_id", IsRequired = false, EmitDefaultValue = false)] -public string? NoiseThresholdId { get; set; } - -/// -/// Name of the noise threshold that was triggered. -/// -[DataMember(Name = "noise_threshold_name", IsRequired = false, EmitDefaultValue = false)] -public string? NoiseThresholdName { get; set; } - -/// -/// Metadata from Noiseaware. -/// -[DataMember(Name = "noiseaware_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? NoiseawareMetadata { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [lock](https://www.seam.co/docs/low-level-apis/smart-locks) was locked. -/// -[DataContract(Name = "seamModel_eventLockLocked_model")] -public class EventLockLocked : Event -{ -[JsonConstructorAttribute] -protected EventLockLocked() { } - -public EventLockLocked(string? accessCodeId = default, bool? accessCodeIsManaged = default, string? actionAttemptId = default, string? code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, bool? isViaBluetooth = default, bool? isViaNfc = default, EventLockLocked.MethodEnum method = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -AccessCodeIsManaged = accessCodeIsManaged; -ActionAttemptId = actionAttemptId; -Code = code; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -IsViaBluetooth = isViaBluetooth; -IsViaNfc = isViaNfc; -Method = method; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum MethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "keycode")] -Keycode = 1, - -[EnumMember(Value = "manual")] -Manual = 2, - -[EnumMember(Value = "automatic")] -Automatic = 3, - -[EnumMember(Value = "unknown")] -Unknown = 4, - -[EnumMember(Value = "remote")] -Remote = 5, - -[EnumMember(Value = "card")] -Card = 6, - -[EnumMember(Value = "mobile_key")] -MobileKey = 7, -} - -/// -/// ID of the access code that was used to lock the device. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessCodeId { get; set; } - -/// -/// Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. -/// -[DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool? AccessCodeIsManaged { get; set; } - -/// -/// ID of the Seam action attempt that triggered this lock. Present only when the lock was initiated through Seam (via a `LOCK_DOOR` action attempt). -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string? ActionAttemptId { get; set; } - -/// -/// Code (PIN) that was used to lock the device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "lock.locked"; - -/// -/// Whether the lock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. -/// -[DataMember(Name = "is_via_bluetooth", IsRequired = false, EmitDefaultValue = false)] -public bool? IsViaBluetooth { get; set; } - -/// -/// Whether the lock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. -/// -[DataMember(Name = "is_via_nfc", IsRequired = false, EmitDefaultValue = false)] -public bool? IsViaNfc { get; set; } - -/// -/// Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. -/// -[DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] -public EventLockLocked.MethodEnum Method { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [lock](https://www.seam.co/docs/low-level-apis/smart-locks) was unlocked. -/// -[DataContract(Name = "seamModel_eventLockUnlocked_model")] -public class EventLockUnlocked : Event -{ -[JsonConstructorAttribute] -protected EventLockUnlocked() { } - -public EventLockUnlocked(string? accessCodeId = default, bool? accessCodeIsManaged = default, string? actionAttemptId = default, string? code = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, bool? isViaBluetooth = default, bool? isViaNfc = default, EventLockUnlocked.MethodEnum method = default, string occurredAt = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -AccessCodeIsManaged = accessCodeIsManaged; -ActionAttemptId = actionAttemptId; -Code = code; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -IsViaBluetooth = isViaBluetooth; -IsViaNfc = isViaNfc; -Method = method; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Method by which the lock was unlocked. `keycode`: an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum MethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "keycode")] -Keycode = 1, - -[EnumMember(Value = "manual")] -Manual = 2, - -[EnumMember(Value = "automatic")] -Automatic = 3, - -[EnumMember(Value = "unknown")] -Unknown = 4, - -[EnumMember(Value = "remote")] -Remote = 5, - -[EnumMember(Value = "card")] -Card = 6, - -[EnumMember(Value = "mobile_key")] -MobileKey = 7, -} - -/// -/// ID of the access code that was used to unlock the affected device. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessCodeId { get; set; } - -/// -/// Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. -/// -[DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool? AccessCodeIsManaged { get; set; } - -/// -/// ID of the Seam action attempt that triggered this unlock. Present only when the unlock was initiated through Seam (via an `UNLOCK_DOOR` action attempt). -/// -[DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] -public string? ActionAttemptId { get; set; } - -/// -/// Code (PIN) that was used to unlock the affected device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "lock.unlocked"; - -/// -/// Whether the unlock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. -/// -[DataMember(Name = "is_via_bluetooth", IsRequired = false, EmitDefaultValue = false)] -public bool? IsViaBluetooth { get; set; } - -/// -/// Whether the unlock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. -/// -[DataMember(Name = "is_via_nfc", IsRequired = false, EmitDefaultValue = false)] -public bool? IsViaNfc { get; set; } - -/// -/// Method by which the lock was unlocked. `keycode`: an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. -/// -[DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] -public EventLockUnlocked.MethodEnum Method { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The [lock](https://www.seam.co/docs/low-level-apis/smart-locks) denied access to a user after one or more consecutive invalid attempts to unlock the device. -/// -[DataContract(Name = "seamModel_eventLockAccessDenied_model")] -public class EventLockAccessDenied : Event -{ -[JsonConstructorAttribute] -protected EventLockAccessDenied() { } - -public EventLockAccessDenied(string? accessCodeId = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string? deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, EventLockAccessDeniedReason? reason = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -Reason = reason; -WorkspaceId = workspaceId; -} - -/// -/// ID of the access code that was used in the unlock attempts. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? AccessCodeId { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "lock.access_denied"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Why access was denied, when the provider reports a determinable cause. Omitted when unknown. -/// -[DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] -public EventLockAccessDeniedReason? Reason { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventLockAccessDeniedReason_model")] -public class EventLockAccessDeniedReason -{ -[JsonConstructorAttribute] -protected EventLockAccessDeniedReason() { } - -public EventLockAccessDeniedReason(string message = default, EventLockAccessDeniedReason.ReasonCodeEnum reasonCode = default) -{ -Message = message; -ReasonCode = reasonCode; -} - -/// -/// Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ReasonCodeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "unknown_code")] -UnknownCode = 1, - -[EnumMember(Value = "expired_code")] -ExpiredCode = 2, - -[EnumMember(Value = "blocklisted_code")] -BlocklistedCode = 3, - -[EnumMember(Value = "too_many_attempts")] -TooManyAttempts = 4, - -[EnumMember(Value = "blocked_by_privacy_mode")] -BlockedByPrivacyMode = 5, - -[EnumMember(Value = "credential_error")] -CredentialError = 6, -} - -/// -/// Human-readable explanation of why access was denied. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. -/// -[DataMember(Name = "reason_code", IsRequired = false, EmitDefaultValue = false)] -public EventLockAccessDeniedReason.ReasonCodeEnum ReasonCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A thermostat [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) was activated. -/// -[DataContract(Name = "seamModel_eventThermostatClimatePresetActivated_model")] -public class EventThermostatClimatePresetActivated : Event -{ -[JsonConstructorAttribute] -protected EventThermostatClimatePresetActivated() { } - -public EventThermostatClimatePresetActivated(string climatePresetKey = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, bool isFallbackClimatePreset = default, string occurredAt = default, string? thermostatScheduleId = default, string workspaceId = default) -{ -ClimatePresetKey = climatePresetKey; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -IsFallbackClimatePreset = isFallbackClimatePreset; -OccurredAt = occurredAt; -ThermostatScheduleId = thermostatScheduleId; -WorkspaceId = workspaceId; -} - -/// -/// Key of the climate preset that was activated. -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "thermostat.climate_preset_activated"; - -/// -/// Indicates whether the climate preset that was activated is the fallback climate preset for the thermostat. -/// -[DataMember(Name = "is_fallback_climate_preset", IsRequired = false, EmitDefaultValue = false)] -public bool IsFallbackClimatePreset { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the thermostat schedule that prompted the affected climate preset to be activated. -/// -[DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] -public string? ThermostatScheduleId { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [thermostat](https://www.seam.co/docs/capability-guides/thermostats) was adjusted manually. -/// -[DataContract(Name = "seamModel_eventThermostatManuallyAdjusted_model")] -public class EventThermostatManuallyAdjusted : Event -{ -[JsonConstructorAttribute] -protected EventThermostatManuallyAdjusted() { } - -public EventThermostatManuallyAdjusted(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, float? coolingSetPointCelsius = default, float? coolingSetPointFahrenheit = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, EventThermostatManuallyAdjusted.FanModeSettingEnum? fanModeSetting = default, float? heatingSetPointCelsius = default, float? heatingSetPointFahrenheit = default, EventThermostatManuallyAdjusted.HvacModeSettingEnum? hvacModeSetting = default, EventThermostatManuallyAdjusted.MethodEnum method = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CoolingSetPointCelsius = coolingSetPointCelsius; -CoolingSetPointFahrenheit = coolingSetPointFahrenheit; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -FanModeSetting = fanModeSetting; -HeatingSetPointCelsius = heatingSetPointCelsius; -HeatingSetPointFahrenheit = heatingSetPointFahrenheit; -HvacModeSetting = hvacModeSetting; -Method = method; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum FanModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "auto")] -Auto = 1, - -[EnumMember(Value = "on")] -On = 2, - -[EnumMember(Value = "circulate")] -Circulate = 3, -} - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum HvacModeSettingEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "off")] -Off = 1, - -[EnumMember(Value = "heat")] -Heat = 2, - -[EnumMember(Value = "cool")] -Cool = 3, - -[EnumMember(Value = "heat_cool")] -HeatCool = 4, - -[EnumMember(Value = "eco")] -Eco = 5, -} - -/// -/// Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum MethodEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "seam")] -Seam = 1, - -[EnumMember(Value = "external")] -External = 2, -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "cooling_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? CoolingSetPointFahrenheit { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "thermostat.manually_adjusted"; - -/// -/// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. -/// -[DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public EventThermostatManuallyAdjusted.FanModeSettingEnum? FanModeSetting { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointCelsius { get; set; } - -/// -/// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataMember(Name = "heating_set_point_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? HeatingSetPointFahrenheit { get; set; } - -/// -/// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. -/// -[DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] -public EventThermostatManuallyAdjusted.HvacModeSettingEnum? HvacModeSetting { get; set; } - -/// -/// Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. -/// -[DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] -public EventThermostatManuallyAdjusted.MethodEnum Method { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading exceeded the set [threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds). -/// -[DataContract(Name = "seamModel_eventThermostatTemperatureThresholdExceeded_model")] -public class EventThermostatTemperatureThresholdExceeded : Event -{ -[JsonConstructorAttribute] -protected EventThermostatTemperatureThresholdExceeded() { } - -public EventThermostatTemperatureThresholdExceeded(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, string occurredAt = default, float temperatureCelsius = default, float temperatureFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -LowerLimitCelsius = lowerLimitCelsius; -LowerLimitFahrenheit = lowerLimitFahrenheit; -OccurredAt = occurredAt; -TemperatureCelsius = temperatureCelsius; -TemperatureFahrenheit = temperatureFahrenheit; -UpperLimitCelsius = upperLimitCelsius; -UpperLimitFahrenheit = upperLimitFahrenheit; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "thermostat.temperature_threshold_exceeded"; - -/// -/// Lower temperature limit, in °C, defined by the set threshold. -/// -[DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? LowerLimitCelsius { get; set; } - -/// -/// Lower temperature limit, in °F, defined by the set threshold. -/// -[DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? LowerLimitFahrenheit { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Temperature, in °C, reported by the affected thermostat. -/// -[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] -public float TemperatureCelsius { get; set; } - -/// -/// Temperature, in °F, reported by the affected thermostat. -/// -[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float TemperatureFahrenheit { get; set; } - -/// -/// Upper temperature limit, in °C, defined by the set threshold. -/// -[DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? UpperLimitCelsius { get; set; } - -/// -/// Upper temperature limit, in °F, defined by the set threshold. -/// -[DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? UpperLimitFahrenheit { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading no longer exceeds the set [threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds). -/// -[DataContract(Name = "seamModel_eventThermostatTemperatureThresholdNoLongerExceeded_model")] -public class EventThermostatTemperatureThresholdNoLongerExceeded : Event -{ -[JsonConstructorAttribute] -protected EventThermostatTemperatureThresholdNoLongerExceeded() { } - -public EventThermostatTemperatureThresholdNoLongerExceeded(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, float? lowerLimitCelsius = default, float? lowerLimitFahrenheit = default, string occurredAt = default, float temperatureCelsius = default, float temperatureFahrenheit = default, float? upperLimitCelsius = default, float? upperLimitFahrenheit = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -LowerLimitCelsius = lowerLimitCelsius; -LowerLimitFahrenheit = lowerLimitFahrenheit; -OccurredAt = occurredAt; -TemperatureCelsius = temperatureCelsius; -TemperatureFahrenheit = temperatureFahrenheit; -UpperLimitCelsius = upperLimitCelsius; -UpperLimitFahrenheit = upperLimitFahrenheit; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "thermostat.temperature_threshold_no_longer_exceeded"; - -/// -/// Lower temperature limit, in °C, defined by the set threshold. -/// -[DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? LowerLimitCelsius { get; set; } - -/// -/// Lower temperature limit, in °F, defined by the set threshold. -/// -[DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? LowerLimitFahrenheit { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Temperature, in °C, reported by the affected thermostat. -/// -[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] -public float TemperatureCelsius { get; set; } - -/// -/// Temperature, in °F, reported by the affected thermostat. -/// -[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float TemperatureFahrenheit { get; set; } - -/// -/// Upper temperature limit, in °C, defined by the set threshold. -/// -[DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? UpperLimitCelsius { get; set; } - -/// -/// Upper temperature limit, in °F, defined by the set threshold. -/// -[DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? UpperLimitFahrenheit { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading is within 1 °C of the configured cooling or heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). -/// -[DataContract(Name = "seamModel_eventThermostatTemperatureReachedSetPoint_model")] -public class EventThermostatTemperatureReachedSetPoint : Event -{ -[JsonConstructorAttribute] -protected EventThermostatTemperatureReachedSetPoint() { } - -public EventThermostatTemperatureReachedSetPoint(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, float? desiredTemperatureCelsius = default, float? desiredTemperatureFahrenheit = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, float temperatureCelsius = default, float temperatureFahrenheit = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DesiredTemperatureCelsius = desiredTemperatureCelsius; -DesiredTemperatureFahrenheit = desiredTemperatureFahrenheit; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -TemperatureCelsius = temperatureCelsius; -TemperatureFahrenheit = temperatureFahrenheit; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Desired temperature, in °C, defined by the affected thermostat's cooling or heating set point. -/// -[DataMember(Name = "desired_temperature_celsius", IsRequired = false, EmitDefaultValue = false)] -public float? DesiredTemperatureCelsius { get; set; } - -/// -/// Desired temperature, in °F, defined by the affected thermostat's cooling or heating set point. -/// -[DataMember(Name = "desired_temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float? DesiredTemperatureFahrenheit { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "thermostat.temperature_reached_set_point"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Temperature, in °C, reported by the affected thermostat. -/// -[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] -public float TemperatureCelsius { get; set; } - -/// -/// Temperature, in °F, reported by the affected thermostat. -/// -[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float TemperatureFahrenheit { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) reported temperature changed by at least 1 °C. -/// -[DataContract(Name = "seamModel_eventThermostatTemperatureChanged_model")] -public class EventThermostatTemperatureChanged : Event -{ -[JsonConstructorAttribute] -protected EventThermostatTemperatureChanged() { } - -public EventThermostatTemperatureChanged(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, float temperatureCelsius = default, float temperatureFahrenheit = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -TemperatureCelsius = temperatureCelsius; -TemperatureFahrenheit = temperatureFahrenheit; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "thermostat.temperature_changed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// Temperature, in °C, reported by the affected thermostat. -/// -[DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] -public float TemperatureCelsius { get; set; } - -/// -/// Temperature, in °F, reported by the affected thermostat. -/// -[DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] -public float TemperatureFahrenheit { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// The name of a device was changed. -/// -[DataContract(Name = "seamModel_eventDeviceNameChanged_model")] -public class EventDeviceNameChanged : Event -{ -[JsonConstructorAttribute] -protected EventDeviceNameChanged() { } - -public EventDeviceNameChanged(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string deviceName = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -DeviceName = deviceName; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// The new name of the affected device. -/// -[DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] -public string DeviceName { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.name_changed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A camera was activated, for example, by motion detection. -/// -[DataContract(Name = "seamModel_eventCameraActivated_model")] -public class EventCameraActivated : Event -{ -[JsonConstructorAttribute] -protected EventCameraActivated() { } - -public EventCameraActivated(EventCameraActivated.ActivationReasonEnum activationReason = default, object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string? imageUrl = default, List? mediaIds = default, EventCameraActivated.MotionSubTypeEnum? motionSubType = default, string occurredAt = default, string? videoUrl = default, string workspaceId = default) -{ -ActivationReason = activationReason; -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -ImageUrl = imageUrl; -MediaIds = mediaIds; -MotionSubType = motionSubType; -OccurredAt = occurredAt; -VideoUrl = videoUrl; -WorkspaceId = workspaceId; -} - -/// -/// The reason the camera was activated. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ActivationReasonEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "motion_detected")] -MotionDetected = 1, -} - -/// -/// Sub-type of motion detected, if available. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum MotionSubTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "human")] -Human = 1, - -[EnumMember(Value = "vehicle")] -Vehicle = 2, - -[EnumMember(Value = "package")] -Package = 3, - -[EnumMember(Value = "other")] -Other = 4, -} - -/// -/// The reason the camera was activated. -/// -[DataMember(Name = "activation_reason", IsRequired = false, EmitDefaultValue = false)] -public EventCameraActivated.ActivationReasonEnum ActivationReason { get; set; } - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "camera.activated"; - -/// -/// URL to a thumbnail image captured at the time of activation. -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string? ImageUrl { get; set; } - -/// -/// IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. -/// -[DataMember(Name = "media_ids", IsRequired = false, EmitDefaultValue = false)] -public List? MediaIds { get; set; } - -/// -/// Sub-type of motion detected, if available. -/// -[DataMember(Name = "motion_sub_type", IsRequired = false, EmitDefaultValue = false)] -public EventCameraActivated.MotionSubTypeEnum? MotionSubType { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// URL to a short video clip captured at the time of activation. -/// -[DataMember(Name = "video_url", IsRequired = false, EmitDefaultValue = false)] -public string? VideoUrl { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A doorbell button was pressed on a device. -/// -[DataContract(Name = "seamModel_eventDeviceDoorbellRang_model")] -public class EventDeviceDoorbellRang : Event -{ -[JsonConstructorAttribute] -protected EventDeviceDoorbellRang() { } - -public EventDeviceDoorbellRang(object? connectedAccountCustomMetadata = default, string connectedAccountId = default, string createdAt = default, string? customerKey = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string? imageUrl = default, List? mediaIds = default, string occurredAt = default, string? videoUrl = default, string workspaceId = default) -{ -ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomerKey = customerKey; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -ImageUrl = imageUrl; -MediaIds = mediaIds; -OccurredAt = occurredAt; -VideoUrl = videoUrl; -WorkspaceId = workspaceId; -} - -/// -/// Custom metadata of the connected account, present when connected_account_id is provided. -/// -[DataMember(Name = "connected_account_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? ConnectedAccountCustomMetadata { get; set; } - -/// -/// ID of the connected account associated with the event. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// The customer key associated with the device, if any. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Custom metadata of the device, present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "device.doorbell_rang"; - -/// -/// URL to a thumbnail image captured at the time the doorbell was pressed. -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string? ImageUrl { get; set; } - -/// -/// IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. -/// -[DataMember(Name = "media_ids", IsRequired = false, EmitDefaultValue = false)] -public List? MediaIds { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// URL to a short video clip captured at the time the doorbell was pressed. -/// -[DataMember(Name = "video_url", IsRequired = false, EmitDefaultValue = false)] -public string? VideoUrl { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A phone device was deactivated. -/// -[DataContract(Name = "seamModel_eventPhoneDeactivated_model")] -public class EventPhoneDeactivated : Event -{ -[JsonConstructorAttribute] -protected EventPhoneDeactivated() { } - -public EventPhoneDeactivated(string createdAt = default, object? deviceCustomMetadata = default, string deviceId = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string workspaceId = default) -{ -CreatedAt = createdAt; -DeviceCustomMetadata = deviceCustomMetadata; -DeviceId = deviceId; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Custom metadata of the device; present when device_id is provided. -/// -[DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object? DeviceCustomMetadata { get; set; } - -/// -/// ID of the affected phone device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "phone.deactivated"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A device was added or removed from a space. -/// -[DataContract(Name = "seamModel_eventSpaceDeviceMembershipChanged_model")] -public class EventSpaceDeviceMembershipChanged : Event -{ -[JsonConstructorAttribute] -protected EventSpaceDeviceMembershipChanged() { } - -public EventSpaceDeviceMembershipChanged(List acsEntranceIds = default, string createdAt = default, List deviceIds = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string spaceId = default, string? spaceKey = default, string workspaceId = default) -{ -AcsEntranceIds = acsEntranceIds; -CreatedAt = createdAt; -DeviceIds = deviceIds; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -SpaceId = spaceId; -SpaceKey = spaceKey; -WorkspaceId = workspaceId; -} - -/// -/// IDs of all ACS entrances currently attached to the space. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List AcsEntranceIds { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// IDs of all devices currently attached to the space. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "space.device_membership_changed"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the affected space. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -/// -/// Unique key for the space within the workspace. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A space was created. -/// -[DataContract(Name = "seamModel_eventSpaceCreated_model")] -public class EventSpaceCreated : Event -{ -[JsonConstructorAttribute] -protected EventSpaceCreated() { } - -public EventSpaceCreated(List acsEntranceIds = default, string createdAt = default, List deviceIds = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string spaceId = default, string? spaceKey = default, string workspaceId = default) -{ -AcsEntranceIds = acsEntranceIds; -CreatedAt = createdAt; -DeviceIds = deviceIds; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -SpaceId = spaceId; -SpaceKey = spaceKey; -WorkspaceId = workspaceId; -} - -/// -/// IDs of all ACS entrances attached to the space when it was created. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List AcsEntranceIds { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// IDs of all devices attached to the space when it was created. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "space.created"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the affected space. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -/// -/// Unique key for the space within the workspace. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// A space was deleted. -/// -[DataContract(Name = "seamModel_eventSpaceDeleted_model")] -public class EventSpaceDeleted : Event -{ -[JsonConstructorAttribute] -protected EventSpaceDeleted() { } - -public EventSpaceDeleted(List acsEntranceIds = default, string createdAt = default, List deviceIds = default, string? eventDescription = default, string eventId = default, string eventType = default, string occurredAt = default, string spaceId = default, string? spaceKey = default, string workspaceId = default) -{ -AcsEntranceIds = acsEntranceIds; -CreatedAt = createdAt; -DeviceIds = deviceIds; -EventDescription = eventDescription; -EventId = eventId; -EventType = eventType; -OccurredAt = occurredAt; -SpaceId = spaceId; -SpaceKey = spaceKey; -WorkspaceId = workspaceId; -} - -/// -/// IDs of all ACS entrances currently attached to the space when it was deleted. -/// -[DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] -public List AcsEntranceIds { get; set; } - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// IDs of all devices attached to the space when it was deleted. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "space.deleted"; - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the affected space. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -/// -/// Unique key for the space within the workspace. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_eventUnrecognized_model")] -public class EventUnrecognized : Event -{ -[JsonConstructorAttribute] -protected EventUnrecognized() { } - -public EventUnrecognized(string eventType = default, string createdAt = default, string? eventDescription = default, string eventId = default, string occurredAt = default, string workspaceId = default) -{ -EventType = eventType; -CreatedAt = createdAt; -EventDescription = eventDescription; -EventId = eventId; -OccurredAt = occurredAt; -WorkspaceId = workspaceId; -} - -[DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] -public override string EventType { get; } = "unrecognized"; - -/// -/// Date and time at which the event was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. -/// -[DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] -public override string? EventDescription { get; set; } - -/// -/// ID of the event. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public override string EventId { get; set; } - -/// -/// Date and time at which the event occurred. -/// -[DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] -public override string OccurredAt { get; set; } - -/// -/// ID of the workspace associated with the event. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public override string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + [JsonConverter(typeof(JsonSubtypes), "event_type")] + [JsonSubtypes.FallBackSubType(typeof(EventUnrecognized))] + [JsonSubtypes.KnownSubType(typeof(EventSpaceDeleted), "space.deleted")] + [JsonSubtypes.KnownSubType(typeof(EventSpaceCreated), "space.created")] + [JsonSubtypes.KnownSubType( + typeof(EventSpaceDeviceMembershipChanged), + "space.device_membership_changed" + )] + [JsonSubtypes.KnownSubType(typeof(EventPhoneDeactivated), "phone.deactivated")] + [JsonSubtypes.KnownSubType(typeof(EventDeviceDoorbellRang), "device.doorbell_rang")] + [JsonSubtypes.KnownSubType(typeof(EventCameraActivated), "camera.activated")] + [JsonSubtypes.KnownSubType(typeof(EventDeviceNameChanged), "device.name_changed")] + [JsonSubtypes.KnownSubType( + typeof(EventThermostatTemperatureChanged), + "thermostat.temperature_changed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventThermostatTemperatureReachedSetPoint), + "thermostat.temperature_reached_set_point" + )] + [JsonSubtypes.KnownSubType( + typeof(EventThermostatTemperatureThresholdNoLongerExceeded), + "thermostat.temperature_threshold_no_longer_exceeded" + )] + [JsonSubtypes.KnownSubType( + typeof(EventThermostatTemperatureThresholdExceeded), + "thermostat.temperature_threshold_exceeded" + )] + [JsonSubtypes.KnownSubType( + typeof(EventThermostatManuallyAdjusted), + "thermostat.manually_adjusted" + )] + [JsonSubtypes.KnownSubType( + typeof(EventThermostatClimatePresetActivated), + "thermostat.climate_preset_activated" + )] + [JsonSubtypes.KnownSubType(typeof(EventLockAccessDenied), "lock.access_denied")] + [JsonSubtypes.KnownSubType(typeof(EventLockUnlocked), "lock.unlocked")] + [JsonSubtypes.KnownSubType(typeof(EventLockLocked), "lock.locked")] + [JsonSubtypes.KnownSubType( + typeof(EventNoiseSensorNoiseThresholdTriggered), + "noise_sensor.noise_threshold_triggered" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceAccessoryKeypadDisconnected), + "device.accessory_keypad_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceAccessoryKeypadConnected), + "device.accessory_keypad_connected" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceErrorSubscriptionRequiredResolved), + "device.error.subscription_required.resolved" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceErrorSubscriptionRequired), + "device.error.subscription_required" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceConnectionStabilized), + "device.connection_stabilized" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceConnectionBecameFlaky), + "device.connection_became_flaky" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceSaltoPrivacyModeDeactivated), + "device.salto.privacy_mode_deactivated" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceSaltoPrivacyModeActivated), + "device.salto.privacy_mode_activated" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceThirdPartyIntegrationNoLongerDetected), + "device.third_party_integration_no_longer_detected" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceThirdPartyIntegrationDetected), + "device.third_party_integration_detected" + )] + [JsonSubtypes.KnownSubType(typeof(EventDeviceDeleted), "device.deleted")] + [JsonSubtypes.KnownSubType(typeof(EventDeviceRemoved), "device.removed")] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceBatteryStatusChanged), + "device.battery_status_changed" + )] + [JsonSubtypes.KnownSubType(typeof(EventDeviceLowBattery), "device.low_battery")] + [JsonSubtypes.KnownSubType(typeof(EventDeviceTampered), "device.tampered")] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceUnmanagedDisconnected), + "device.unmanaged.disconnected" + )] + [JsonSubtypes.KnownSubType(typeof(EventDeviceDisconnected), "device.disconnected")] + [JsonSubtypes.KnownSubType(typeof(EventDeviceUnmanagedConnected), "device.unmanaged.connected")] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceUnmanagedConvertedToManaged), + "device.unmanaged.converted_to_managed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventDeviceConvertedToUnmanaged), + "device.converted_to_unmanaged" + )] + [JsonSubtypes.KnownSubType(typeof(EventDeviceAdded), "device.added")] + [JsonSubtypes.KnownSubType(typeof(EventDeviceConnected), "device.connected")] + [JsonSubtypes.KnownSubType( + typeof(EventConnectWebviewLoginFailed), + "connect_webview.login_failed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventConnectWebviewLoginSucceeded), + "connect_webview.login_succeeded" + )] + [JsonSubtypes.KnownSubType( + typeof(EventActionAttemptSimulateManualLockViaKeypadFailed), + "action_attempt.simulate_manual_lock_via_keypad.failed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventActionAttemptSimulateManualLockViaKeypadSucceeded), + "action_attempt.simulate_manual_lock_via_keypad.succeeded" + )] + [JsonSubtypes.KnownSubType( + typeof(EventActionAttemptSimulateKeypadCodeEntryFailed), + "action_attempt.simulate_keypad_code_entry.failed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventActionAttemptSimulateKeypadCodeEntrySucceeded), + "action_attempt.simulate_keypad_code_entry.succeeded" + )] + [JsonSubtypes.KnownSubType( + typeof(EventActionAttemptUnlockDoorFailed), + "action_attempt.unlock_door.failed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventActionAttemptUnlockDoorSucceeded), + "action_attempt.unlock_door.succeeded" + )] + [JsonSubtypes.KnownSubType( + typeof(EventActionAttemptLockDoorFailed), + "action_attempt.lock_door.failed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventActionAttemptLockDoorSucceeded), + "action_attempt.lock_door.succeeded" + )] + [JsonSubtypes.KnownSubType( + typeof(EventConnectedAccountReauthorizationRequested), + "connected_account.reauthorization_requested" + )] + [JsonSubtypes.KnownSubType( + typeof(EventConnectedAccountCompletedFirstSyncAfterReconnection), + "connected_account.completed_first_sync_after_reconnection" + )] + [JsonSubtypes.KnownSubType(typeof(EventConnectedAccountDeleted), "connected_account.deleted")] + [JsonSubtypes.KnownSubType( + typeof(EventConnectedAccountCompletedFirstSync), + "connected_account.completed_first_sync" + )] + [JsonSubtypes.KnownSubType( + typeof(EventConnectedAccountDisconnected), + "connected_account.disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(EventConnectedAccountSuccessfulLogin), + "connected_account.successful_login" + )] + [JsonSubtypes.KnownSubType(typeof(EventConnectedAccountCreated), "connected_account.created")] + [JsonSubtypes.KnownSubType( + typeof(EventConnectedAccountConnected), + "connected_account.connected" + )] + [JsonSubtypes.KnownSubType(typeof(EventClientSessionDeleted), "client_session.deleted")] + [JsonSubtypes.KnownSubType(typeof(EventAcsEntranceRemoved), "acs_entrance.removed")] + [JsonSubtypes.KnownSubType(typeof(EventAcsEntranceAdded), "acs_entrance.added")] + [JsonSubtypes.KnownSubType(typeof(EventAcsAccessGroupDeleted), "acs_access_group.deleted")] + [JsonSubtypes.KnownSubType(typeof(EventAcsEncoderRemoved), "acs_encoder.removed")] + [JsonSubtypes.KnownSubType(typeof(EventAcsEncoderAdded), "acs_encoder.added")] + [JsonSubtypes.KnownSubType(typeof(EventAcsUserDeleted), "acs_user.deleted")] + [JsonSubtypes.KnownSubType(typeof(EventAcsUserCreated), "acs_user.created")] + [JsonSubtypes.KnownSubType(typeof(EventAcsCredentialInvalidated), "acs_credential.invalidated")] + [JsonSubtypes.KnownSubType(typeof(EventAcsCredentialReissued), "acs_credential.reissued")] + [JsonSubtypes.KnownSubType(typeof(EventAcsCredentialIssued), "acs_credential.issued")] + [JsonSubtypes.KnownSubType(typeof(EventAcsCredentialDeleted), "acs_credential.deleted")] + [JsonSubtypes.KnownSubType(typeof(EventAcsSystemDisconnected), "acs_system.disconnected")] + [JsonSubtypes.KnownSubType(typeof(EventAcsSystemAdded), "acs_system.added")] + [JsonSubtypes.KnownSubType(typeof(EventAcsSystemConnected), "acs_system.connected")] + [JsonSubtypes.KnownSubType( + typeof(EventAccessMethodFailedToIssue), + "access_method.failed_to_issue" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessMethodDelayInIssuing), + "access_method.delay_in_issuing" + )] + [JsonSubtypes.KnownSubType(typeof(EventAccessMethodCreated), "access_method.created")] + [JsonSubtypes.KnownSubType(typeof(EventAccessMethodReissued), "access_method.reissued")] + [JsonSubtypes.KnownSubType(typeof(EventAccessMethodDeleted), "access_method.deleted")] + [JsonSubtypes.KnownSubType( + typeof(EventAccessMethodCardEncodingRequired), + "access_method.card_encoding_required" + )] + [JsonSubtypes.KnownSubType(typeof(EventAccessMethodRevoked), "access_method.revoked")] + [JsonSubtypes.KnownSubType(typeof(EventAccessMethodIssued), "access_method.issued")] + [JsonSubtypes.KnownSubType( + typeof(EventAccessGrantCouldNotCreateRequestedAccessMethods), + "access_grant.could_not_create_requested_access_methods" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessGrantAccessTimesChanged), + "access_grant.access_times_changed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessGrantAccessToDoorLost), + "access_grant.access_to_door_lost" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessGrantAccessGrantedToDoor), + "access_grant.access_granted_to_door" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessGrantAccessGrantedToAllDoors), + "access_grant.access_granted_to_all_doors" + )] + [JsonSubtypes.KnownSubType(typeof(EventAccessGrantDeleted), "access_grant.deleted")] + [JsonSubtypes.KnownSubType(typeof(EventAccessGrantCreated), "access_grant.created")] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeUnmanagedRemoved), + "access_code.unmanaged.removed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeUnmanagedCreated), + "access_code.unmanaged.created" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeUnmanagedFailedToConvertToManaged), + "access_code.unmanaged.failed_to_convert_to_managed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeUnmanagedConvertedToManaged), + "access_code.unmanaged.converted_to_managed" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeBackupAccessCodePulled), + "access_code.backup_access_code_pulled" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeDeletedExternalToSeam), + "access_code.deleted_external_to_seam" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeModifiedExternalToSeam), + "access_code.modified_external_to_seam" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeFailedToRemoveFromDevice), + "access_code.failed_to_remove_from_device" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeDelayInRemovingFromDevice), + "access_code.delay_in_removing_from_device" + )] + [JsonSubtypes.KnownSubType(typeof(EventAccessCodeDeleted), "access_code.deleted")] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeFailedToSetOnDevice), + "access_code.failed_to_set_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeDelayInSettingOnDevice), + "access_code.delay_in_setting_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeRemovedFromDevice), + "access_code.removed_from_device" + )] + [JsonSubtypes.KnownSubType(typeof(EventAccessCodeSetOnDevice), "access_code.set_on_device")] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeScheduledOnDevice), + "access_code.scheduled_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeMutationsRequested), + "access_code.mutations_requested" + )] + [JsonSubtypes.KnownSubType( + typeof(EventAccessCodeTimeFrameChanged), + "access_code.time_frame_changed" + )] + [JsonSubtypes.KnownSubType(typeof(EventAccessCodeCodeChanged), "access_code.code_changed")] + [JsonSubtypes.KnownSubType(typeof(EventAccessCodeNameChanged), "access_code.name_changed")] + [JsonSubtypes.KnownSubType(typeof(EventAccessCodeChanged), "access_code.changed")] + [JsonSubtypes.KnownSubType(typeof(EventAccessCodeCreated), "access_code.created")] + public abstract class Event + { + public abstract string EventType { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string? EventDescription { get; set; } + + public abstract string EventId { get; set; } + + public abstract string OccurredAt { get; set; } + + public abstract string WorkspaceId { get; set; } + + public abstract override string ToString(); + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was created. + /// + [DataContract(Name = "seamModel_eventAccessCodeCreated_model")] + public class EventAccessCodeCreated : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeCreated() { } + + public EventAccessCodeCreated( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.created"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed. + /// + [DataContract(Name = "seamModel_eventAccessCodeChanged_model")] + public class EventAccessCodeChanged : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeChanged() { } + + public EventAccessCodeChanged( + string accessCodeId = default, + string? changeReason = default, + List? changedProperties = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ChangeReason = changeReason; + ChangedProperties = changedProperties; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Human-readable reason for the change (e.g. `ongoing code auto-renewed`). + /// + [DataMember(Name = "change_reason", IsRequired = false, EmitDefaultValue = false)] + public string? ChangeReason { get; set; } + + /// + /// List of properties that changed on the access code. + /// + [DataMember(Name = "changed_properties", IsRequired = false, EmitDefaultValue = false)] + public List? ChangedProperties { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.changed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeChangedChangedProperties_model")] + public class EventAccessCodeChangedChangedProperties + { + [JsonConstructorAttribute] + protected EventAccessCodeChangedChangedProperties() { } + + public EventAccessCodeChangedChangedProperties( + string? from = default, + string property = default, + string? to = default + ) + { + From = from; + Property = property; + To = to; + } + + /// + /// Previous value of the property, or null if not set. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public string? From { get; set; } + + /// + /// Name of the property that changed (e.g. `code`). + /// + [DataMember(Name = "property", IsRequired = false, EmitDefaultValue = false)] + public string Property { get; set; } + + /// + /// New value of the property, or null if cleared. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public string? To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The name of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. + /// + [DataContract(Name = "seamModel_eventAccessCodeNameChanged_model")] + public class EventAccessCodeNameChanged : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeNameChanged() { } + + public EventAccessCodeNameChanged( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string description = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + EventAccessCodeNameChangedFrom from = default, + string occurredAt = default, + EventAccessCodeNameChangedTo to = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + Description = description; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + From = from; + OccurredAt = occurredAt; + To = to; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the change and its source. + /// + [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.name_changed"; + + /// + /// Previous access code name configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public EventAccessCodeNameChangedFrom From { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// New access code name configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public EventAccessCodeNameChangedTo To { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeNameChangedFrom_model")] + public class EventAccessCodeNameChangedFrom + { + [JsonConstructorAttribute] + protected EventAccessCodeNameChangedFrom() { } + + public EventAccessCodeNameChangedFrom(string? name = default) + { + Name = name; + } + + /// + /// Previous name of the access code. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeNameChangedTo_model")] + public class EventAccessCodeNameChangedTo + { + [JsonConstructorAttribute] + protected EventAccessCodeNameChangedTo() { } + + public EventAccessCodeNameChangedTo(string? name = default) + { + Name = name; + } + + /// + /// New name of the access code. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The pin code of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. + /// + [DataContract(Name = "seamModel_eventAccessCodeCodeChanged_model")] + public class EventAccessCodeCodeChanged : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeCodeChanged() { } + + public EventAccessCodeCodeChanged( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string description = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + EventAccessCodeCodeChangedFrom from = default, + string occurredAt = default, + EventAccessCodeCodeChangedTo to = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + Description = description; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + From = from; + OccurredAt = occurredAt; + To = to; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the change and its source. + /// + [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.code_changed"; + + /// + /// Previous pin code configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public EventAccessCodeCodeChangedFrom From { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// New pin code configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public EventAccessCodeCodeChangedTo To { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeCodeChangedFrom_model")] + public class EventAccessCodeCodeChangedFrom + { + [JsonConstructorAttribute] + protected EventAccessCodeCodeChangedFrom() { } + + public EventAccessCodeCodeChangedFrom(string? code = default) + { + Code = code; + } + + /// + /// Previous pin code. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeCodeChangedTo_model")] + public class EventAccessCodeCodeChangedTo + { + [JsonConstructorAttribute] + protected EventAccessCodeCodeChangedTo() { } + + public EventAccessCodeCodeChangedTo(string? code = default) + { + Code = code; + } + + /// + /// New pin code. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The time frame of an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was changed on the device. + /// + [DataContract(Name = "seamModel_eventAccessCodeTimeFrameChanged_model")] + public class EventAccessCodeTimeFrameChanged : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeTimeFrameChanged() { } + + public EventAccessCodeTimeFrameChanged( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string description = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + EventAccessCodeTimeFrameChangedFrom from = default, + string occurredAt = default, + EventAccessCodeTimeFrameChangedTo to = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + Description = description; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + From = from; + OccurredAt = occurredAt; + To = to; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the change and its source. + /// + [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.time_frame_changed"; + + /// + /// Previous time frame configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public EventAccessCodeTimeFrameChangedFrom From { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// New time frame configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public EventAccessCodeTimeFrameChangedTo To { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeTimeFrameChangedFrom_model")] + public class EventAccessCodeTimeFrameChangedFrom + { + [JsonConstructorAttribute] + protected EventAccessCodeTimeFrameChangedFrom() { } + + public EventAccessCodeTimeFrameChangedFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeTimeFrameChangedTo_model")] + public class EventAccessCodeTimeFrameChangedTo + { + [JsonConstructorAttribute] + protected EventAccessCodeTimeFrameChangedTo() { } + + public EventAccessCodeTimeFrameChangedTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Mutations were requested on an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). This event fires at request time, before the change is confirmed on the device. + /// + [DataContract(Name = "seamModel_eventAccessCodeMutationsRequested_model")] + public class EventAccessCodeMutationsRequested : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeMutationsRequested() { } + + public EventAccessCodeMutationsRequested( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + List requestedMutations = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + RequestedMutations = requestedMutations; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.mutations_requested"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Array of mutations requested on the access code, each containing the mutation type and from/to values. + /// + [DataMember(Name = "requested_mutations", IsRequired = false, EmitDefaultValue = false)] + public List RequestedMutations { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeMutationsRequestedRequestedMutations_model")] + public class EventAccessCodeMutationsRequestedRequestedMutations + { + [JsonConstructorAttribute] + protected EventAccessCodeMutationsRequestedRequestedMutations() { } + + public EventAccessCodeMutationsRequestedRequestedMutations( + object? from = default, + EventAccessCodeMutationsRequestedRequestedMutations.MutationCodeEnum mutationCode = + default, + object? to = default + ) + { + From = from; + MutationCode = mutationCode; + To = to; + } + + /// + /// Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum MutationCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "updating_name")] + UpdatingName = 1, + + [EnumMember(Value = "updating_code")] + UpdatingCode = 2, + + [EnumMember(Value = "updating_time_frame")] + UpdatingTimeFrame = 3, + + [EnumMember(Value = "deleting")] + Deleting = 4, + + [EnumMember(Value = "creating")] + Creating = 5, + + [EnumMember(Value = "deferring_creation")] + DeferringCreation = 6, + } + + /// + /// Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public object? From { get; set; } + + /// + /// Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. + /// + [DataMember(Name = "mutation_code", IsRequired = false, EmitDefaultValue = false)] + public EventAccessCodeMutationsRequestedRequestedMutations.MutationCodeEnum MutationCode { get; set; } + + /// + /// New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public object? To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes#native-scheduling) on a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeScheduledOnDevice_model")] + public class EventAccessCodeScheduledOnDevice : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeScheduledOnDevice() { } + + public EventAccessCodeScheduledOnDevice( + string accessCodeId = default, + string code = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + Code = code; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Code for the affected access code. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string Code { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.scheduled_on_device"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was set on a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeSetOnDevice_model")] + public class EventAccessCodeSetOnDevice : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeSetOnDevice() { } + + public EventAccessCodeSetOnDevice( + string accessCodeId = default, + string code = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + Code = code; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Code for the affected access code. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string Code { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.set_on_device"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was removed from a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeRemovedFromDevice_model")] + public class EventAccessCodeRemovedFromDevice : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeRemovedFromDevice() { } + + public EventAccessCodeRemovedFromDevice( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.removed_from_device"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// There was an unusually long delay in setting an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) on a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDevice_model")] + public class EventAccessCodeDelayInSettingOnDevice : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInSettingOnDevice() { } + + public EventAccessCodeDelayInSettingOnDevice( + List accessCodeErrors = default, + string accessCodeId = default, + List accessCodeWarnings = + default, + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeErrors = accessCodeErrors; + AccessCodeId = accessCodeId; + AccessCodeWarnings = accessCodeWarnings; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Errors associated with the access code. + /// + [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeErrors { get; set; } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Warnings associated with the access code. + /// + [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeWarnings { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.delay_in_setting_on_device"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceAccessCodeErrors_model")] + public class EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors() { } + + public EventAccessCodeDelayInSettingOnDeviceAccessCodeErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings_model")] + public class EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings() { } + + public EventAccessCodeDelayInSettingOnDeviceAccessCodeWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors_model" + )] + public class EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors() { } + + public EventAccessCodeDelayInSettingOnDeviceConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings_model" + )] + public class EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings() { } + + public EventAccessCodeDelayInSettingOnDeviceConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceDeviceErrors_model")] + public class EventAccessCodeDelayInSettingOnDeviceDeviceErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInSettingOnDeviceDeviceErrors() { } + + public EventAccessCodeDelayInSettingOnDeviceDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeDelayInSettingOnDeviceDeviceWarnings_model")] + public class EventAccessCodeDelayInSettingOnDeviceDeviceWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInSettingOnDeviceDeviceWarnings() { } + + public EventAccessCodeDelayInSettingOnDeviceDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) failed to be set on a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDevice_model")] + public class EventAccessCodeFailedToSetOnDevice : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToSetOnDevice() { } + + public EventAccessCodeFailedToSetOnDevice( + List accessCodeErrors = default, + string accessCodeId = default, + List accessCodeWarnings = default, + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeErrors = accessCodeErrors; + AccessCodeId = accessCodeId; + AccessCodeWarnings = accessCodeWarnings; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Errors associated with the access code. + /// + [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeErrors { get; set; } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Warnings associated with the access code. + /// + [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeWarnings { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.failed_to_set_on_device"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceAccessCodeErrors_model")] + public class EventAccessCodeFailedToSetOnDeviceAccessCodeErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToSetOnDeviceAccessCodeErrors() { } + + public EventAccessCodeFailedToSetOnDeviceAccessCodeErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceAccessCodeWarnings_model")] + public class EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings() { } + + public EventAccessCodeFailedToSetOnDeviceAccessCodeWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeFailedToSetOnDeviceConnectedAccountErrors_model" + )] + public class EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors() { } + + public EventAccessCodeFailedToSetOnDeviceConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings_model" + )] + public class EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings() { } + + public EventAccessCodeFailedToSetOnDeviceConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceDeviceErrors_model")] + public class EventAccessCodeFailedToSetOnDeviceDeviceErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToSetOnDeviceDeviceErrors() { } + + public EventAccessCodeFailedToSetOnDeviceDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeFailedToSetOnDeviceDeviceWarnings_model")] + public class EventAccessCodeFailedToSetOnDeviceDeviceWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToSetOnDeviceDeviceWarnings() { } + + public EventAccessCodeFailedToSetOnDeviceDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was deleted. + /// + [DataContract(Name = "seamModel_eventAccessCodeDeleted_model")] + public class EventAccessCodeDeleted : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeDeleted() { } + + public EventAccessCodeDeleted( + string accessCodeId = default, + string? code = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + Code = code; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Code for the affected access code. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// There was an unusually long delay in removing an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) from a device. + /// + [Obsolete( + "Seam no longer emits this event. Use `access_code.failed_to_remove_from_device` instead." + )] + [DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDevice_model")] + public class EventAccessCodeDelayInRemovingFromDevice : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInRemovingFromDevice() { } + + public EventAccessCodeDelayInRemovingFromDevice( + List accessCodeErrors = + default, + string accessCodeId = default, + List accessCodeWarnings = + default, + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeErrors = accessCodeErrors; + AccessCodeId = accessCodeId; + AccessCodeWarnings = accessCodeWarnings; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Errors associated with the access code. + /// + [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeErrors { get; set; } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Warnings associated with the access code. + /// + [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeWarnings { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.delay_in_removing_from_device"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors_model" + )] + public class EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors() { } + + public EventAccessCodeDelayInRemovingFromDeviceAccessCodeErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings_model" + )] + public class EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings() { } + + public EventAccessCodeDelayInRemovingFromDeviceAccessCodeWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors_model" + )] + public class EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors() { } + + public EventAccessCodeDelayInRemovingFromDeviceConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings_model" + )] + public class EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings() { } + + public EventAccessCodeDelayInRemovingFromDeviceConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceDeviceErrors_model")] + public class EventAccessCodeDelayInRemovingFromDeviceDeviceErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInRemovingFromDeviceDeviceErrors() { } + + public EventAccessCodeDelayInRemovingFromDeviceDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeDelayInRemovingFromDeviceDeviceWarnings_model")] + public class EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings() { } + + public EventAccessCodeDelayInRemovingFromDeviceDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) failed to be removed from a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDevice_model")] + public class EventAccessCodeFailedToRemoveFromDevice : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToRemoveFromDevice() { } + + public EventAccessCodeFailedToRemoveFromDevice( + List accessCodeErrors = + default, + string accessCodeId = default, + List accessCodeWarnings = + default, + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeErrors = accessCodeErrors; + AccessCodeId = accessCodeId; + AccessCodeWarnings = accessCodeWarnings; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Errors associated with the access code. + /// + [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeErrors { get; set; } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Warnings associated with the access code. + /// + [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeWarnings { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.failed_to_remove_from_device"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors_model")] + public class EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors() { } + + public EventAccessCodeFailedToRemoveFromDeviceAccessCodeErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings_model" + )] + public class EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings() { } + + public EventAccessCodeFailedToRemoveFromDeviceAccessCodeWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors_model" + )] + public class EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors() { } + + public EventAccessCodeFailedToRemoveFromDeviceConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings_model" + )] + public class EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings() { } + + public EventAccessCodeFailedToRemoveFromDeviceConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceDeviceErrors_model")] + public class EventAccessCodeFailedToRemoveFromDeviceDeviceErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToRemoveFromDeviceDeviceErrors() { } + + public EventAccessCodeFailedToRemoveFromDeviceDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAccessCodeFailedToRemoveFromDeviceDeviceWarnings_model")] + public class EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings() { } + + public EventAccessCodeFailedToRemoveFromDeviceDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was modified outside of Seam. + /// + [DataContract(Name = "seamModel_eventAccessCodeModifiedExternalToSeam_model")] + public class EventAccessCodeModifiedExternalToSeam : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeModifiedExternalToSeam() { } + + public EventAccessCodeModifiedExternalToSeam( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.modified_external_to_seam"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was deleted outside of Seam. + /// + [DataContract(Name = "seamModel_eventAccessCodeDeletedExternalToSeam_model")] + public class EventAccessCodeDeletedExternalToSeam : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeDeletedExternalToSeam() { } + + public EventAccessCodeDeletedExternalToSeam( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.deleted_external_to_seam"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [backup access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/backup-access-codes) was pulled from the backup access code pool and set on a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeBackupAccessCodePulled_model")] + public class EventAccessCodeBackupAccessCodePulled : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeBackupAccessCodePulled() { } + + public EventAccessCodeBackupAccessCodePulled( + string accessCodeId = default, + string backupAccessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + BackupAccessCodeId = backupAccessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// ID of the backup access code that was pulled from the pool. + /// + [DataMember(Name = "backup_access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string BackupAccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.backup_access_code_pulled"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was converted successfully to a managed access code. + /// + [DataContract(Name = "seamModel_eventAccessCodeUnmanagedConvertedToManaged_model")] + public class EventAccessCodeUnmanagedConvertedToManaged : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedConvertedToManaged() { } + + public EventAccessCodeUnmanagedConvertedToManaged( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.unmanaged.converted_to_managed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) failed to be converted to a managed access code. + /// + [DataContract(Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManaged_model")] + public class EventAccessCodeUnmanagedFailedToConvertToManaged : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedFailedToConvertToManaged() { } + + public EventAccessCodeUnmanagedFailedToConvertToManaged( + List accessCodeErrors = + default, + string accessCodeId = default, + List accessCodeWarnings = + default, + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + object? deviceCustomMetadata = default, + List deviceErrors = + default, + string deviceId = default, + List deviceWarnings = + default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeErrors = accessCodeErrors; + AccessCodeId = accessCodeId; + AccessCodeWarnings = accessCodeWarnings; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Errors associated with the access code. + /// + [DataMember(Name = "access_code_errors", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeErrors { get; set; } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Warnings associated with the access code. + /// + [DataMember(Name = "access_code_warnings", IsRequired = false, EmitDefaultValue = false)] + public List AccessCodeWarnings { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "access_code.unmanaged.failed_to_convert_to_managed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors_model" + )] + public class EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors() { } + + public EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings_model" + )] + public class EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings() { } + + public EventAccessCodeUnmanagedFailedToConvertToManagedAccessCodeWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors_model" + )] + public class EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors() { } + + public EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings_model" + )] + public class EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings() { } + + public EventAccessCodeUnmanagedFailedToConvertToManagedConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors_model" + )] + public class EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors() { } + + public EventAccessCodeUnmanagedFailedToConvertToManagedDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings_model" + )] + public class EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings() { } + + public EventAccessCodeUnmanagedFailedToConvertToManagedDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was created on a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeUnmanagedCreated_model")] + public class EventAccessCodeUnmanagedCreated : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedCreated() { } + + public EventAccessCodeUnmanagedCreated( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.unmanaged.created"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [unmanaged access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) was removed from a device. + /// + [DataContract(Name = "seamModel_eventAccessCodeUnmanagedRemoved_model")] + public class EventAccessCodeUnmanagedRemoved : Event + { + [JsonConstructorAttribute] + protected EventAccessCodeUnmanagedRemoved() { } + + public EventAccessCodeUnmanagedRemoved( + string accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the affected access code. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the device associated with the affected access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_code.unmanaged.removed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An Access Grant was created. + /// + [DataContract(Name = "seamModel_eventAccessGrantCreated_model")] + public class EventAccessGrantCreated : Event + { + [JsonConstructorAttribute] + protected EventAccessGrantCreated() { } + + public EventAccessGrantCreated( + string accessGrantId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_grant.created"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An Access Grant was deleted. + /// + [DataContract(Name = "seamModel_eventAccessGrantDeleted_model")] + public class EventAccessGrantDeleted : Event + { + [JsonConstructorAttribute] + protected EventAccessGrantDeleted() { } + + public EventAccessGrantDeleted( + string accessGrantId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_grant.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// All access requested for an Access Grant was successfully granted. + /// + [DataContract(Name = "seamModel_eventAccessGrantAccessGrantedToAllDoors_model")] + public class EventAccessGrantAccessGrantedToAllDoors : Event + { + [JsonConstructorAttribute] + protected EventAccessGrantAccessGrantedToAllDoors() { } + + public EventAccessGrantAccessGrantedToAllDoors( + string accessGrantId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_grant.access_granted_to_all_doors"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Access requested as part of an Access Grant to a particular door was successfully granted. + /// + [DataContract(Name = "seamModel_eventAccessGrantAccessGrantedToDoor_model")] + public class EventAccessGrantAccessGrantedToDoor : Event + { + [JsonConstructorAttribute] + protected EventAccessGrantAccessGrantedToDoor() { } + + public EventAccessGrantAccessGrantedToDoor( + string accessGrantId = default, + string acsEntranceId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + AcsEntranceId = acsEntranceId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// ID of the affected [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_grant.access_granted_to_door"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Access to a particular door that was requested as part of an Access Grant was lost. + /// + [DataContract(Name = "seamModel_eventAccessGrantAccessToDoorLost_model")] + public class EventAccessGrantAccessToDoorLost : Event + { + [JsonConstructorAttribute] + protected EventAccessGrantAccessToDoorLost() { } + + public EventAccessGrantAccessToDoorLost( + string accessGrantId = default, + string acsEntranceId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + AcsEntranceId = acsEntranceId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// ID of the affected [entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details). + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_grant.access_to_door_lost"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An Access Grant's start or end time was changed. + /// + [DataContract(Name = "seamModel_eventAccessGrantAccessTimesChanged_model")] + public class EventAccessGrantAccessTimesChanged : Event + { + [JsonConstructorAttribute] + protected EventAccessGrantAccessTimesChanged() { } + + public EventAccessGrantAccessTimesChanged( + string accessGrantId = default, + string? accessGrantKey = default, + string createdAt = default, + string? endsAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string? startsAt = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + AccessGrantKey = accessGrantKey; + CreatedAt = createdAt; + EndsAt = endsAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + StartsAt = startsAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// Key of the affected Access Grant (if present). + /// + [DataMember(Name = "access_grant_key", IsRequired = false, EmitDefaultValue = false)] + public string? AccessGrantKey { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The new end time for the access grant. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_grant.access_times_changed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// The new start time for the access grant. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// One or more requested access methods could not be created for an Access Grant. + /// + [DataContract(Name = "seamModel_eventAccessGrantCouldNotCreateRequestedAccessMethods_model")] + public class EventAccessGrantCouldNotCreateRequestedAccessMethods : Event + { + [JsonConstructorAttribute] + protected EventAccessGrantCouldNotCreateRequestedAccessMethods() { } + + public EventAccessGrantCouldNotCreateRequestedAccessMethods( + string accessGrantId = default, + string createdAt = default, + string errorMessage = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + List? missingDeviceIds = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + CreatedAt = createdAt; + ErrorMessage = errorMessage; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + MissingDeviceIds = missingDeviceIds; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Description of why the access methods could not be created. + /// + [DataMember(Name = "error_message", IsRequired = false, EmitDefaultValue = false)] + public string ErrorMessage { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "access_grant.could_not_create_requested_access_methods"; + + /// + /// IDs of the devices that did not receive a requested access method. Use these to identify which specific devices failed without having to fetch the Access Grant. + /// + [DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? MissingDeviceIds { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An access method was issued. + /// + [DataContract(Name = "seamModel_eventAccessMethodIssued_model")] + public class EventAccessMethodIssued : Event + { + [JsonConstructorAttribute] + protected EventAccessMethodIssued() { } + + public EventAccessMethodIssued( + List accessGrantIds = default, + List? accessGrantKeys = default, + string accessMethodId = default, + string? code = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + bool? isBackupCode = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + AccessMethodId = accessMethodId; + Code = code; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + IsBackupCode = isBackupCode; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// IDs of the access grants associated with this access method. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + /// + /// Keys of the access grants associated with this access method (if present). + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// ID of the affected access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// The actual PIN code for code access methods (only present when mode is 'code'). + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_method.issued"; + + /// + /// Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). + /// + [DataMember(Name = "is_backup_code", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBackupCode { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An access method was revoked. + /// + [DataContract(Name = "seamModel_eventAccessMethodRevoked_model")] + public class EventAccessMethodRevoked : Event + { + [JsonConstructorAttribute] + protected EventAccessMethodRevoked() { } + + public EventAccessMethodRevoked( + List accessGrantIds = default, + List? accessGrantKeys = default, + string accessMethodId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + AccessMethodId = accessMethodId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// IDs of the access grants associated with this access method. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + /// + /// Keys of the access grants associated with this access method (if present). + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// ID of the affected access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_method.revoked"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An access method representing a physical card requires encoding. + /// + [DataContract(Name = "seamModel_eventAccessMethodCardEncodingRequired_model")] + public class EventAccessMethodCardEncodingRequired : Event + { + [JsonConstructorAttribute] + protected EventAccessMethodCardEncodingRequired() { } + + public EventAccessMethodCardEncodingRequired( + List accessGrantIds = default, + List? accessGrantKeys = default, + string accessMethodId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + AccessMethodId = accessMethodId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// IDs of the access grants associated with this access method. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + /// + /// Keys of the access grants associated with this access method (if present). + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// ID of the affected access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_method.card_encoding_required"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An access method was deleted. + /// + [DataContract(Name = "seamModel_eventAccessMethodDeleted_model")] + public class EventAccessMethodDeleted : Event + { + [JsonConstructorAttribute] + protected EventAccessMethodDeleted() { } + + public EventAccessMethodDeleted( + List accessGrantIds = default, + List? accessGrantKeys = default, + string accessMethodId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + AccessMethodId = accessMethodId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// IDs of the access grants associated with this access method. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + /// + /// Keys of the access grants associated with this access method (if present). + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// ID of the affected access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_method.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An access method was reissued. + /// + [DataContract(Name = "seamModel_eventAccessMethodReissued_model")] + public class EventAccessMethodReissued : Event + { + [JsonConstructorAttribute] + protected EventAccessMethodReissued() { } + + public EventAccessMethodReissued( + List accessGrantIds = default, + List? accessGrantKeys = default, + string accessMethodId = default, + string? code = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + bool? isBackupCode = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + AccessMethodId = accessMethodId; + Code = code; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + IsBackupCode = isBackupCode; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// IDs of the access grants associated with this access method. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + /// + /// Keys of the access grants associated with this access method (if present). + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// ID of the affected access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// The actual PIN code for code access methods (only present when mode is 'code'). + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_method.reissued"; + + /// + /// Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). + /// + [DataMember(Name = "is_backup_code", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBackupCode { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An access method was created. + /// + [DataContract(Name = "seamModel_eventAccessMethodCreated_model")] + public class EventAccessMethodCreated : Event + { + [JsonConstructorAttribute] + protected EventAccessMethodCreated() { } + + public EventAccessMethodCreated( + List accessGrantIds = default, + List? accessGrantKeys = default, + string accessMethodId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + AccessMethodId = accessMethodId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// IDs of the access grants associated with this access method. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + /// + /// Keys of the access grants associated with this access method (if present). + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// ID of the affected access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_method.created"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Seam has not yet issued this access method, even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and the accompanying `delay_in_issuing` warning clears automatically once issuance succeeds. + /// + [DataContract(Name = "seamModel_eventAccessMethodDelayInIssuing_model")] + public class EventAccessMethodDelayInIssuing : Event + { + [JsonConstructorAttribute] + protected EventAccessMethodDelayInIssuing() { } + + public EventAccessMethodDelayInIssuing( + List accessGrantIds = default, + List? accessGrantKeys = default, + string accessMethodId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + AccessMethodId = accessMethodId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// IDs of the access grants associated with this access method. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + /// + /// Keys of the access grants associated with this access method (if present). + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// ID of the affected access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_method.delay_in_issuing"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Seam was unable to issue this access method before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and the accompanying `failed_to_issue` error clears automatically if the access method is eventually issued. + /// + [DataContract(Name = "seamModel_eventAccessMethodFailedToIssue_model")] + public class EventAccessMethodFailedToIssue : Event + { + [JsonConstructorAttribute] + protected EventAccessMethodFailedToIssue() { } + + public EventAccessMethodFailedToIssue( + List accessGrantIds = default, + List? accessGrantKeys = default, + string accessMethodId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessGrantIds = accessGrantIds; + AccessGrantKeys = accessGrantKeys; + AccessMethodId = accessMethodId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// IDs of the access grants associated with this access method. + /// + [DataMember(Name = "access_grant_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessGrantIds { get; set; } + + /// + /// Keys of the access grants associated with this access method (if present). + /// + [DataMember(Name = "access_grant_keys", IsRequired = false, EmitDefaultValue = false)] + public List? AccessGrantKeys { get; set; } + + /// + /// ID of the affected access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "access_method.failed_to_issue"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was connected. + /// + [DataContract(Name = "seamModel_eventAcsSystemConnected_model")] + public class EventAcsSystemConnected : Event + { + [JsonConstructorAttribute] + protected EventAcsSystemConnected() { } + + public EventAcsSystemConnected( + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_system.connected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was added. + /// + [DataContract(Name = "seamModel_eventAcsSystemAdded_model")] + public class EventAcsSystemAdded : Event + { + [JsonConstructorAttribute] + protected EventAcsSystemAdded() { } + + public EventAcsSystemAdded( + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_system.added"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system](https://www.seam.co/docs/low-level-apis/access-systems) was disconnected. + /// + [DataContract(Name = "seamModel_eventAcsSystemDisconnected_model")] + public class EventAcsSystemDisconnected : Event + { + [JsonConstructorAttribute] + protected EventAcsSystemDisconnected() { } + + public EventAcsSystemDisconnected( + List acsSystemErrors = default, + string acsSystemId = default, + List acsSystemWarnings = default, + List connectedAccountErrors = default, + string? connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsSystemErrors = acsSystemErrors; + AcsSystemId = acsSystemId; + AcsSystemWarnings = acsSystemWarnings; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Errors associated with the access control system. + /// + [DataMember(Name = "acs_system_errors", IsRequired = false, EmitDefaultValue = false)] + public List AcsSystemErrors { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// Warnings associated with the access control system. + /// + [DataMember(Name = "acs_system_warnings", IsRequired = false, EmitDefaultValue = false)] + public List AcsSystemWarnings { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_system.disconnected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAcsSystemDisconnectedAcsSystemErrors_model")] + public class EventAcsSystemDisconnectedAcsSystemErrors + { + [JsonConstructorAttribute] + protected EventAcsSystemDisconnectedAcsSystemErrors() { } + + public EventAcsSystemDisconnectedAcsSystemErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAcsSystemDisconnectedAcsSystemWarnings_model")] + public class EventAcsSystemDisconnectedAcsSystemWarnings + { + [JsonConstructorAttribute] + protected EventAcsSystemDisconnectedAcsSystemWarnings() { } + + public EventAcsSystemDisconnectedAcsSystemWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAcsSystemDisconnectedConnectedAccountErrors_model")] + public class EventAcsSystemDisconnectedConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventAcsSystemDisconnectedConnectedAccountErrors() { } + + public EventAcsSystemDisconnectedConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventAcsSystemDisconnectedConnectedAccountWarnings_model")] + public class EventAcsSystemDisconnectedConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventAcsSystemDisconnectedConnectedAccountWarnings() { } + + public EventAcsSystemDisconnectedConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was deleted. + /// + [DataContract(Name = "seamModel_eventAcsCredentialDeleted_model")] + public class EventAcsCredentialDeleted : Event + { + [JsonConstructorAttribute] + protected EventAcsCredentialDeleted() { } + + public EventAcsCredentialDeleted( + string acsCredentialId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsCredentialId = acsCredentialId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected credential. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_credential.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was issued. + /// + [DataContract(Name = "seamModel_eventAcsCredentialIssued_model")] + public class EventAcsCredentialIssued : Event + { + [JsonConstructorAttribute] + protected EventAcsCredentialIssued() { } + + public EventAcsCredentialIssued( + string acsCredentialId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsCredentialId = acsCredentialId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected credential. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_credential.issued"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was reissued. + /// + [DataContract(Name = "seamModel_eventAcsCredentialReissued_model")] + public class EventAcsCredentialReissued : Event + { + [JsonConstructorAttribute] + protected EventAcsCredentialReissued() { } + + public EventAcsCredentialReissued( + string acsCredentialId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsCredentialId = acsCredentialId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected credential. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_credential.reissued"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system credential](https://www.seam.co/docs/low-level-apis/access-systems/managing-credentials) was invalidated. That is, the credential cannot be used anymore. + /// + [DataContract(Name = "seamModel_eventAcsCredentialInvalidated_model")] + public class EventAcsCredentialInvalidated : Event + { + [JsonConstructorAttribute] + protected EventAcsCredentialInvalidated() { } + + public EventAcsCredentialInvalidated( + string acsCredentialId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsCredentialId = acsCredentialId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected credential. + /// + [DataMember(Name = "acs_credential_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsCredentialId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_credential.invalidated"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was created. + /// + [DataContract(Name = "seamModel_eventAcsUserCreated_model")] + public class EventAcsUserCreated : Event + { + [JsonConstructorAttribute] + protected EventAcsUserCreated() { } + + public EventAcsUserCreated( + string acsSystemId = default, + string acsUserId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the affected access system user. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsUserId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_user.created"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system user](https://www.seam.co/docs/low-level-apis/access-systems/user-management) was deleted. + /// + [DataContract(Name = "seamModel_eventAcsUserDeleted_model")] + public class EventAcsUserDeleted : Event + { + [JsonConstructorAttribute] + protected EventAcsUserDeleted() { } + + public EventAcsUserDeleted( + string acsSystemId = default, + string acsUserId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the affected access system user. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsUserId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_user.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was added. + /// + [DataContract(Name = "seamModel_eventAcsEncoderAdded_model")] + public class EventAcsEncoderAdded : Event + { + [JsonConstructorAttribute] + protected EventAcsEncoderAdded() { } + + public EventAcsEncoderAdded( + string acsEncoderId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsEncoderId = acsEncoderId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected encoder. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_encoder.added"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system encoder](https://www.seam.co/docs/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was removed. + /// + [DataContract(Name = "seamModel_eventAcsEncoderRemoved_model")] + public class EventAcsEncoderRemoved : Event + { + [JsonConstructorAttribute] + protected EventAcsEncoderRemoved() { } + + public EventAcsEncoderRemoved( + string acsEncoderId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsEncoderId = acsEncoderId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected encoder. + /// + [DataMember(Name = "acs_encoder_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsEncoderId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_encoder.removed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An ACS access group was deleted. + /// + [DataContract(Name = "seamModel_eventAcsAccessGroupDeleted_model")] + public class EventAcsAccessGroupDeleted : Event + { + [JsonConstructorAttribute] + protected EventAcsAccessGroupDeleted() { } + + public EventAcsAccessGroupDeleted( + string acsAccessGroupId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsAccessGroupId = acsAccessGroupId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected access group. + /// + [DataMember(Name = "acs_access_group_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsAccessGroupId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_access_group.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was added. + /// + [DataContract(Name = "seamModel_eventAcsEntranceAdded_model")] + public class EventAcsEntranceAdded : Event + { + [JsonConstructorAttribute] + protected EventAcsEntranceAdded() { } + + public EventAcsEntranceAdded( + string acsEntranceId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsEntranceId = acsEntranceId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected entrance. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_entrance.added"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [access system entrance](https://www.seam.co/docs/low-level-apis/access-systems/retrieving-entrance-details) was removed. + /// + [DataContract(Name = "seamModel_eventAcsEntranceRemoved_model")] + public class EventAcsEntranceRemoved : Event + { + [JsonConstructorAttribute] + protected EventAcsEntranceRemoved() { } + + public EventAcsEntranceRemoved( + string acsEntranceId = default, + string acsSystemId = default, + string? connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AcsEntranceId = acsEntranceId; + AcsSystemId = acsSystemId; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected entrance. + /// + [DataMember(Name = "acs_entrance_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsEntranceId { get; set; } + + /// + /// ID of the access system. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public string AcsSystemId { get; set; } + + /// + /// ID of the connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "acs_entrance.removed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A client session was deleted. + /// + [DataContract(Name = "seamModel_eventClientSessionDeleted_model")] + public class EventClientSessionDeleted : Event + { + [JsonConstructorAttribute] + protected EventClientSessionDeleted() { } + + public EventClientSessionDeleted( + string clientSessionId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ClientSessionId = clientSessionId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected client session. + /// + [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] + public string ClientSessionId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "client_session.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A connected account was connected for the first time or was reconnected after being disconnected. + /// + [DataContract(Name = "seamModel_eventConnectedAccountConnected_model")] + public class EventConnectedAccountConnected : Event + { + [JsonConstructorAttribute] + protected EventConnectedAccountConnected() { } + + public EventConnectedAccountConnected( + string? connectWebviewId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the Connect Webview associated with the event. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectWebviewId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the affected connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with this connected account, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connected_account.connected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A connected account was created. + /// + [DataContract(Name = "seamModel_eventConnectedAccountCreated_model")] + public class EventConnectedAccountCreated : Event + { + [JsonConstructorAttribute] + protected EventConnectedAccountCreated() { } + + public EventConnectedAccountCreated( + string connectWebviewId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the Connect Webview associated with the event. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectWebviewId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the affected connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connected_account.created"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A connected account had a successful login using a Connect Webview. + /// + [Obsolete("Use `connect_webview.login_succeeded`.")] + [DataContract(Name = "seamModel_eventConnectedAccountSuccessfulLogin_model")] + public class EventConnectedAccountSuccessfulLogin : Event + { + [JsonConstructorAttribute] + protected EventConnectedAccountSuccessfulLogin() { } + + public EventConnectedAccountSuccessfulLogin( + string connectWebviewId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the Connect Webview associated with the event. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectWebviewId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the affected connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connected_account.successful_login"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A connected account was disconnected. + /// + [DataContract(Name = "seamModel_eventConnectedAccountDisconnected_model")] + public class EventConnectedAccountDisconnected : Event + { + [JsonConstructorAttribute] + protected EventConnectedAccountDisconnected() { } + + public EventConnectedAccountDisconnected( + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the affected connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connected_account.disconnected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventConnectedAccountDisconnectedConnectedAccountErrors_model")] + public class EventConnectedAccountDisconnectedConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventConnectedAccountDisconnectedConnectedAccountErrors() { } + + public EventConnectedAccountDisconnectedConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventConnectedAccountDisconnectedConnectedAccountWarnings_model" + )] + public class EventConnectedAccountDisconnectedConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventConnectedAccountDisconnectedConnectedAccountWarnings() { } + + public EventConnectedAccountDisconnectedConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A connected account completed the first sync with Seam, and the corresponding devices or systems are now available. + /// + [DataContract(Name = "seamModel_eventConnectedAccountCompletedFirstSync_model")] + public class EventConnectedAccountCompletedFirstSync : Event + { + [JsonConstructorAttribute] + protected EventConnectedAccountCompletedFirstSync() { } + + public EventConnectedAccountCompletedFirstSync( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the affected connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connected_account.completed_first_sync"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A connected account was deleted. + /// + [DataContract(Name = "seamModel_eventConnectedAccountDeleted_model")] + public class EventConnectedAccountDeleted : Event + { + [JsonConstructorAttribute] + protected EventConnectedAccountDeleted() { } + + public EventConnectedAccountDeleted( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the affected connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with this connected account, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connected_account.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A connected account completed the first sync after reconnection with Seam, and the corresponding devices or systems are now available. + /// + [DataContract( + Name = "seamModel_eventConnectedAccountCompletedFirstSyncAfterReconnection_model" + )] + public class EventConnectedAccountCompletedFirstSyncAfterReconnection : Event + { + [JsonConstructorAttribute] + protected EventConnectedAccountCompletedFirstSyncAfterReconnection() { } + + public EventConnectedAccountCompletedFirstSyncAfterReconnection( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the affected connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "connected_account.completed_first_sync_after_reconnection"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A connected account requires reauthorization using a new Connect Webview. The account is still connected, but cannot access new features. Delaying reauthorization too long will eventually cause the Connected Account to become disconnected. + /// + [DataContract(Name = "seamModel_eventConnectedAccountReauthorizationRequested_model")] + public class EventConnectedAccountReauthorizationRequested : Event + { + [JsonConstructorAttribute] + protected EventConnectedAccountReauthorizationRequested() { } + + public EventConnectedAccountReauthorizationRequested( + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the affected connected account. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connected_account.reauthorization_requested"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventConnectedAccountReauthorizationRequestedConnectedAccountErrors_model" + )] + public class EventConnectedAccountReauthorizationRequestedConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventConnectedAccountReauthorizationRequestedConnectedAccountErrors() { } + + public EventConnectedAccountReauthorizationRequestedConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventConnectedAccountReauthorizationRequestedConnectedAccountWarnings_model" + )] + public class EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings() { } + + public EventConnectedAccountReauthorizationRequestedConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A lock door action attempt succeeded. + /// + [DataContract(Name = "seamModel_eventActionAttemptLockDoorSucceeded_model")] + public class EventActionAttemptLockDoorSucceeded : Event + { + [JsonConstructorAttribute] + protected EventActionAttemptLockDoorSucceeded() { } + + public EventActionAttemptLockDoorSucceeded( + string actionAttemptId = default, + string actionType = default, + string? connectedAccountId = default, + string createdAt = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string status = default, + string workspaceId = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Status = status; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + /// + /// Type of the action. + /// + [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] + public string ActionType { get; set; } + + /// + /// ID of the connected account associated with the action attempt, if applicable. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device associated with the action attempt, if applicable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "action_attempt.lock_door.succeeded"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Status of the action. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A lock door action attempt failed. + /// + [DataContract(Name = "seamModel_eventActionAttemptLockDoorFailed_model")] + public class EventActionAttemptLockDoorFailed : Event + { + [JsonConstructorAttribute] + protected EventActionAttemptLockDoorFailed() { } + + public EventActionAttemptLockDoorFailed( + string actionAttemptId = default, + string actionType = default, + string? connectedAccountId = default, + string createdAt = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string status = default, + string workspaceId = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Status = status; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + /// + /// Type of the action. + /// + [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] + public string ActionType { get; set; } + + /// + /// ID of the connected account associated with the action attempt, if applicable. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device associated with the action attempt, if applicable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "action_attempt.lock_door.failed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Status of the action. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An unlock door action attempt succeeded. + /// + [DataContract(Name = "seamModel_eventActionAttemptUnlockDoorSucceeded_model")] + public class EventActionAttemptUnlockDoorSucceeded : Event + { + [JsonConstructorAttribute] + protected EventActionAttemptUnlockDoorSucceeded() { } + + public EventActionAttemptUnlockDoorSucceeded( + string actionAttemptId = default, + string actionType = default, + string? connectedAccountId = default, + string createdAt = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string status = default, + string workspaceId = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Status = status; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + /// + /// Type of the action. + /// + [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] + public string ActionType { get; set; } + + /// + /// ID of the connected account associated with the action attempt, if applicable. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device associated with the action attempt, if applicable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "action_attempt.unlock_door.succeeded"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Status of the action. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An unlock door action attempt failed. + /// + [DataContract(Name = "seamModel_eventActionAttemptUnlockDoorFailed_model")] + public class EventActionAttemptUnlockDoorFailed : Event + { + [JsonConstructorAttribute] + protected EventActionAttemptUnlockDoorFailed() { } + + public EventActionAttemptUnlockDoorFailed( + string actionAttemptId = default, + string actionType = default, + string? connectedAccountId = default, + string createdAt = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string status = default, + string workspaceId = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Status = status; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + /// + /// Type of the action. + /// + [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] + public string ActionType { get; set; } + + /// + /// ID of the connected account associated with the action attempt, if applicable. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device associated with the action attempt, if applicable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "action_attempt.unlock_door.failed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Status of the action. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A simulate keypad code entry action attempt succeeded. + /// + [DataContract(Name = "seamModel_eventActionAttemptSimulateKeypadCodeEntrySucceeded_model")] + public class EventActionAttemptSimulateKeypadCodeEntrySucceeded : Event + { + [JsonConstructorAttribute] + protected EventActionAttemptSimulateKeypadCodeEntrySucceeded() { } + + public EventActionAttemptSimulateKeypadCodeEntrySucceeded( + string actionAttemptId = default, + string actionType = default, + string? connectedAccountId = default, + string createdAt = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string status = default, + string workspaceId = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Status = status; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + /// + /// Type of the action. + /// + [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] + public string ActionType { get; set; } + + /// + /// ID of the connected account associated with the action attempt, if applicable. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device associated with the action attempt, if applicable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "action_attempt.simulate_keypad_code_entry.succeeded"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Status of the action. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A simulate keypad code entry action attempt failed. + /// + [DataContract(Name = "seamModel_eventActionAttemptSimulateKeypadCodeEntryFailed_model")] + public class EventActionAttemptSimulateKeypadCodeEntryFailed : Event + { + [JsonConstructorAttribute] + protected EventActionAttemptSimulateKeypadCodeEntryFailed() { } + + public EventActionAttemptSimulateKeypadCodeEntryFailed( + string actionAttemptId = default, + string actionType = default, + string? connectedAccountId = default, + string createdAt = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string status = default, + string workspaceId = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Status = status; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + /// + /// Type of the action. + /// + [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] + public string ActionType { get; set; } + + /// + /// ID of the connected account associated with the action attempt, if applicable. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device associated with the action attempt, if applicable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "action_attempt.simulate_keypad_code_entry.failed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Status of the action. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A simulate manual lock via keypad action attempt succeeded. + /// + [DataContract(Name = "seamModel_eventActionAttemptSimulateManualLockViaKeypadSucceeded_model")] + public class EventActionAttemptSimulateManualLockViaKeypadSucceeded : Event + { + [JsonConstructorAttribute] + protected EventActionAttemptSimulateManualLockViaKeypadSucceeded() { } + + public EventActionAttemptSimulateManualLockViaKeypadSucceeded( + string actionAttemptId = default, + string actionType = default, + string? connectedAccountId = default, + string createdAt = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string status = default, + string workspaceId = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Status = status; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + /// + /// Type of the action. + /// + [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] + public string ActionType { get; set; } + + /// + /// ID of the connected account associated with the action attempt, if applicable. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device associated with the action attempt, if applicable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "action_attempt.simulate_manual_lock_via_keypad.succeeded"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Status of the action. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A simulate manual lock via keypad action attempt failed. + /// + [DataContract(Name = "seamModel_eventActionAttemptSimulateManualLockViaKeypadFailed_model")] + public class EventActionAttemptSimulateManualLockViaKeypadFailed : Event + { + [JsonConstructorAttribute] + protected EventActionAttemptSimulateManualLockViaKeypadFailed() { } + + public EventActionAttemptSimulateManualLockViaKeypadFailed( + string actionAttemptId = default, + string actionType = default, + string? connectedAccountId = default, + string createdAt = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string status = default, + string workspaceId = default + ) + { + ActionAttemptId = actionAttemptId; + ActionType = actionType; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Status = status; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected action attempt. + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string ActionAttemptId { get; set; } + + /// + /// Type of the action. + /// + [DataMember(Name = "action_type", IsRequired = false, EmitDefaultValue = false)] + public string ActionType { get; set; } + + /// + /// ID of the connected account associated with the action attempt, if applicable. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device associated with the action attempt, if applicable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "action_attempt.simulate_manual_lock_via_keypad.failed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Status of the action. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A Connect Webview login succeeded. + /// + [DataContract(Name = "seamModel_eventConnectWebviewLoginSucceeded_model")] + public class EventConnectWebviewLoginSucceeded : Event + { + [JsonConstructorAttribute] + protected EventConnectWebviewLoginSucceeded() { } + + public EventConnectWebviewLoginSucceeded( + string connectWebviewId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectWebviewId = connectWebviewId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Connect Webview. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectWebviewId { get; set; } + + /// + /// Custom metadata of the connected account; present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with this connect webview, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connect_webview.login_succeeded"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A Connect Webview login failed. + /// + [DataContract(Name = "seamModel_eventConnectWebviewLoginFailed_model")] + public class EventConnectWebviewLoginFailed : Event + { + [JsonConstructorAttribute] + protected EventConnectWebviewLoginFailed() { } + + public EventConnectWebviewLoginFailed( + string connectWebviewId = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectWebviewId = connectWebviewId; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// ID of the affected Connect Webview. + /// + [DataMember(Name = "connect_webview_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectWebviewId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "connect_webview.login_failed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The status of a device changed from offline to online. That is, the `device.properties.online` property changed from `false` to `true`. Note that some devices operate entirely in offline mode, so Seam never emits a `device.connected` event for these devices. + /// + [DataContract(Name = "seamModel_eventDeviceConnected_model")] + public class EventDeviceConnected : Event + { + [JsonConstructorAttribute] + protected EventDeviceConnected() { } + + public EventDeviceConnected( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.connected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A device was added to Seam or was re-added to Seam after having been removed. + /// + [DataContract(Name = "seamModel_eventDeviceAdded_model")] + public class EventDeviceAdded : Event + { + [JsonConstructorAttribute] + protected EventDeviceAdded() { } + + public EventDeviceAdded( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.added"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A managed device was successfully converted to an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). + /// + [DataContract(Name = "seamModel_eventDeviceConvertedToUnmanaged_model")] + public class EventDeviceConvertedToUnmanaged : Event + { + [JsonConstructorAttribute] + protected EventDeviceConvertedToUnmanaged() { } + + public EventDeviceConvertedToUnmanaged( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.converted_to_unmanaged"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) was successfully converted to a managed device. + /// + [DataContract(Name = "seamModel_eventDeviceUnmanagedConvertedToManaged_model")] + public class EventDeviceUnmanagedConvertedToManaged : Event + { + [JsonConstructorAttribute] + protected EventDeviceUnmanagedConvertedToManaged() { } + + public EventDeviceUnmanagedConvertedToManaged( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.unmanaged.converted_to_managed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The status of an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) changed from offline to online. That is, the `device.properties.online` property changed from `false` to `true`. + /// + [DataContract(Name = "seamModel_eventDeviceUnmanagedConnected_model")] + public class EventDeviceUnmanagedConnected : Event + { + [JsonConstructorAttribute] + protected EventDeviceUnmanagedConnected() { } + + public EventDeviceUnmanagedConnected( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.unmanaged.connected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The status of a device changed from online to offline. That is, the `device.properties.online` property changed from `true` to `false`. + /// + [DataContract(Name = "seamModel_eventDeviceDisconnected_model")] + public class EventDeviceDisconnected : Event + { + [JsonConstructorAttribute] + protected EventDeviceDisconnected() { } + + public EventDeviceDisconnected( + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + EventDeviceDisconnected.ErrorCodeEnum errorCode = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + ErrorCode = errorCode; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Error code associated with the disconnection event, if any. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ErrorCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "account_disconnected")] + AccountDisconnected = 1, + + [EnumMember(Value = "hub_disconnected")] + HubDisconnected = 2, + + [EnumMember(Value = "device_disconnected")] + DeviceDisconnected = 3, + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Error code associated with the disconnection event, if any. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public EventDeviceDisconnected.ErrorCodeEnum ErrorCode { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.disconnected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceDisconnectedConnectedAccountErrors_model")] + public class EventDeviceDisconnectedConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventDeviceDisconnectedConnectedAccountErrors() { } + + public EventDeviceDisconnectedConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceDisconnectedConnectedAccountWarnings_model")] + public class EventDeviceDisconnectedConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventDeviceDisconnectedConnectedAccountWarnings() { } + + public EventDeviceDisconnectedConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceDisconnectedDeviceErrors_model")] + public class EventDeviceDisconnectedDeviceErrors + { + [JsonConstructorAttribute] + protected EventDeviceDisconnectedDeviceErrors() { } + + public EventDeviceDisconnectedDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceDisconnectedDeviceWarnings_model")] + public class EventDeviceDisconnectedDeviceWarnings + { + [JsonConstructorAttribute] + protected EventDeviceDisconnectedDeviceWarnings() { } + + public EventDeviceDisconnectedDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The status of an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices) changed from online to offline. That is, the `device.properties.online` property changed from `true` to `false`. + /// + [DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnected_model")] + public class EventDeviceUnmanagedDisconnected : Event + { + [JsonConstructorAttribute] + protected EventDeviceUnmanagedDisconnected() { } + + public EventDeviceUnmanagedDisconnected( + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + EventDeviceUnmanagedDisconnected.ErrorCodeEnum errorCode = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + ErrorCode = errorCode; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Error code associated with the disconnection event, if any. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ErrorCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "account_disconnected")] + AccountDisconnected = 1, + + [EnumMember(Value = "hub_disconnected")] + HubDisconnected = 2, + + [EnumMember(Value = "device_disconnected")] + DeviceDisconnected = 3, + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Error code associated with the disconnection event, if any. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public EventDeviceUnmanagedDisconnected.ErrorCodeEnum ErrorCode { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.unmanaged.disconnected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedConnectedAccountErrors_model")] + public class EventDeviceUnmanagedDisconnectedConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventDeviceUnmanagedDisconnectedConnectedAccountErrors() { } + + public EventDeviceUnmanagedDisconnectedConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventDeviceUnmanagedDisconnectedConnectedAccountWarnings_model" + )] + public class EventDeviceUnmanagedDisconnectedConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventDeviceUnmanagedDisconnectedConnectedAccountWarnings() { } + + public EventDeviceUnmanagedDisconnectedConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedDeviceErrors_model")] + public class EventDeviceUnmanagedDisconnectedDeviceErrors + { + [JsonConstructorAttribute] + protected EventDeviceUnmanagedDisconnectedDeviceErrors() { } + + public EventDeviceUnmanagedDisconnectedDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceUnmanagedDisconnectedDeviceWarnings_model")] + public class EventDeviceUnmanagedDisconnectedDeviceWarnings + { + [JsonConstructorAttribute] + protected EventDeviceUnmanagedDisconnectedDeviceWarnings() { } + + public EventDeviceUnmanagedDisconnectedDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A device detected that it was tampered with, for example, opened or moved. + /// + [DataContract(Name = "seamModel_eventDeviceTampered_model")] + public class EventDeviceTampered : Event + { + [JsonConstructorAttribute] + protected EventDeviceTampered() { } + + public EventDeviceTampered( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.tampered"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A device battery level dropped below the low threshold. + /// + [DataContract(Name = "seamModel_eventDeviceLowBattery_model")] + public class EventDeviceLowBattery : Event + { + [JsonConstructorAttribute] + protected EventDeviceLowBattery() { } + + public EventDeviceLowBattery( + float? accessoryKeypadBatteryLevel = default, + float batteryLevel = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + float? deviceBatteryLevel = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessoryKeypadBatteryLevel = accessoryKeypadBatteryLevel; + BatteryLevel = batteryLevel; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceBatteryLevel = deviceBatteryLevel; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known. + /// + [DataMember( + Name = "accessory_keypad_battery_level", + IsRequired = false, + EmitDefaultValue = false + )] + public float? AccessoryKeypadBatteryLevel { get; set; } + + /// + /// Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event. + /// + [Obsolete( + "Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery." + )] + [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] + public float BatteryLevel { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Number in the range 0 to 1.0 indicating the affected device's own battery level, when known. + /// + [DataMember(Name = "device_battery_level", IsRequired = false, EmitDefaultValue = false)] + public float? DeviceBatteryLevel { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.low_battery"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A device battery status changed since the last `battery_status_changed` event. + /// + [DataContract(Name = "seamModel_eventDeviceBatteryStatusChanged_model")] + public class EventDeviceBatteryStatusChanged : Event + { + [JsonConstructorAttribute] + protected EventDeviceBatteryStatusChanged() { } + + public EventDeviceBatteryStatusChanged( + float batteryLevel = default, + EventDeviceBatteryStatusChanged.BatteryStatusEnum batteryStatus = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + BatteryLevel = batteryLevel; + BatteryStatus = batteryStatus; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Battery status of the affected device, calculated from the numeric `battery_level` value. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum BatteryStatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "critical")] + Critical = 1, + + [EnumMember(Value = "low")] + Low = 2, + + [EnumMember(Value = "good")] + Good = 3, + + [EnumMember(Value = "full")] + Full = 4, + } + + /// + /// Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. + /// + [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] + public float BatteryLevel { get; set; } + + /// + /// Battery status of the affected device, calculated from the numeric `battery_level` value. + /// + [DataMember(Name = "battery_status", IsRequired = false, EmitDefaultValue = false)] + public EventDeviceBatteryStatusChanged.BatteryStatusEnum BatteryStatus { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.battery_status_changed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A device was removed externally from the connected account. + /// + [DataContract(Name = "seamModel_eventDeviceRemoved_model")] + public class EventDeviceRemoved : Event + { + [JsonConstructorAttribute] + protected EventDeviceRemoved() { } + + public EventDeviceRemoved( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.removed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A device was deleted. + /// + [DataContract(Name = "seamModel_eventDeviceDeleted_model")] + public class EventDeviceDeleted : Event + { + [JsonConstructorAttribute] + protected EventDeviceDeleted() { } + + public EventDeviceDeleted( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? deviceName = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + DeviceName = deviceName; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Name of the deleted device, captured at deletion time. The device record no longer exists when this event fires, so the name is preserved here. Null when the device had no resolvable name. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceName { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Seam detected that a device is using a third-party integration that will interfere with Seam device management. + /// + [DataContract(Name = "seamModel_eventDeviceThirdPartyIntegrationDetected_model")] + public class EventDeviceThirdPartyIntegrationDetected : Event + { + [JsonConstructorAttribute] + protected EventDeviceThirdPartyIntegrationDetected() { } + + public EventDeviceThirdPartyIntegrationDetected( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.third_party_integration_detected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Seam detected that a device is no longer using a third-party integration that was interfering with Seam device management. + /// + [DataContract(Name = "seamModel_eventDeviceThirdPartyIntegrationNoLongerDetected_model")] + public class EventDeviceThirdPartyIntegrationNoLongerDetected : Event + { + [JsonConstructorAttribute] + protected EventDeviceThirdPartyIntegrationNoLongerDetected() { } + + public EventDeviceThirdPartyIntegrationNoLongerDetected( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "device.third_party_integration_no_longer_detected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [Salto device](https://www.seam.co/docs/device-and-system-integration-guides/salto-locks) activated privacy mode. + /// + [DataContract(Name = "seamModel_eventDeviceSaltoPrivacyModeActivated_model")] + public class EventDeviceSaltoPrivacyModeActivated : Event + { + [JsonConstructorAttribute] + protected EventDeviceSaltoPrivacyModeActivated() { } + + public EventDeviceSaltoPrivacyModeActivated( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.salto.privacy_mode_activated"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [Salto device](https://www.seam.co/docs/device-and-system-integration-guides/salto-locks) deactivated privacy mode. + /// + [DataContract(Name = "seamModel_eventDeviceSaltoPrivacyModeDeactivated_model")] + public class EventDeviceSaltoPrivacyModeDeactivated : Event + { + [JsonConstructorAttribute] + protected EventDeviceSaltoPrivacyModeDeactivated() { } + + public EventDeviceSaltoPrivacyModeDeactivated( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.salto.privacy_mode_deactivated"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Seam detected a flaky device connection. + /// + [DataContract(Name = "seamModel_eventDeviceConnectionBecameFlaky_model")] + public class EventDeviceConnectionBecameFlaky : Event + { + [JsonConstructorAttribute] + protected EventDeviceConnectionBecameFlaky() { } + + public EventDeviceConnectionBecameFlaky( + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.connection_became_flaky"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyConnectedAccountErrors_model")] + public class EventDeviceConnectionBecameFlakyConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventDeviceConnectionBecameFlakyConnectedAccountErrors() { } + + public EventDeviceConnectionBecameFlakyConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventDeviceConnectionBecameFlakyConnectedAccountWarnings_model" + )] + public class EventDeviceConnectionBecameFlakyConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventDeviceConnectionBecameFlakyConnectedAccountWarnings() { } + + public EventDeviceConnectionBecameFlakyConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyDeviceErrors_model")] + public class EventDeviceConnectionBecameFlakyDeviceErrors + { + [JsonConstructorAttribute] + protected EventDeviceConnectionBecameFlakyDeviceErrors() { } + + public EventDeviceConnectionBecameFlakyDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceConnectionBecameFlakyDeviceWarnings_model")] + public class EventDeviceConnectionBecameFlakyDeviceWarnings + { + [JsonConstructorAttribute] + protected EventDeviceConnectionBecameFlakyDeviceWarnings() { } + + public EventDeviceConnectionBecameFlakyDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Seam detected that a previously-flaky device connection stabilized. + /// + [DataContract(Name = "seamModel_eventDeviceConnectionStabilized_model")] + public class EventDeviceConnectionStabilized : Event + { + [JsonConstructorAttribute] + protected EventDeviceConnectionStabilized() { } + + public EventDeviceConnectionStabilized( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.connection_stabilized"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A third-party subscription is required to use all device features. + /// + [DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequired_model")] + public class EventDeviceErrorSubscriptionRequired : Event + { + [JsonConstructorAttribute] + protected EventDeviceErrorSubscriptionRequired() { } + + public EventDeviceErrorSubscriptionRequired( + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.error.subscription_required"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventDeviceErrorSubscriptionRequiredConnectedAccountErrors_model" + )] + public class EventDeviceErrorSubscriptionRequiredConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventDeviceErrorSubscriptionRequiredConnectedAccountErrors() { } + + public EventDeviceErrorSubscriptionRequiredConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventDeviceErrorSubscriptionRequiredConnectedAccountWarnings_model" + )] + public class EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings() { } + + public EventDeviceErrorSubscriptionRequiredConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredDeviceErrors_model")] + public class EventDeviceErrorSubscriptionRequiredDeviceErrors + { + [JsonConstructorAttribute] + protected EventDeviceErrorSubscriptionRequiredDeviceErrors() { } + + public EventDeviceErrorSubscriptionRequiredDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredDeviceWarnings_model")] + public class EventDeviceErrorSubscriptionRequiredDeviceWarnings + { + [JsonConstructorAttribute] + protected EventDeviceErrorSubscriptionRequiredDeviceWarnings() { } + + public EventDeviceErrorSubscriptionRequiredDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A third-party subscription is active or no longer required to use all device features. + /// + [DataContract(Name = "seamModel_eventDeviceErrorSubscriptionRequiredResolved_model")] + public class EventDeviceErrorSubscriptionRequiredResolved : Event + { + [JsonConstructorAttribute] + protected EventDeviceErrorSubscriptionRequiredResolved() { } + + public EventDeviceErrorSubscriptionRequiredResolved( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.error.subscription_required.resolved"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An accessory keypad was connected to a device. + /// + [DataContract(Name = "seamModel_eventDeviceAccessoryKeypadConnected_model")] + public class EventDeviceAccessoryKeypadConnected : Event + { + [JsonConstructorAttribute] + protected EventDeviceAccessoryKeypadConnected() { } + + public EventDeviceAccessoryKeypadConnected( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.accessory_keypad_connected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// An accessory keypad was disconnected from a device. + /// + [DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnected_model")] + public class EventDeviceAccessoryKeypadDisconnected : Event + { + [JsonConstructorAttribute] + protected EventDeviceAccessoryKeypadDisconnected() { } + + public EventDeviceAccessoryKeypadDisconnected( + object? connectedAccountCustomMetadata = default, + List connectedAccountErrors = + default, + string connectedAccountId = default, + List connectedAccountWarnings = + default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + List deviceErrors = default, + string deviceId = default, + List deviceWarnings = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountErrors = connectedAccountErrors; + ConnectedAccountId = connectedAccountId; + ConnectedAccountWarnings = connectedAccountWarnings; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceErrors = deviceErrors; + DeviceId = deviceId; + DeviceWarnings = deviceWarnings; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// Errors associated with the connected account. + /// + [DataMember( + Name = "connected_account_errors", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountErrors { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Warnings associated with the connected account. + /// + [DataMember( + Name = "connected_account_warnings", + IsRequired = false, + EmitDefaultValue = false + )] + public List ConnectedAccountWarnings { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// Errors associated with the device. + /// + [DataMember(Name = "device_errors", IsRequired = false, EmitDefaultValue = false)] + public List DeviceErrors { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Warnings associated with the device. + /// + [DataMember(Name = "device_warnings", IsRequired = false, EmitDefaultValue = false)] + public List DeviceWarnings { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.accessory_keypad_disconnected"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors_model" + )] + public class EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors + { + [JsonConstructorAttribute] + protected EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors() { } + + public EventDeviceAccessoryKeypadDisconnectedConnectedAccountErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings_model" + )] + public class EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings + { + [JsonConstructorAttribute] + protected EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings() { } + + public EventDeviceAccessoryKeypadDisconnectedConnectedAccountWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedDeviceErrors_model")] + public class EventDeviceAccessoryKeypadDisconnectedDeviceErrors + { + [JsonConstructorAttribute] + protected EventDeviceAccessoryKeypadDisconnectedDeviceErrors() { } + + public EventDeviceAccessoryKeypadDisconnectedDeviceErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventDeviceAccessoryKeypadDisconnectedDeviceWarnings_model")] + public class EventDeviceAccessoryKeypadDisconnectedDeviceWarnings + { + [JsonConstructorAttribute] + protected EventDeviceAccessoryKeypadDisconnectedDeviceWarnings() { } + + public EventDeviceAccessoryKeypadDisconnectedDeviceWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Extended periods of noise or noise exceeding a [threshold](https://www.seam.co/docs/capability-guides/noise-sensors#what-is-a-threshold) were detected. + /// + [DataContract(Name = "seamModel_eventNoiseSensorNoiseThresholdTriggered_model")] + public class EventNoiseSensorNoiseThresholdTriggered : Event + { + [JsonConstructorAttribute] + protected EventNoiseSensorNoiseThresholdTriggered() { } + + public EventNoiseSensorNoiseThresholdTriggered( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + object? minutMetadata = default, + float? noiseLevelDecibels = default, + float? noiseLevelNrs = default, + string? noiseThresholdId = default, + string? noiseThresholdName = default, + object? noiseawareMetadata = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + MinutMetadata = minutMetadata; + NoiseLevelDecibels = noiseLevelDecibels; + NoiseLevelNrs = noiseLevelNrs; + NoiseThresholdId = noiseThresholdId; + NoiseThresholdName = noiseThresholdName; + NoiseawareMetadata = noiseawareMetadata; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "noise_sensor.noise_threshold_triggered"; + + /// + /// Metadata from Minut. + /// + [DataMember(Name = "minut_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? MinutMetadata { get; set; } + + /// + /// Detected noise level in decibels. + /// + [DataMember(Name = "noise_level_decibels", IsRequired = false, EmitDefaultValue = false)] + public float? NoiseLevelDecibels { get; set; } + + /// + /// Detected noise level in Noiseaware Noise Risk Score (NRS). + /// + [DataMember(Name = "noise_level_nrs", IsRequired = false, EmitDefaultValue = false)] + public float? NoiseLevelNrs { get; set; } + + /// + /// ID of the noise threshold that was triggered. + /// + [DataMember(Name = "noise_threshold_id", IsRequired = false, EmitDefaultValue = false)] + public string? NoiseThresholdId { get; set; } + + /// + /// Name of the noise threshold that was triggered. + /// + [DataMember(Name = "noise_threshold_name", IsRequired = false, EmitDefaultValue = false)] + public string? NoiseThresholdName { get; set; } + + /// + /// Metadata from Noiseaware. + /// + [DataMember(Name = "noiseaware_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? NoiseawareMetadata { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [lock](https://www.seam.co/docs/low-level-apis/smart-locks) was locked. + /// + [DataContract(Name = "seamModel_eventLockLocked_model")] + public class EventLockLocked : Event + { + [JsonConstructorAttribute] + protected EventLockLocked() { } + + public EventLockLocked( + string? accessCodeId = default, + bool? accessCodeIsManaged = default, + string? actionAttemptId = default, + string? code = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + bool? isViaBluetooth = default, + bool? isViaNfc = default, + EventLockLocked.MethodEnum method = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + AccessCodeIsManaged = accessCodeIsManaged; + ActionAttemptId = actionAttemptId; + Code = code; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + IsViaBluetooth = isViaBluetooth; + IsViaNfc = isViaNfc; + Method = method; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum MethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "keycode")] + Keycode = 1, + + [EnumMember(Value = "manual")] + Manual = 2, + + [EnumMember(Value = "automatic")] + Automatic = 3, + + [EnumMember(Value = "unknown")] + Unknown = 4, + + [EnumMember(Value = "remote")] + Remote = 5, + + [EnumMember(Value = "card")] + Card = 6, + + [EnumMember(Value = "mobile_key")] + MobileKey = 7, + } + + /// + /// ID of the access code that was used to lock the device. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessCodeId { get; set; } + + /// + /// Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. + /// + [DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool? AccessCodeIsManaged { get; set; } + + /// + /// ID of the Seam action attempt that triggered this lock. Present only when the lock was initiated through Seam (via a `LOCK_DOOR` action attempt). + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string? ActionAttemptId { get; set; } + + /// + /// Code (PIN) that was used to lock the device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "lock.locked"; + + /// + /// Whether the lock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. + /// + [DataMember(Name = "is_via_bluetooth", IsRequired = false, EmitDefaultValue = false)] + public bool? IsViaBluetooth { get; set; } + + /// + /// Whether the lock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. + /// + [DataMember(Name = "is_via_nfc", IsRequired = false, EmitDefaultValue = false)] + public bool? IsViaNfc { get; set; } + + /// + /// Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. + /// + [DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] + public EventLockLocked.MethodEnum Method { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [lock](https://www.seam.co/docs/low-level-apis/smart-locks) was unlocked. + /// + [DataContract(Name = "seamModel_eventLockUnlocked_model")] + public class EventLockUnlocked : Event + { + [JsonConstructorAttribute] + protected EventLockUnlocked() { } + + public EventLockUnlocked( + string? accessCodeId = default, + bool? accessCodeIsManaged = default, + string? actionAttemptId = default, + string? code = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + bool? isViaBluetooth = default, + bool? isViaNfc = default, + EventLockUnlocked.MethodEnum method = default, + string occurredAt = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + AccessCodeIsManaged = accessCodeIsManaged; + ActionAttemptId = actionAttemptId; + Code = code; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + IsViaBluetooth = isViaBluetooth; + IsViaNfc = isViaNfc; + Method = method; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Method by which the lock was unlocked. `keycode`: an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum MethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "keycode")] + Keycode = 1, + + [EnumMember(Value = "manual")] + Manual = 2, + + [EnumMember(Value = "automatic")] + Automatic = 3, + + [EnumMember(Value = "unknown")] + Unknown = 4, + + [EnumMember(Value = "remote")] + Remote = 5, + + [EnumMember(Value = "card")] + Card = 6, + + [EnumMember(Value = "mobile_key")] + MobileKey = 7, + } + + /// + /// ID of the access code that was used to unlock the affected device. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessCodeId { get; set; } + + /// + /// Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. + /// + [DataMember(Name = "access_code_is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool? AccessCodeIsManaged { get; set; } + + /// + /// ID of the Seam action attempt that triggered this unlock. Present only when the unlock was initiated through Seam (via an `UNLOCK_DOOR` action attempt). + /// + [DataMember(Name = "action_attempt_id", IsRequired = false, EmitDefaultValue = false)] + public string? ActionAttemptId { get; set; } + + /// + /// Code (PIN) that was used to unlock the affected device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "lock.unlocked"; + + /// + /// Whether the unlock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. + /// + [DataMember(Name = "is_via_bluetooth", IsRequired = false, EmitDefaultValue = false)] + public bool? IsViaBluetooth { get; set; } + + /// + /// Whether the unlock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. + /// + [DataMember(Name = "is_via_nfc", IsRequired = false, EmitDefaultValue = false)] + public bool? IsViaNfc { get; set; } + + /// + /// Method by which the lock was unlocked. `keycode`: an [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. + /// + [DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] + public EventLockUnlocked.MethodEnum Method { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The [lock](https://www.seam.co/docs/low-level-apis/smart-locks) denied access to a user after one or more consecutive invalid attempts to unlock the device. + /// + [DataContract(Name = "seamModel_eventLockAccessDenied_model")] + public class EventLockAccessDenied : Event + { + [JsonConstructorAttribute] + protected EventLockAccessDenied() { } + + public EventLockAccessDenied( + string? accessCodeId = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string? deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + EventLockAccessDeniedReason? reason = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + Reason = reason; + WorkspaceId = workspaceId; + } + + /// + /// ID of the access code that was used in the unlock attempts. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string? AccessCodeId { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "lock.access_denied"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Why access was denied, when the provider reports a determinable cause. Omitted when unknown. + /// + [DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] + public EventLockAccessDeniedReason? Reason { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventLockAccessDeniedReason_model")] + public class EventLockAccessDeniedReason + { + [JsonConstructorAttribute] + protected EventLockAccessDeniedReason() { } + + public EventLockAccessDeniedReason( + string message = default, + EventLockAccessDeniedReason.ReasonCodeEnum reasonCode = default + ) + { + Message = message; + ReasonCode = reasonCode; + } + + /// + /// Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ReasonCodeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "unknown_code")] + UnknownCode = 1, + + [EnumMember(Value = "expired_code")] + ExpiredCode = 2, + + [EnumMember(Value = "blocklisted_code")] + BlocklistedCode = 3, + + [EnumMember(Value = "too_many_attempts")] + TooManyAttempts = 4, + + [EnumMember(Value = "blocked_by_privacy_mode")] + BlockedByPrivacyMode = 5, + + [EnumMember(Value = "credential_error")] + CredentialError = 6, + } + + /// + /// Human-readable explanation of why access was denied. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. + /// + [DataMember(Name = "reason_code", IsRequired = false, EmitDefaultValue = false)] + public EventLockAccessDeniedReason.ReasonCodeEnum ReasonCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A thermostat [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) was activated. + /// + [DataContract(Name = "seamModel_eventThermostatClimatePresetActivated_model")] + public class EventThermostatClimatePresetActivated : Event + { + [JsonConstructorAttribute] + protected EventThermostatClimatePresetActivated() { } + + public EventThermostatClimatePresetActivated( + string climatePresetKey = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + bool isFallbackClimatePreset = default, + string occurredAt = default, + string? thermostatScheduleId = default, + string workspaceId = default + ) + { + ClimatePresetKey = climatePresetKey; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + IsFallbackClimatePreset = isFallbackClimatePreset; + OccurredAt = occurredAt; + ThermostatScheduleId = thermostatScheduleId; + WorkspaceId = workspaceId; + } + + /// + /// Key of the climate preset that was activated. + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "thermostat.climate_preset_activated"; + + /// + /// Indicates whether the climate preset that was activated is the fallback climate preset for the thermostat. + /// + [DataMember( + Name = "is_fallback_climate_preset", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsFallbackClimatePreset { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the thermostat schedule that prompted the affected climate preset to be activated. + /// + [DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] + public string? ThermostatScheduleId { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [thermostat](https://www.seam.co/docs/capability-guides/thermostats) was adjusted manually. + /// + [DataContract(Name = "seamModel_eventThermostatManuallyAdjusted_model")] + public class EventThermostatManuallyAdjusted : Event + { + [JsonConstructorAttribute] + protected EventThermostatManuallyAdjusted() { } + + public EventThermostatManuallyAdjusted( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + float? coolingSetPointCelsius = default, + float? coolingSetPointFahrenheit = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + EventThermostatManuallyAdjusted.FanModeSettingEnum? fanModeSetting = default, + float? heatingSetPointCelsius = default, + float? heatingSetPointFahrenheit = default, + EventThermostatManuallyAdjusted.HvacModeSettingEnum? hvacModeSetting = default, + EventThermostatManuallyAdjusted.MethodEnum method = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CoolingSetPointCelsius = coolingSetPointCelsius; + CoolingSetPointFahrenheit = coolingSetPointFahrenheit; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + FanModeSetting = fanModeSetting; + HeatingSetPointCelsius = heatingSetPointCelsius; + HeatingSetPointFahrenheit = heatingSetPointFahrenheit; + HvacModeSetting = hvacModeSetting; + Method = method; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum FanModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "auto")] + Auto = 1, + + [EnumMember(Value = "on")] + On = 2, + + [EnumMember(Value = "circulate")] + Circulate = 3, + } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum HvacModeSettingEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "off")] + Off = 1, + + [EnumMember(Value = "heat")] + Heat = 2, + + [EnumMember(Value = "cool")] + Cool = 3, + + [EnumMember(Value = "heat_cool")] + HeatCool = 4, + + [EnumMember(Value = "eco")] + Eco = 5, + } + + /// + /// Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum MethodEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "seam")] + Seam = 1, + + [EnumMember(Value = "external")] + External = 2, + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should cool (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "cooling_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? CoolingSetPointFahrenheit { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "thermostat.manually_adjusted"; + + /// + /// Desired [fan mode setting](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + /// + [DataMember(Name = "fan_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public EventThermostatManuallyAdjusted.FanModeSettingEnum? FanModeSetting { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °C). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointCelsius { get; set; } + + /// + /// Temperature to which the thermostat should heat (in °F). See also [Set Points](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataMember( + Name = "heating_set_point_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? HeatingSetPointFahrenheit { get; set; } + + /// + /// Desired [HVAC mode](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + /// + [DataMember(Name = "hvac_mode_setting", IsRequired = false, EmitDefaultValue = false)] + public EventThermostatManuallyAdjusted.HvacModeSettingEnum? HvacModeSetting { get; set; } + + /// + /// Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. + /// + [DataMember(Name = "method", IsRequired = false, EmitDefaultValue = false)] + public EventThermostatManuallyAdjusted.MethodEnum Method { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading exceeded the set [threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds). + /// + [DataContract(Name = "seamModel_eventThermostatTemperatureThresholdExceeded_model")] + public class EventThermostatTemperatureThresholdExceeded : Event + { + [JsonConstructorAttribute] + protected EventThermostatTemperatureThresholdExceeded() { } + + public EventThermostatTemperatureThresholdExceeded( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + float? lowerLimitCelsius = default, + float? lowerLimitFahrenheit = default, + string occurredAt = default, + float temperatureCelsius = default, + float temperatureFahrenheit = default, + float? upperLimitCelsius = default, + float? upperLimitFahrenheit = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + LowerLimitCelsius = lowerLimitCelsius; + LowerLimitFahrenheit = lowerLimitFahrenheit; + OccurredAt = occurredAt; + TemperatureCelsius = temperatureCelsius; + TemperatureFahrenheit = temperatureFahrenheit; + UpperLimitCelsius = upperLimitCelsius; + UpperLimitFahrenheit = upperLimitFahrenheit; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "thermostat.temperature_threshold_exceeded"; + + /// + /// Lower temperature limit, in °C, defined by the set threshold. + /// + [DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? LowerLimitCelsius { get; set; } + + /// + /// Lower temperature limit, in °F, defined by the set threshold. + /// + [DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float? LowerLimitFahrenheit { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Temperature, in °C, reported by the affected thermostat. + /// + [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] + public float TemperatureCelsius { get; set; } + + /// + /// Temperature, in °F, reported by the affected thermostat. + /// + [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float TemperatureFahrenheit { get; set; } + + /// + /// Upper temperature limit, in °C, defined by the set threshold. + /// + [DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? UpperLimitCelsius { get; set; } + + /// + /// Upper temperature limit, in °F, defined by the set threshold. + /// + [DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float? UpperLimitFahrenheit { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading no longer exceeds the set [threshold](https://www.seam.co/docs/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds). + /// + [DataContract(Name = "seamModel_eventThermostatTemperatureThresholdNoLongerExceeded_model")] + public class EventThermostatTemperatureThresholdNoLongerExceeded : Event + { + [JsonConstructorAttribute] + protected EventThermostatTemperatureThresholdNoLongerExceeded() { } + + public EventThermostatTemperatureThresholdNoLongerExceeded( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + float? lowerLimitCelsius = default, + float? lowerLimitFahrenheit = default, + string occurredAt = default, + float temperatureCelsius = default, + float temperatureFahrenheit = default, + float? upperLimitCelsius = default, + float? upperLimitFahrenheit = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + LowerLimitCelsius = lowerLimitCelsius; + LowerLimitFahrenheit = lowerLimitFahrenheit; + OccurredAt = occurredAt; + TemperatureCelsius = temperatureCelsius; + TemperatureFahrenheit = temperatureFahrenheit; + UpperLimitCelsius = upperLimitCelsius; + UpperLimitFahrenheit = upperLimitFahrenheit; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = + "thermostat.temperature_threshold_no_longer_exceeded"; + + /// + /// Lower temperature limit, in °C, defined by the set threshold. + /// + [DataMember(Name = "lower_limit_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? LowerLimitCelsius { get; set; } + + /// + /// Lower temperature limit, in °F, defined by the set threshold. + /// + [DataMember(Name = "lower_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float? LowerLimitFahrenheit { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Temperature, in °C, reported by the affected thermostat. + /// + [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] + public float TemperatureCelsius { get; set; } + + /// + /// Temperature, in °F, reported by the affected thermostat. + /// + [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float TemperatureFahrenheit { get; set; } + + /// + /// Upper temperature limit, in °C, defined by the set threshold. + /// + [DataMember(Name = "upper_limit_celsius", IsRequired = false, EmitDefaultValue = false)] + public float? UpperLimitCelsius { get; set; } + + /// + /// Upper temperature limit, in °F, defined by the set threshold. + /// + [DataMember(Name = "upper_limit_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float? UpperLimitFahrenheit { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) temperature reading is within 1 °C of the configured cooling or heating [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + /// + [DataContract(Name = "seamModel_eventThermostatTemperatureReachedSetPoint_model")] + public class EventThermostatTemperatureReachedSetPoint : Event + { + [JsonConstructorAttribute] + protected EventThermostatTemperatureReachedSetPoint() { } + + public EventThermostatTemperatureReachedSetPoint( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + float? desiredTemperatureCelsius = default, + float? desiredTemperatureFahrenheit = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + float temperatureCelsius = default, + float temperatureFahrenheit = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DesiredTemperatureCelsius = desiredTemperatureCelsius; + DesiredTemperatureFahrenheit = desiredTemperatureFahrenheit; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + TemperatureCelsius = temperatureCelsius; + TemperatureFahrenheit = temperatureFahrenheit; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Desired temperature, in °C, defined by the affected thermostat's cooling or heating set point. + /// + [DataMember( + Name = "desired_temperature_celsius", + IsRequired = false, + EmitDefaultValue = false + )] + public float? DesiredTemperatureCelsius { get; set; } + + /// + /// Desired temperature, in °F, defined by the affected thermostat's cooling or heating set point. + /// + [DataMember( + Name = "desired_temperature_fahrenheit", + IsRequired = false, + EmitDefaultValue = false + )] + public float? DesiredTemperatureFahrenheit { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "thermostat.temperature_reached_set_point"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Temperature, in °C, reported by the affected thermostat. + /// + [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] + public float TemperatureCelsius { get; set; } + + /// + /// Temperature, in °F, reported by the affected thermostat. + /// + [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float TemperatureFahrenheit { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A [thermostat's](https://www.seam.co/docs/capability-guides/thermostats) reported temperature changed by at least 1 °C. + /// + [DataContract(Name = "seamModel_eventThermostatTemperatureChanged_model")] + public class EventThermostatTemperatureChanged : Event + { + [JsonConstructorAttribute] + protected EventThermostatTemperatureChanged() { } + + public EventThermostatTemperatureChanged( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + float temperatureCelsius = default, + float temperatureFahrenheit = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + TemperatureCelsius = temperatureCelsius; + TemperatureFahrenheit = temperatureFahrenheit; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "thermostat.temperature_changed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// Temperature, in °C, reported by the affected thermostat. + /// + [DataMember(Name = "temperature_celsius", IsRequired = false, EmitDefaultValue = false)] + public float TemperatureCelsius { get; set; } + + /// + /// Temperature, in °F, reported by the affected thermostat. + /// + [DataMember(Name = "temperature_fahrenheit", IsRequired = false, EmitDefaultValue = false)] + public float TemperatureFahrenheit { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// The name of a device was changed. + /// + [DataContract(Name = "seamModel_eventDeviceNameChanged_model")] + public class EventDeviceNameChanged : Event + { + [JsonConstructorAttribute] + protected EventDeviceNameChanged() { } + + public EventDeviceNameChanged( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string deviceName = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + DeviceName = deviceName; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// The new name of the affected device. + /// + [DataMember(Name = "device_name", IsRequired = false, EmitDefaultValue = false)] + public string DeviceName { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.name_changed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A camera was activated, for example, by motion detection. + /// + [DataContract(Name = "seamModel_eventCameraActivated_model")] + public class EventCameraActivated : Event + { + [JsonConstructorAttribute] + protected EventCameraActivated() { } + + public EventCameraActivated( + EventCameraActivated.ActivationReasonEnum activationReason = default, + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string? imageUrl = default, + List? mediaIds = default, + EventCameraActivated.MotionSubTypeEnum? motionSubType = default, + string occurredAt = default, + string? videoUrl = default, + string workspaceId = default + ) + { + ActivationReason = activationReason; + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + ImageUrl = imageUrl; + MediaIds = mediaIds; + MotionSubType = motionSubType; + OccurredAt = occurredAt; + VideoUrl = videoUrl; + WorkspaceId = workspaceId; + } + + /// + /// The reason the camera was activated. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ActivationReasonEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "motion_detected")] + MotionDetected = 1, + } + + /// + /// Sub-type of motion detected, if available. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum MotionSubTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "human")] + Human = 1, + + [EnumMember(Value = "vehicle")] + Vehicle = 2, + + [EnumMember(Value = "package")] + Package = 3, + + [EnumMember(Value = "other")] + Other = 4, + } + + /// + /// The reason the camera was activated. + /// + [DataMember(Name = "activation_reason", IsRequired = false, EmitDefaultValue = false)] + public EventCameraActivated.ActivationReasonEnum ActivationReason { get; set; } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "camera.activated"; + + /// + /// URL to a thumbnail image captured at the time of activation. + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string? ImageUrl { get; set; } + + /// + /// IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. + /// + [DataMember(Name = "media_ids", IsRequired = false, EmitDefaultValue = false)] + public List? MediaIds { get; set; } + + /// + /// Sub-type of motion detected, if available. + /// + [DataMember(Name = "motion_sub_type", IsRequired = false, EmitDefaultValue = false)] + public EventCameraActivated.MotionSubTypeEnum? MotionSubType { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// URL to a short video clip captured at the time of activation. + /// + [DataMember(Name = "video_url", IsRequired = false, EmitDefaultValue = false)] + public string? VideoUrl { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A doorbell button was pressed on a device. + /// + [DataContract(Name = "seamModel_eventDeviceDoorbellRang_model")] + public class EventDeviceDoorbellRang : Event + { + [JsonConstructorAttribute] + protected EventDeviceDoorbellRang() { } + + public EventDeviceDoorbellRang( + object? connectedAccountCustomMetadata = default, + string connectedAccountId = default, + string createdAt = default, + string? customerKey = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string? imageUrl = default, + List? mediaIds = default, + string occurredAt = default, + string? videoUrl = default, + string workspaceId = default + ) + { + ConnectedAccountCustomMetadata = connectedAccountCustomMetadata; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomerKey = customerKey; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + ImageUrl = imageUrl; + MediaIds = mediaIds; + OccurredAt = occurredAt; + VideoUrl = videoUrl; + WorkspaceId = workspaceId; + } + + /// + /// Custom metadata of the connected account, present when connected_account_id is provided. + /// + [DataMember( + Name = "connected_account_custom_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public object? ConnectedAccountCustomMetadata { get; set; } + + /// + /// ID of the connected account associated with the event. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// The customer key associated with the device, if any. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Custom metadata of the device, present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "device.doorbell_rang"; + + /// + /// URL to a thumbnail image captured at the time the doorbell was pressed. + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string? ImageUrl { get; set; } + + /// + /// IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. + /// + [DataMember(Name = "media_ids", IsRequired = false, EmitDefaultValue = false)] + public List? MediaIds { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// URL to a short video clip captured at the time the doorbell was pressed. + /// + [DataMember(Name = "video_url", IsRequired = false, EmitDefaultValue = false)] + public string? VideoUrl { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A phone device was deactivated. + /// + [DataContract(Name = "seamModel_eventPhoneDeactivated_model")] + public class EventPhoneDeactivated : Event + { + [JsonConstructorAttribute] + protected EventPhoneDeactivated() { } + + public EventPhoneDeactivated( + string createdAt = default, + object? deviceCustomMetadata = default, + string deviceId = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string workspaceId = default + ) + { + CreatedAt = createdAt; + DeviceCustomMetadata = deviceCustomMetadata; + DeviceId = deviceId; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Custom metadata of the device; present when device_id is provided. + /// + [DataMember(Name = "device_custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object? DeviceCustomMetadata { get; set; } + + /// + /// ID of the affected phone device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "phone.deactivated"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A device was added or removed from a space. + /// + [DataContract(Name = "seamModel_eventSpaceDeviceMembershipChanged_model")] + public class EventSpaceDeviceMembershipChanged : Event + { + [JsonConstructorAttribute] + protected EventSpaceDeviceMembershipChanged() { } + + public EventSpaceDeviceMembershipChanged( + List acsEntranceIds = default, + string createdAt = default, + List deviceIds = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string spaceId = default, + string? spaceKey = default, + string workspaceId = default + ) + { + AcsEntranceIds = acsEntranceIds; + CreatedAt = createdAt; + DeviceIds = deviceIds; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + SpaceId = spaceId; + SpaceKey = spaceKey; + WorkspaceId = workspaceId; + } + + /// + /// IDs of all ACS entrances currently attached to the space. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List AcsEntranceIds { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// IDs of all devices currently attached to the space. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "space.device_membership_changed"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the affected space. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + /// + /// Unique key for the space within the workspace. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A space was created. + /// + [DataContract(Name = "seamModel_eventSpaceCreated_model")] + public class EventSpaceCreated : Event + { + [JsonConstructorAttribute] + protected EventSpaceCreated() { } + + public EventSpaceCreated( + List acsEntranceIds = default, + string createdAt = default, + List deviceIds = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string spaceId = default, + string? spaceKey = default, + string workspaceId = default + ) + { + AcsEntranceIds = acsEntranceIds; + CreatedAt = createdAt; + DeviceIds = deviceIds; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + SpaceId = spaceId; + SpaceKey = spaceKey; + WorkspaceId = workspaceId; + } + + /// + /// IDs of all ACS entrances attached to the space when it was created. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List AcsEntranceIds { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// IDs of all devices attached to the space when it was created. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "space.created"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the affected space. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + /// + /// Unique key for the space within the workspace. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// A space was deleted. + /// + [DataContract(Name = "seamModel_eventSpaceDeleted_model")] + public class EventSpaceDeleted : Event + { + [JsonConstructorAttribute] + protected EventSpaceDeleted() { } + + public EventSpaceDeleted( + List acsEntranceIds = default, + string createdAt = default, + List deviceIds = default, + string? eventDescription = default, + string eventId = default, + string eventType = default, + string occurredAt = default, + string spaceId = default, + string? spaceKey = default, + string workspaceId = default + ) + { + AcsEntranceIds = acsEntranceIds; + CreatedAt = createdAt; + DeviceIds = deviceIds; + EventDescription = eventDescription; + EventId = eventId; + EventType = eventType; + OccurredAt = occurredAt; + SpaceId = spaceId; + SpaceKey = spaceKey; + WorkspaceId = workspaceId; + } + + /// + /// IDs of all ACS entrances currently attached to the space when it was deleted. + /// + [DataMember(Name = "acs_entrance_ids", IsRequired = false, EmitDefaultValue = false)] + public List AcsEntranceIds { get; set; } + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// IDs of all devices attached to the space when it was deleted. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "space.deleted"; + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the affected space. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + /// + /// Unique key for the space within the workspace. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_eventUnrecognized_model")] + public class EventUnrecognized : Event + { + [JsonConstructorAttribute] + protected EventUnrecognized() { } + + public EventUnrecognized( + string eventType = default, + string createdAt = default, + string? eventDescription = default, + string eventId = default, + string occurredAt = default, + string workspaceId = default + ) + { + EventType = eventType; + CreatedAt = createdAt; + EventDescription = eventDescription; + EventId = eventId; + OccurredAt = occurredAt; + WorkspaceId = workspaceId; + } + + [DataMember(Name = "event_type", IsRequired = true, EmitDefaultValue = false)] + public override string EventType { get; } = "unrecognized"; + + /// + /// Date and time at which the event was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + /// + [DataMember(Name = "event_description", IsRequired = false, EmitDefaultValue = false)] + public override string? EventDescription { get; set; } + + /// + /// ID of the event. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public override string EventId { get; set; } + + /// + /// Date and time at which the event occurred. + /// + [DataMember(Name = "occurred_at", IsRequired = false, EmitDefaultValue = false)] + public override string OccurredAt { get; set; } + + /// + /// ID of the workspace associated with the event. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public override string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/InstantKey.cs b/src/Seam/Model/InstantKey.cs index 64567ee7..030b9b52 100644 --- a/src/Seam/Model/InstantKey.cs +++ b/src/Seam/Model/InstantKey.cs @@ -8,153 +8,170 @@ namespace Seam.Model { -/// -/// Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. -/// -/// There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. -/// -[DataContract(Name = "seamModel_instantKey_model")] -public class InstantKey -{ -[JsonConstructorAttribute] -protected InstantKey() { } - -public InstantKey(string clientSessionId = default, string createdAt = default, InstantKeyCustomization? customization = default, string? customizationProfileId = default, string expiresAt = default, string instantKeyId = default, string instantKeyUrl = default, string userIdentityId = default, string workspaceId = default) -{ -ClientSessionId = clientSessionId; -CreatedAt = createdAt; -Customization = customization; -CustomizationProfileId = customizationProfileId; -ExpiresAt = expiresAt; -InstantKeyId = instantKeyId; -InstantKeyUrl = instantKeyUrl; -UserIdentityId = userIdentityId; -WorkspaceId = workspaceId; -} - -/// -/// ID of the client session associated with the Instant Key. -/// -[DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] -public string ClientSessionId { get; set; } - -/// -/// Date and time at which the Instant Key was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Customization applied to the Instant Key UI. -/// -[DataMember(Name = "customization", IsRequired = false, EmitDefaultValue = false)] -public InstantKeyCustomization? Customization { get; set; } - -/// -/// ID of the customization profile associated with the Instant Key. -/// -[DataMember(Name = "customization_profile_id", IsRequired = false, EmitDefaultValue = false)] -public string? CustomizationProfileId { get; set; } - -/// -/// Date and time at which the Instant Key expires. -/// -[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] -public string ExpiresAt { get; set; } - -/// -/// ID of the Instant Key. -/// -[DataMember(Name = "instant_key_id", IsRequired = false, EmitDefaultValue = false)] -public string InstantKeyId { get; set; } - -/// -/// Shareable URL for the Instant Key. Use the URL to deliver the Instant Key to your user through a link in a text message or email or by embedding it in your web app. -/// -[DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] -public string InstantKeyUrl { get; set; } - -/// -/// ID of the user identity associated with the Instant Key. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -/// -/// ID of the workspace that contains the Instant Key. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_instantKeyCustomization_model")] -public class InstantKeyCustomization -{ -[JsonConstructorAttribute] -protected InstantKeyCustomization() { } - -public InstantKeyCustomization(string? logoUrl = default, string? primaryColor = default, string? secondaryColor = default) -{ -LogoUrl = logoUrl; -PrimaryColor = primaryColor; -SecondaryColor = secondaryColor; -} - -/// -/// URL of the logo displayed on the Instant Key. -/// -[DataMember(Name = "logo_url", IsRequired = false, EmitDefaultValue = false)] -public string? LogoUrl { get; set; } - -/// -/// Primary color used in the Instant Key UI. -/// -[DataMember(Name = "primary_color", IsRequired = false, EmitDefaultValue = false)] -public string? PrimaryColor { get; set; } - -/// -/// Secondary color used in the Instant Key UI. -/// -[DataMember(Name = "secondary_color", IsRequired = false, EmitDefaultValue = false)] -public string? SecondaryColor { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. + /// + /// There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. + /// + [DataContract(Name = "seamModel_instantKey_model")] + public class InstantKey + { + [JsonConstructorAttribute] + protected InstantKey() { } + + public InstantKey( + string clientSessionId = default, + string createdAt = default, + InstantKeyCustomization? customization = default, + string? customizationProfileId = default, + string expiresAt = default, + string instantKeyId = default, + string instantKeyUrl = default, + string userIdentityId = default, + string workspaceId = default + ) + { + ClientSessionId = clientSessionId; + CreatedAt = createdAt; + Customization = customization; + CustomizationProfileId = customizationProfileId; + ExpiresAt = expiresAt; + InstantKeyId = instantKeyId; + InstantKeyUrl = instantKeyUrl; + UserIdentityId = userIdentityId; + WorkspaceId = workspaceId; + } + + /// + /// ID of the client session associated with the Instant Key. + /// + [DataMember(Name = "client_session_id", IsRequired = false, EmitDefaultValue = false)] + public string ClientSessionId { get; set; } + + /// + /// Date and time at which the Instant Key was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Customization applied to the Instant Key UI. + /// + [DataMember(Name = "customization", IsRequired = false, EmitDefaultValue = false)] + public InstantKeyCustomization? Customization { get; set; } + + /// + /// ID of the customization profile associated with the Instant Key. + /// + [DataMember( + Name = "customization_profile_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? CustomizationProfileId { get; set; } + + /// + /// Date and time at which the Instant Key expires. + /// + [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] + public string ExpiresAt { get; set; } + + /// + /// ID of the Instant Key. + /// + [DataMember(Name = "instant_key_id", IsRequired = false, EmitDefaultValue = false)] + public string InstantKeyId { get; set; } + + /// + /// Shareable URL for the Instant Key. Use the URL to deliver the Instant Key to your user through a link in a text message or email or by embedding it in your web app. + /// + [DataMember(Name = "instant_key_url", IsRequired = false, EmitDefaultValue = false)] + public string InstantKeyUrl { get; set; } + + /// + /// ID of the user identity associated with the Instant Key. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + /// + /// ID of the workspace that contains the Instant Key. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_instantKeyCustomization_model")] + public class InstantKeyCustomization + { + [JsonConstructorAttribute] + protected InstantKeyCustomization() { } + + public InstantKeyCustomization( + string? logoUrl = default, + string? primaryColor = default, + string? secondaryColor = default + ) + { + LogoUrl = logoUrl; + PrimaryColor = primaryColor; + SecondaryColor = secondaryColor; + } + + /// + /// URL of the logo displayed on the Instant Key. + /// + [DataMember(Name = "logo_url", IsRequired = false, EmitDefaultValue = false)] + public string? LogoUrl { get; set; } + + /// + /// Primary color used in the Instant Key UI. + /// + [DataMember(Name = "primary_color", IsRequired = false, EmitDefaultValue = false)] + public string? PrimaryColor { get; set; } + + /// + /// Secondary color used in the Instant Key UI. + /// + [DataMember(Name = "secondary_color", IsRequired = false, EmitDefaultValue = false)] + public string? SecondaryColor { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/Media.cs b/src/Seam/Model/Media.cs index a88bf683..15a83d26 100644 --- a/src/Seam/Model/Media.cs +++ b/src/Seam/Model/Media.cs @@ -8,168 +8,179 @@ namespace Seam.Model { -/// -/// Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta. -/// -[DataContract(Name = "seamModel_media_model")] -public class Media -{ -[JsonConstructorAttribute] -protected Media() { } - -public Media(string? contentType = default, string createdAt = default, string? deviceId = default, string? eventId = default, string? expiresAt = default, string mediaId = default, Media.MediaTypeEnum mediaType = default, Media.StatusEnum status = default, string? url = default, Media.VideoCodecEnum? videoCodec = default, string workspaceId = default) -{ -ContentType = contentType; -CreatedAt = createdAt; -DeviceId = deviceId; -EventId = eventId; -ExpiresAt = expiresAt; -MediaId = mediaId; -MediaType = mediaType; -Status = status; -Url = url; -VideoCodec = videoCodec; -WorkspaceId = workspaceId; -} - -/// -/// Type of the media: a video clip or a still image. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum MediaTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "video")] -Video = 1, - -[EnumMember(Value = "image")] -Image = 2, -} - -/// -/// Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "pending")] -Pending = 1, - -[EnumMember(Value = "available")] -Available = 2, - -[EnumMember(Value = "unavailable")] -Unavailable = 3, - -[EnumMember(Value = "failed")] -Failed = 4, -} - -/// -/// Video codec used to encode the media. Only present for video media. `hevc` (H.265) playback support varies by browser and device, so check compatibility before assuming a clip plays inline. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum VideoCodecEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "h264")] -H264 = 1, - -[EnumMember(Value = "hevc")] -Hevc = 2, -} - -/// -/// MIME type of the media, such as `video/mp4` or `image/jpeg`. -/// -[DataMember(Name = "content_type", IsRequired = false, EmitDefaultValue = false)] -public string? ContentType { get; set; } - -/// -/// Date and time at which the media was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the device that captured the media. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string? DeviceId { get; set; } - -/// -/// ID of the event that the media belongs to. -/// -[DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] -public string? EventId { get; set; } - -/// -/// Date and time at which the media stops being available. Null when Seam does not know when the media expires. -/// -[DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] -public string? ExpiresAt { get; set; } - -/// -/// ID of the media. -/// -[DataMember(Name = "media_id", IsRequired = false, EmitDefaultValue = false)] -public string MediaId { get; set; } - -/// -/// Type of the media: a video clip or a still image. -/// -[DataMember(Name = "media_type", IsRequired = false, EmitDefaultValue = false)] -public Media.MediaTypeEnum MediaType { get; set; } - -/// -/// Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public Media.StatusEnum Status { get; set; } - -/// -/// Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL. -/// -[DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] -public string? Url { get; set; } - -/// -/// Video codec used to encode the media. Only present for video media. `hevc` (H.265) playback support varies by browser and device, so check compatibility before assuming a clip plays inline. -/// -[DataMember(Name = "video_codec", IsRequired = false, EmitDefaultValue = false)] -public Media.VideoCodecEnum? VideoCodec { get; set; } - -/// -/// ID of the workspace that contains the media. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta. + /// + [DataContract(Name = "seamModel_media_model")] + public class Media + { + [JsonConstructorAttribute] + protected Media() { } + + public Media( + string? contentType = default, + string createdAt = default, + string? deviceId = default, + string? eventId = default, + string? expiresAt = default, + string mediaId = default, + Media.MediaTypeEnum mediaType = default, + Media.StatusEnum status = default, + string? url = default, + Media.VideoCodecEnum? videoCodec = default, + string workspaceId = default + ) + { + ContentType = contentType; + CreatedAt = createdAt; + DeviceId = deviceId; + EventId = eventId; + ExpiresAt = expiresAt; + MediaId = mediaId; + MediaType = mediaType; + Status = status; + Url = url; + VideoCodec = videoCodec; + WorkspaceId = workspaceId; + } + + /// + /// Type of the media: a video clip or a still image. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum MediaTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "video")] + Video = 1, + + [EnumMember(Value = "image")] + Image = 2, + } + + /// + /// Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "pending")] + Pending = 1, + + [EnumMember(Value = "available")] + Available = 2, + + [EnumMember(Value = "unavailable")] + Unavailable = 3, + + [EnumMember(Value = "failed")] + Failed = 4, + } + + /// + /// Video codec used to encode the media. Only present for video media. `hevc` (H.265) playback support varies by browser and device, so check compatibility before assuming a clip plays inline. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum VideoCodecEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "h264")] + H264 = 1, + + [EnumMember(Value = "hevc")] + Hevc = 2, + } + + /// + /// MIME type of the media, such as `video/mp4` or `image/jpeg`. + /// + [DataMember(Name = "content_type", IsRequired = false, EmitDefaultValue = false)] + public string? ContentType { get; set; } + + /// + /// Date and time at which the media was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the device that captured the media. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string? DeviceId { get; set; } + + /// + /// ID of the event that the media belongs to. + /// + [DataMember(Name = "event_id", IsRequired = false, EmitDefaultValue = false)] + public string? EventId { get; set; } + + /// + /// Date and time at which the media stops being available. Null when Seam does not know when the media expires. + /// + [DataMember(Name = "expires_at", IsRequired = false, EmitDefaultValue = false)] + public string? ExpiresAt { get; set; } + + /// + /// ID of the media. + /// + [DataMember(Name = "media_id", IsRequired = false, EmitDefaultValue = false)] + public string MediaId { get; set; } + + /// + /// Type of the media: a video clip or a still image. + /// + [DataMember(Name = "media_type", IsRequired = false, EmitDefaultValue = false)] + public Media.MediaTypeEnum MediaType { get; set; } + + /// + /// Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public Media.StatusEnum Status { get; set; } + + /// + /// Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL. + /// + [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] + public string? Url { get; set; } + + /// + /// Video codec used to encode the media. Only present for video media. `hevc` (H.265) playback support varies by browser and device, so check compatibility before assuming a clip plays inline. + /// + [DataMember(Name = "video_codec", IsRequired = false, EmitDefaultValue = false)] + public Media.VideoCodecEnum? VideoCodec { get; set; } + + /// + /// ID of the workspace that contains the media. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/NoiseThreshold.cs b/src/Seam/Model/NoiseThreshold.cs index de3e3db9..18a36fd4 100644 --- a/src/Seam/Model/NoiseThreshold.cs +++ b/src/Seam/Model/NoiseThreshold.cs @@ -8,86 +8,97 @@ namespace Seam.Model { -/// -/// Represents a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. -/// -[DataContract(Name = "seamModel_noiseThreshold_model")] -public class NoiseThreshold -{ -[JsonConstructorAttribute] -protected NoiseThreshold() { } + /// + /// Represents a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + /// + [DataContract(Name = "seamModel_noiseThreshold_model")] + public class NoiseThreshold + { + [JsonConstructorAttribute] + protected NoiseThreshold() { } -public NoiseThreshold(string deviceId = default, string endsDailyAt = default, string name = default, float noiseThresholdDecibels = default, string noiseThresholdId = default, float? noiseThresholdNrs = default, string startsDailyAt = default) -{ -DeviceId = deviceId; -EndsDailyAt = endsDailyAt; -Name = name; -NoiseThresholdDecibels = noiseThresholdDecibels; -NoiseThresholdId = noiseThresholdId; -NoiseThresholdNrs = noiseThresholdNrs; -StartsDailyAt = startsDailyAt; -} + public NoiseThreshold( + string deviceId = default, + string endsDailyAt = default, + string name = default, + float noiseThresholdDecibels = default, + string noiseThresholdId = default, + float? noiseThresholdNrs = default, + string startsDailyAt = default + ) + { + DeviceId = deviceId; + EndsDailyAt = endsDailyAt; + Name = name; + NoiseThresholdDecibels = noiseThresholdDecibels; + NoiseThresholdId = noiseThresholdId; + NoiseThresholdNrs = noiseThresholdNrs; + StartsDailyAt = startsDailyAt; + } -/// -/// Unique identifier for the device that contains the noise threshold. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } + /// + /// Unique identifier for the device that contains the noise threshold. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } -/// -/// Time at which the noise threshold should become inactive daily. -/// -[DataMember(Name = "ends_daily_at", IsRequired = false, EmitDefaultValue = false)] -public string EndsDailyAt { get; set; } + /// + /// Time at which the noise threshold should become inactive daily. + /// + [DataMember(Name = "ends_daily_at", IsRequired = false, EmitDefaultValue = false)] + public string EndsDailyAt { get; set; } -/// -/// Name of the noise threshold. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string Name { get; set; } + /// + /// Name of the noise threshold. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } -/// -/// Noise level in decibels for the noise threshold. -/// -[DataMember(Name = "noise_threshold_decibels", IsRequired = false, EmitDefaultValue = false)] -public float NoiseThresholdDecibels { get; set; } + /// + /// Noise level in decibels for the noise threshold. + /// + [DataMember( + Name = "noise_threshold_decibels", + IsRequired = false, + EmitDefaultValue = false + )] + public float NoiseThresholdDecibels { get; set; } -/// -/// Unique identifier for the noise threshold. -/// -[DataMember(Name = "noise_threshold_id", IsRequired = false, EmitDefaultValue = false)] -public string NoiseThresholdId { get; set; } + /// + /// Unique identifier for the noise threshold. + /// + [DataMember(Name = "noise_threshold_id", IsRequired = false, EmitDefaultValue = false)] + public string NoiseThresholdId { get; set; } -/// -/// Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). -/// -[DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] -public float? NoiseThresholdNrs { get; set; } + /// + /// Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://www.seam.co/docs/device-and-system-integration-guides/noiseaware-sensors). + /// + [DataMember(Name = "noise_threshold_nrs", IsRequired = false, EmitDefaultValue = false)] + public float? NoiseThresholdNrs { get; set; } -/// -/// Time at which the noise threshold should become active daily. -/// -[DataMember(Name = "starts_daily_at", IsRequired = false, EmitDefaultValue = false)] -public string StartsDailyAt { get; set; } + /// + /// Time at which the noise threshold should become active daily. + /// + [DataMember(Name = "starts_daily_at", IsRequired = false, EmitDefaultValue = false)] + public string StartsDailyAt { get; set; } -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/Phone.cs b/src/Seam/Model/Phone.cs index 5e30437f..902f9c8f 100644 --- a/src/Seam/Model/Phone.cs +++ b/src/Seam/Model/Phone.cs @@ -8,394 +8,433 @@ namespace Seam.Model { -/// -/// Represents an app user's mobile phone. -/// -[DataContract(Name = "seamModel_phone_model")] -public class Phone -{ -[JsonConstructorAttribute] -protected Phone() { } - -public Phone(string createdAt = default, object customMetadata = default, string deviceId = default, Phone.DeviceTypeEnum deviceType = default, string displayName = default, List errors = default, string? nickname = default, PhoneProperties properties = default, List warnings = default, string workspaceId = default) -{ -CreatedAt = createdAt; -CustomMetadata = customMetadata; -DeviceId = deviceId; -DeviceType = deviceType; -DisplayName = displayName; -Errors = errors; -Nickname = nickname; -Properties = properties; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -/// -/// Type of the phone device, such as `ios_phone` or `android_phone`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "ios_phone")] -IosPhone = 1, - -[EnumMember(Value = "android_phone")] -AndroidPhone = 2, -} - -/// -/// Date and time at which the phone was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Optional [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object CustomMetadata { get; set; } - -/// -/// ID of the phone. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Type of the phone device, such as `ios_phone` or `android_phone`. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public Phone.DeviceTypeEnum DeviceType { get; set; } - -/// -/// Display name of the phone. Defaults to `nickname` (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Errors associated with the phone. -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Optional nickname to describe the phone, settable through Seam. -/// -[DataMember(Name = "nickname", IsRequired = false, EmitDefaultValue = false)] -public string? Nickname { get; set; } - -/// -/// Properties of the phone. -/// -[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] -public PhoneProperties Properties { get; set; } - -/// -/// Warnings associated with the phone. -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the phone. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_phoneErrors_model")] -public class PhoneErrors -{ -[JsonConstructorAttribute] -protected PhoneErrors() { } - -public PhoneErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_phoneProperties_model")] -public class PhoneProperties -{ -[JsonConstructorAttribute] -protected PhoneProperties() { } - -public PhoneProperties(PhonePropertiesAssaAbloyCredentialServiceMetadata? assaAbloyCredentialServiceMetadata = default, PhonePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = default) -{ -AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; -SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; -} - -/// -/// ASSA ABLOY Credential Service metadata for the phone. -/// -[DataMember(Name = "assa_abloy_credential_service_metadata", IsRequired = false, EmitDefaultValue = false)] -public PhonePropertiesAssaAbloyCredentialServiceMetadata? AssaAbloyCredentialServiceMetadata { get; set; } - -/// -/// Salto Space credential service metadata for the phone. -/// -[DataMember(Name = "salto_space_credential_service_metadata", IsRequired = false, EmitDefaultValue = false)] -public PhonePropertiesSaltoSpaceCredentialServiceMetadata? SaltoSpaceCredentialServiceMetadata { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_phonePropertiesAssaAbloyCredentialServiceMetadata_model")] -public class PhonePropertiesAssaAbloyCredentialServiceMetadata -{ -[JsonConstructorAttribute] -protected PhonePropertiesAssaAbloyCredentialServiceMetadata() { } - -public PhonePropertiesAssaAbloyCredentialServiceMetadata(List? endpoints = default, bool? hasActiveEndpoint = default) -{ -Endpoints = endpoints; -HasActiveEndpoint = hasActiveEndpoint; -} - -/// -/// Endpoints associated with the phone. -/// -[DataMember(Name = "endpoints", IsRequired = false, EmitDefaultValue = false)] -public List? Endpoints { get; set; } - -/// -/// Indicates whether the credential service has active endpoints associated with the phone. -/// -[DataMember(Name = "has_active_endpoint", IsRequired = false, EmitDefaultValue = false)] -public bool? HasActiveEndpoint { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_phonePropertiesAssaAbloyCredentialServiceMetadataEndpoints_model")] -public class PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints -{ -[JsonConstructorAttribute] -protected PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints() { } - -public PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints(string? endpointId = default, bool? isActive = default) -{ -EndpointId = endpointId; -IsActive = isActive; -} - -/// -/// ID of the associated endpoint. -/// -[DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] -public string? EndpointId { get; set; } - -/// -/// Indicated whether the endpoint is active. -/// -[DataMember(Name = "is_active", IsRequired = false, EmitDefaultValue = false)] -public bool? IsActive { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_phonePropertiesSaltoSpaceCredentialServiceMetadata_model")] -public class PhonePropertiesSaltoSpaceCredentialServiceMetadata -{ -[JsonConstructorAttribute] -protected PhonePropertiesSaltoSpaceCredentialServiceMetadata() { } - -public PhonePropertiesSaltoSpaceCredentialServiceMetadata(bool? hasActivePhone = default) -{ -HasActivePhone = hasActivePhone; -} - -/// -/// Indicates whether the credential service has an active associated phone. -/// -[DataMember(Name = "has_active_phone", IsRequired = false, EmitDefaultValue = false)] -public bool? HasActivePhone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_phoneWarnings_model")] -public class PhoneWarnings -{ -[JsonConstructorAttribute] -protected PhoneWarnings() { } - -public PhoneWarnings(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -/// -/// Unique identifier of the type of warning. -/// -[DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] -public string WarningCode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an app user's mobile phone. + /// + [DataContract(Name = "seamModel_phone_model")] + public class Phone + { + [JsonConstructorAttribute] + protected Phone() { } + + public Phone( + string createdAt = default, + object customMetadata = default, + string deviceId = default, + Phone.DeviceTypeEnum deviceType = default, + string displayName = default, + List errors = default, + string? nickname = default, + PhoneProperties properties = default, + List warnings = default, + string workspaceId = default + ) + { + CreatedAt = createdAt; + CustomMetadata = customMetadata; + DeviceId = deviceId; + DeviceType = deviceType; + DisplayName = displayName; + Errors = errors; + Nickname = nickname; + Properties = properties; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + /// + /// Type of the phone device, such as `ios_phone` or `android_phone`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "ios_phone")] + IosPhone = 1, + + [EnumMember(Value = "android_phone")] + AndroidPhone = 2, + } + + /// + /// Date and time at which the phone was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Optional [custom metadata](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object CustomMetadata { get; set; } + + /// + /// ID of the phone. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Type of the phone device, such as `ios_phone` or `android_phone`. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public Phone.DeviceTypeEnum DeviceType { get; set; } + + /// + /// Display name of the phone. Defaults to `nickname` (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Errors associated with the phone. + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Optional nickname to describe the phone, settable through Seam. + /// + [DataMember(Name = "nickname", IsRequired = false, EmitDefaultValue = false)] + public string? Nickname { get; set; } + + /// + /// Properties of the phone. + /// + [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] + public PhoneProperties Properties { get; set; } + + /// + /// Warnings associated with the phone. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the phone. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_phoneErrors_model")] + public class PhoneErrors + { + [JsonConstructorAttribute] + protected PhoneErrors() { } + + public PhoneErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_phoneProperties_model")] + public class PhoneProperties + { + [JsonConstructorAttribute] + protected PhoneProperties() { } + + public PhoneProperties( + PhonePropertiesAssaAbloyCredentialServiceMetadata? assaAbloyCredentialServiceMetadata = + default, + PhonePropertiesSaltoSpaceCredentialServiceMetadata? saltoSpaceCredentialServiceMetadata = + default + ) + { + AssaAbloyCredentialServiceMetadata = assaAbloyCredentialServiceMetadata; + SaltoSpaceCredentialServiceMetadata = saltoSpaceCredentialServiceMetadata; + } + + /// + /// ASSA ABLOY Credential Service metadata for the phone. + /// + [DataMember( + Name = "assa_abloy_credential_service_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public PhonePropertiesAssaAbloyCredentialServiceMetadata? AssaAbloyCredentialServiceMetadata { get; set; } + + /// + /// Salto Space credential service metadata for the phone. + /// + [DataMember( + Name = "salto_space_credential_service_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public PhonePropertiesSaltoSpaceCredentialServiceMetadata? SaltoSpaceCredentialServiceMetadata { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_phonePropertiesAssaAbloyCredentialServiceMetadata_model")] + public class PhonePropertiesAssaAbloyCredentialServiceMetadata + { + [JsonConstructorAttribute] + protected PhonePropertiesAssaAbloyCredentialServiceMetadata() { } + + public PhonePropertiesAssaAbloyCredentialServiceMetadata( + List? endpoints = default, + bool? hasActiveEndpoint = default + ) + { + Endpoints = endpoints; + HasActiveEndpoint = hasActiveEndpoint; + } + + /// + /// Endpoints associated with the phone. + /// + [DataMember(Name = "endpoints", IsRequired = false, EmitDefaultValue = false)] + public List? Endpoints { get; set; } + + /// + /// Indicates whether the credential service has active endpoints associated with the phone. + /// + [DataMember(Name = "has_active_endpoint", IsRequired = false, EmitDefaultValue = false)] + public bool? HasActiveEndpoint { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_phonePropertiesAssaAbloyCredentialServiceMetadataEndpoints_model" + )] + public class PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints + { + [JsonConstructorAttribute] + protected PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints() { } + + public PhonePropertiesAssaAbloyCredentialServiceMetadataEndpoints( + string? endpointId = default, + bool? isActive = default + ) + { + EndpointId = endpointId; + IsActive = isActive; + } + + /// + /// ID of the associated endpoint. + /// + [DataMember(Name = "endpoint_id", IsRequired = false, EmitDefaultValue = false)] + public string? EndpointId { get; set; } + + /// + /// Indicated whether the endpoint is active. + /// + [DataMember(Name = "is_active", IsRequired = false, EmitDefaultValue = false)] + public bool? IsActive { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_phonePropertiesSaltoSpaceCredentialServiceMetadata_model")] + public class PhonePropertiesSaltoSpaceCredentialServiceMetadata + { + [JsonConstructorAttribute] + protected PhonePropertiesSaltoSpaceCredentialServiceMetadata() { } + + public PhonePropertiesSaltoSpaceCredentialServiceMetadata(bool? hasActivePhone = default) + { + HasActivePhone = hasActivePhone; + } + + /// + /// Indicates whether the credential service has an active associated phone. + /// + [DataMember(Name = "has_active_phone", IsRequired = false, EmitDefaultValue = false)] + public bool? HasActivePhone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_phoneWarnings_model")] + public class PhoneWarnings + { + [JsonConstructorAttribute] + protected PhoneWarnings() { } + + public PhoneWarnings( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Unique identifier of the type of warning. + /// + [DataMember(Name = "warning_code", IsRequired = false, EmitDefaultValue = false)] + public string WarningCode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/Space.cs b/src/Seam/Model/Space.cs index 4a6fd265..ef105583 100644 --- a/src/Seam/Model/Space.cs +++ b/src/Seam/Model/Space.cs @@ -8,216 +8,232 @@ namespace Seam.Model { -/// -/// Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. -/// -[DataContract(Name = "seamModel_space_model")] -public class Space -{ -[JsonConstructorAttribute] -protected Space() { } - -public Space(float acsEntranceCount = default, string createdAt = default, SpaceCustomerData? customerData = default, string? customerKey = default, float deviceCount = default, string displayName = default, SpaceGeolocation? geolocation = default, string name = default, string spaceId = default, string? spaceKey = default, string workspaceId = default) -{ -AcsEntranceCount = acsEntranceCount; -CreatedAt = createdAt; -CustomerData = customerData; -CustomerKey = customerKey; -DeviceCount = deviceCount; -DisplayName = displayName; -Geolocation = geolocation; -Name = name; -SpaceId = spaceId; -SpaceKey = spaceKey; -WorkspaceId = workspaceId; -} - -/// -/// Number of entrances in the space. -/// -[DataMember(Name = "acs_entrance_count", IsRequired = false, EmitDefaultValue = false)] -public float AcsEntranceCount { get; set; } - -/// -/// Date and time at which the space was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Reservation/stay-related defaults for the space. Also carries the provider/PMS-supplied name under a `<connector_type>_name` key (e.g. `guesty_name`), which Seam preserves when you rename the space (read-only — managed by Seam). -/// -[DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] -public SpaceCustomerData? CustomerData { get; set; } - -/// -/// Customer key associated with the space. -/// -[DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] -public string? CustomerKey { get; set; } - -/// -/// Number of devices in the space. -/// -[DataMember(Name = "device_count", IsRequired = false, EmitDefaultValue = false)] -public float DeviceCount { get; set; } - -/// -/// Display name for the space. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Geographic coordinates (latitude and longitude) of the space. -/// -[DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] -public SpaceGeolocation? Geolocation { get; set; } - -/// -/// Name of the space. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// ID of the space. -/// -[DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] -public string SpaceId { get; set; } - -/// -/// Unique key for the space within the workspace. -/// -[DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] -public string? SpaceKey { get; set; } - -/// -/// ID of the workspace associated with the space. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_spaceCustomerData_model")] -public class SpaceCustomerData -{ -[JsonConstructorAttribute] -protected SpaceCustomerData() { } - -public SpaceCustomerData(string? address = default, string? defaultCheckinTime = default, string? defaultCheckoutTime = default, string? timeZone = default) -{ -Address = address; -DefaultCheckinTime = defaultCheckinTime; -DefaultCheckoutTime = defaultCheckoutTime; -TimeZone = timeZone; -} - -/// -/// Postal address for the space. -/// -[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] -public string? Address { get; set; } - -/// -/// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckinTime { get; set; } - -/// -/// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. -/// -[DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] -public string? DefaultCheckoutTime { get; set; } - -/// -/// IANA time zone for the space, e.g. America/Los_Angeles. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_spaceGeolocation_model")] -public class SpaceGeolocation -{ -[JsonConstructorAttribute] -protected SpaceGeolocation() { } - -public SpaceGeolocation(float latitude = default, float longitude = default) -{ -Latitude = latitude; -Longitude = longitude; -} - -/// -/// Latitude of the space, in decimal degrees. -/// -[DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] -public float Latitude { get; set; } - -/// -/// Longitude of the space, in decimal degrees. -/// -[DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] -public float Longitude { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. + /// + [DataContract(Name = "seamModel_space_model")] + public class Space + { + [JsonConstructorAttribute] + protected Space() { } + + public Space( + float acsEntranceCount = default, + string createdAt = default, + SpaceCustomerData? customerData = default, + string? customerKey = default, + float deviceCount = default, + string displayName = default, + SpaceGeolocation? geolocation = default, + string name = default, + string spaceId = default, + string? spaceKey = default, + string workspaceId = default + ) + { + AcsEntranceCount = acsEntranceCount; + CreatedAt = createdAt; + CustomerData = customerData; + CustomerKey = customerKey; + DeviceCount = deviceCount; + DisplayName = displayName; + Geolocation = geolocation; + Name = name; + SpaceId = spaceId; + SpaceKey = spaceKey; + WorkspaceId = workspaceId; + } + + /// + /// Number of entrances in the space. + /// + [DataMember(Name = "acs_entrance_count", IsRequired = false, EmitDefaultValue = false)] + public float AcsEntranceCount { get; set; } + + /// + /// Date and time at which the space was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Reservation/stay-related defaults for the space. Also carries the provider/PMS-supplied name under a `<connector_type>_name` key (e.g. `guesty_name`), which Seam preserves when you rename the space (read-only — managed by Seam). + /// + [DataMember(Name = "customer_data", IsRequired = false, EmitDefaultValue = false)] + public SpaceCustomerData? CustomerData { get; set; } + + /// + /// Customer key associated with the space. + /// + [DataMember(Name = "customer_key", IsRequired = false, EmitDefaultValue = false)] + public string? CustomerKey { get; set; } + + /// + /// Number of devices in the space. + /// + [DataMember(Name = "device_count", IsRequired = false, EmitDefaultValue = false)] + public float DeviceCount { get; set; } + + /// + /// Display name for the space. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Geographic coordinates (latitude and longitude) of the space. + /// + [DataMember(Name = "geolocation", IsRequired = false, EmitDefaultValue = false)] + public SpaceGeolocation? Geolocation { get; set; } + + /// + /// Name of the space. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// ID of the space. + /// + [DataMember(Name = "space_id", IsRequired = false, EmitDefaultValue = false)] + public string SpaceId { get; set; } + + /// + /// Unique key for the space within the workspace. + /// + [DataMember(Name = "space_key", IsRequired = false, EmitDefaultValue = false)] + public string? SpaceKey { get; set; } + + /// + /// ID of the workspace associated with the space. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_spaceCustomerData_model")] + public class SpaceCustomerData + { + [JsonConstructorAttribute] + protected SpaceCustomerData() { } + + public SpaceCustomerData( + string? address = default, + string? defaultCheckinTime = default, + string? defaultCheckoutTime = default, + string? timeZone = default + ) + { + Address = address; + DefaultCheckinTime = defaultCheckinTime; + DefaultCheckoutTime = defaultCheckoutTime; + TimeZone = timeZone; + } + + /// + /// Postal address for the space. + /// + [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] + public string? Address { get; set; } + + /// + /// Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember(Name = "default_checkin_time", IsRequired = false, EmitDefaultValue = false)] + public string? DefaultCheckinTime { get; set; } + + /// + /// Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + /// + [DataMember(Name = "default_checkout_time", IsRequired = false, EmitDefaultValue = false)] + public string? DefaultCheckoutTime { get; set; } + + /// + /// IANA time zone for the space, e.g. America/Los_Angeles. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_spaceGeolocation_model")] + public class SpaceGeolocation + { + [JsonConstructorAttribute] + protected SpaceGeolocation() { } + + public SpaceGeolocation(float latitude = default, float longitude = default) + { + Latitude = latitude; + Longitude = longitude; + } + + /// + /// Latitude of the space, in decimal degrees. + /// + [DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)] + public float Latitude { get; set; } + + /// + /// Longitude of the space, in decimal degrees. + /// + [DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)] + public float Longitude { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/ThermostatDailyProgram.cs b/src/Seam/Model/ThermostatDailyProgram.cs index 98ad3d6c..4958adcc 100644 --- a/src/Seam/Model/ThermostatDailyProgram.cs +++ b/src/Seam/Model/ThermostatDailyProgram.cs @@ -8,123 +8,136 @@ namespace Seam.Model { -/// -/// Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. -/// -[DataContract(Name = "seamModel_thermostatDailyProgram_model")] -public class ThermostatDailyProgram -{ -[JsonConstructorAttribute] -protected ThermostatDailyProgram() { } - -public ThermostatDailyProgram(string createdAt = default, string deviceId = default, string? name = default, List periods = default, string thermostatDailyProgramId = default, string workspaceId = default) -{ -CreatedAt = createdAt; -DeviceId = deviceId; -Name = name; -Periods = periods; -ThermostatDailyProgramId = thermostatDailyProgramId; -WorkspaceId = workspaceId; -} - -/// -/// Date and time at which the thermostat daily program was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the thermostat device on which the thermostat daily program is configured. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// User-friendly name to identify the thermostat daily program. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Array of thermostat daily program periods. -/// -[DataMember(Name = "periods", IsRequired = false, EmitDefaultValue = false)] -public List Periods { get; set; } - -/// -/// ID of the thermostat daily program. -/// -[DataMember(Name = "thermostat_daily_program_id", IsRequired = false, EmitDefaultValue = false)] -public string ThermostatDailyProgramId { get; set; } - -/// -/// ID of the workspace that contains the thermostat daily program. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_thermostatDailyProgramPeriods_model")] -public class ThermostatDailyProgramPeriods -{ -[JsonConstructorAttribute] -protected ThermostatDailyProgramPeriods() { } - -public ThermostatDailyProgramPeriods(string climatePresetKey = default, string startsAtTime = default) -{ -ClimatePresetKey = climatePresetKey; -StartsAtTime = startsAtTime; -} - -/// -/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] -public string StartsAtTime { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. + /// + [DataContract(Name = "seamModel_thermostatDailyProgram_model")] + public class ThermostatDailyProgram + { + [JsonConstructorAttribute] + protected ThermostatDailyProgram() { } + + public ThermostatDailyProgram( + string createdAt = default, + string deviceId = default, + string? name = default, + List periods = default, + string thermostatDailyProgramId = default, + string workspaceId = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Name = name; + Periods = periods; + ThermostatDailyProgramId = thermostatDailyProgramId; + WorkspaceId = workspaceId; + } + + /// + /// Date and time at which the thermostat daily program was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the thermostat device on which the thermostat daily program is configured. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// User-friendly name to identify the thermostat daily program. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Array of thermostat daily program periods. + /// + [DataMember(Name = "periods", IsRequired = false, EmitDefaultValue = false)] + public List Periods { get; set; } + + /// + /// ID of the thermostat daily program. + /// + [DataMember( + Name = "thermostat_daily_program_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string ThermostatDailyProgramId { get; set; } + + /// + /// ID of the workspace that contains the thermostat daily program. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_thermostatDailyProgramPeriods_model")] + public class ThermostatDailyProgramPeriods + { + [JsonConstructorAttribute] + protected ThermostatDailyProgramPeriods() { } + + public ThermostatDailyProgramPeriods( + string climatePresetKey = default, + string startsAtTime = default + ) + { + ClimatePresetKey = climatePresetKey; + StartsAtTime = startsAtTime; + } + + /// + /// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at_time", IsRequired = false, EmitDefaultValue = false)] + public string StartsAtTime { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/ThermostatSchedule.cs b/src/Seam/Model/ThermostatSchedule.cs index f9340bf5..db036c3b 100644 --- a/src/Seam/Model/ThermostatSchedule.cs +++ b/src/Seam/Model/ThermostatSchedule.cs @@ -8,165 +8,184 @@ namespace Seam.Model { -/// -/// Represents a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. -/// -[DataContract(Name = "seamModel_thermostatSchedule_model")] -public class ThermostatSchedule -{ -[JsonConstructorAttribute] -protected ThermostatSchedule() { } - -public ThermostatSchedule(string climatePresetKey = default, string createdAt = default, string deviceId = default, string endsAt = default, List errors = default, bool? isOverrideAllowed = default, int? maxOverridePeriodMinutes = default, string? name = default, string startsAt = default, string thermostatScheduleId = default, string workspaceId = default) -{ -ClimatePresetKey = climatePresetKey; -CreatedAt = createdAt; -DeviceId = deviceId; -EndsAt = endsAt; -Errors = errors; -IsOverrideAllowed = isOverrideAllowed; -MaxOverridePeriodMinutes = maxOverridePeriodMinutes; -Name = name; -StartsAt = startsAt; -ThermostatScheduleId = thermostatScheduleId; -WorkspaceId = workspaceId; -} - -/// -/// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] -public string ClimatePresetKey { get; set; } - -/// -/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// ID of the desired [thermostat](https://www.seam.co/docs/capability-guides/thermostats) device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string EndsAt { get; set; } - -/// -/// Errors associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. -/// -[DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOverrideAllowed { get; set; } - -/// -/// Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). -/// -[DataMember(Name = "max_override_period_minutes", IsRequired = false, EmitDefaultValue = false)] -public int? MaxOverridePeriodMinutes { get; set; } - -/// -/// User-friendly name to identify the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string StartsAt { get; set; } - -/// -/// ID of the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). -/// -[DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] -public string ThermostatScheduleId { get; set; } - -/// -/// ID of the workspace that contains the thermostat schedule. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_thermostatScheduleErrors_model")] -public class ThermostatScheduleErrors -{ -[JsonConstructorAttribute] -protected ThermostatScheduleErrors() { } - -public ThermostatScheduleErrors(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://www.seam.co/docs/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. + /// + [DataContract(Name = "seamModel_thermostatSchedule_model")] + public class ThermostatSchedule + { + [JsonConstructorAttribute] + protected ThermostatSchedule() { } + + public ThermostatSchedule( + string climatePresetKey = default, + string createdAt = default, + string deviceId = default, + string endsAt = default, + List errors = default, + bool? isOverrideAllowed = default, + int? maxOverridePeriodMinutes = default, + string? name = default, + string startsAt = default, + string thermostatScheduleId = default, + string workspaceId = default + ) + { + ClimatePresetKey = climatePresetKey; + CreatedAt = createdAt; + DeviceId = deviceId; + EndsAt = endsAt; + Errors = errors; + IsOverrideAllowed = isOverrideAllowed; + MaxOverridePeriodMinutes = maxOverridePeriodMinutes; + Name = name; + StartsAt = startsAt; + ThermostatScheduleId = thermostatScheduleId; + WorkspaceId = workspaceId; + } + + /// + /// Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember(Name = "climate_preset_key", IsRequired = false, EmitDefaultValue = false)] + public string ClimatePresetKey { get; set; } + + /// + /// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// ID of the desired [thermostat](https://www.seam.co/docs/capability-guides/thermostats) device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string EndsAt { get; set; } + + /// + /// Errors associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. + /// + [DataMember(Name = "is_override_allowed", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOverrideAllowed { get; set; } + + /// + /// Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + /// + [DataMember( + Name = "max_override_period_minutes", + IsRequired = false, + EmitDefaultValue = false + )] + public int? MaxOverridePeriodMinutes { get; set; } + + /// + /// User-friendly name to identify the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Date and time at which the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string StartsAt { get; set; } + + /// + /// ID of the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + /// + [DataMember(Name = "thermostat_schedule_id", IsRequired = false, EmitDefaultValue = false)] + public string ThermostatScheduleId { get; set; } + + /// + /// ID of the workspace that contains the thermostat schedule. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_thermostatScheduleErrors_model")] + public class ThermostatScheduleErrors + { + [JsonConstructorAttribute] + protected ThermostatScheduleErrors() { } + + public ThermostatScheduleErrors( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/UnmanagedAccessCode.cs b/src/Seam/Model/UnmanagedAccessCode.cs index 181dfd0f..0cbb4c70 100644 --- a/src/Seam/Model/UnmanagedAccessCode.cs +++ b/src/Seam/Model/UnmanagedAccessCode.cs @@ -8,2597 +8,3051 @@ namespace Seam.Model { -/// -/// Represents an [unmanaged smart lock access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). -/// -/// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. -/// -/// When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. -/// -/// Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. -/// -/// Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: -/// -/// - [Kwikset](https://www.seam.co/docs/device-and-system-integration-guides/kwikset-locks) -/// -[DataContract(Name = "seamModel_unmanagedAccessCode_model")] -public class UnmanagedAccessCode -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCode() { } - -public UnmanagedAccessCode(string accessCodeId = default, bool? cannotBeManaged = default, bool? cannotDeleteUnmanagedAccessCode = default, string? code = default, string createdAt = default, string deviceId = default, string displayStatus = default, UnmanagedAccessCodeDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, string? endsAt = default, List errors = default, bool isManaged = default, string? name = default, string? startsAt = default, UnmanagedAccessCode.StatusEnum status = default, UnmanagedAccessCode.TypeEnum type = default, List warnings = default, string workspaceId = default) -{ -AccessCodeId = accessCodeId; -CannotBeManaged = cannotBeManaged; -CannotDeleteUnmanagedAccessCode = cannotDeleteUnmanagedAccessCode; -Code = code; -CreatedAt = createdAt; -DeviceId = deviceId; -DisplayStatus = displayStatus; -DormakabaOracodeMetadata = dormakabaOracodeMetadata; -EndsAt = endsAt; -Errors = errors; -IsManaged = isManaged; -Name = name; -StartsAt = startsAt; -Status = status; -Type = type; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessCodeErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsBridgeDisconnected), "bridge_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsSubscriptionRequired), "subscription_required")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsAuxiliaryHeatRunning), "auxiliary_heat_running")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsMissingDeviceCredentials), "missing_device_credentials")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsAugustLockNotAuthorized), "august_lock_not_authorized")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool), "empty_backup_access_code_pool")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDeviceDisconnected), "device_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsHubDisconnected), "hub_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDeviceRemoved), "device_removed")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDeviceOffline), "device_offline")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsInsufficientPermissions), "insufficient_permissions")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsAccountDisconnected), "account_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToDelete), "failed_to_delete")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToUpdate), "failed_to_update")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToIssue), "failed_to_issue")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsCodeConstraintsViolated), "code_constraints_violated")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsAccessCodeInactive), "access_code_inactive")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsConflictingExternalModification), "conflicting_external_modification")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice), "no_space_for_access_code_on_device")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsDuplicateCodeOnDevice), "duplicate_code_on_device")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToRemoveFromDevice), "failed_to_remove_from_device")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsFailedToSetOnDevice), "failed_to_set_on_device")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeErrorsProviderIssue), "provider_issue")] -public abstract class UnmanagedAccessCodeErrors -{ -public abstract string ErrorCode { get; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsProviderIssue_model")] -public class UnmanagedAccessCodeErrorsProviderIssue : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsProviderIssue() { } - -public UnmanagedAccessCodeErrorsProviderIssue(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "provider_issue"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToSetOnDevice_model")] -public class UnmanagedAccessCodeErrorsFailedToSetOnDevice : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsFailedToSetOnDevice() { } - -public UnmanagedAccessCodeErrorsFailedToSetOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_set_on_device"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToRemoveFromDevice_model")] -public class UnmanagedAccessCodeErrorsFailedToRemoveFromDevice : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsFailedToRemoveFromDevice() { } - -public UnmanagedAccessCodeErrorsFailedToRemoveFromDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_remove_from_device"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDuplicateCodeOnDevice_model")] -public class UnmanagedAccessCodeErrorsDuplicateCodeOnDevice : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsDuplicateCodeOnDevice() { } - -public UnmanagedAccessCodeErrorsDuplicateCodeOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string? managedAccessCodeId = default, string message = default, string? unmanagedAccessCodeId = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -ManagedAccessCodeId = managedAccessCodeId; -Message = message; -UnmanagedAccessCodeId = unmanagedAccessCodeId; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "duplicate_code_on_device"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// ID of the managed access code that conflicts with this managed access code, when Seam can identify it. -/// -[DataMember(Name = "managed_access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? ManagedAccessCodeId { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. -/// -[DataMember(Name = "unmanaged_access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string? UnmanagedAccessCodeId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice_model")] -public class UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice() { } - -public UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "no_space_for_access_code_on_device"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsConflictingExternalModification_model")] -public class UnmanagedAccessCodeErrorsConflictingExternalModification : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsConflictingExternalModification() { } - -public UnmanagedAccessCodeErrorsConflictingExternalModification(UnmanagedAccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? changeType = default, string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default, List? modifiedFields = default) -{ -ChangeType = changeType; -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -ModifiedFields = modifiedFields; -} - -/// -/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ChangeTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "modified")] -Modified = 1, - -[EnumMember(Value = "removed")] -Removed = 2, -} - -/// -/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. -/// -[DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? ChangeType { get; set; } - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "conflicting_external_modification"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// List of fields that were changed externally, with their previous and new values. -/// -[DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] -public List? ModifiedFields { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields_model")] -public class UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields() { } - -public UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields(string field = default, string? from = default, string? to = default) -{ -Field = field; -From = from; -To = to; -} - -/// -/// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). -/// -[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] -public string Field { get; set; } - -/// -/// The previous value of the field. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public string? From { get; set; } - -/// -/// The new value of the field. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public string? To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAccessCodeInactive_model")] -public class UnmanagedAccessCodeErrorsAccessCodeInactive : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsAccessCodeInactive() { } - -public UnmanagedAccessCodeErrorsAccessCodeInactive(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "access_code_inactive"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsCodeConstraintsViolated_model")] -public class UnmanagedAccessCodeErrorsCodeConstraintsViolated : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsCodeConstraintsViolated() { } - -public UnmanagedAccessCodeErrorsCodeConstraintsViolated(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "code_constraints_violated"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToIssue_model")] -public class UnmanagedAccessCodeErrorsFailedToIssue : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsFailedToIssue() { } - -public UnmanagedAccessCodeErrorsFailedToIssue(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_issue"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToUpdate_model")] -public class UnmanagedAccessCodeErrorsFailedToUpdate : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsFailedToUpdate() { } - -public UnmanagedAccessCodeErrorsFailedToUpdate(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_update"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToDelete_model")] -public class UnmanagedAccessCodeErrorsFailedToDelete : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsFailedToDelete() { } - -public UnmanagedAccessCodeErrorsFailedToDelete(string? createdAt = default, string errorCode = default, bool isAccessCodeError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsAccessCodeError = isAccessCodeError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string? CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_delete"; - -/// -/// Indicates that this is an access code error. -/// -[DataMember(Name = "is_access_code_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsAccessCodeError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAccountDisconnected_model")] -public class UnmanagedAccessCodeErrorsAccountDisconnected : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsAccountDisconnected() { } - -public UnmanagedAccessCodeErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "account_disconnected"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded_model")] -public class UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded() { } - -public UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsInsufficientPermissions_model")] -public class UnmanagedAccessCodeErrorsInsufficientPermissions : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsInsufficientPermissions() { } - -public UnmanagedAccessCodeErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "insufficient_permissions"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDormakabaSitesDisconnected_model")] -public class UnmanagedAccessCodeErrorsDormakabaSitesDisconnected : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsDormakabaSitesDisconnected() { } - -public UnmanagedAccessCodeErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceOffline_model")] -public class UnmanagedAccessCodeErrorsDeviceOffline : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsDeviceOffline() { } - -public UnmanagedAccessCodeErrorsDeviceOffline(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_offline"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceRemoved_model")] -public class UnmanagedAccessCodeErrorsDeviceRemoved : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsDeviceRemoved() { } - -public UnmanagedAccessCodeErrorsDeviceRemoved(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_removed"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsHubDisconnected_model")] -public class UnmanagedAccessCodeErrorsHubDisconnected : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsHubDisconnected() { } - -public UnmanagedAccessCodeErrorsHubDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "hub_disconnected"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceDisconnected_model")] -public class UnmanagedAccessCodeErrorsDeviceDisconnected : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsDeviceDisconnected() { } - -public UnmanagedAccessCodeErrorsDeviceDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_disconnected"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsEmptyBackupAccessCodePool_model")] -public class UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool() { } - -public UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "empty_backup_access_code_pool"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAugustLockNotAuthorized_model")] -public class UnmanagedAccessCodeErrorsAugustLockNotAuthorized : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsAugustLockNotAuthorized() { } - -public UnmanagedAccessCodeErrorsAugustLockNotAuthorized(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "august_lock_not_authorized"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsMissingDeviceCredentials_model")] -public class UnmanagedAccessCodeErrorsMissingDeviceCredentials : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsMissingDeviceCredentials() { } - -public UnmanagedAccessCodeErrorsMissingDeviceCredentials(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "missing_device_credentials"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAuxiliaryHeatRunning_model")] -public class UnmanagedAccessCodeErrorsAuxiliaryHeatRunning : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsAuxiliaryHeatRunning() { } - -public UnmanagedAccessCodeErrorsAuxiliaryHeatRunning(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "auxiliary_heat_running"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsSubscriptionRequired_model")] -public class UnmanagedAccessCodeErrorsSubscriptionRequired : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsSubscriptionRequired() { } - -public UnmanagedAccessCodeErrorsSubscriptionRequired(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "subscription_required"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsBridgeDisconnected_model")] -public class UnmanagedAccessCodeErrorsBridgeDisconnected : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsBridgeDisconnected() { } - -public UnmanagedAccessCodeErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "bridge_disconnected"; - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeErrorsUnrecognized_model")] -public class UnmanagedAccessCodeErrorsUnrecognized : UnmanagedAccessCodeErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeErrorsUnrecognized() { } - -public UnmanagedAccessCodeErrorsUnrecognized(string errorCode = default, string message = default) -{ -ErrorCode = errorCode; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "set")] -Set = 1, - -[EnumMember(Value = "unset")] -Unset = 2, -} - -/// -/// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum TypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "time_bound")] -TimeBound = 1, - -[EnumMember(Value = "ongoing")] -Ongoing = 2, -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessCodeWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode), "unknown_issue_with_access_code")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsBeingDeleted), "being_deleted")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsUsingBackupAccessCode), "using_backup_access_code")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsManagementTransferred), "management_transferred")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours), "igloo_algopin_must_be_used_within_24_hours")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected), "third_party_integration_detected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsDelayInIssuing), "delay_in_issuing")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsDelayInRemovingFromDevice), "delay_in_removing_from_device")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsDelayInSettingOnDevice), "delay_in_setting_on_device")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsExternalModificationInEffect), "external_modification_in_effect")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone), "time_frame_adjusted_for_unknown_time_zone")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessCodeWarningsCodeRotatesPeriodically), "code_rotates_periodically")] -public abstract class UnmanagedAccessCodeWarnings -{ -public abstract string WarningCode { get; } - -public abstract string? CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsCodeRotatesPeriodically_model")] -public class UnmanagedAccessCodeWarningsCodeRotatesPeriodically : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsCodeRotatesPeriodically() { } - -public UnmanagedAccessCodeWarningsCodeRotatesPeriodically(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "code_rotates_periodically"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone_model")] -public class UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone() { } - -public UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "time_frame_adjusted_for_unknown_time_zone"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsExternalModificationInEffect_model")] -public class UnmanagedAccessCodeWarningsExternalModificationInEffect : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsExternalModificationInEffect() { } - -public UnmanagedAccessCodeWarningsExternalModificationInEffect(UnmanagedAccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? changeType = default, string? createdAt = default, string message = default, List? modifiedFields = default, string warningCode = default) -{ -ChangeType = changeType; -CreatedAt = createdAt; -Message = message; -ModifiedFields = modifiedFields; -WarningCode = warningCode; -} - -/// -/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ChangeTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "modified")] -Modified = 1, - -[EnumMember(Value = "removed")] -Removed = 2, -} - -/// -/// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. -/// -[DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? ChangeType { get; set; } - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// List of fields that were changed externally, with their previous and new values. -/// -[DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] -public List? ModifiedFields { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "external_modification_in_effect"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields_model")] -public class UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields() { } - -public UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields(string field = default, string? from = default, string? to = default) -{ -Field = field; -From = from; -To = to; -} - -/// -/// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). -/// -[DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] -public string Field { get; set; } - -/// -/// The previous value of the field. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public string? From { get; set; } - -/// -/// The new value of the field. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public string? To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInSettingOnDevice_model")] -public class UnmanagedAccessCodeWarningsDelayInSettingOnDevice : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsDelayInSettingOnDevice() { } - -public UnmanagedAccessCodeWarningsDelayInSettingOnDevice(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "delay_in_setting_on_device"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInRemovingFromDevice_model")] -public class UnmanagedAccessCodeWarningsDelayInRemovingFromDevice : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsDelayInRemovingFromDevice() { } - -public UnmanagedAccessCodeWarningsDelayInRemovingFromDevice(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "delay_in_removing_from_device"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInIssuing_model")] -public class UnmanagedAccessCodeWarningsDelayInIssuing : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsDelayInIssuing() { } - -public UnmanagedAccessCodeWarningsDelayInIssuing(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "delay_in_issuing"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsThirdPartyIntegrationDetected_model")] -public class UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected() { } - -public UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "third_party_integration_detected"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours_model")] -public class UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours() { } - -public UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "igloo_algopin_must_be_used_within_24_hours"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsManagementTransferred_model")] -public class UnmanagedAccessCodeWarningsManagementTransferred : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsManagementTransferred() { } - -public UnmanagedAccessCodeWarningsManagementTransferred(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "management_transferred"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUsingBackupAccessCode_model")] -public class UnmanagedAccessCodeWarningsUsingBackupAccessCode : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsUsingBackupAccessCode() { } - -public UnmanagedAccessCodeWarningsUsingBackupAccessCode(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "using_backup_access_code"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsBeingDeleted_model")] -public class UnmanagedAccessCodeWarningsBeingDeleted : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsBeingDeleted() { } - -public UnmanagedAccessCodeWarningsBeingDeleted(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUnknownIssueWithAccessCode_model")] -public class UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode() { } - -public UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode(string? createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unknown_issue_with_access_code"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUnrecognized_model")] -public class UnmanagedAccessCodeWarningsUnrecognized : UnmanagedAccessCodeWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeWarningsUnrecognized() { } - -public UnmanagedAccessCodeWarningsUnrecognized(string warningCode = default, string? createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string? CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Unique identifier for the access code. -/// -[DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessCodeId { get; set; } - -/// -/// Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations. -/// -[DataMember(Name = "cannot_be_managed", IsRequired = false, EmitDefaultValue = false)] -public bool? CannotBeManaged { get; set; } - -/// -/// Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app. -/// -[DataMember(Name = "cannot_delete_unmanaged_access_code", IsRequired = false, EmitDefaultValue = false)] -public bool? CannotDeleteUnmanagedAccessCode { get; set; } - -/// -/// Code used for access. Typically, a numeric or alphanumeric string. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Date and time at which the access code was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Unique identifier for the device associated with the access code. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Human-readable label for the code's state: `Active` or `Not active`, based on whether the code is set on the device. For display only. The wording is not stable and is not an enumeration — never compare against or branch on it. -/// -[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] -public string DisplayStatus { get; set; } - -/// -/// Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices. -/// -[DataMember(Name = "dormakaba_oracode_metadata", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessCodeDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } - -/// -/// Date and time after which the time-bound access code becomes inactive. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Errors associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Indicates that Seam does not manage the access code. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// Date and time at which the time-bound access code becomes active. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -/// -/// Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. -/// -[Obsolete("Use `display_status` to show a person the code's state.")] -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessCode.StatusEnum Status { get; set; } - -/// -/// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. -/// -[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessCode.TypeEnum Type { get; set; } - -/// -/// Warnings associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// Unique identifier for the Seam workspace associated with the access code. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessCodeDormakabaOracodeMetadata_model")] -public class UnmanagedAccessCodeDormakabaOracodeMetadata -{ -[JsonConstructorAttribute] -protected UnmanagedAccessCodeDormakabaOracodeMetadata() { } - -public UnmanagedAccessCodeDormakabaOracodeMetadata(bool? isCancellable = default, bool? isEarlyCheckinAble = default, bool? isExtendable = default, bool? isOverridable = default, string? siteName = default, float? stayId = default, string? userLevelId = default, string? userLevelName = default) -{ -IsCancellable = isCancellable; -IsEarlyCheckinAble = isEarlyCheckinAble; -IsExtendable = isExtendable; -IsOverridable = isOverridable; -SiteName = siteName; -StayId = stayId; -UserLevelId = userLevelId; -UserLevelName = userLevelName; -} - -/// -/// Indicates whether the stay can be cancelled via the Dormakaba Oracode API. -/// -[DataMember(Name = "is_cancellable", IsRequired = false, EmitDefaultValue = false)] -public bool? IsCancellable { get; set; } - -/// -/// Indicates whether early check-in is available for this stay. -/// -[DataMember(Name = "is_early_checkin_able", IsRequired = false, EmitDefaultValue = false)] -public bool? IsEarlyCheckinAble { get; set; } - -/// -/// Indicates whether the stay can be extended via the Dormakaba Oracode API. -/// -[DataMember(Name = "is_extendable", IsRequired = false, EmitDefaultValue = false)] -public bool? IsExtendable { get; set; } - -/// -/// Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. -/// -[DataMember(Name = "is_overridable", IsRequired = false, EmitDefaultValue = false)] -public bool? IsOverridable { get; set; } - -/// -/// Dormakaba Oracode site name associated with this access code. -/// -[DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] -public string? SiteName { get; set; } - -/// -/// Dormakaba Oracode stay ID associated with this access code. -/// -[DataMember(Name = "stay_id", IsRequired = false, EmitDefaultValue = false)] -public float? StayId { get; set; } - -/// -/// Dormakaba Oracode user level ID associated with this access code. -/// -[DataMember(Name = "user_level_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserLevelId { get; set; } - -/// -/// Dormakaba Oracode user level name associated with this access code. -/// -[DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] -public string? UserLevelName { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an [unmanaged smart lock access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + /// + /// An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. + /// + /// When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. + /// + /// Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. + /// + /// Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: + /// + /// - [Kwikset](https://www.seam.co/docs/device-and-system-integration-guides/kwikset-locks) + /// + [DataContract(Name = "seamModel_unmanagedAccessCode_model")] + public class UnmanagedAccessCode + { + [JsonConstructorAttribute] + protected UnmanagedAccessCode() { } + + public UnmanagedAccessCode( + string accessCodeId = default, + bool? cannotBeManaged = default, + bool? cannotDeleteUnmanagedAccessCode = default, + string? code = default, + string createdAt = default, + string deviceId = default, + string displayStatus = default, + UnmanagedAccessCodeDormakabaOracodeMetadata? dormakabaOracodeMetadata = default, + string? endsAt = default, + List errors = default, + bool isManaged = default, + string? name = default, + string? startsAt = default, + UnmanagedAccessCode.StatusEnum status = default, + UnmanagedAccessCode.TypeEnum type = default, + List warnings = default, + string workspaceId = default + ) + { + AccessCodeId = accessCodeId; + CannotBeManaged = cannotBeManaged; + CannotDeleteUnmanagedAccessCode = cannotDeleteUnmanagedAccessCode; + Code = code; + CreatedAt = createdAt; + DeviceId = deviceId; + DisplayStatus = displayStatus; + DormakabaOracodeMetadata = dormakabaOracodeMetadata; + EndsAt = endsAt; + Errors = errors; + IsManaged = isManaged; + Name = name; + StartsAt = startsAt; + Status = status; + Type = type; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessCodeErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsBridgeDisconnected), + "bridge_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsSubscriptionRequired), + "subscription_required" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsAuxiliaryHeatRunning), + "auxiliary_heat_running" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsMissingDeviceCredentials), + "missing_device_credentials" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsAugustLockNotAuthorized), + "august_lock_not_authorized" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool), + "empty_backup_access_code_pool" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsDeviceDisconnected), + "device_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsHubDisconnected), + "hub_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsDeviceRemoved), + "device_removed" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsDeviceOffline), + "device_offline" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsDormakabaSitesDisconnected), + "dormakaba_sites_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsInsufficientPermissions), + "insufficient_permissions" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded), + "salto_ks_subscription_limit_exceeded" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsAccountDisconnected), + "account_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsFailedToDelete), + "failed_to_delete" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsFailedToUpdate), + "failed_to_update" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsFailedToIssue), + "failed_to_issue" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsCodeConstraintsViolated), + "code_constraints_violated" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsAccessCodeInactive), + "access_code_inactive" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsConflictingExternalModification), + "conflicting_external_modification" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice), + "no_space_for_access_code_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsDuplicateCodeOnDevice), + "duplicate_code_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsFailedToRemoveFromDevice), + "failed_to_remove_from_device" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsFailedToSetOnDevice), + "failed_to_set_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeErrorsProviderIssue), + "provider_issue" + )] + public abstract class UnmanagedAccessCodeErrors + { + public abstract string ErrorCode { get; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsProviderIssue_model")] + public class UnmanagedAccessCodeErrorsProviderIssue : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsProviderIssue() { } + + public UnmanagedAccessCodeErrorsProviderIssue( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "provider_issue"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToSetOnDevice_model")] + public class UnmanagedAccessCodeErrorsFailedToSetOnDevice : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsFailedToSetOnDevice() { } + + public UnmanagedAccessCodeErrorsFailedToSetOnDevice( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_set_on_device"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToRemoveFromDevice_model")] + public class UnmanagedAccessCodeErrorsFailedToRemoveFromDevice : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsFailedToRemoveFromDevice() { } + + public UnmanagedAccessCodeErrorsFailedToRemoveFromDevice( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_remove_from_device"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDuplicateCodeOnDevice_model")] + public class UnmanagedAccessCodeErrorsDuplicateCodeOnDevice : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsDuplicateCodeOnDevice() { } + + public UnmanagedAccessCodeErrorsDuplicateCodeOnDevice( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string? managedAccessCodeId = default, + string message = default, + string? unmanagedAccessCodeId = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + ManagedAccessCodeId = managedAccessCodeId; + Message = message; + UnmanagedAccessCodeId = unmanagedAccessCodeId; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "duplicate_code_on_device"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// ID of the managed access code that conflicts with this managed access code, when Seam can identify it. + /// + [DataMember( + Name = "managed_access_code_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? ManagedAccessCodeId { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. + /// + [DataMember( + Name = "unmanaged_access_code_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? UnmanagedAccessCodeId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice_model" + )] + public class UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice + : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice() { } + + public UnmanagedAccessCodeErrorsNoSpaceForAccessCodeOnDevice( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "no_space_for_access_code_on_device"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeErrorsConflictingExternalModification_model" + )] + public class UnmanagedAccessCodeErrorsConflictingExternalModification + : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsConflictingExternalModification() { } + + public UnmanagedAccessCodeErrorsConflictingExternalModification( + UnmanagedAccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? changeType = + default, + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default, + List? modifiedFields = + default + ) + { + ChangeType = changeType; + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + ModifiedFields = modifiedFields; + } + + /// + /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ChangeTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "modified")] + Modified = 1, + + [EnumMember(Value = "removed")] + Removed = 2, + } + + /// + /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + /// + [DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessCodeErrorsConflictingExternalModification.ChangeTypeEnum? ChangeType { get; set; } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "conflicting_external_modification"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// List of fields that were changed externally, with their previous and new values. + /// + [DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] + public List? ModifiedFields { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields_model" + )] + public class UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields() { } + + public UnmanagedAccessCodeErrorsConflictingExternalModificationModifiedFields( + string field = default, + string? from = default, + string? to = default + ) + { + Field = field; + From = from; + To = to; + } + + /// + /// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). + /// + [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] + public string Field { get; set; } + + /// + /// The previous value of the field. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public string? From { get; set; } + + /// + /// The new value of the field. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public string? To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAccessCodeInactive_model")] + public class UnmanagedAccessCodeErrorsAccessCodeInactive : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsAccessCodeInactive() { } + + public UnmanagedAccessCodeErrorsAccessCodeInactive( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "access_code_inactive"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsCodeConstraintsViolated_model")] + public class UnmanagedAccessCodeErrorsCodeConstraintsViolated : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsCodeConstraintsViolated() { } + + public UnmanagedAccessCodeErrorsCodeConstraintsViolated( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "code_constraints_violated"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToIssue_model")] + public class UnmanagedAccessCodeErrorsFailedToIssue : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsFailedToIssue() { } + + public UnmanagedAccessCodeErrorsFailedToIssue( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_issue"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToUpdate_model")] + public class UnmanagedAccessCodeErrorsFailedToUpdate : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsFailedToUpdate() { } + + public UnmanagedAccessCodeErrorsFailedToUpdate( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_update"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsFailedToDelete_model")] + public class UnmanagedAccessCodeErrorsFailedToDelete : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsFailedToDelete() { } + + public UnmanagedAccessCodeErrorsFailedToDelete( + string? createdAt = default, + string errorCode = default, + bool isAccessCodeError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsAccessCodeError = isAccessCodeError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string? CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_delete"; + + /// + /// Indicates that this is an access code error. + /// + [DataMember( + Name = "is_access_code_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsAccessCodeError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAccountDisconnected_model")] + public class UnmanagedAccessCodeErrorsAccountDisconnected : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsAccountDisconnected() { } + + public UnmanagedAccessCodeErrorsAccountDisconnected( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "account_disconnected"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded_model" + )] + public class UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded + : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded() { } + + public UnmanagedAccessCodeErrorsSaltoKsSubscriptionLimitExceeded( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsInsufficientPermissions_model")] + public class UnmanagedAccessCodeErrorsInsufficientPermissions : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsInsufficientPermissions() { } + + public UnmanagedAccessCodeErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDormakabaSitesDisconnected_model")] + public class UnmanagedAccessCodeErrorsDormakabaSitesDisconnected : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsDormakabaSitesDisconnected() { } + + public UnmanagedAccessCodeErrorsDormakabaSitesDisconnected( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceOffline_model")] + public class UnmanagedAccessCodeErrorsDeviceOffline : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsDeviceOffline() { } + + public UnmanagedAccessCodeErrorsDeviceOffline( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_offline"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceRemoved_model")] + public class UnmanagedAccessCodeErrorsDeviceRemoved : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsDeviceRemoved() { } + + public UnmanagedAccessCodeErrorsDeviceRemoved( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_removed"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsHubDisconnected_model")] + public class UnmanagedAccessCodeErrorsHubDisconnected : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsHubDisconnected() { } + + public UnmanagedAccessCodeErrorsHubDisconnected( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "hub_disconnected"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsDeviceDisconnected_model")] + public class UnmanagedAccessCodeErrorsDeviceDisconnected : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsDeviceDisconnected() { } + + public UnmanagedAccessCodeErrorsDeviceDisconnected( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_disconnected"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsEmptyBackupAccessCodePool_model")] + public class UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool() { } + + public UnmanagedAccessCodeErrorsEmptyBackupAccessCodePool( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "empty_backup_access_code_pool"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAugustLockNotAuthorized_model")] + public class UnmanagedAccessCodeErrorsAugustLockNotAuthorized : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsAugustLockNotAuthorized() { } + + public UnmanagedAccessCodeErrorsAugustLockNotAuthorized( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "august_lock_not_authorized"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsMissingDeviceCredentials_model")] + public class UnmanagedAccessCodeErrorsMissingDeviceCredentials : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsMissingDeviceCredentials() { } + + public UnmanagedAccessCodeErrorsMissingDeviceCredentials( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "missing_device_credentials"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsAuxiliaryHeatRunning_model")] + public class UnmanagedAccessCodeErrorsAuxiliaryHeatRunning : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsAuxiliaryHeatRunning() { } + + public UnmanagedAccessCodeErrorsAuxiliaryHeatRunning( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "auxiliary_heat_running"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsSubscriptionRequired_model")] + public class UnmanagedAccessCodeErrorsSubscriptionRequired : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsSubscriptionRequired() { } + + public UnmanagedAccessCodeErrorsSubscriptionRequired( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "subscription_required"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsBridgeDisconnected_model")] + public class UnmanagedAccessCodeErrorsBridgeDisconnected : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsBridgeDisconnected() { } + + public UnmanagedAccessCodeErrorsBridgeDisconnected( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "bridge_disconnected"; + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeErrorsUnrecognized_model")] + public class UnmanagedAccessCodeErrorsUnrecognized : UnmanagedAccessCodeErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeErrorsUnrecognized() { } + + public UnmanagedAccessCodeErrorsUnrecognized( + string errorCode = default, + string message = default + ) + { + ErrorCode = errorCode; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "set")] + Set = 1, + + [EnumMember(Value = "unset")] + Unset = 2, + } + + /// + /// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum TypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "time_bound")] + TimeBound = 1, + + [EnumMember(Value = "ongoing")] + Ongoing = 2, + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessCodeWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode), + "unknown_issue_with_access_code" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsBeingDeleted), + "being_deleted" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsUsingBackupAccessCode), + "using_backup_access_code" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsManagementTransferred), + "management_transferred" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours), + "igloo_algopin_must_be_used_within_24_hours" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected), + "third_party_integration_detected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsDelayInIssuing), + "delay_in_issuing" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsDelayInRemovingFromDevice), + "delay_in_removing_from_device" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsDelayInSettingOnDevice), + "delay_in_setting_on_device" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsExternalModificationInEffect), + "external_modification_in_effect" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone), + "time_frame_adjusted_for_unknown_time_zone" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessCodeWarningsCodeRotatesPeriodically), + "code_rotates_periodically" + )] + public abstract class UnmanagedAccessCodeWarnings + { + public abstract string WarningCode { get; } + + public abstract string? CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsCodeRotatesPeriodically_model")] + public class UnmanagedAccessCodeWarningsCodeRotatesPeriodically + : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsCodeRotatesPeriodically() { } + + public UnmanagedAccessCodeWarningsCodeRotatesPeriodically( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "code_rotates_periodically"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone_model" + )] + public class UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone + : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone() { } + + public UnmanagedAccessCodeWarningsTimeFrameAdjustedForUnknownTimeZone( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "time_frame_adjusted_for_unknown_time_zone"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeWarningsExternalModificationInEffect_model" + )] + public class UnmanagedAccessCodeWarningsExternalModificationInEffect + : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsExternalModificationInEffect() { } + + public UnmanagedAccessCodeWarningsExternalModificationInEffect( + UnmanagedAccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? changeType = + default, + string? createdAt = default, + string message = default, + List? modifiedFields = + default, + string warningCode = default + ) + { + ChangeType = changeType; + CreatedAt = createdAt; + Message = message; + ModifiedFields = modifiedFields; + WarningCode = warningCode; + } + + /// + /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ChangeTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "modified")] + Modified = 1, + + [EnumMember(Value = "removed")] + Removed = 2, + } + + /// + /// Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + /// + [DataMember(Name = "change_type", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessCodeWarningsExternalModificationInEffect.ChangeTypeEnum? ChangeType { get; set; } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// List of fields that were changed externally, with their previous and new values. + /// + [DataMember(Name = "modified_fields", IsRequired = false, EmitDefaultValue = false)] + public List? ModifiedFields { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "external_modification_in_effect"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields_model" + )] + public class UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields() { } + + public UnmanagedAccessCodeWarningsExternalModificationInEffectModifiedFields( + string field = default, + string? from = default, + string? to = default + ) + { + Field = field; + From = from; + To = to; + } + + /// + /// The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). + /// + [DataMember(Name = "field", IsRequired = false, EmitDefaultValue = false)] + public string Field { get; set; } + + /// + /// The previous value of the field. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public string? From { get; set; } + + /// + /// The new value of the field. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public string? To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInSettingOnDevice_model")] + public class UnmanagedAccessCodeWarningsDelayInSettingOnDevice : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsDelayInSettingOnDevice() { } + + public UnmanagedAccessCodeWarningsDelayInSettingOnDevice( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_setting_on_device"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeWarningsDelayInRemovingFromDevice_model" + )] + public class UnmanagedAccessCodeWarningsDelayInRemovingFromDevice + : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsDelayInRemovingFromDevice() { } + + public UnmanagedAccessCodeWarningsDelayInRemovingFromDevice( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_removing_from_device"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsDelayInIssuing_model")] + public class UnmanagedAccessCodeWarningsDelayInIssuing : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsDelayInIssuing() { } + + public UnmanagedAccessCodeWarningsDelayInIssuing( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_issuing"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeWarningsThirdPartyIntegrationDetected_model" + )] + public class UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected + : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected() { } + + public UnmanagedAccessCodeWarningsThirdPartyIntegrationDetected( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "third_party_integration_detected"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours_model" + )] + public class UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours + : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours() { } + + public UnmanagedAccessCodeWarningsIglooAlgopinMustBeUsedWithin_24Hours( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "igloo_algopin_must_be_used_within_24_hours"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsManagementTransferred_model")] + public class UnmanagedAccessCodeWarningsManagementTransferred : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsManagementTransferred() { } + + public UnmanagedAccessCodeWarningsManagementTransferred( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "management_transferred"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUsingBackupAccessCode_model")] + public class UnmanagedAccessCodeWarningsUsingBackupAccessCode : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsUsingBackupAccessCode() { } + + public UnmanagedAccessCodeWarningsUsingBackupAccessCode( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "using_backup_access_code"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsBeingDeleted_model")] + public class UnmanagedAccessCodeWarningsBeingDeleted : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsBeingDeleted() { } + + public UnmanagedAccessCodeWarningsBeingDeleted( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessCodeWarningsUnknownIssueWithAccessCode_model" + )] + public class UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode + : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode() { } + + public UnmanagedAccessCodeWarningsUnknownIssueWithAccessCode( + string? createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_access_code"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeWarningsUnrecognized_model")] + public class UnmanagedAccessCodeWarningsUnrecognized : UnmanagedAccessCodeWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeWarningsUnrecognized() { } + + public UnmanagedAccessCodeWarningsUnrecognized( + string warningCode = default, + string? createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string? CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Unique identifier for the access code. + /// + [DataMember(Name = "access_code_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessCodeId { get; set; } + + /// + /// Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations. + /// + [DataMember(Name = "cannot_be_managed", IsRequired = false, EmitDefaultValue = false)] + public bool? CannotBeManaged { get; set; } + + /// + /// Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app. + /// + [DataMember( + Name = "cannot_delete_unmanaged_access_code", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CannotDeleteUnmanagedAccessCode { get; set; } + + /// + /// Code used for access. Typically, a numeric or alphanumeric string. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Date and time at which the access code was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Unique identifier for the device associated with the access code. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Human-readable label for the code's state: `Active` or `Not active`, based on whether the code is set on the device. For display only. The wording is not stable and is not an enumeration — never compare against or branch on it. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + + /// + /// Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices. + /// + [DataMember( + Name = "dormakaba_oracode_metadata", + IsRequired = false, + EmitDefaultValue = false + )] + public UnmanagedAccessCodeDormakabaOracodeMetadata? DormakabaOracodeMetadata { get; set; } + + /// + /// Date and time after which the time-bound access code becomes inactive. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Indicates that Seam does not manage the access code. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// Date and time at which the time-bound access code becomes active. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + /// + /// Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. + /// + [Obsolete("Use `display_status` to show a person the code's state.")] + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessCode.StatusEnum Status { get; set; } + + /// + /// Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. + /// + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessCode.TypeEnum Type { get; set; } + + /// + /// Warnings associated with the [access code](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// Unique identifier for the Seam workspace associated with the access code. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessCodeDormakabaOracodeMetadata_model")] + public class UnmanagedAccessCodeDormakabaOracodeMetadata + { + [JsonConstructorAttribute] + protected UnmanagedAccessCodeDormakabaOracodeMetadata() { } + + public UnmanagedAccessCodeDormakabaOracodeMetadata( + bool? isCancellable = default, + bool? isEarlyCheckinAble = default, + bool? isExtendable = default, + bool? isOverridable = default, + string? siteName = default, + float? stayId = default, + string? userLevelId = default, + string? userLevelName = default + ) + { + IsCancellable = isCancellable; + IsEarlyCheckinAble = isEarlyCheckinAble; + IsExtendable = isExtendable; + IsOverridable = isOverridable; + SiteName = siteName; + StayId = stayId; + UserLevelId = userLevelId; + UserLevelName = userLevelName; + } + + /// + /// Indicates whether the stay can be cancelled via the Dormakaba Oracode API. + /// + [DataMember(Name = "is_cancellable", IsRequired = false, EmitDefaultValue = false)] + public bool? IsCancellable { get; set; } + + /// + /// Indicates whether early check-in is available for this stay. + /// + [DataMember(Name = "is_early_checkin_able", IsRequired = false, EmitDefaultValue = false)] + public bool? IsEarlyCheckinAble { get; set; } + + /// + /// Indicates whether the stay can be extended via the Dormakaba Oracode API. + /// + [DataMember(Name = "is_extendable", IsRequired = false, EmitDefaultValue = false)] + public bool? IsExtendable { get; set; } + + /// + /// Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. + /// + [DataMember(Name = "is_overridable", IsRequired = false, EmitDefaultValue = false)] + public bool? IsOverridable { get; set; } + + /// + /// Dormakaba Oracode site name associated with this access code. + /// + [DataMember(Name = "site_name", IsRequired = false, EmitDefaultValue = false)] + public string? SiteName { get; set; } + + /// + /// Dormakaba Oracode stay ID associated with this access code. + /// + [DataMember(Name = "stay_id", IsRequired = false, EmitDefaultValue = false)] + public float? StayId { get; set; } + + /// + /// Dormakaba Oracode user level ID associated with this access code. + /// + [DataMember(Name = "user_level_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserLevelId { get; set; } + + /// + /// Dormakaba Oracode user level name associated with this access code. + /// + [DataMember(Name = "user_level_name", IsRequired = false, EmitDefaultValue = false)] + public string? UserLevelName { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/UnmanagedAccessGrant.cs b/src/Seam/Model/UnmanagedAccessGrant.cs index 0ea4f417..751c29c5 100644 --- a/src/Seam/Model/UnmanagedAccessGrant.cs +++ b/src/Seam/Model/UnmanagedAccessGrant.cs @@ -8,1251 +8,1428 @@ namespace Seam.Model { -/// -/// Represents an unmanaged Access Grant. Unmanaged Access Grants do not have client sessions, instant keys, customization profiles, or keys. -/// -[DataContract(Name = "seamModel_unmanagedAccessGrant_model")] -public class UnmanagedAccessGrant -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrant() { } - -public UnmanagedAccessGrant(string accessGrantId = default, List accessMethodIds = default, string createdAt = default, string displayName = default, string? endsAt = default, List errors = default, List locationIds = default, string? name = default, List pendingMutations = default, List requestedAccessMethods = default, string? reservationKey = default, List spaceIds = default, string startsAt = default, string? userIdentityId = default, List warnings = default, string workspaceId = default) -{ -AccessGrantId = accessGrantId; -AccessMethodIds = accessMethodIds; -CreatedAt = createdAt; -DisplayName = displayName; -EndsAt = endsAt; -Errors = errors; -LocationIds = locationIds; -Name = name; -PendingMutations = pendingMutations; -RequestedAccessMethods = requestedAccessMethods; -ReservationKey = reservationKey; -SpaceIds = spaceIds; -StartsAt = startsAt; -UserIdentityId = userIdentityId; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods), "cannot_create_requested_access_methods")] -public abstract class UnmanagedAccessGrantErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods_model")] -public class UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods : UnmanagedAccessGrantErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods() { } - -public UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods(string createdAt = default, string errorCode = default, string message = default, List? missingDeviceIds = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -MissingDeviceIds = missingDeviceIds; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. -/// -[DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] -public List? MissingDeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantErrorsUnrecognized_model")] -public class UnmanagedAccessGrantErrorsUnrecognized : UnmanagedAccessGrantErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantErrorsUnrecognized() { } - -public UnmanagedAccessGrantErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "mutation_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantPendingMutationsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes), "updating_access_times")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantPendingMutationsUpdatingSpaces), "updating_spaces")] -public abstract class UnmanagedAccessGrantPendingMutations -{ -public abstract string MutationCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpaces_model")] -public class UnmanagedAccessGrantPendingMutationsUpdatingSpaces : UnmanagedAccessGrantPendingMutations -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantPendingMutationsUpdatingSpaces() { } - -public UnmanagedAccessGrantPendingMutationsUpdatingSpaces(string createdAt = default, UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous location configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_spaces"; - -/// -/// New location configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesFrom_model")] -public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom() { } - -public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// Previous device IDs where access codes existed. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesTo_model")] -public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo() { } - -public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo(string? commonCodeKey = default, List deviceIds = default) -{ -CommonCodeKey = commonCodeKey; -DeviceIds = deviceIds; -} - -/// -/// Common code key to ensure PIN code reuse across devices. -/// -[DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] -public string? CommonCodeKey { get; set; } - -/// -/// New device IDs where access codes should be created. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimes_model")] -public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes : UnmanagedAccessGrantPendingMutations -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes() { } - -public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes(List accessMethodIds = default, string createdAt = default, UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo to = default) -{ -AccessMethodIds = accessMethodIds; -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// IDs of the access methods being updated. -/// -[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessMethodIds { get; set; } - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous access time configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_access_times"; - -/// -/// New access time configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom_model")] -public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom() { } - -public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Previous end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Previous start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo_model")] -public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo() { } - -public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// New end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// New start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUnrecognized_model")] -public class UnmanagedAccessGrantPendingMutationsUnrecognized : UnmanagedAccessGrantPendingMutations -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantPendingMutationsUnrecognized() { } - -public UnmanagedAccessGrantPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) -{ -MutationCode = mutationCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "unrecognized"; - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated), "device_time_constraints_violated")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes), "device_does_not_support_access_codes")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsRequestedCodeUnavailable), "requested_code_unavailable")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsUpdatingAccessTimes), "updating_access_times")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsOverprovisionedAccess), "overprovisioned_access")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsUnderprovisionedAccess), "underprovisioned_access")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessGrantWarningsBeingDeleted), "being_deleted")] -public abstract class UnmanagedAccessGrantWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsBeingDeleted_model")] -public class UnmanagedAccessGrantWarningsBeingDeleted : UnmanagedAccessGrantWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsBeingDeleted() { } - -public UnmanagedAccessGrantWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUnderprovisionedAccess_model")] -public class UnmanagedAccessGrantWarningsUnderprovisionedAccess : UnmanagedAccessGrantWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsUnderprovisionedAccess() { } - -public UnmanagedAccessGrantWarningsUnderprovisionedAccess(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "underprovisioned_access"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccess_model")] -public class UnmanagedAccessGrantWarningsOverprovisionedAccess : UnmanagedAccessGrantWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsOverprovisionedAccess() { } - -public UnmanagedAccessGrantWarningsOverprovisionedAccess(string createdAt = default, List? failedDevices = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -FailedDevices = failedDevices; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). -/// -[DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] -public List? FailedDevices { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "overprovisioned_access"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices_model")] -public class UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices() { } - -public UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices(string deviceId = default, string errorCode = default, string message = default) -{ -DeviceId = deviceId; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Device whose access code could not be revoked. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). -/// -[DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] -public string ErrorCode { get; set; } - -/// -/// Human-readable description of why revocation failed. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUpdatingAccessTimes_model")] -public class UnmanagedAccessGrantWarningsUpdatingAccessTimes : UnmanagedAccessGrantWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsUpdatingAccessTimes() { } - -public UnmanagedAccessGrantWarningsUpdatingAccessTimes(List accessMethodIds = default, string createdAt = default, string message = default, string warningCode = default) -{ -AccessMethodIds = accessMethodIds; -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// IDs of the access methods being updated. -/// -[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessMethodIds { get; set; } - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "updating_access_times"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsRequestedCodeUnavailable_model")] -public class UnmanagedAccessGrantWarningsRequestedCodeUnavailable : UnmanagedAccessGrantWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsRequestedCodeUnavailable() { } - -public UnmanagedAccessGrantWarningsRequestedCodeUnavailable(string createdAt = default, string deviceId = default, string message = default, string newCode = default, string originalCode = default, string warningCode = default) -{ -CreatedAt = createdAt; -DeviceId = deviceId; -Message = message; -NewCode = newCode; -OriginalCode = originalCode; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device where the requested code was unavailable. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// The new PIN code that was assigned instead. -/// -[DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] -public string NewCode { get; set; } - -/// -/// The originally requested PIN code that was unavailable. -/// -[DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] -public string OriginalCode { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "requested_code_unavailable"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes_model")] -public class UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes : UnmanagedAccessGrantWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } - -public UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes(string createdAt = default, string deviceId = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -DeviceId = deviceId; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device that does not support access codes. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "device_does_not_support_access_codes"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsDeviceTimeConstraintsViolated_model")] -public class UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated : UnmanagedAccessGrantWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated() { } - -public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated(string createdAt = default, string deviceId = default, string message = default, UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = default, string warningCode = default) -{ -CreatedAt = createdAt; -DeviceId = deviceId; -Message = message; -Reason = reason; -WarningCode = warningCode; -} - -/// -/// Specific reason why the grant's times are not programmable on the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ReasonEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "duration_exceeds_max")] -DurationExceedsMax = 1, - -[EnumMember(Value = "times_do_not_match_slots")] -TimesDoNotMatchSlots = 2, - -[EnumMember(Value = "ongoing_not_supported")] -OngoingNotSupported = 3, -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// ID of the device whose time constraints the access grant violates. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// Specific reason why the grant's times are not programmable on the device. -/// -[DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "device_time_constraints_violated"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUnrecognized_model")] -public class UnmanagedAccessGrantWarningsUnrecognized : UnmanagedAccessGrantWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantWarningsUnrecognized() { } - -public UnmanagedAccessGrantWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// ID of the Access Grant. -/// -[DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessGrantId { get; set; } - -/// -/// IDs of the access methods created for the Access Grant. -/// -[DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List AccessMethodIds { get; set; } - -/// -/// Date and time at which the Access Grant was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name of the Access Grant. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Date and time at which the Access Grant ends. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Errors associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -[Obsolete("Use `space_ids`.")] -[DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] -public List LocationIds { get; set; } - -/// -/// Name of the Access Grant. If not provided, the display name will be computed. -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string? Name { get; set; } - -/// -/// List of pending mutations for the access grant. This shows updates that are in progress. -/// -[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] -public List PendingMutations { get; set; } - -/// -/// Access methods that the user requested for the Access Grant. -/// -[DataMember(Name = "requested_access_methods", IsRequired = false, EmitDefaultValue = false)] -public List RequestedAccessMethods { get; set; } - -/// -/// Reservation key for the access grant. -/// -[DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] -public string? ReservationKey { get; set; } - -/// -/// IDs of the spaces to which the Access Grant gives access. -/// -[DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] -public List SpaceIds { get; set; } - -/// -/// Date and time at which the Access Grant starts. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string StartsAt { get; set; } - -/// -/// ID of user identity to which the Access Grant gives access. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityId { get; set; } - -/// -/// Warnings associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the Seam workspace associated with the Access Grant. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessGrantRequestedAccessMethods_model")] -public class UnmanagedAccessGrantRequestedAccessMethods -{ -[JsonConstructorAttribute] -protected UnmanagedAccessGrantRequestedAccessMethods() { } - -public UnmanagedAccessGrantRequestedAccessMethods(string? code = default, List createdAccessMethodIds = default, string createdAt = default, string displayName = default, int? instantKeyMaxUseCount = default, UnmanagedAccessGrantRequestedAccessMethods.ModeEnum mode = default) -{ -Code = code; -CreatedAccessMethodIds = createdAccessMethodIds; -CreatedAt = createdAt; -DisplayName = displayName; -InstantKeyMaxUseCount = instantKeyMaxUseCount; -Mode = mode; -} - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -/// -/// Specific PIN code to use for this access method. Only applicable when mode is 'code'. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// IDs of the access methods created for the requested access method. -/// -[DataMember(Name = "created_access_method_ids", IsRequired = false, EmitDefaultValue = false)] -public List CreatedAccessMethodIds { get; set; } - -/// -/// Date and time at which the requested access method was added to the Access Grant. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name of the access method. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. -/// -[DataMember(Name = "instant_key_max_use_count", IsRequired = false, EmitDefaultValue = false)] -public int? InstantKeyMaxUseCount { get; set; } - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessGrantRequestedAccessMethods.ModeEnum Mode { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an unmanaged Access Grant. Unmanaged Access Grants do not have client sessions, instant keys, customization profiles, or keys. + /// + [DataContract(Name = "seamModel_unmanagedAccessGrant_model")] + public class UnmanagedAccessGrant + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrant() { } + + public UnmanagedAccessGrant( + string accessGrantId = default, + List accessMethodIds = default, + string createdAt = default, + string displayName = default, + string? endsAt = default, + List errors = default, + List locationIds = default, + string? name = default, + List pendingMutations = default, + List requestedAccessMethods = default, + string? reservationKey = default, + List spaceIds = default, + string startsAt = default, + string? userIdentityId = default, + List warnings = default, + string workspaceId = default + ) + { + AccessGrantId = accessGrantId; + AccessMethodIds = accessMethodIds; + CreatedAt = createdAt; + DisplayName = displayName; + EndsAt = endsAt; + Errors = errors; + LocationIds = locationIds; + Name = name; + PendingMutations = pendingMutations; + RequestedAccessMethods = requestedAccessMethods; + ReservationKey = reservationKey; + SpaceIds = spaceIds; + StartsAt = startsAt; + UserIdentityId = userIdentityId; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods), + "cannot_create_requested_access_methods" + )] + public abstract class UnmanagedAccessGrantErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods_model" + )] + public class UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods + : UnmanagedAccessGrantErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods() { } + + public UnmanagedAccessGrantErrorsCannotCreateRequestedAccessMethods( + string createdAt = default, + string errorCode = default, + string message = default, + List? missingDeviceIds = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + MissingDeviceIds = missingDeviceIds; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "cannot_create_requested_access_methods"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. + /// + [DataMember(Name = "missing_device_ids", IsRequired = false, EmitDefaultValue = false)] + public List? MissingDeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantErrorsUnrecognized_model")] + public class UnmanagedAccessGrantErrorsUnrecognized : UnmanagedAccessGrantErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantErrorsUnrecognized() { } + + public UnmanagedAccessGrantErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantPendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantPendingMutationsUpdatingSpaces), + "updating_spaces" + )] + public abstract class UnmanagedAccessGrantPendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpaces_model")] + public class UnmanagedAccessGrantPendingMutationsUpdatingSpaces + : UnmanagedAccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingSpaces() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingSpaces( + string createdAt = default, + UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous location configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_spaces"; + + /// + /// New location configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesFrom_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingSpacesFrom( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access codes existed. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingSpacesTo_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingSpacesTo( + string? commonCodeKey = default, + List deviceIds = default + ) + { + CommonCodeKey = commonCodeKey; + DeviceIds = deviceIds; + } + + /// + /// Common code key to ensure PIN code reuse across devices. + /// + [DataMember(Name = "common_code_key", IsRequired = false, EmitDefaultValue = false)] + public string? CommonCodeKey { get; set; } + + /// + /// New device IDs where access codes should be created. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimes_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes + : UnmanagedAccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimes( + List accessMethodIds = default, + string createdAt = default, + UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo to = default + ) + { + AccessMethodIds = accessMethodIds; + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// IDs of the access methods being updated. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous access time configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_access_times"; + + /// + /// New access time configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo_model" + )] + public class UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo() { } + + public UnmanagedAccessGrantPendingMutationsUpdatingAccessTimesTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantPendingMutationsUnrecognized_model")] + public class UnmanagedAccessGrantPendingMutationsUnrecognized + : UnmanagedAccessGrantPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantPendingMutationsUnrecognized() { } + + public UnmanagedAccessGrantPendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessGrantWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated), + "device_time_constraints_violated" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes), + "device_does_not_support_access_codes" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsRequestedCodeUnavailable), + "requested_code_unavailable" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsOverprovisionedAccess), + "overprovisioned_access" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsUnderprovisionedAccess), + "underprovisioned_access" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessGrantWarningsBeingDeleted), + "being_deleted" + )] + public abstract class UnmanagedAccessGrantWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsBeingDeleted_model")] + public class UnmanagedAccessGrantWarningsBeingDeleted : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsBeingDeleted() { } + + public UnmanagedAccessGrantWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUnderprovisionedAccess_model")] + public class UnmanagedAccessGrantWarningsUnderprovisionedAccess + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsUnderprovisionedAccess() { } + + public UnmanagedAccessGrantWarningsUnderprovisionedAccess( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "underprovisioned_access"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccess_model")] + public class UnmanagedAccessGrantWarningsOverprovisionedAccess + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsOverprovisionedAccess() { } + + public UnmanagedAccessGrantWarningsOverprovisionedAccess( + string createdAt = default, + List? failedDevices = + default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + FailedDevices = failedDevices; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). + /// + [DataMember(Name = "failed_devices", IsRequired = false, EmitDefaultValue = false)] + public List? FailedDevices { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "overprovisioned_access"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices_model" + )] + public class UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices() { } + + public UnmanagedAccessGrantWarningsOverprovisionedAccessFailedDevices( + string deviceId = default, + string errorCode = default, + string message = default + ) + { + DeviceId = deviceId; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Device whose access code could not be revoked. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). + /// + [DataMember(Name = "error_code", IsRequired = false, EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// Human-readable description of why revocation failed. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUpdatingAccessTimes_model")] + public class UnmanagedAccessGrantWarningsUpdatingAccessTimes : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsUpdatingAccessTimes() { } + + public UnmanagedAccessGrantWarningsUpdatingAccessTimes( + List accessMethodIds = default, + string createdAt = default, + string message = default, + string warningCode = default + ) + { + AccessMethodIds = accessMethodIds; + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// IDs of the access methods being updated. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "updating_access_times"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantWarningsRequestedCodeUnavailable_model" + )] + public class UnmanagedAccessGrantWarningsRequestedCodeUnavailable + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsRequestedCodeUnavailable() { } + + public UnmanagedAccessGrantWarningsRequestedCodeUnavailable( + string createdAt = default, + string deviceId = default, + string message = default, + string newCode = default, + string originalCode = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + NewCode = newCode; + OriginalCode = originalCode; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device where the requested code was unavailable. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// The new PIN code that was assigned instead. + /// + [DataMember(Name = "new_code", IsRequired = false, EmitDefaultValue = false)] + public string NewCode { get; set; } + + /// + /// The originally requested PIN code that was unavailable. + /// + [DataMember(Name = "original_code", IsRequired = false, EmitDefaultValue = false)] + public string OriginalCode { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "requested_code_unavailable"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes_model" + )] + public class UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes() { } + + public UnmanagedAccessGrantWarningsDeviceDoesNotSupportAccessCodes( + string createdAt = default, + string deviceId = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device that does not support access codes. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_does_not_support_access_codes"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessGrantWarningsDeviceTimeConstraintsViolated_model" + )] + public class UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated + : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated() { } + + public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated( + string createdAt = default, + string deviceId = default, + string message = default, + UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum reason = + default, + string warningCode = default + ) + { + CreatedAt = createdAt; + DeviceId = deviceId; + Message = message; + Reason = reason; + WarningCode = warningCode; + } + + /// + /// Specific reason why the grant's times are not programmable on the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ReasonEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "duration_exceeds_max")] + DurationExceedsMax = 1, + + [EnumMember(Value = "times_do_not_match_slots")] + TimesDoNotMatchSlots = 2, + + [EnumMember(Value = "ongoing_not_supported")] + OngoingNotSupported = 3, + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// ID of the device whose time constraints the access grant violates. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// Specific reason why the grant's times are not programmable on the device. + /// + [DataMember(Name = "reason", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantWarningsDeviceTimeConstraintsViolated.ReasonEnum Reason { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_time_constraints_violated"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantWarningsUnrecognized_model")] + public class UnmanagedAccessGrantWarningsUnrecognized : UnmanagedAccessGrantWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantWarningsUnrecognized() { } + + public UnmanagedAccessGrantWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// ID of the Access Grant. + /// + [DataMember(Name = "access_grant_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessGrantId { get; set; } + + /// + /// IDs of the access methods created for the Access Grant. + /// + [DataMember(Name = "access_method_ids", IsRequired = false, EmitDefaultValue = false)] + public List AccessMethodIds { get; set; } + + /// + /// Date and time at which the Access Grant was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name of the Access Grant. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Date and time at which the Access Grant ends. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Errors associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + [Obsolete("Use `space_ids`.")] + [DataMember(Name = "location_ids", IsRequired = false, EmitDefaultValue = false)] + public List LocationIds { get; set; } + + /// + /// Name of the Access Grant. If not provided, the display name will be computed. + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string? Name { get; set; } + + /// + /// List of pending mutations for the access grant. This shows updates that are in progress. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Access methods that the user requested for the Access Grant. + /// + [DataMember( + Name = "requested_access_methods", + IsRequired = false, + EmitDefaultValue = false + )] + public List RequestedAccessMethods { get; set; } + + /// + /// Reservation key for the access grant. + /// + [DataMember(Name = "reservation_key", IsRequired = false, EmitDefaultValue = false)] + public string? ReservationKey { get; set; } + + /// + /// IDs of the spaces to which the Access Grant gives access. + /// + [DataMember(Name = "space_ids", IsRequired = false, EmitDefaultValue = false)] + public List SpaceIds { get; set; } + + /// + /// Date and time at which the Access Grant starts. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string StartsAt { get; set; } + + /// + /// ID of user identity to which the Access Grant gives access. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityId { get; set; } + + /// + /// Warnings associated with the [access grant](https://www.seam.co/docs/use-cases/granting-access). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the Seam workspace associated with the Access Grant. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessGrantRequestedAccessMethods_model")] + public class UnmanagedAccessGrantRequestedAccessMethods + { + [JsonConstructorAttribute] + protected UnmanagedAccessGrantRequestedAccessMethods() { } + + public UnmanagedAccessGrantRequestedAccessMethods( + string? code = default, + List createdAccessMethodIds = default, + string createdAt = default, + string displayName = default, + int? instantKeyMaxUseCount = default, + UnmanagedAccessGrantRequestedAccessMethods.ModeEnum mode = default + ) + { + Code = code; + CreatedAccessMethodIds = createdAccessMethodIds; + CreatedAt = createdAt; + DisplayName = displayName; + InstantKeyMaxUseCount = instantKeyMaxUseCount; + Mode = mode; + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + /// + /// Specific PIN code to use for this access method. Only applicable when mode is 'code'. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// IDs of the access methods created for the requested access method. + /// + [DataMember( + Name = "created_access_method_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List CreatedAccessMethodIds { get; set; } + + /// + /// Date and time at which the requested access method was added to the Access Grant. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name of the access method. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + /// + [DataMember( + Name = "instant_key_max_use_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int? InstantKeyMaxUseCount { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessGrantRequestedAccessMethods.ModeEnum Mode { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/UnmanagedAccessMethod.cs b/src/Seam/Model/UnmanagedAccessMethod.cs index 05d66511..d2c88981 100644 --- a/src/Seam/Model/UnmanagedAccessMethod.cs +++ b/src/Seam/Model/UnmanagedAccessMethod.cs @@ -8,1129 +8,1280 @@ namespace Seam.Model { -/// -/// Represents an unmanaged access method. Unmanaged access methods do not have client sessions, instant keys, customization profiles, or keys. -/// -[DataContract(Name = "seamModel_unmanagedAccessMethod_model")] -public class UnmanagedAccessMethod -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethod() { } - -public UnmanagedAccessMethod(string accessMethodId = default, string? code = default, string createdAt = default, string displayName = default, string displayStatus = default, List errors = default, bool? isAssignmentRequired = default, bool? isEncodingRequired = default, bool isIssued = default, bool? isReadyForAssignment = default, bool? isReadyForEncoding = default, string? issuedAt = default, UnmanagedAccessMethod.ModeEnum mode = default, List pendingMutations = default, List warnings = default, string workspaceId = default) -{ -AccessMethodId = accessMethodId; -Code = code; -CreatedAt = createdAt; -DisplayName = displayName; -DisplayStatus = displayStatus; -Errors = errors; -IsAssignmentRequired = isAssignmentRequired; -IsEncodingRequired = isEncodingRequired; -IsIssued = isIssued; -IsReadyForAssignment = isReadyForAssignment; -IsReadyForEncoding = isReadyForEncoding; -IssuedAt = issuedAt; -Mode = mode; -PendingMutations = pendingMutations; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodErrorsFailedToIssue), "failed_to_issue")] -public abstract class UnmanagedAccessMethodErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodErrorsFailedToIssue_model")] -public class UnmanagedAccessMethodErrorsFailedToIssue : UnmanagedAccessMethodErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodErrorsFailedToIssue() { } - -public UnmanagedAccessMethodErrorsFailedToIssue(string createdAt = default, string errorCode = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "failed_to_issue"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodErrorsUnrecognized_model")] -public class UnmanagedAccessMethodErrorsUnrecognized : UnmanagedAccessMethodErrors -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodErrorsUnrecognized() { } - -public UnmanagedAccessMethodErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum ModeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "code")] -Code = 1, - -[EnumMember(Value = "card")] -Card = 2, - -[EnumMember(Value = "mobile_key")] -MobileKey = 3, - -[EnumMember(Value = "cloud_key")] -CloudKey = 4, -} - -[JsonConverter(typeof(JsonSubtypes), "mutation_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodPendingMutationsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes), "updating_access_times")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodPendingMutationsRevokingAccess), "revoking_access")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodPendingMutationsProvisioningAccess), "provisioning_access")] -public abstract class UnmanagedAccessMethodPendingMutations -{ -public abstract string MutationCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccess_model")] -public class UnmanagedAccessMethodPendingMutationsProvisioningAccess : UnmanagedAccessMethodPendingMutations -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsProvisioningAccess() { } - -public UnmanagedAccessMethodPendingMutationsProvisioningAccess(string createdAt = default, UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessMethodPendingMutationsProvisioningAccessTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous device configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "provisioning_access"; - -/// -/// New device configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessFrom_model")] -public class UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom() { } - -public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// Previous device IDs where access was provisioned. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessTo_model")] -public class UnmanagedAccessMethodPendingMutationsProvisioningAccessTo -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsProvisioningAccessTo() { } - -public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// New device IDs where access is being provisioned. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccess_model")] -public class UnmanagedAccessMethodPendingMutationsRevokingAccess : UnmanagedAccessMethodPendingMutations -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsRevokingAccess() { } - -public UnmanagedAccessMethodPendingMutationsRevokingAccess(string createdAt = default, UnmanagedAccessMethodPendingMutationsRevokingAccessFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessMethodPendingMutationsRevokingAccessTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous device configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "revoking_access"; - -/// -/// New device configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessMethodPendingMutationsRevokingAccessTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessFrom_model")] -public class UnmanagedAccessMethodPendingMutationsRevokingAccessFrom -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsRevokingAccessFrom() { } - -public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// Previous device IDs where access existed. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessTo_model")] -public class UnmanagedAccessMethodPendingMutationsRevokingAccessTo -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsRevokingAccessTo() { } - -public UnmanagedAccessMethodPendingMutationsRevokingAccessTo(List deviceIds = default) -{ -DeviceIds = deviceIds; -} - -/// -/// New device IDs where access should remain. -/// -[DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] -public List DeviceIds { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimes_model")] -public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes : UnmanagedAccessMethodPendingMutations -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes() { } - -public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes(string createdAt = default, UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, string message = default, string mutationCode = default, UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo to = default) -{ -CreatedAt = createdAt; -From = from; -Message = message; -MutationCode = mutationCode; -To = to; -} - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Previous access time configuration. -/// -[DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "updating_access_times"; - -/// -/// New access time configuration. -/// -[DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo To { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom_model")] -public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom() { } - -public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// Previous end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// Previous start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo_model")] -public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo() { } - -public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo(string? endsAt = default, string? startsAt = default) -{ -EndsAt = endsAt; -StartsAt = startsAt; -} - -/// -/// New end time for access. -/// -[DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] -public string? EndsAt { get; set; } - -/// -/// New start time for access. -/// -[DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] -public string? StartsAt { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUnrecognized_model")] -public class UnmanagedAccessMethodPendingMutationsUnrecognized : UnmanagedAccessMethodPendingMutations -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodPendingMutationsUnrecognized() { } - -public UnmanagedAccessMethodPendingMutationsUnrecognized(string mutationCode = default, string createdAt = default, string message = default) -{ -MutationCode = mutationCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] -public override string MutationCode { get; } = "unrecognized"; - -/// -/// Date and time at which the mutation was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the mutation. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber), "user_identity_missing_phone_number")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress), "user_identity_missing_email_address")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsDelayInIssuing), "delay_in_issuing")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsPulledBackupAccessCode), "pulled_backup_access_code")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsUpdatingAccessTimes), "updating_access_times")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedAccessMethodWarningsBeingDeleted), "being_deleted")] -public abstract class UnmanagedAccessMethodWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsBeingDeleted_model")] -public class UnmanagedAccessMethodWarningsBeingDeleted : UnmanagedAccessMethodWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodWarningsBeingDeleted() { } - -public UnmanagedAccessMethodWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUpdatingAccessTimes_model")] -public class UnmanagedAccessMethodWarningsUpdatingAccessTimes : UnmanagedAccessMethodWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodWarningsUpdatingAccessTimes() { } - -public UnmanagedAccessMethodWarningsUpdatingAccessTimes(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "updating_access_times"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsPulledBackupAccessCode_model")] -public class UnmanagedAccessMethodWarningsPulledBackupAccessCode : UnmanagedAccessMethodWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodWarningsPulledBackupAccessCode() { } - -public UnmanagedAccessMethodWarningsPulledBackupAccessCode(string createdAt = default, string message = default, string? originalAccessMethodId = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -OriginalAccessMethodId = originalAccessMethodId; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -/// -/// ID of the original access method from which this backup access method was split, if applicable. -/// -[DataMember(Name = "original_access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string? OriginalAccessMethodId { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "pulled_backup_access_code"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsDelayInIssuing_model")] -public class UnmanagedAccessMethodWarningsDelayInIssuing : UnmanagedAccessMethodWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodWarningsDelayInIssuing() { } - -public UnmanagedAccessMethodWarningsDelayInIssuing(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "delay_in_issuing"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUserIdentityMissingEmailAddress_model")] -public class UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress : UnmanagedAccessMethodWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress() { } - -public UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "user_identity_missing_email_address"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber_model")] -public class UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber : UnmanagedAccessMethodWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber() { } - -public UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "user_identity_missing_phone_number"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUnrecognized_model")] -public class UnmanagedAccessMethodWarningsUnrecognized : UnmanagedAccessMethodWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedAccessMethodWarningsUnrecognized() { } - -public UnmanagedAccessMethodWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// ID of the access method. -/// -[DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] -public string AccessMethodId { get; set; } - -/// -/// The actual PIN code for code access methods. -/// -[DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] -public string? Code { get; set; } - -/// -/// Date and time at which the access method was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name of the access method. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. -/// -[DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] -public string DisplayStatus { get; set; } - -/// -/// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. -/// -[DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] -public bool? IsAssignmentRequired { get; set; } - -/// -/// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. -/// -[DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] -public bool? IsEncodingRequired { get; set; } - -/// -/// Indicates whether the access method has been issued. -/// -[DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] -public bool IsIssued { get; set; } - -/// -/// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. -/// -[DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] -public bool? IsReadyForAssignment { get; set; } - -/// -/// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. -/// -[DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] -public bool? IsReadyForEncoding { get; set; } - -/// -/// Date and time at which the access method was issued. -/// -[DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] -public string? IssuedAt { get; set; } - -/// -/// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. -/// -[DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedAccessMethod.ModeEnum Mode { get; set; } - -/// -/// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. -/// -[DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] -public List PendingMutations { get; set; } - -/// -/// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the Seam workspace associated with the access method. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an unmanaged access method. Unmanaged access methods do not have client sessions, instant keys, customization profiles, or keys. + /// + [DataContract(Name = "seamModel_unmanagedAccessMethod_model")] + public class UnmanagedAccessMethod + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethod() { } + + public UnmanagedAccessMethod( + string accessMethodId = default, + string? code = default, + string createdAt = default, + string displayName = default, + string displayStatus = default, + List errors = default, + bool? isAssignmentRequired = default, + bool? isEncodingRequired = default, + bool isIssued = default, + bool? isReadyForAssignment = default, + bool? isReadyForEncoding = default, + string? issuedAt = default, + UnmanagedAccessMethod.ModeEnum mode = default, + List pendingMutations = default, + List warnings = default, + string workspaceId = default + ) + { + AccessMethodId = accessMethodId; + Code = code; + CreatedAt = createdAt; + DisplayName = displayName; + DisplayStatus = displayStatus; + Errors = errors; + IsAssignmentRequired = isAssignmentRequired; + IsEncodingRequired = isEncodingRequired; + IsIssued = isIssued; + IsReadyForAssignment = isReadyForAssignment; + IsReadyForEncoding = isReadyForEncoding; + IssuedAt = issuedAt; + Mode = mode; + PendingMutations = pendingMutations; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodErrorsFailedToIssue), + "failed_to_issue" + )] + public abstract class UnmanagedAccessMethodErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodErrorsFailedToIssue_model")] + public class UnmanagedAccessMethodErrorsFailedToIssue : UnmanagedAccessMethodErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodErrorsFailedToIssue() { } + + public UnmanagedAccessMethodErrorsFailedToIssue( + string createdAt = default, + string errorCode = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "failed_to_issue"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodErrorsUnrecognized_model")] + public class UnmanagedAccessMethodErrorsUnrecognized : UnmanagedAccessMethodErrors + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodErrorsUnrecognized() { } + + public UnmanagedAccessMethodErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum ModeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "code")] + Code = 1, + + [EnumMember(Value = "card")] + Card = 2, + + [EnumMember(Value = "mobile_key")] + MobileKey = 3, + + [EnumMember(Value = "cloud_key")] + CloudKey = 4, + } + + [JsonConverter(typeof(JsonSubtypes), "mutation_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodPendingMutationsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodPendingMutationsRevokingAccess), + "revoking_access" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodPendingMutationsProvisioningAccess), + "provisioning_access" + )] + public abstract class UnmanagedAccessMethodPendingMutations + { + public abstract string MutationCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccess_model" + )] + public class UnmanagedAccessMethodPendingMutationsProvisioningAccess + : UnmanagedAccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsProvisioningAccess() { } + + public UnmanagedAccessMethodPendingMutationsProvisioningAccess( + string createdAt = default, + UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessMethodPendingMutationsProvisioningAccessTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous device configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "provisioning_access"; + + /// + /// New device configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessFrom_model" + )] + public class UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom() { } + + public UnmanagedAccessMethodPendingMutationsProvisioningAccessFrom( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access was provisioned. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsProvisioningAccessTo_model" + )] + public class UnmanagedAccessMethodPendingMutationsProvisioningAccessTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsProvisioningAccessTo() { } + + public UnmanagedAccessMethodPendingMutationsProvisioningAccessTo( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// New device IDs where access is being provisioned. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccess_model")] + public class UnmanagedAccessMethodPendingMutationsRevokingAccess + : UnmanagedAccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsRevokingAccess() { } + + public UnmanagedAccessMethodPendingMutationsRevokingAccess( + string createdAt = default, + UnmanagedAccessMethodPendingMutationsRevokingAccessFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessMethodPendingMutationsRevokingAccessTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous device configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "revoking_access"; + + /// + /// New device configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsRevokingAccessTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessFrom_model" + )] + public class UnmanagedAccessMethodPendingMutationsRevokingAccessFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsRevokingAccessFrom() { } + + public UnmanagedAccessMethodPendingMutationsRevokingAccessFrom( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// Previous device IDs where access existed. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsRevokingAccessTo_model" + )] + public class UnmanagedAccessMethodPendingMutationsRevokingAccessTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsRevokingAccessTo() { } + + public UnmanagedAccessMethodPendingMutationsRevokingAccessTo( + List deviceIds = default + ) + { + DeviceIds = deviceIds; + } + + /// + /// New device IDs where access should remain. + /// + [DataMember(Name = "device_ids", IsRequired = false, EmitDefaultValue = false)] + public List DeviceIds { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimes_model" + )] + public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes + : UnmanagedAccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes() { } + + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimes( + string createdAt = default, + UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom from = default, + string message = default, + string mutationCode = default, + UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo to = default + ) + { + CreatedAt = createdAt; + From = from; + Message = message; + MutationCode = mutationCode; + To = to; + } + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Previous access time configuration. + /// + [DataMember(Name = "from", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom From { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "updating_access_times"; + + /// + /// New access time configuration. + /// + [DataMember(Name = "to", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo To { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom_model" + )] + public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom() { } + + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesFrom( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// Previous end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// Previous start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo_model" + )] + public class UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo() { } + + public UnmanagedAccessMethodPendingMutationsUpdatingAccessTimesTo( + string? endsAt = default, + string? startsAt = default + ) + { + EndsAt = endsAt; + StartsAt = startsAt; + } + + /// + /// New end time for access. + /// + [DataMember(Name = "ends_at", IsRequired = false, EmitDefaultValue = false)] + public string? EndsAt { get; set; } + + /// + /// New start time for access. + /// + [DataMember(Name = "starts_at", IsRequired = false, EmitDefaultValue = false)] + public string? StartsAt { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodPendingMutationsUnrecognized_model")] + public class UnmanagedAccessMethodPendingMutationsUnrecognized + : UnmanagedAccessMethodPendingMutations + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodPendingMutationsUnrecognized() { } + + public UnmanagedAccessMethodPendingMutationsUnrecognized( + string mutationCode = default, + string createdAt = default, + string message = default + ) + { + MutationCode = mutationCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "mutation_code", IsRequired = true, EmitDefaultValue = false)] + public override string MutationCode { get; } = "unrecognized"; + + /// + /// Date and time at which the mutation was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the mutation. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedAccessMethodWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber), + "user_identity_missing_phone_number" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress), + "user_identity_missing_email_address" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsDelayInIssuing), + "delay_in_issuing" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsPulledBackupAccessCode), + "pulled_backup_access_code" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsUpdatingAccessTimes), + "updating_access_times" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedAccessMethodWarningsBeingDeleted), + "being_deleted" + )] + public abstract class UnmanagedAccessMethodWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsBeingDeleted_model")] + public class UnmanagedAccessMethodWarningsBeingDeleted : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsBeingDeleted() { } + + public UnmanagedAccessMethodWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUpdatingAccessTimes_model")] + public class UnmanagedAccessMethodWarningsUpdatingAccessTimes + : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsUpdatingAccessTimes() { } + + public UnmanagedAccessMethodWarningsUpdatingAccessTimes( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "updating_access_times"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsPulledBackupAccessCode_model")] + public class UnmanagedAccessMethodWarningsPulledBackupAccessCode + : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsPulledBackupAccessCode() { } + + public UnmanagedAccessMethodWarningsPulledBackupAccessCode( + string createdAt = default, + string message = default, + string? originalAccessMethodId = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + OriginalAccessMethodId = originalAccessMethodId; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + /// + /// ID of the original access method from which this backup access method was split, if applicable. + /// + [DataMember( + Name = "original_access_method_id", + IsRequired = false, + EmitDefaultValue = false + )] + public string? OriginalAccessMethodId { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "pulled_backup_access_code"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsDelayInIssuing_model")] + public class UnmanagedAccessMethodWarningsDelayInIssuing : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsDelayInIssuing() { } + + public UnmanagedAccessMethodWarningsDelayInIssuing( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "delay_in_issuing"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodWarningsUserIdentityMissingEmailAddress_model" + )] + public class UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress + : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress() { } + + public UnmanagedAccessMethodWarningsUserIdentityMissingEmailAddress( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "user_identity_missing_email_address"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber_model" + )] + public class UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber + : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber() { } + + public UnmanagedAccessMethodWarningsUserIdentityMissingPhoneNumber( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "user_identity_missing_phone_number"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedAccessMethodWarningsUnrecognized_model")] + public class UnmanagedAccessMethodWarningsUnrecognized : UnmanagedAccessMethodWarnings + { + [JsonConstructorAttribute] + protected UnmanagedAccessMethodWarningsUnrecognized() { } + + public UnmanagedAccessMethodWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// ID of the access method. + /// + [DataMember(Name = "access_method_id", IsRequired = false, EmitDefaultValue = false)] + public string AccessMethodId { get; set; } + + /// + /// The actual PIN code for code access methods. + /// + [DataMember(Name = "code", IsRequired = false, EmitDefaultValue = false)] + public string? Code { get; set; } + + /// + /// Date and time at which the access method was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name of the access method. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Human-readable sentence describing where the access method sits in its relationship with the device or access system, for example `Awaiting encoding`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `is_issued`, `errors`, and `pending_mutations`. + /// + [DataMember(Name = "display_status", IsRequired = false, EmitDefaultValue = false)] + public string DisplayStatus { get; set; } + + /// + /// Errors associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + /// + [DataMember(Name = "is_assignment_required", IsRequired = false, EmitDefaultValue = false)] + public bool? IsAssignmentRequired { get; set; } + + /// + /// Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + /// + [DataMember(Name = "is_encoding_required", IsRequired = false, EmitDefaultValue = false)] + public bool? IsEncodingRequired { get; set; } + + /// + /// Indicates whether the access method has been issued. + /// + [DataMember(Name = "is_issued", IsRequired = false, EmitDefaultValue = false)] + public bool IsIssued { get; set; } + + /// + /// Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + /// + [DataMember(Name = "is_ready_for_assignment", IsRequired = false, EmitDefaultValue = false)] + public bool? IsReadyForAssignment { get; set; } + + /// + /// Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + /// + [DataMember(Name = "is_ready_for_encoding", IsRequired = false, EmitDefaultValue = false)] + public bool? IsReadyForEncoding { get; set; } + + /// + /// Date and time at which the access method was issued. + /// + [DataMember(Name = "issued_at", IsRequired = false, EmitDefaultValue = false)] + public string? IssuedAt { get; set; } + + /// + /// Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + /// + [DataMember(Name = "mode", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedAccessMethod.ModeEnum Mode { get; set; } + + /// + /// Pending mutations for the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. + /// + [DataMember(Name = "pending_mutations", IsRequired = false, EmitDefaultValue = false)] + public List PendingMutations { get; set; } + + /// + /// Warnings associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant). + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the Seam workspace associated with the access method. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/UnmanagedDevice.cs b/src/Seam/Model/UnmanagedDevice.cs index 9ba9d2cc..0317ac19 100644 --- a/src/Seam/Model/UnmanagedDevice.cs +++ b/src/Seam/Model/UnmanagedDevice.cs @@ -8,3171 +8,3670 @@ namespace Seam.Model { -/// -/// Represents an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). -/// -[DataContract(Name = "seamModel_unmanagedDevice_model")] -public class UnmanagedDevice -{ -[JsonConstructorAttribute] -protected UnmanagedDevice() { } - -public UnmanagedDevice(bool? canActivateWeeklyProgram = default, bool? canConfigureAutoLock = default, bool? canHvacCool = default, bool? canHvacHeat = default, bool? canHvacHeatCool = default, bool? canProgramOfflineAccessCodes = default, bool? canProgramOnlineAccessCodes = default, bool? canProgramThermostatProgramsAsDifferentEachDay = default, bool? canProgramThermostatProgramsAsSameEachDay = default, bool? canProgramThermostatProgramsAsWeekdayWeekend = default, bool? canRemotelyLock = default, bool? canRemotelyUnlock = default, bool? canRunThermostatPrograms = default, bool? canSimulateConnection = default, bool? canSimulateDisconnection = default, bool? canSimulateHubConnection = default, bool? canSimulateHubDisconnection = default, bool? canSimulatePaidSubscription = default, bool? canSimulateRemoval = default, bool? canStreamLiveVideo = default, bool? canTurnOffHvac = default, bool? canUnlockWithCode = default, List capabilitiesSupported = default, string connectedAccountId = default, string createdAt = default, object customMetadata = default, string deviceId = default, UnmanagedDevice.DeviceTypeEnum deviceType = default, string displayName = default, List errors = default, bool isManaged = default, UnmanagedDeviceLocation? location = default, UnmanagedDeviceProperties properties = default, List warnings = default, string workspaceId = default) -{ -CanActivateWeeklyProgram = canActivateWeeklyProgram; -CanConfigureAutoLock = canConfigureAutoLock; -CanHvacCool = canHvacCool; -CanHvacHeat = canHvacHeat; -CanHvacHeatCool = canHvacHeatCool; -CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; -CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; -CanProgramThermostatProgramsAsDifferentEachDay = canProgramThermostatProgramsAsDifferentEachDay; -CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; -CanProgramThermostatProgramsAsWeekdayWeekend = canProgramThermostatProgramsAsWeekdayWeekend; -CanRemotelyLock = canRemotelyLock; -CanRemotelyUnlock = canRemotelyUnlock; -CanRunThermostatPrograms = canRunThermostatPrograms; -CanSimulateConnection = canSimulateConnection; -CanSimulateDisconnection = canSimulateDisconnection; -CanSimulateHubConnection = canSimulateHubConnection; -CanSimulateHubDisconnection = canSimulateHubDisconnection; -CanSimulatePaidSubscription = canSimulatePaidSubscription; -CanSimulateRemoval = canSimulateRemoval; -CanStreamLiveVideo = canStreamLiveVideo; -CanTurnOffHvac = canTurnOffHvac; -CanUnlockWithCode = canUnlockWithCode; -CapabilitiesSupported = capabilitiesSupported; -ConnectedAccountId = connectedAccountId; -CreatedAt = createdAt; -CustomMetadata = customMetadata; -DeviceId = deviceId; -DeviceType = deviceType; -DisplayName = displayName; -Errors = errors; -IsManaged = isManaged; -Location = location; -Properties = properties; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -/// -/// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum CapabilitiesSupportedEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "access_code")] -AccessCode = 1, - -[EnumMember(Value = "lock")] -Lock = 2, - -[EnumMember(Value = "noise_detection")] -NoiseDetection = 3, - -[EnumMember(Value = "thermostat")] -Thermostat = 4, - -[EnumMember(Value = "battery")] -Battery = 5, - -[EnumMember(Value = "phone")] -Phone = 6, -} - -/// -/// Type of the device. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum DeviceTypeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "akuvox_lock")] -AkuvoxLock = 1, - -[EnumMember(Value = "august_lock")] -AugustLock = 2, - -[EnumMember(Value = "brivo_access_point")] -BrivoAccessPoint = 3, - -[EnumMember(Value = "butterflymx_panel")] -ButterflymxPanel = 4, - -[EnumMember(Value = "avigilon_alta_entry")] -AvigilonAltaEntry = 5, - -[EnumMember(Value = "doorking_lock")] -DoorkingLock = 6, - -[EnumMember(Value = "genie_door")] -GenieDoor = 7, - -[EnumMember(Value = "igloo_lock")] -IglooLock = 8, - -[EnumMember(Value = "linear_lock")] -LinearLock = 9, - -[EnumMember(Value = "lockly_lock")] -LocklyLock = 10, - -[EnumMember(Value = "kwikset_lock")] -KwiksetLock = 11, - -[EnumMember(Value = "nuki_lock")] -NukiLock = 12, - -[EnumMember(Value = "salto_lock")] -SaltoLock = 13, - -[EnumMember(Value = "schlage_lock")] -SchlageLock = 14, - -[EnumMember(Value = "smartthings_lock")] -SmartthingsLock = 15, - -[EnumMember(Value = "wyze_lock")] -WyzeLock = 16, - -[EnumMember(Value = "yale_lock")] -YaleLock = 17, - -[EnumMember(Value = "two_n_intercom")] -TwoNIntercom = 18, - -[EnumMember(Value = "controlbyweb_device")] -ControlbywebDevice = 19, - -[EnumMember(Value = "ttlock_lock")] -TtlockLock = 20, - -[EnumMember(Value = "igloohome_lock")] -IgloohomeLock = 21, - -[EnumMember(Value = "four_suites_door")] -FourSuitesDoor = 22, - -[EnumMember(Value = "dormakaba_oracode_door")] -DormakabaOracodeDoor = 23, - -[EnumMember(Value = "tedee_lock")] -TedeeLock = 24, - -[EnumMember(Value = "akiles_lock")] -AkilesLock = 25, - -[EnumMember(Value = "ultraloq_lock")] -UltraloqLock = 26, - -[EnumMember(Value = "yacan_lock")] -YacanLock = 27, - -[EnumMember(Value = "keyincode_lock")] -KeyincodeLock = 28, - -[EnumMember(Value = "omnitec_lock")] -OmnitecLock = 29, - -[EnumMember(Value = "kisi_lock")] -KisiLock = 30, - -[EnumMember(Value = "aqara_lock")] -AqaraLock = 31, - -[EnumMember(Value = "keynest_key")] -KeynestKey = 32, - -[EnumMember(Value = "noiseaware_activity_zone")] -NoiseawareActivityZone = 33, - -[EnumMember(Value = "minut_sensor")] -MinutSensor = 34, - -[EnumMember(Value = "ecobee_thermostat")] -EcobeeThermostat = 35, - -[EnumMember(Value = "nest_thermostat")] -NestThermostat = 36, - -[EnumMember(Value = "honeywell_resideo_thermostat")] -HoneywellResideoThermostat = 37, - -[EnumMember(Value = "tado_thermostat")] -TadoThermostat = 38, - -[EnumMember(Value = "sensi_thermostat")] -SensiThermostat = 39, - -[EnumMember(Value = "smartthings_thermostat")] -SmartthingsThermostat = 40, - -[EnumMember(Value = "ios_phone")] -IosPhone = 41, - -[EnumMember(Value = "android_phone")] -AndroidPhone = 42, - -[EnumMember(Value = "ring_camera")] -RingCamera = 43, - -[EnumMember(Value = "tapo_camera")] -TapoCamera = 44, - -[EnumMember(Value = "arlo_camera")] -ArloCamera = 45, - -[EnumMember(Value = "reolink_camera")] -ReolinkCamera = 46, -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsBridgeDisconnected), "bridge_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsSubscriptionRequired), "subscription_required")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsAuxiliaryHeatRunning), "auxiliary_heat_running")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsMissingDeviceCredentials), "missing_device_credentials")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsAugustLockNotAuthorized), "august_lock_not_authorized")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsEmptyBackupAccessCodePool), "empty_backup_access_code_pool")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceDisconnected), "device_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsHubDisconnected), "hub_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceRemoved), "device_removed")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceOffline), "device_offline")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDormakabaSitesDisconnected), "dormakaba_sites_disconnected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsInsufficientPermissions), "insufficient_permissions")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded), "salto_ks_subscription_limit_exceeded")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsAccountDisconnected), "account_disconnected")] -public abstract class UnmanagedDeviceErrors -{ -public abstract string ErrorCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsAccountDisconnected_model")] -public class UnmanagedDeviceErrorsAccountDisconnected : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsAccountDisconnected() { } - -public UnmanagedDeviceErrorsAccountDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "account_disconnected"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded_model")] -public class UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded() { } - -public UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsInsufficientPermissions_model")] -public class UnmanagedDeviceErrorsInsufficientPermissions : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsInsufficientPermissions() { } - -public UnmanagedDeviceErrorsInsufficientPermissions(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "insufficient_permissions"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsDormakabaSitesDisconnected_model")] -public class UnmanagedDeviceErrorsDormakabaSitesDisconnected : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsDormakabaSitesDisconnected() { } - -public UnmanagedDeviceErrorsDormakabaSitesDisconnected(string createdAt = default, string errorCode = default, bool isConnectedAccountError = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsConnectedAccountError = isConnectedAccountError; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; - -/// -/// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnectedAccountError { get; set; } - -/// -/// Indicates that the error is not a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceOffline_model")] -public class UnmanagedDeviceErrorsDeviceOffline : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsDeviceOffline() { } - -public UnmanagedDeviceErrorsDeviceOffline(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_offline"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceRemoved_model")] -public class UnmanagedDeviceErrorsDeviceRemoved : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsDeviceRemoved() { } - -public UnmanagedDeviceErrorsDeviceRemoved(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_removed"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsHubDisconnected_model")] -public class UnmanagedDeviceErrorsHubDisconnected : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsHubDisconnected() { } - -public UnmanagedDeviceErrorsHubDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "hub_disconnected"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceDisconnected_model")] -public class UnmanagedDeviceErrorsDeviceDisconnected : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsDeviceDisconnected() { } - -public UnmanagedDeviceErrorsDeviceDisconnected(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "device_disconnected"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsEmptyBackupAccessCodePool_model")] -public class UnmanagedDeviceErrorsEmptyBackupAccessCodePool : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsEmptyBackupAccessCodePool() { } - -public UnmanagedDeviceErrorsEmptyBackupAccessCodePool(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "empty_backup_access_code_pool"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsAugustLockNotAuthorized_model")] -public class UnmanagedDeviceErrorsAugustLockNotAuthorized : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsAugustLockNotAuthorized() { } - -public UnmanagedDeviceErrorsAugustLockNotAuthorized(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "august_lock_not_authorized"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsMissingDeviceCredentials_model")] -public class UnmanagedDeviceErrorsMissingDeviceCredentials : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsMissingDeviceCredentials() { } - -public UnmanagedDeviceErrorsMissingDeviceCredentials(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "missing_device_credentials"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsAuxiliaryHeatRunning_model")] -public class UnmanagedDeviceErrorsAuxiliaryHeatRunning : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsAuxiliaryHeatRunning() { } - -public UnmanagedDeviceErrorsAuxiliaryHeatRunning(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "auxiliary_heat_running"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsSubscriptionRequired_model")] -public class UnmanagedDeviceErrorsSubscriptionRequired : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsSubscriptionRequired() { } - -public UnmanagedDeviceErrorsSubscriptionRequired(string createdAt = default, string errorCode = default, bool isDeviceError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsDeviceError = isDeviceError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "subscription_required"; - -/// -/// Indicates that the error is a device error. -/// -[DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] -public bool IsDeviceError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsBridgeDisconnected_model")] -public class UnmanagedDeviceErrorsBridgeDisconnected : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsBridgeDisconnected() { } - -public UnmanagedDeviceErrorsBridgeDisconnected(string createdAt = default, string errorCode = default, bool? isBridgeError = default, bool? isConnectedAccountError = default, string message = default) -{ -CreatedAt = createdAt; -ErrorCode = errorCode; -IsBridgeError = isBridgeError; -IsConnectedAccountError = isConnectedAccountError; -Message = message; -} - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "bridge_disconnected"; - -/// -/// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). -/// -[DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsBridgeError { get; set; } - -/// -/// Indicates whether the error is related specifically to the connected account. -/// -[DataMember(Name = "is_connected_account_error", IsRequired = false, EmitDefaultValue = false)] -public bool? IsConnectedAccountError { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceErrorsUnrecognized_model")] -public class UnmanagedDeviceErrorsUnrecognized : UnmanagedDeviceErrors -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceErrorsUnrecognized() { } - -public UnmanagedDeviceErrorsUnrecognized(string errorCode = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsMaxAccessCodesReached), "max_access_codes_reached")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsUnreliableOnlineStatus), "unreliable_online_status")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsAccessoryKeypadLowBattery), "accessory_keypad_low_battery")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsAccessoryKeypadSetupRequired), "accessory_keypad_setup_required")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsKeynestUnsupportedLocker), "keynest_unsupported_locker")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsProviderIssue), "provider_issue")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities), "hub_required_for_additional_capabilities")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTwoNDeviceMissingTimezone), "two_n_device_missing_timezone")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTimeZoneMismatch), "time_zone_mismatch")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTimeZoneUnknown), "time_zone_unknown")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsUltraloqTimeZoneUnknown), "ultraloq_time_zone_unknown")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured), "lockly_time_zone_not_configured")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsUnknownIssueWithPhone), "unknown_issue_with_phone")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved), "salto_ks_lock_access_code_support_removed")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached), "salto_ks_subscription_limit_almost_reached")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsPrivacyMode), "privacy_mode")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsSaltoKsPrivacyMode), "salto_ks_privacy_mode")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsSaltoKsOfficeMode), "salto_ks_office_mode")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsDeviceHasFlakyConnection), "device_has_flaky_connection")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsScheduledMaintenanceWindow), "scheduled_maintenance_window")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsDeviceCommunicationDegraded), "device_communication_degraded")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTemperatureThresholdExceeded), "temperature_threshold_exceeded")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsPowerSavingMode), "power_saving_mode")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTtlockWeakGatewaySignal), "ttlock_weak_gateway_signal")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled), "ttlock_lock_gateway_unlocking_not_enabled")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsThirdPartyIntegrationDetected), "third_party_integration_detected")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsManyActiveBackupCodes), "many_active_backup_codes")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsPartialBackupAccessCodePool), "partial_backup_access_code_pool")] -public abstract class UnmanagedDeviceWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsPartialBackupAccessCodePool_model")] -public class UnmanagedDeviceWarningsPartialBackupAccessCodePool : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsPartialBackupAccessCodePool() { } - -public UnmanagedDeviceWarningsPartialBackupAccessCodePool(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "partial_backup_access_code_pool"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsManyActiveBackupCodes_model")] -public class UnmanagedDeviceWarningsManyActiveBackupCodes : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsManyActiveBackupCodes() { } - -public UnmanagedDeviceWarningsManyActiveBackupCodes(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "many_active_backup_codes"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsThirdPartyIntegrationDetected_model")] -public class UnmanagedDeviceWarningsThirdPartyIntegrationDetected : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsThirdPartyIntegrationDetected() { } - -public UnmanagedDeviceWarningsThirdPartyIntegrationDetected(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "third_party_integration_detected"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled_model")] -public class UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled() { } - -public UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "ttlock_lock_gateway_unlocking_not_enabled"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsTtlockWeakGatewaySignal_model")] -public class UnmanagedDeviceWarningsTtlockWeakGatewaySignal : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsTtlockWeakGatewaySignal() { } - -public UnmanagedDeviceWarningsTtlockWeakGatewaySignal(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "ttlock_weak_gateway_signal"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsPowerSavingMode_model")] -public class UnmanagedDeviceWarningsPowerSavingMode : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsPowerSavingMode() { } - -public UnmanagedDeviceWarningsPowerSavingMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "power_saving_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsTemperatureThresholdExceeded_model")] -public class UnmanagedDeviceWarningsTemperatureThresholdExceeded : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsTemperatureThresholdExceeded() { } - -public UnmanagedDeviceWarningsTemperatureThresholdExceeded(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "temperature_threshold_exceeded"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsDeviceCommunicationDegraded_model")] -public class UnmanagedDeviceWarningsDeviceCommunicationDegraded : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsDeviceCommunicationDegraded() { } - -public UnmanagedDeviceWarningsDeviceCommunicationDegraded(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "device_communication_degraded"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsScheduledMaintenanceWindow_model")] -public class UnmanagedDeviceWarningsScheduledMaintenanceWindow : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsScheduledMaintenanceWindow() { } - -public UnmanagedDeviceWarningsScheduledMaintenanceWindow(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "scheduled_maintenance_window"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsDeviceHasFlakyConnection_model")] -public class UnmanagedDeviceWarningsDeviceHasFlakyConnection : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsDeviceHasFlakyConnection() { } - -public UnmanagedDeviceWarningsDeviceHasFlakyConnection(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "device_has_flaky_connection"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsOfficeMode_model")] -public class UnmanagedDeviceWarningsSaltoKsOfficeMode : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsSaltoKsOfficeMode() { } - -public UnmanagedDeviceWarningsSaltoKsOfficeMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_office_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsPrivacyMode_model")] -public class UnmanagedDeviceWarningsSaltoKsPrivacyMode : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsSaltoKsPrivacyMode() { } - -public UnmanagedDeviceWarningsSaltoKsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_privacy_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsPrivacyMode_model")] -public class UnmanagedDeviceWarningsPrivacyMode : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsPrivacyMode() { } - -public UnmanagedDeviceWarningsPrivacyMode(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "privacy_mode"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached_model")] -public class UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached() { } - -public UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_subscription_limit_almost_reached"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved_model")] -public class UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved() { } - -public UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "salto_ks_lock_access_code_support_removed"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsUnknownIssueWithPhone_model")] -public class UnmanagedDeviceWarningsUnknownIssueWithPhone : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsUnknownIssueWithPhone() { } - -public UnmanagedDeviceWarningsUnknownIssueWithPhone(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unknown_issue_with_phone"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsLocklyTimeZoneNotConfigured_model")] -public class UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured() { } - -public UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "lockly_time_zone_not_configured"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsUltraloqTimeZoneUnknown_model")] -public class UnmanagedDeviceWarningsUltraloqTimeZoneUnknown : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsUltraloqTimeZoneUnknown() { } - -public UnmanagedDeviceWarningsUltraloqTimeZoneUnknown(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "ultraloq_time_zone_unknown"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsTimeZoneUnknown_model")] -public class UnmanagedDeviceWarningsTimeZoneUnknown : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsTimeZoneUnknown() { } - -public UnmanagedDeviceWarningsTimeZoneUnknown(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "time_zone_unknown"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsTimeZoneMismatch_model")] -public class UnmanagedDeviceWarningsTimeZoneMismatch : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsTimeZoneMismatch() { } - -public UnmanagedDeviceWarningsTimeZoneMismatch(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "time_zone_mismatch"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsTwoNDeviceMissingTimezone_model")] -public class UnmanagedDeviceWarningsTwoNDeviceMissingTimezone : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsTwoNDeviceMissingTimezone() { } - -public UnmanagedDeviceWarningsTwoNDeviceMissingTimezone(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "two_n_device_missing_timezone"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsHubRequiredForAdditionalCapabilities_model")] -public class UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities() { } - -public UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "hub_required_for_additional_capabilities"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsProviderIssue_model")] -public class UnmanagedDeviceWarningsProviderIssue : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsProviderIssue() { } - -public UnmanagedDeviceWarningsProviderIssue(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "provider_issue"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsKeynestUnsupportedLocker_model")] -public class UnmanagedDeviceWarningsKeynestUnsupportedLocker : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsKeynestUnsupportedLocker() { } - -public UnmanagedDeviceWarningsKeynestUnsupportedLocker(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "keynest_unsupported_locker"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsAccessoryKeypadSetupRequired_model")] -public class UnmanagedDeviceWarningsAccessoryKeypadSetupRequired : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsAccessoryKeypadSetupRequired() { } - -public UnmanagedDeviceWarningsAccessoryKeypadSetupRequired(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "accessory_keypad_setup_required"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsAccessoryKeypadLowBattery_model")] -public class UnmanagedDeviceWarningsAccessoryKeypadLowBattery : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsAccessoryKeypadLowBattery() { } - -public UnmanagedDeviceWarningsAccessoryKeypadLowBattery(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "accessory_keypad_low_battery"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsUnreliableOnlineStatus_model")] -public class UnmanagedDeviceWarningsUnreliableOnlineStatus : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsUnreliableOnlineStatus() { } - -public UnmanagedDeviceWarningsUnreliableOnlineStatus(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unreliable_online_status"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsMaxAccessCodesReached_model")] -public class UnmanagedDeviceWarningsMaxAccessCodesReached : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsMaxAccessCodesReached() { } - -public UnmanagedDeviceWarningsMaxAccessCodesReached(int activeAccessCodeCount = default, string createdAt = default, int maxActiveAccessCodeCount = default, string message = default, string warningCode = default) -{ -ActiveAccessCodeCount = activeAccessCodeCount; -CreatedAt = createdAt; -MaxActiveAccessCodeCount = maxActiveAccessCodeCount; -Message = message; -WarningCode = warningCode; -} - -/// -/// Number of active access codes on the device when the warning was set. -/// -[DataMember(Name = "active_access_code_count", IsRequired = false, EmitDefaultValue = false)] -public int ActiveAccessCodeCount { get; set; } - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Maximum number of active access codes supported by the device. -/// -[DataMember(Name = "max_active_access_code_count", IsRequired = false, EmitDefaultValue = false)] -public int MaxActiveAccessCodeCount { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "max_access_codes_reached"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceWarningsUnrecognized_model")] -public class UnmanagedDeviceWarningsUnrecognized : UnmanagedDeviceWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceWarningsUnrecognized() { } - -public UnmanagedDeviceWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. -/// -[DataMember(Name = "can_activate_weekly_program", IsRequired = false, EmitDefaultValue = false)] -public bool? CanActivateWeeklyProgram { get; set; } - -/// -/// Indicates whether the lock supports configuring automatic locking. -/// -[DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanConfigureAutoLock { get; set; } - -/// -/// Indicates whether the thermostat supports cooling. -/// -[DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacCool { get; set; } - -/// -/// Indicates whether the thermostat supports heating. -/// -[DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacHeat { get; set; } - -/// -/// Indicates whether the thermostat supports simultaneous heating and cooling. -/// -[DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] -public bool? CanHvacHeatCool { get; set; } - -/// -/// Indicates whether the device supports programming offline access codes. -/// -[DataMember(Name = "can_program_offline_access_codes", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramOfflineAccessCodes { get; set; } - -/// -/// Indicates whether the device supports programming online access codes. -/// -[DataMember(Name = "can_program_online_access_codes", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramOnlineAccessCodes { get; set; } - -/// -/// Indicates whether the thermostat supports different climate programs for each day of the week. -/// -[DataMember(Name = "can_program_thermostat_programs_as_different_each_day", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } - -/// -/// Indicates whether the thermostat supports a single climate program applied to every day. -/// -[DataMember(Name = "can_program_thermostat_programs_as_same_each_day", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } - -/// -/// Indicates whether the thermostat supports weekday/weekend climate programs. -/// -[DataMember(Name = "can_program_thermostat_programs_as_weekday_weekend", IsRequired = false, EmitDefaultValue = false)] -public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } - -/// -/// Indicates whether the device supports remote locking. -/// -[DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRemotelyLock { get; set; } - -/// -/// Indicates whether the device supports remote unlocking. -/// -[DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRemotelyUnlock { get; set; } - -/// -/// Indicates whether the thermostat supports running climate programs. -/// -[DataMember(Name = "can_run_thermostat_programs", IsRequired = false, EmitDefaultValue = false)] -public bool? CanRunThermostatPrograms { get; set; } - -/// -/// Indicates whether the device supports simulating connection in a sandbox. -/// -[DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateConnection { get; set; } - -/// -/// Indicates whether the device supports simulating disconnection in a sandbox. -/// -[DataMember(Name = "can_simulate_disconnection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateDisconnection { get; set; } - -/// -/// Indicates whether the hub supports simulating connection in a sandbox. -/// -[DataMember(Name = "can_simulate_hub_connection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateHubConnection { get; set; } - -/// -/// Indicates whether the hub supports simulating disconnection in a sandbox. -/// -[DataMember(Name = "can_simulate_hub_disconnection", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateHubDisconnection { get; set; } - -/// -/// Indicates whether the device supports simulating a paid subscription in a sandbox. -/// -[DataMember(Name = "can_simulate_paid_subscription", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulatePaidSubscription { get; set; } - -/// -/// Indicates whether the device supports simulating removal in a sandbox. -/// -[DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] -public bool? CanSimulateRemoval { get; set; } - -/// -/// Indicates whether the camera supports streaming live video through a camera live view session. -/// -[DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] -public bool? CanStreamLiveVideo { get; set; } - -/// -/// Indicates whether the thermostat can be turned off. -/// -[DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] -public bool? CanTurnOffHvac { get; set; } - -/// -/// Indicates whether the lock supports unlocking with an access code. -/// -[DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] -public bool? CanUnlockWithCode { get; set; } - -/// -/// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). -/// -[DataMember(Name = "capabilities_supported", IsRequired = false, EmitDefaultValue = false)] -public List CapabilitiesSupported { get; set; } - -/// -/// Unique identifier for the account associated with the device. -/// -[DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] -public string ConnectedAccountId { get; set; } - -/// -/// Date and time at which the device object was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. -/// -[DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] -public object CustomMetadata { get; set; } - -/// -/// ID of the device. -/// -[DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] -public string DeviceId { get; set; } - -/// -/// Type of the device. -/// -[DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDevice.DeviceTypeEnum DeviceType { get; set; } - -/// -/// Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Indicates that Seam does not manage the device. -/// -[DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] -public bool IsManaged { get; set; } - -/// -/// Location information for the device. -/// -[DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDeviceLocation? Location { get; set; } - -/// -/// properties of the device. -/// -[DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDeviceProperties Properties { get; set; } - -/// -/// Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// Unique identifier for the Seam workspace associated with the device. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceLocation_model")] -public class UnmanagedDeviceLocation -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceLocation() { } - -public UnmanagedDeviceLocation(string? locationName = default, string? roomName = default, string? timeZone = default, string? timezone = default) -{ -LocationName = locationName; -RoomName = roomName; -TimeZone = timeZone; -Timezone = timezone; -} - -/// -/// Name of the device location. -/// -[DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] -public string? LocationName { get; set; } - -/// -/// Name of the room within the device location, when the provider reports one. -/// -[DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] -public string? RoomName { get; set; } - -/// -/// Time zone of the device location. -/// -[DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] -public string? TimeZone { get; set; } - -/// -/// Time zone of the device location. -/// -[Obsolete("Use `time_zone` instead.")] -[DataMember(Name = "timezone", IsRequired = false, EmitDefaultValue = false)] -public string? Timezone { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDeviceProperties_model")] -public class UnmanagedDeviceProperties -{ -[JsonConstructorAttribute] -protected UnmanagedDeviceProperties() { } - -public UnmanagedDeviceProperties(UnmanagedDevicePropertiesAccessoryKeypad? accessoryKeypad = default, UnmanagedDevicePropertiesBattery? battery = default, float? batteryLevel = default, string? imageAltText = default, string? imageUrl = default, string? manufacturer = default, UnmanagedDevicePropertiesModel model = default, string name = default, bool? offlineAccessCodesEnabled = default, bool online = default, bool? onlineAccessCodesEnabled = default) -{ -AccessoryKeypad = accessoryKeypad; -Battery = battery; -BatteryLevel = batteryLevel; -ImageAltText = imageAltText; -ImageUrl = imageUrl; -Manufacturer = manufacturer; -Model = model; -Name = name; -OfflineAccessCodesEnabled = offlineAccessCodesEnabled; -Online = online; -OnlineAccessCodesEnabled = onlineAccessCodesEnabled; -} - -/// -/// Accessory keypad properties and state. -/// -[DataMember(Name = "accessory_keypad", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDevicePropertiesAccessoryKeypad? AccessoryKeypad { get; set; } - -/// -/// Represents the current status of the battery charge level. -/// -[DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDevicePropertiesBattery? Battery { get; set; } - -/// -/// Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. -/// -[DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] -public float? BatteryLevel { get; set; } - -/// -/// Alt text for the device image. -/// -[DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] -public string? ImageAltText { get; set; } - -/// -/// Image URL for the device. -/// -[DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] -public string? ImageUrl { get; set; } - -/// -/// Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. -/// -[DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] -public string? Manufacturer { get; set; } - -/// -/// Device model-related properties. -/// -[DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDevicePropertiesModel Model { get; set; } - -/// -/// Name of the device. -/// -[Obsolete("use device.display_name instead")] -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// Indicates whether it is currently possible to use offline access codes for the device. -/// -[Obsolete("use device.can_program_offline_access_codes")] -[DataMember(Name = "offline_access_codes_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? OfflineAccessCodesEnabled { get; set; } - -/// -/// Indicates whether the device is online. -/// -[DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] -public bool Online { get; set; } - -/// -/// Indicates whether it is currently possible to use online access codes for the device. -/// -[Obsolete("use device.can_program_online_access_codes")] -[DataMember(Name = "online_access_codes_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool? OnlineAccessCodesEnabled { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDevicePropertiesAccessoryKeypad_model")] -public class UnmanagedDevicePropertiesAccessoryKeypad -{ -[JsonConstructorAttribute] -protected UnmanagedDevicePropertiesAccessoryKeypad() { } - -public UnmanagedDevicePropertiesAccessoryKeypad(UnmanagedDevicePropertiesAccessoryKeypadBattery? battery = default, bool isConnected = default) -{ -Battery = battery; -IsConnected = isConnected; -} - -/// -/// Keypad battery properties. -/// -[DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDevicePropertiesAccessoryKeypadBattery? Battery { get; set; } - -/// -/// Indicates if an accessory keypad is connected to the device. -/// -[DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] -public bool IsConnected { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedDevicePropertiesAccessoryKeypadBattery_model")] -public class UnmanagedDevicePropertiesAccessoryKeypadBattery -{ -[JsonConstructorAttribute] -protected UnmanagedDevicePropertiesAccessoryKeypadBattery() { } + /// + /// Represents an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + /// + [DataContract(Name = "seamModel_unmanagedDevice_model")] + public class UnmanagedDevice + { + [JsonConstructorAttribute] + protected UnmanagedDevice() { } + + public UnmanagedDevice( + bool? canActivateWeeklyProgram = default, + bool? canConfigureAutoLock = default, + bool? canHvacCool = default, + bool? canHvacHeat = default, + bool? canHvacHeatCool = default, + bool? canProgramOfflineAccessCodes = default, + bool? canProgramOnlineAccessCodes = default, + bool? canProgramThermostatProgramsAsDifferentEachDay = default, + bool? canProgramThermostatProgramsAsSameEachDay = default, + bool? canProgramThermostatProgramsAsWeekdayWeekend = default, + bool? canRemotelyLock = default, + bool? canRemotelyUnlock = default, + bool? canRunThermostatPrograms = default, + bool? canSimulateConnection = default, + bool? canSimulateDisconnection = default, + bool? canSimulateHubConnection = default, + bool? canSimulateHubDisconnection = default, + bool? canSimulatePaidSubscription = default, + bool? canSimulateRemoval = default, + bool? canStreamLiveVideo = default, + bool? canTurnOffHvac = default, + bool? canUnlockWithCode = default, + List capabilitiesSupported = default, + string connectedAccountId = default, + string createdAt = default, + object customMetadata = default, + string deviceId = default, + UnmanagedDevice.DeviceTypeEnum deviceType = default, + string displayName = default, + List errors = default, + bool isManaged = default, + UnmanagedDeviceLocation? location = default, + UnmanagedDeviceProperties properties = default, + List warnings = default, + string workspaceId = default + ) + { + CanActivateWeeklyProgram = canActivateWeeklyProgram; + CanConfigureAutoLock = canConfigureAutoLock; + CanHvacCool = canHvacCool; + CanHvacHeat = canHvacHeat; + CanHvacHeatCool = canHvacHeatCool; + CanProgramOfflineAccessCodes = canProgramOfflineAccessCodes; + CanProgramOnlineAccessCodes = canProgramOnlineAccessCodes; + CanProgramThermostatProgramsAsDifferentEachDay = + canProgramThermostatProgramsAsDifferentEachDay; + CanProgramThermostatProgramsAsSameEachDay = canProgramThermostatProgramsAsSameEachDay; + CanProgramThermostatProgramsAsWeekdayWeekend = + canProgramThermostatProgramsAsWeekdayWeekend; + CanRemotelyLock = canRemotelyLock; + CanRemotelyUnlock = canRemotelyUnlock; + CanRunThermostatPrograms = canRunThermostatPrograms; + CanSimulateConnection = canSimulateConnection; + CanSimulateDisconnection = canSimulateDisconnection; + CanSimulateHubConnection = canSimulateHubConnection; + CanSimulateHubDisconnection = canSimulateHubDisconnection; + CanSimulatePaidSubscription = canSimulatePaidSubscription; + CanSimulateRemoval = canSimulateRemoval; + CanStreamLiveVideo = canStreamLiveVideo; + CanTurnOffHvac = canTurnOffHvac; + CanUnlockWithCode = canUnlockWithCode; + CapabilitiesSupported = capabilitiesSupported; + ConnectedAccountId = connectedAccountId; + CreatedAt = createdAt; + CustomMetadata = customMetadata; + DeviceId = deviceId; + DeviceType = deviceType; + DisplayName = displayName; + Errors = errors; + IsManaged = isManaged; + Location = location; + Properties = properties; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + /// + /// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum CapabilitiesSupportedEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "access_code")] + AccessCode = 1, + + [EnumMember(Value = "lock")] + Lock = 2, + + [EnumMember(Value = "noise_detection")] + NoiseDetection = 3, + + [EnumMember(Value = "thermostat")] + Thermostat = 4, + + [EnumMember(Value = "battery")] + Battery = 5, + + [EnumMember(Value = "phone")] + Phone = 6, + } + + /// + /// Type of the device. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum DeviceTypeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "akuvox_lock")] + AkuvoxLock = 1, + + [EnumMember(Value = "august_lock")] + AugustLock = 2, + + [EnumMember(Value = "brivo_access_point")] + BrivoAccessPoint = 3, + + [EnumMember(Value = "butterflymx_panel")] + ButterflymxPanel = 4, + + [EnumMember(Value = "avigilon_alta_entry")] + AvigilonAltaEntry = 5, + + [EnumMember(Value = "doorking_lock")] + DoorkingLock = 6, + + [EnumMember(Value = "genie_door")] + GenieDoor = 7, + + [EnumMember(Value = "igloo_lock")] + IglooLock = 8, -public UnmanagedDevicePropertiesAccessoryKeypadBattery(float level = default) -{ -Level = level; -} + [EnumMember(Value = "linear_lock")] + LinearLock = 9, -[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] -public float Level { get; set; } + [EnumMember(Value = "lockly_lock")] + LocklyLock = 10, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "kwikset_lock")] + KwiksetLock = 11, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "nuki_lock")] + NukiLock = 12, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "salto_lock")] + SaltoLock = 13, -[DataContract(Name = "seamModel_unmanagedDevicePropertiesBattery_model")] -public class UnmanagedDevicePropertiesBattery -{ -[JsonConstructorAttribute] -protected UnmanagedDevicePropertiesBattery() { } + [EnumMember(Value = "schlage_lock")] + SchlageLock = 14, -public UnmanagedDevicePropertiesBattery(float level = default, UnmanagedDevicePropertiesBattery.StatusEnum status = default) -{ -Level = level; -Status = status; -} + [EnumMember(Value = "smartthings_lock")] + SmartthingsLock = 15, -/// -/// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum StatusEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, + [EnumMember(Value = "wyze_lock")] + WyzeLock = 16, -[EnumMember(Value = "critical")] -Critical = 1, + [EnumMember(Value = "yale_lock")] + YaleLock = 17, -[EnumMember(Value = "low")] -Low = 2, + [EnumMember(Value = "two_n_intercom")] + TwoNIntercom = 18, -[EnumMember(Value = "good")] -Good = 3, + [EnumMember(Value = "controlbyweb_device")] + ControlbywebDevice = 19, -[EnumMember(Value = "full")] -Full = 4, -} + [EnumMember(Value = "ttlock_lock")] + TtlockLock = 20, -/// -/// Battery charge level as a value between 0 and 1, inclusive. -/// -[DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] -public float Level { get; set; } + [EnumMember(Value = "igloohome_lock")] + IgloohomeLock = 21, -/// -/// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. -/// -[DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] -public UnmanagedDevicePropertiesBattery.StatusEnum Status { get; set; } + [EnumMember(Value = "four_suites_door")] + FourSuitesDoor = 22, -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "dormakaba_oracode_door")] + DormakabaOracodeDoor = 23, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "tedee_lock")] + TedeeLock = 24, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "akiles_lock")] + AkilesLock = 25, -[DataContract(Name = "seamModel_unmanagedDevicePropertiesModel_model")] -public class UnmanagedDevicePropertiesModel -{ -[JsonConstructorAttribute] -protected UnmanagedDevicePropertiesModel() { } + [EnumMember(Value = "ultraloq_lock")] + UltraloqLock = 26, -public UnmanagedDevicePropertiesModel(bool? accessoryKeypadSupported = default, bool? canConnectAccessoryKeypad = default, string displayName = default, bool? hasBuiltInKeypad = default, string manufacturerDisplayName = default, bool? offlineAccessCodesSupported = default, bool? onlineAccessCodesSupported = default) -{ -AccessoryKeypadSupported = accessoryKeypadSupported; -CanConnectAccessoryKeypad = canConnectAccessoryKeypad; -DisplayName = displayName; -HasBuiltInKeypad = hasBuiltInKeypad; -ManufacturerDisplayName = manufacturerDisplayName; -OfflineAccessCodesSupported = offlineAccessCodesSupported; -OnlineAccessCodesSupported = onlineAccessCodesSupported; -} + [EnumMember(Value = "yacan_lock")] + YacanLock = 27, -[Obsolete("use device.properties.model.can_connect_accessory_keypad")] -[DataMember(Name = "accessory_keypad_supported", IsRequired = false, EmitDefaultValue = false)] -public bool? AccessoryKeypadSupported { get; set; } - -/// -/// Indicates whether the device can connect a accessory keypad. -/// -[DataMember(Name = "can_connect_accessory_keypad", IsRequired = false, EmitDefaultValue = false)] -public bool? CanConnectAccessoryKeypad { get; set; } - -/// -/// Display name of the device model. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Indicates whether the device has a built in accessory keypad. -/// -[DataMember(Name = "has_built_in_keypad", IsRequired = false, EmitDefaultValue = false)] -public bool? HasBuiltInKeypad { get; set; } - -/// -/// Display name that corresponds to the manufacturer-specific terminology for the device. -/// -[DataMember(Name = "manufacturer_display_name", IsRequired = false, EmitDefaultValue = false)] -public string ManufacturerDisplayName { get; set; } - -[Obsolete("use device.can_program_offline_access_codes.")] -[DataMember(Name = "offline_access_codes_supported", IsRequired = false, EmitDefaultValue = false)] -public bool? OfflineAccessCodesSupported { get; set; } - -[Obsolete("use device.can_program_online_access_codes.")] -[DataMember(Name = "online_access_codes_supported", IsRequired = false, EmitDefaultValue = false)] -public bool? OnlineAccessCodesSupported { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + [EnumMember(Value = "keyincode_lock")] + KeyincodeLock = 28, -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} + [EnumMember(Value = "omnitec_lock")] + OmnitecLock = 29, + + [EnumMember(Value = "kisi_lock")] + KisiLock = 30, + + [EnumMember(Value = "aqara_lock")] + AqaraLock = 31, + + [EnumMember(Value = "keynest_key")] + KeynestKey = 32, + + [EnumMember(Value = "noiseaware_activity_zone")] + NoiseawareActivityZone = 33, -return stringWriter.ToString(); -} -} + [EnumMember(Value = "minut_sensor")] + MinutSensor = 34, + [EnumMember(Value = "ecobee_thermostat")] + EcobeeThermostat = 35, + + [EnumMember(Value = "nest_thermostat")] + NestThermostat = 36, + + [EnumMember(Value = "honeywell_resideo_thermostat")] + HoneywellResideoThermostat = 37, + + [EnumMember(Value = "tado_thermostat")] + TadoThermostat = 38, + + [EnumMember(Value = "sensi_thermostat")] + SensiThermostat = 39, + + [EnumMember(Value = "smartthings_thermostat")] + SmartthingsThermostat = 40, + + [EnumMember(Value = "ios_phone")] + IosPhone = 41, + + [EnumMember(Value = "android_phone")] + AndroidPhone = 42, + + [EnumMember(Value = "ring_camera")] + RingCamera = 43, + + [EnumMember(Value = "tapo_camera")] + TapoCamera = 44, + + [EnumMember(Value = "arlo_camera")] + ArloCamera = 45, + + [EnumMember(Value = "reolink_camera")] + ReolinkCamera = 46, + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsBridgeDisconnected), + "bridge_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsSubscriptionRequired), + "subscription_required" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsAuxiliaryHeatRunning), + "auxiliary_heat_running" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsMissingDeviceCredentials), + "missing_device_credentials" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsAugustLockNotAuthorized), + "august_lock_not_authorized" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsEmptyBackupAccessCodePool), + "empty_backup_access_code_pool" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsDeviceDisconnected), + "device_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsHubDisconnected), + "hub_disconnected" + )] + [JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceRemoved), "device_removed")] + [JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceErrorsDeviceOffline), "device_offline")] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsDormakabaSitesDisconnected), + "dormakaba_sites_disconnected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsInsufficientPermissions), + "insufficient_permissions" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded), + "salto_ks_subscription_limit_exceeded" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceErrorsAccountDisconnected), + "account_disconnected" + )] + public abstract class UnmanagedDeviceErrors + { + public abstract string ErrorCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsAccountDisconnected_model")] + public class UnmanagedDeviceErrorsAccountDisconnected : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsAccountDisconnected() { } + + public UnmanagedDeviceErrorsAccountDisconnected( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "account_disconnected"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded_model" + )] + public class UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded() { } + + public UnmanagedDeviceErrorsSaltoKsSubscriptionLimitExceeded( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "salto_ks_subscription_limit_exceeded"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsInsufficientPermissions_model")] + public class UnmanagedDeviceErrorsInsufficientPermissions : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsInsufficientPermissions() { } + + public UnmanagedDeviceErrorsInsufficientPermissions( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "insufficient_permissions"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsDormakabaSitesDisconnected_model")] + public class UnmanagedDeviceErrorsDormakabaSitesDisconnected : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsDormakabaSitesDisconnected() { } + + public UnmanagedDeviceErrorsDormakabaSitesDisconnected( + string createdAt = default, + string errorCode = default, + bool isConnectedAccountError = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsConnectedAccountError = isConnectedAccountError; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "dormakaba_sites_disconnected"; + + /// + /// Indicates that the error is a [connected account](https://www.seam.co/docs/api/connected_accounts/object) error. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsConnectedAccountError { get; set; } + + /// + /// Indicates that the error is not a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceOffline_model")] + public class UnmanagedDeviceErrorsDeviceOffline : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsDeviceOffline() { } + + public UnmanagedDeviceErrorsDeviceOffline( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_offline"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceRemoved_model")] + public class UnmanagedDeviceErrorsDeviceRemoved : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsDeviceRemoved() { } + + public UnmanagedDeviceErrorsDeviceRemoved( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_removed"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsHubDisconnected_model")] + public class UnmanagedDeviceErrorsHubDisconnected : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsHubDisconnected() { } + + public UnmanagedDeviceErrorsHubDisconnected( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "hub_disconnected"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsDeviceDisconnected_model")] + public class UnmanagedDeviceErrorsDeviceDisconnected : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsDeviceDisconnected() { } + + public UnmanagedDeviceErrorsDeviceDisconnected( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "device_disconnected"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsEmptyBackupAccessCodePool_model")] + public class UnmanagedDeviceErrorsEmptyBackupAccessCodePool : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsEmptyBackupAccessCodePool() { } + + public UnmanagedDeviceErrorsEmptyBackupAccessCodePool( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "empty_backup_access_code_pool"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsAugustLockNotAuthorized_model")] + public class UnmanagedDeviceErrorsAugustLockNotAuthorized : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsAugustLockNotAuthorized() { } + + public UnmanagedDeviceErrorsAugustLockNotAuthorized( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "august_lock_not_authorized"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsMissingDeviceCredentials_model")] + public class UnmanagedDeviceErrorsMissingDeviceCredentials : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsMissingDeviceCredentials() { } + + public UnmanagedDeviceErrorsMissingDeviceCredentials( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "missing_device_credentials"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsAuxiliaryHeatRunning_model")] + public class UnmanagedDeviceErrorsAuxiliaryHeatRunning : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsAuxiliaryHeatRunning() { } + + public UnmanagedDeviceErrorsAuxiliaryHeatRunning( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "auxiliary_heat_running"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsSubscriptionRequired_model")] + public class UnmanagedDeviceErrorsSubscriptionRequired : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsSubscriptionRequired() { } + + public UnmanagedDeviceErrorsSubscriptionRequired( + string createdAt = default, + string errorCode = default, + bool isDeviceError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsDeviceError = isDeviceError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "subscription_required"; + + /// + /// Indicates that the error is a device error. + /// + [DataMember(Name = "is_device_error", IsRequired = false, EmitDefaultValue = false)] + public bool IsDeviceError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsBridgeDisconnected_model")] + public class UnmanagedDeviceErrorsBridgeDisconnected : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsBridgeDisconnected() { } + + public UnmanagedDeviceErrorsBridgeDisconnected( + string createdAt = default, + string errorCode = default, + bool? isBridgeError = default, + bool? isConnectedAccountError = default, + string message = default + ) + { + CreatedAt = createdAt; + ErrorCode = errorCode; + IsBridgeError = isBridgeError; + IsConnectedAccountError = isConnectedAccountError; + Message = message; + } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "bridge_disconnected"; + + /// + /// Indicates whether the error is related to [Seam Bridge](https://www.seam.co/docs/capability-guides/seam-bridge). + /// + [DataMember(Name = "is_bridge_error", IsRequired = false, EmitDefaultValue = false)] + public bool? IsBridgeError { get; set; } + + /// + /// Indicates whether the error is related specifically to the connected account. + /// + [DataMember( + Name = "is_connected_account_error", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? IsConnectedAccountError { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceErrorsUnrecognized_model")] + public class UnmanagedDeviceErrorsUnrecognized : UnmanagedDeviceErrors + { + [JsonConstructorAttribute] + protected UnmanagedDeviceErrorsUnrecognized() { } + + public UnmanagedDeviceErrorsUnrecognized( + string errorCode = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedDeviceWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsMaxAccessCodesReached), + "max_access_codes_reached" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsUnreliableOnlineStatus), + "unreliable_online_status" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsAccessoryKeypadLowBattery), + "accessory_keypad_low_battery" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsAccessoryKeypadSetupRequired), + "accessory_keypad_setup_required" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsKeynestUnsupportedLocker), + "keynest_unsupported_locker" + )] + [JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsProviderIssue), "provider_issue")] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities), + "hub_required_for_additional_capabilities" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsTwoNDeviceMissingTimezone), + "two_n_device_missing_timezone" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsTimeZoneMismatch), + "time_zone_mismatch" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsTimeZoneUnknown), + "time_zone_unknown" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsUltraloqTimeZoneUnknown), + "ultraloq_time_zone_unknown" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured), + "lockly_time_zone_not_configured" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsUnknownIssueWithPhone), + "unknown_issue_with_phone" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved), + "salto_ks_lock_access_code_support_removed" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached), + "salto_ks_subscription_limit_almost_reached" + )] + [JsonSubtypes.KnownSubType(typeof(UnmanagedDeviceWarningsPrivacyMode), "privacy_mode")] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsSaltoKsPrivacyMode), + "salto_ks_privacy_mode" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsSaltoKsOfficeMode), + "salto_ks_office_mode" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsDeviceHasFlakyConnection), + "device_has_flaky_connection" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsScheduledMaintenanceWindow), + "scheduled_maintenance_window" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsDeviceCommunicationDegraded), + "device_communication_degraded" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsTemperatureThresholdExceeded), + "temperature_threshold_exceeded" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsPowerSavingMode), + "power_saving_mode" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsTtlockWeakGatewaySignal), + "ttlock_weak_gateway_signal" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled), + "ttlock_lock_gateway_unlocking_not_enabled" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsThirdPartyIntegrationDetected), + "third_party_integration_detected" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsManyActiveBackupCodes), + "many_active_backup_codes" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedDeviceWarningsPartialBackupAccessCodePool), + "partial_backup_access_code_pool" + )] + public abstract class UnmanagedDeviceWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsPartialBackupAccessCodePool_model")] + public class UnmanagedDeviceWarningsPartialBackupAccessCodePool : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsPartialBackupAccessCodePool() { } + + public UnmanagedDeviceWarningsPartialBackupAccessCodePool( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "partial_backup_access_code_pool"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsManyActiveBackupCodes_model")] + public class UnmanagedDeviceWarningsManyActiveBackupCodes : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsManyActiveBackupCodes() { } + + public UnmanagedDeviceWarningsManyActiveBackupCodes( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "many_active_backup_codes"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedDeviceWarningsThirdPartyIntegrationDetected_model" + )] + public class UnmanagedDeviceWarningsThirdPartyIntegrationDetected : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsThirdPartyIntegrationDetected() { } + + public UnmanagedDeviceWarningsThirdPartyIntegrationDetected( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "third_party_integration_detected"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled_model" + )] + public class UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled + : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled() { } + + public UnmanagedDeviceWarningsTtlockLockGatewayUnlockingNotEnabled( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "ttlock_lock_gateway_unlocking_not_enabled"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsTtlockWeakGatewaySignal_model")] + public class UnmanagedDeviceWarningsTtlockWeakGatewaySignal : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsTtlockWeakGatewaySignal() { } + + public UnmanagedDeviceWarningsTtlockWeakGatewaySignal( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "ttlock_weak_gateway_signal"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsPowerSavingMode_model")] + public class UnmanagedDeviceWarningsPowerSavingMode : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsPowerSavingMode() { } + + public UnmanagedDeviceWarningsPowerSavingMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "power_saving_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsTemperatureThresholdExceeded_model")] + public class UnmanagedDeviceWarningsTemperatureThresholdExceeded : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsTemperatureThresholdExceeded() { } + + public UnmanagedDeviceWarningsTemperatureThresholdExceeded( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "temperature_threshold_exceeded"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsDeviceCommunicationDegraded_model")] + public class UnmanagedDeviceWarningsDeviceCommunicationDegraded : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsDeviceCommunicationDegraded() { } + + public UnmanagedDeviceWarningsDeviceCommunicationDegraded( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_communication_degraded"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsScheduledMaintenanceWindow_model")] + public class UnmanagedDeviceWarningsScheduledMaintenanceWindow : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsScheduledMaintenanceWindow() { } + + public UnmanagedDeviceWarningsScheduledMaintenanceWindow( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "scheduled_maintenance_window"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsDeviceHasFlakyConnection_model")] + public class UnmanagedDeviceWarningsDeviceHasFlakyConnection : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsDeviceHasFlakyConnection() { } + + public UnmanagedDeviceWarningsDeviceHasFlakyConnection( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "device_has_flaky_connection"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsOfficeMode_model")] + public class UnmanagedDeviceWarningsSaltoKsOfficeMode : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsSaltoKsOfficeMode() { } + + public UnmanagedDeviceWarningsSaltoKsOfficeMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "salto_ks_office_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsSaltoKsPrivacyMode_model")] + public class UnmanagedDeviceWarningsSaltoKsPrivacyMode : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsSaltoKsPrivacyMode() { } + + public UnmanagedDeviceWarningsSaltoKsPrivacyMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "salto_ks_privacy_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsPrivacyMode_model")] + public class UnmanagedDeviceWarningsPrivacyMode : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsPrivacyMode() { } + + public UnmanagedDeviceWarningsPrivacyMode( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "privacy_mode"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached_model" + )] + public class UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached + : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached() { } + + public UnmanagedDeviceWarningsSaltoKsSubscriptionLimitAlmostReached( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "salto_ks_subscription_limit_almost_reached"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved_model" + )] + public class UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved + : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved() { } + + public UnmanagedDeviceWarningsSaltoKsLockAccessCodeSupportRemoved( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "salto_ks_lock_access_code_support_removed"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsUnknownIssueWithPhone_model")] + public class UnmanagedDeviceWarningsUnknownIssueWithPhone : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsUnknownIssueWithPhone() { } + + public UnmanagedDeviceWarningsUnknownIssueWithPhone( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unknown_issue_with_phone"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsLocklyTimeZoneNotConfigured_model")] + public class UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured() { } + + public UnmanagedDeviceWarningsLocklyTimeZoneNotConfigured( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "lockly_time_zone_not_configured"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsUltraloqTimeZoneUnknown_model")] + public class UnmanagedDeviceWarningsUltraloqTimeZoneUnknown : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsUltraloqTimeZoneUnknown() { } + + public UnmanagedDeviceWarningsUltraloqTimeZoneUnknown( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "ultraloq_time_zone_unknown"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsTimeZoneUnknown_model")] + public class UnmanagedDeviceWarningsTimeZoneUnknown : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsTimeZoneUnknown() { } + + public UnmanagedDeviceWarningsTimeZoneUnknown( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "time_zone_unknown"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsTimeZoneMismatch_model")] + public class UnmanagedDeviceWarningsTimeZoneMismatch : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsTimeZoneMismatch() { } + + public UnmanagedDeviceWarningsTimeZoneMismatch( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "time_zone_mismatch"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsTwoNDeviceMissingTimezone_model")] + public class UnmanagedDeviceWarningsTwoNDeviceMissingTimezone : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsTwoNDeviceMissingTimezone() { } + + public UnmanagedDeviceWarningsTwoNDeviceMissingTimezone( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "two_n_device_missing_timezone"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedDeviceWarningsHubRequiredForAdditionalCapabilities_model" + )] + public class UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities + : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities() { } + + public UnmanagedDeviceWarningsHubRequiredForAdditionalCapabilities( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "hub_required_for_additional_capabilities"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsProviderIssue_model")] + public class UnmanagedDeviceWarningsProviderIssue : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsProviderIssue() { } + + public UnmanagedDeviceWarningsProviderIssue( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "provider_issue"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsKeynestUnsupportedLocker_model")] + public class UnmanagedDeviceWarningsKeynestUnsupportedLocker : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsKeynestUnsupportedLocker() { } + + public UnmanagedDeviceWarningsKeynestUnsupportedLocker( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "keynest_unsupported_locker"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsAccessoryKeypadSetupRequired_model")] + public class UnmanagedDeviceWarningsAccessoryKeypadSetupRequired : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsAccessoryKeypadSetupRequired() { } + + public UnmanagedDeviceWarningsAccessoryKeypadSetupRequired( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "accessory_keypad_setup_required"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsAccessoryKeypadLowBattery_model")] + public class UnmanagedDeviceWarningsAccessoryKeypadLowBattery : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsAccessoryKeypadLowBattery() { } + + public UnmanagedDeviceWarningsAccessoryKeypadLowBattery( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "accessory_keypad_low_battery"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsUnreliableOnlineStatus_model")] + public class UnmanagedDeviceWarningsUnreliableOnlineStatus : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsUnreliableOnlineStatus() { } + + public UnmanagedDeviceWarningsUnreliableOnlineStatus( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unreliable_online_status"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsMaxAccessCodesReached_model")] + public class UnmanagedDeviceWarningsMaxAccessCodesReached : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsMaxAccessCodesReached() { } + + public UnmanagedDeviceWarningsMaxAccessCodesReached( + int activeAccessCodeCount = default, + string createdAt = default, + int maxActiveAccessCodeCount = default, + string message = default, + string warningCode = default + ) + { + ActiveAccessCodeCount = activeAccessCodeCount; + CreatedAt = createdAt; + MaxActiveAccessCodeCount = maxActiveAccessCodeCount; + Message = message; + WarningCode = warningCode; + } + + /// + /// Number of active access codes on the device when the warning was set. + /// + [DataMember( + Name = "active_access_code_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int ActiveAccessCodeCount { get; set; } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Maximum number of active access codes supported by the device. + /// + [DataMember( + Name = "max_active_access_code_count", + IsRequired = false, + EmitDefaultValue = false + )] + public int MaxActiveAccessCodeCount { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "max_access_codes_reached"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceWarningsUnrecognized_model")] + public class UnmanagedDeviceWarningsUnrecognized : UnmanagedDeviceWarnings + { + [JsonConstructorAttribute] + protected UnmanagedDeviceWarningsUnrecognized() { } + + public UnmanagedDeviceWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set. + /// + [DataMember( + Name = "can_activate_weekly_program", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanActivateWeeklyProgram { get; set; } + + /// + /// Indicates whether the lock supports configuring automatic locking. + /// + [DataMember(Name = "can_configure_auto_lock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanConfigureAutoLock { get; set; } + + /// + /// Indicates whether the thermostat supports cooling. + /// + [DataMember(Name = "can_hvac_cool", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacCool { get; set; } + + /// + /// Indicates whether the thermostat supports heating. + /// + [DataMember(Name = "can_hvac_heat", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacHeat { get; set; } + + /// + /// Indicates whether the thermostat supports simultaneous heating and cooling. + /// + [DataMember(Name = "can_hvac_heat_cool", IsRequired = false, EmitDefaultValue = false)] + public bool? CanHvacHeatCool { get; set; } + + /// + /// Indicates whether the device supports programming offline access codes. + /// + [DataMember( + Name = "can_program_offline_access_codes", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramOfflineAccessCodes { get; set; } + + /// + /// Indicates whether the device supports programming online access codes. + /// + [DataMember( + Name = "can_program_online_access_codes", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramOnlineAccessCodes { get; set; } + + /// + /// Indicates whether the thermostat supports different climate programs for each day of the week. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_different_each_day", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsDifferentEachDay { get; set; } + + /// + /// Indicates whether the thermostat supports a single climate program applied to every day. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_same_each_day", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsSameEachDay { get; set; } + + /// + /// Indicates whether the thermostat supports weekday/weekend climate programs. + /// + [DataMember( + Name = "can_program_thermostat_programs_as_weekday_weekend", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanProgramThermostatProgramsAsWeekdayWeekend { get; set; } + + /// + /// Indicates whether the device supports remote locking. + /// + [DataMember(Name = "can_remotely_lock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanRemotelyLock { get; set; } + + /// + /// Indicates whether the device supports remote unlocking. + /// + [DataMember(Name = "can_remotely_unlock", IsRequired = false, EmitDefaultValue = false)] + public bool? CanRemotelyUnlock { get; set; } + + /// + /// Indicates whether the thermostat supports running climate programs. + /// + [DataMember( + Name = "can_run_thermostat_programs", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanRunThermostatPrograms { get; set; } + + /// + /// Indicates whether the device supports simulating connection in a sandbox. + /// + [DataMember(Name = "can_simulate_connection", IsRequired = false, EmitDefaultValue = false)] + public bool? CanSimulateConnection { get; set; } + + /// + /// Indicates whether the device supports simulating disconnection in a sandbox. + /// + [DataMember( + Name = "can_simulate_disconnection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateDisconnection { get; set; } + + /// + /// Indicates whether the hub supports simulating connection in a sandbox. + /// + [DataMember( + Name = "can_simulate_hub_connection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateHubConnection { get; set; } + + /// + /// Indicates whether the hub supports simulating disconnection in a sandbox. + /// + [DataMember( + Name = "can_simulate_hub_disconnection", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulateHubDisconnection { get; set; } + + /// + /// Indicates whether the device supports simulating a paid subscription in a sandbox. + /// + [DataMember( + Name = "can_simulate_paid_subscription", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanSimulatePaidSubscription { get; set; } + + /// + /// Indicates whether the device supports simulating removal in a sandbox. + /// + [DataMember(Name = "can_simulate_removal", IsRequired = false, EmitDefaultValue = false)] + public bool? CanSimulateRemoval { get; set; } + + /// + /// Indicates whether the camera supports streaming live video through a camera live view session. + /// + [DataMember(Name = "can_stream_live_video", IsRequired = false, EmitDefaultValue = false)] + public bool? CanStreamLiveVideo { get; set; } + + /// + /// Indicates whether the thermostat can be turned off. + /// + [DataMember(Name = "can_turn_off_hvac", IsRequired = false, EmitDefaultValue = false)] + public bool? CanTurnOffHvac { get; set; } + + /// + /// Indicates whether the lock supports unlocking with an access code. + /// + [DataMember(Name = "can_unlock_with_code", IsRequired = false, EmitDefaultValue = false)] + public bool? CanUnlockWithCode { get; set; } + + /// + /// Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags). + /// + [DataMember(Name = "capabilities_supported", IsRequired = false, EmitDefaultValue = false)] + public List CapabilitiesSupported { get; set; } + + /// + /// Unique identifier for the account associated with the device. + /// + [DataMember(Name = "connected_account_id", IsRequired = false, EmitDefaultValue = false)] + public string ConnectedAccountId { get; set; } + + /// + /// Date and time at which the device object was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://www.seam.co/docs/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://www.seam.co/docs/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://www.seam.co/docs/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. + /// + [DataMember(Name = "custom_metadata", IsRequired = false, EmitDefaultValue = false)] + public object CustomMetadata { get; set; } + + /// + /// ID of the device. + /// + [DataMember(Name = "device_id", IsRequired = false, EmitDefaultValue = false)] + public string DeviceId { get; set; } + + /// + /// Type of the device. + /// + [DataMember(Name = "device_type", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDevice.DeviceTypeEnum DeviceType { get; set; } + + /// + /// Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Indicates that Seam does not manage the device. + /// + [DataMember(Name = "is_managed", IsRequired = false, EmitDefaultValue = false)] + public bool IsManaged { get; set; } + + /// + /// Location information for the device. + /// + [DataMember(Name = "location", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDeviceLocation? Location { get; set; } + + /// + /// properties of the device. + /// + [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDeviceProperties Properties { get; set; } + + /// + /// Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// Unique identifier for the Seam workspace associated with the device. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceLocation_model")] + public class UnmanagedDeviceLocation + { + [JsonConstructorAttribute] + protected UnmanagedDeviceLocation() { } + + public UnmanagedDeviceLocation( + string? locationName = default, + string? roomName = default, + string? timeZone = default, + string? timezone = default + ) + { + LocationName = locationName; + RoomName = roomName; + TimeZone = timeZone; + Timezone = timezone; + } + + /// + /// Name of the device location. + /// + [DataMember(Name = "location_name", IsRequired = false, EmitDefaultValue = false)] + public string? LocationName { get; set; } + + /// + /// Name of the room within the device location, when the provider reports one. + /// + [DataMember(Name = "room_name", IsRequired = false, EmitDefaultValue = false)] + public string? RoomName { get; set; } + + /// + /// Time zone of the device location. + /// + [DataMember(Name = "time_zone", IsRequired = false, EmitDefaultValue = false)] + public string? TimeZone { get; set; } + + /// + /// Time zone of the device location. + /// + [Obsolete("Use `time_zone` instead.")] + [DataMember(Name = "timezone", IsRequired = false, EmitDefaultValue = false)] + public string? Timezone { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDeviceProperties_model")] + public class UnmanagedDeviceProperties + { + [JsonConstructorAttribute] + protected UnmanagedDeviceProperties() { } + + public UnmanagedDeviceProperties( + UnmanagedDevicePropertiesAccessoryKeypad? accessoryKeypad = default, + UnmanagedDevicePropertiesBattery? battery = default, + float? batteryLevel = default, + string? imageAltText = default, + string? imageUrl = default, + string? manufacturer = default, + UnmanagedDevicePropertiesModel model = default, + string name = default, + bool? offlineAccessCodesEnabled = default, + bool online = default, + bool? onlineAccessCodesEnabled = default + ) + { + AccessoryKeypad = accessoryKeypad; + Battery = battery; + BatteryLevel = batteryLevel; + ImageAltText = imageAltText; + ImageUrl = imageUrl; + Manufacturer = manufacturer; + Model = model; + Name = name; + OfflineAccessCodesEnabled = offlineAccessCodesEnabled; + Online = online; + OnlineAccessCodesEnabled = onlineAccessCodesEnabled; + } + + /// + /// Accessory keypad properties and state. + /// + [DataMember(Name = "accessory_keypad", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDevicePropertiesAccessoryKeypad? AccessoryKeypad { get; set; } + + /// + /// Represents the current status of the battery charge level. + /// + [DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDevicePropertiesBattery? Battery { get; set; } + + /// + /// Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. + /// + [DataMember(Name = "battery_level", IsRequired = false, EmitDefaultValue = false)] + public float? BatteryLevel { get; set; } + + /// + /// Alt text for the device image. + /// + [DataMember(Name = "image_alt_text", IsRequired = false, EmitDefaultValue = false)] + public string? ImageAltText { get; set; } + + /// + /// Image URL for the device. + /// + [DataMember(Name = "image_url", IsRequired = false, EmitDefaultValue = false)] + public string? ImageUrl { get; set; } + + /// + /// Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. + /// + [DataMember(Name = "manufacturer", IsRequired = false, EmitDefaultValue = false)] + public string? Manufacturer { get; set; } + + /// + /// Device model-related properties. + /// + [DataMember(Name = "model", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDevicePropertiesModel Model { get; set; } + + /// + /// Name of the device. + /// + [Obsolete("use device.display_name instead")] + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Indicates whether it is currently possible to use offline access codes for the device. + /// + [Obsolete("use device.can_program_offline_access_codes")] + [DataMember( + Name = "offline_access_codes_enabled", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OfflineAccessCodesEnabled { get; set; } + + /// + /// Indicates whether the device is online. + /// + [DataMember(Name = "online", IsRequired = false, EmitDefaultValue = false)] + public bool Online { get; set; } + + /// + /// Indicates whether it is currently possible to use online access codes for the device. + /// + [Obsolete("use device.can_program_online_access_codes")] + [DataMember( + Name = "online_access_codes_enabled", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OnlineAccessCodesEnabled { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDevicePropertiesAccessoryKeypad_model")] + public class UnmanagedDevicePropertiesAccessoryKeypad + { + [JsonConstructorAttribute] + protected UnmanagedDevicePropertiesAccessoryKeypad() { } + + public UnmanagedDevicePropertiesAccessoryKeypad( + UnmanagedDevicePropertiesAccessoryKeypadBattery? battery = default, + bool isConnected = default + ) + { + Battery = battery; + IsConnected = isConnected; + } + + /// + /// Keypad battery properties. + /// + [DataMember(Name = "battery", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDevicePropertiesAccessoryKeypadBattery? Battery { get; set; } + + /// + /// Indicates if an accessory keypad is connected to the device. + /// + [DataMember(Name = "is_connected", IsRequired = false, EmitDefaultValue = false)] + public bool IsConnected { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDevicePropertiesAccessoryKeypadBattery_model")] + public class UnmanagedDevicePropertiesAccessoryKeypadBattery + { + [JsonConstructorAttribute] + protected UnmanagedDevicePropertiesAccessoryKeypadBattery() { } + + public UnmanagedDevicePropertiesAccessoryKeypadBattery(float level = default) + { + Level = level; + } + + [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] + public float Level { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDevicePropertiesBattery_model")] + public class UnmanagedDevicePropertiesBattery + { + [JsonConstructorAttribute] + protected UnmanagedDevicePropertiesBattery() { } + + public UnmanagedDevicePropertiesBattery( + float level = default, + UnmanagedDevicePropertiesBattery.StatusEnum status = default + ) + { + Level = level; + Status = status; + } + + /// + /// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum StatusEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "critical")] + Critical = 1, + + [EnumMember(Value = "low")] + Low = 2, + + [EnumMember(Value = "good")] + Good = 3, + + [EnumMember(Value = "full")] + Full = 4, + } + + /// + /// Battery charge level as a value between 0 and 1, inclusive. + /// + [DataMember(Name = "level", IsRequired = false, EmitDefaultValue = false)] + public float Level { get; set; } + + /// + /// Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. + /// + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public UnmanagedDevicePropertiesBattery.StatusEnum Status { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedDevicePropertiesModel_model")] + public class UnmanagedDevicePropertiesModel + { + [JsonConstructorAttribute] + protected UnmanagedDevicePropertiesModel() { } + + public UnmanagedDevicePropertiesModel( + bool? accessoryKeypadSupported = default, + bool? canConnectAccessoryKeypad = default, + string displayName = default, + bool? hasBuiltInKeypad = default, + string manufacturerDisplayName = default, + bool? offlineAccessCodesSupported = default, + bool? onlineAccessCodesSupported = default + ) + { + AccessoryKeypadSupported = accessoryKeypadSupported; + CanConnectAccessoryKeypad = canConnectAccessoryKeypad; + DisplayName = displayName; + HasBuiltInKeypad = hasBuiltInKeypad; + ManufacturerDisplayName = manufacturerDisplayName; + OfflineAccessCodesSupported = offlineAccessCodesSupported; + OnlineAccessCodesSupported = onlineAccessCodesSupported; + } + + [Obsolete("use device.properties.model.can_connect_accessory_keypad")] + [DataMember( + Name = "accessory_keypad_supported", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? AccessoryKeypadSupported { get; set; } + + /// + /// Indicates whether the device can connect a accessory keypad. + /// + [DataMember( + Name = "can_connect_accessory_keypad", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? CanConnectAccessoryKeypad { get; set; } + + /// + /// Display name of the device model. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Indicates whether the device has a built in accessory keypad. + /// + [DataMember(Name = "has_built_in_keypad", IsRequired = false, EmitDefaultValue = false)] + public bool? HasBuiltInKeypad { get; set; } + + /// + /// Display name that corresponds to the manufacturer-specific terminology for the device. + /// + [DataMember( + Name = "manufacturer_display_name", + IsRequired = false, + EmitDefaultValue = false + )] + public string ManufacturerDisplayName { get; set; } + + [Obsolete("use device.can_program_offline_access_codes.")] + [DataMember( + Name = "offline_access_codes_supported", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OfflineAccessCodesSupported { get; set; } + + [Obsolete("use device.can_program_online_access_codes.")] + [DataMember( + Name = "online_access_codes_supported", + IsRequired = false, + EmitDefaultValue = false + )] + public bool? OnlineAccessCodesSupported { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/UnmanagedUserIdentity.cs b/src/Seam/Model/UnmanagedUserIdentity.cs index 1d184dcc..4bada5ab 100644 --- a/src/Seam/Model/UnmanagedUserIdentity.cs +++ b/src/Seam/Model/UnmanagedUserIdentity.cs @@ -8,422 +8,479 @@ namespace Seam.Model { -/// -/// Represents an unmanaged user identity. Unmanaged user identities do not have keys. -/// -[DataContract(Name = "seamModel_unmanagedUserIdentity_model")] -public class UnmanagedUserIdentity -{ -[JsonConstructorAttribute] -protected UnmanagedUserIdentity() { } - -public UnmanagedUserIdentity(List acsUserIds = default, string createdAt = default, string displayName = default, string? emailAddress = default, List errors = default, string? fullName = default, List mergedUserIdentityIds = default, List mergedUserIdentityKeys = default, string? phoneNumber = default, string userIdentityId = default, List warnings = default, string workspaceId = default) -{ -AcsUserIds = acsUserIds; -CreatedAt = createdAt; -DisplayName = displayName; -EmailAddress = emailAddress; -Errors = errors; -FullName = fullName; -MergedUserIdentityIds = mergedUserIdentityIds; -MergedUserIdentityKeys = mergedUserIdentityKeys; -PhoneNumber = phoneNumber; -UserIdentityId = userIdentityId; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedUserIdentityErrorsIssueWithAcsUser), "issue_with_acs_user")] -public abstract class UnmanagedUserIdentityErrors -{ -public abstract string ErrorCode { get; } - -public abstract string AcsSystemId { get; set; } - -public abstract string AcsUserId { get; set; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedUserIdentityErrorsIssueWithAcsUser_model")] -public class UnmanagedUserIdentityErrorsIssueWithAcsUser : UnmanagedUserIdentityErrors -{ -[JsonConstructorAttribute] -protected UnmanagedUserIdentityErrorsIssueWithAcsUser() { } - -public UnmanagedUserIdentityErrorsIssueWithAcsUser(string acsSystemId = default, string acsUserId = default, string createdAt = default, string errorCode = default, string message = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// ID of the access system that the user identity is associated with. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public override string AcsSystemId { get; set; } - -/// -/// ID of the access system user that has an issue. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public override string AcsUserId { get; set; } - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "issue_with_acs_user"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedUserIdentityErrorsUnrecognized_model")] -public class UnmanagedUserIdentityErrorsUnrecognized : UnmanagedUserIdentityErrors -{ -[JsonConstructorAttribute] -protected UnmanagedUserIdentityErrorsUnrecognized() { } - -public UnmanagedUserIdentityErrorsUnrecognized(string errorCode = default, string acsSystemId = default, string acsUserId = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// ID of the access system that the user identity is associated with. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public override string AcsSystemId { get; set; } - -/// -/// ID of the access system user that has an issue. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public override string AcsUserId { get; set; } - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), "acs_user_profile_does_not_match_user_identity")] -[JsonSubtypes.KnownSubType(typeof(UnmanagedUserIdentityWarningsBeingDeleted), "being_deleted")] -public abstract class UnmanagedUserIdentityWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_unmanagedUserIdentityWarningsBeingDeleted_model")] -public class UnmanagedUserIdentityWarningsBeingDeleted : UnmanagedUserIdentityWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedUserIdentityWarningsBeingDeleted() { } - -public UnmanagedUserIdentityWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model")] -public class UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity : UnmanagedUserIdentityWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } - -public UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "acs_user_profile_does_not_match_user_identity"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_unmanagedUserIdentityWarningsUnrecognized_model")] -public class UnmanagedUserIdentityWarningsUnrecognized : UnmanagedUserIdentityWarnings -{ -[JsonConstructorAttribute] -protected UnmanagedUserIdentityWarningsUnrecognized() { } - -public UnmanagedUserIdentityWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Array of access system user IDs associated with the user identity. -/// -[DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] -public List AcsUserIds { get; set; } - -/// -/// Date and time at which the user identity was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name for the user identity. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Unique email address for the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Full name of the user associated with the user identity. -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. -/// -[DataMember(Name = "merged_user_identity_ids", IsRequired = false, EmitDefaultValue = false)] -public List MergedUserIdentityIds { get; set; } - -/// -/// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. -/// -[DataMember(Name = "merged_user_identity_keys", IsRequired = false, EmitDefaultValue = false)] -public List MergedUserIdentityKeys { get; set; } - -/// -/// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// ID of the user identity. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -/// -/// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the user identity. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents an unmanaged user identity. Unmanaged user identities do not have keys. + /// + [DataContract(Name = "seamModel_unmanagedUserIdentity_model")] + public class UnmanagedUserIdentity + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentity() { } + + public UnmanagedUserIdentity( + List acsUserIds = default, + string createdAt = default, + string displayName = default, + string? emailAddress = default, + List errors = default, + string? fullName = default, + List mergedUserIdentityIds = default, + List mergedUserIdentityKeys = default, + string? phoneNumber = default, + string userIdentityId = default, + List warnings = default, + string workspaceId = default + ) + { + AcsUserIds = acsUserIds; + CreatedAt = createdAt; + DisplayName = displayName; + EmailAddress = emailAddress; + Errors = errors; + FullName = fullName; + MergedUserIdentityIds = mergedUserIdentityIds; + MergedUserIdentityKeys = mergedUserIdentityKeys; + PhoneNumber = phoneNumber; + UserIdentityId = userIdentityId; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedUserIdentityErrorsIssueWithAcsUser), + "issue_with_acs_user" + )] + public abstract class UnmanagedUserIdentityErrors + { + public abstract string ErrorCode { get; } + + public abstract string AcsSystemId { get; set; } + + public abstract string AcsUserId { get; set; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedUserIdentityErrorsIssueWithAcsUser_model")] + public class UnmanagedUserIdentityErrorsIssueWithAcsUser : UnmanagedUserIdentityErrors + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityErrorsIssueWithAcsUser() { } + + public UnmanagedUserIdentityErrorsIssueWithAcsUser( + string acsSystemId = default, + string acsUserId = default, + string createdAt = default, + string errorCode = default, + string message = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// ID of the access system that the user identity is associated with. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsSystemId { get; set; } + + /// + /// ID of the access system user that has an issue. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsUserId { get; set; } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "issue_with_acs_user"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedUserIdentityErrorsUnrecognized_model")] + public class UnmanagedUserIdentityErrorsUnrecognized : UnmanagedUserIdentityErrors + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityErrorsUnrecognized() { } + + public UnmanagedUserIdentityErrorsUnrecognized( + string errorCode = default, + string acsSystemId = default, + string acsUserId = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// ID of the access system that the user identity is associated with. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsSystemId { get; set; } + + /// + /// ID of the access system user that has an issue. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsUserId { get; set; } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UnmanagedUserIdentityWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), + "acs_user_profile_does_not_match_user_identity" + )] + [JsonSubtypes.KnownSubType( + typeof(UnmanagedUserIdentityWarningsBeingDeleted), + "being_deleted" + )] + public abstract class UnmanagedUserIdentityWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_unmanagedUserIdentityWarningsBeingDeleted_model")] + public class UnmanagedUserIdentityWarningsBeingDeleted : UnmanagedUserIdentityWarnings + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityWarningsBeingDeleted() { } + + public UnmanagedUserIdentityWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_unmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model" + )] + public class UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity + : UnmanagedUserIdentityWarnings + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } + + public UnmanagedUserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "acs_user_profile_does_not_match_user_identity"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_unmanagedUserIdentityWarningsUnrecognized_model")] + public class UnmanagedUserIdentityWarningsUnrecognized : UnmanagedUserIdentityWarnings + { + [JsonConstructorAttribute] + protected UnmanagedUserIdentityWarningsUnrecognized() { } + + public UnmanagedUserIdentityWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Array of access system user IDs associated with the user identity. + /// + [DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] + public List AcsUserIds { get; set; } + + /// + /// Date and time at which the user identity was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name for the user identity. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Unique email address for the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Full name of the user associated with the user identity. + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. + /// + [DataMember( + Name = "merged_user_identity_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List MergedUserIdentityIds { get; set; } + + /// + /// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. + /// + [DataMember( + Name = "merged_user_identity_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List MergedUserIdentityKeys { get; set; } + + /// + /// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// ID of the user identity. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + /// + /// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the user identity. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/UserIdentity.cs b/src/Seam/Model/UserIdentity.cs index 7e435fe4..9d3dafbf 100644 --- a/src/Seam/Model/UserIdentity.cs +++ b/src/Seam/Model/UserIdentity.cs @@ -8,429 +8,484 @@ namespace Seam.Model { -/// -/// Represents a [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. -/// -[DataContract(Name = "seamModel_userIdentity_model")] -public class UserIdentity -{ -[JsonConstructorAttribute] -protected UserIdentity() { } - -public UserIdentity(List acsUserIds = default, string createdAt = default, string displayName = default, string? emailAddress = default, List errors = default, string? fullName = default, List mergedUserIdentityIds = default, List mergedUserIdentityKeys = default, string? phoneNumber = default, string userIdentityId = default, string? userIdentityKey = default, List warnings = default, string workspaceId = default) -{ -AcsUserIds = acsUserIds; -CreatedAt = createdAt; -DisplayName = displayName; -EmailAddress = emailAddress; -Errors = errors; -FullName = fullName; -MergedUserIdentityIds = mergedUserIdentityIds; -MergedUserIdentityKeys = mergedUserIdentityKeys; -PhoneNumber = phoneNumber; -UserIdentityId = userIdentityId; -UserIdentityKey = userIdentityKey; -Warnings = warnings; -WorkspaceId = workspaceId; -} - -[JsonConverter(typeof(JsonSubtypes), "error_code")] -[JsonSubtypes.FallBackSubType(typeof(UserIdentityErrorsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UserIdentityErrorsIssueWithAcsUser), "issue_with_acs_user")] -public abstract class UserIdentityErrors -{ -public abstract string ErrorCode { get; } - -public abstract string AcsSystemId { get; set; } - -public abstract string AcsUserId { get; set; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_userIdentityErrorsIssueWithAcsUser_model")] -public class UserIdentityErrorsIssueWithAcsUser : UserIdentityErrors -{ -[JsonConstructorAttribute] -protected UserIdentityErrorsIssueWithAcsUser() { } - -public UserIdentityErrorsIssueWithAcsUser(string acsSystemId = default, string acsUserId = default, string createdAt = default, string errorCode = default, string message = default) -{ -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -CreatedAt = createdAt; -ErrorCode = errorCode; -Message = message; -} - -/// -/// ID of the access system that the user identity is associated with. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public override string AcsSystemId { get; set; } - -/// -/// ID of the access system user that has an issue. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public override string AcsUserId { get; set; } - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "issue_with_acs_user"; - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_userIdentityErrorsUnrecognized_model")] -public class UserIdentityErrorsUnrecognized : UserIdentityErrors -{ -[JsonConstructorAttribute] -protected UserIdentityErrorsUnrecognized() { } - -public UserIdentityErrorsUnrecognized(string errorCode = default, string acsSystemId = default, string acsUserId = default, string createdAt = default, string message = default) -{ -ErrorCode = errorCode; -AcsSystemId = acsSystemId; -AcsUserId = acsUserId; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] -public override string ErrorCode { get; } = "unrecognized"; - -/// -/// ID of the access system that the user identity is associated with. -/// -[DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] -public override string AcsSystemId { get; set; } - -/// -/// ID of the access system user that has an issue. -/// -[DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] -public override string AcsUserId { get; set; } - -/// -/// Date and time at which Seam created the error. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[JsonConverter(typeof(JsonSubtypes), "warning_code")] -[JsonSubtypes.FallBackSubType(typeof(UserIdentityWarningsUnrecognized))] -[JsonSubtypes.KnownSubType(typeof(UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), "acs_user_profile_does_not_match_user_identity")] -[JsonSubtypes.KnownSubType(typeof(UserIdentityWarningsBeingDeleted), "being_deleted")] -public abstract class UserIdentityWarnings -{ -public abstract string WarningCode { get; } - -public abstract string CreatedAt { get; set; } - -public abstract string Message { get; set; } - -public abstract override string ToString(); -} - -[DataContract(Name = "seamModel_userIdentityWarningsBeingDeleted_model")] -public class UserIdentityWarningsBeingDeleted : UserIdentityWarnings -{ -[JsonConstructorAttribute] -protected UserIdentityWarningsBeingDeleted() { } - -public UserIdentityWarningsBeingDeleted(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "being_deleted"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_userIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model")] -public class UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity : UserIdentityWarnings -{ -[JsonConstructorAttribute] -protected UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } - -public UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity(string createdAt = default, string message = default, string warningCode = default) -{ -CreatedAt = createdAt; -Message = message; -WarningCode = warningCode; -} - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "acs_user_profile_does_not_match_user_identity"; - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_userIdentityWarningsUnrecognized_model")] -public class UserIdentityWarningsUnrecognized : UserIdentityWarnings -{ -[JsonConstructorAttribute] -protected UserIdentityWarningsUnrecognized() { } - -public UserIdentityWarningsUnrecognized(string warningCode = default, string createdAt = default, string message = default) -{ -WarningCode = warningCode; -CreatedAt = createdAt; -Message = message; -} - -[DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] -public override string WarningCode { get; } = "unrecognized"; - -/// -/// Date and time at which Seam created the warning. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public override string CreatedAt { get; set; } - -/// -/// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] -public override string Message { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -/// -/// Array of access system user IDs associated with the user identity. -/// -[DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] -public List AcsUserIds { get; set; } - -/// -/// Date and time at which the user identity was created. -/// -[DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] -public string CreatedAt { get; set; } - -/// -/// Display name for the user identity. -/// -[DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] -public string DisplayName { get; set; } - -/// -/// Unique email address for the user identity. -/// -[DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] -public string? EmailAddress { get; set; } - -/// -/// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] -public List Errors { get; set; } - -/// -/// Full name of the user associated with the user identity. -/// -[DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] -public string? FullName { get; set; } - -/// -/// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. -/// -[DataMember(Name = "merged_user_identity_ids", IsRequired = false, EmitDefaultValue = false)] -public List MergedUserIdentityIds { get; set; } - -/// -/// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. -/// -[DataMember(Name = "merged_user_identity_keys", IsRequired = false, EmitDefaultValue = false)] -public List MergedUserIdentityKeys { get; set; } - -/// -/// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). -/// -[DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] -public string? PhoneNumber { get; set; } - -/// -/// ID of the user identity. -/// -[DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] -public string UserIdentityId { get; set; } - -/// -/// Unique key for the user identity. -/// -[DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] -public string? UserIdentityKey { get; set; } - -/// -/// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. -/// -[DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] -public List Warnings { get; set; } - -/// -/// ID of the workspace that contains the user identity. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. + /// + [DataContract(Name = "seamModel_userIdentity_model")] + public class UserIdentity + { + [JsonConstructorAttribute] + protected UserIdentity() { } + + public UserIdentity( + List acsUserIds = default, + string createdAt = default, + string displayName = default, + string? emailAddress = default, + List errors = default, + string? fullName = default, + List mergedUserIdentityIds = default, + List mergedUserIdentityKeys = default, + string? phoneNumber = default, + string userIdentityId = default, + string? userIdentityKey = default, + List warnings = default, + string workspaceId = default + ) + { + AcsUserIds = acsUserIds; + CreatedAt = createdAt; + DisplayName = displayName; + EmailAddress = emailAddress; + Errors = errors; + FullName = fullName; + MergedUserIdentityIds = mergedUserIdentityIds; + MergedUserIdentityKeys = mergedUserIdentityKeys; + PhoneNumber = phoneNumber; + UserIdentityId = userIdentityId; + UserIdentityKey = userIdentityKey; + Warnings = warnings; + WorkspaceId = workspaceId; + } + + [JsonConverter(typeof(JsonSubtypes), "error_code")] + [JsonSubtypes.FallBackSubType(typeof(UserIdentityErrorsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UserIdentityErrorsIssueWithAcsUser), + "issue_with_acs_user" + )] + public abstract class UserIdentityErrors + { + public abstract string ErrorCode { get; } + + public abstract string AcsSystemId { get; set; } + + public abstract string AcsUserId { get; set; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_userIdentityErrorsIssueWithAcsUser_model")] + public class UserIdentityErrorsIssueWithAcsUser : UserIdentityErrors + { + [JsonConstructorAttribute] + protected UserIdentityErrorsIssueWithAcsUser() { } + + public UserIdentityErrorsIssueWithAcsUser( + string acsSystemId = default, + string acsUserId = default, + string createdAt = default, + string errorCode = default, + string message = default + ) + { + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + CreatedAt = createdAt; + ErrorCode = errorCode; + Message = message; + } + + /// + /// ID of the access system that the user identity is associated with. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsSystemId { get; set; } + + /// + /// ID of the access system user that has an issue. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsUserId { get; set; } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "issue_with_acs_user"; + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_userIdentityErrorsUnrecognized_model")] + public class UserIdentityErrorsUnrecognized : UserIdentityErrors + { + [JsonConstructorAttribute] + protected UserIdentityErrorsUnrecognized() { } + + public UserIdentityErrorsUnrecognized( + string errorCode = default, + string acsSystemId = default, + string acsUserId = default, + string createdAt = default, + string message = default + ) + { + ErrorCode = errorCode; + AcsSystemId = acsSystemId; + AcsUserId = acsUserId; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "error_code", IsRequired = true, EmitDefaultValue = false)] + public override string ErrorCode { get; } = "unrecognized"; + + /// + /// ID of the access system that the user identity is associated with. + /// + [DataMember(Name = "acs_system_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsSystemId { get; set; } + + /// + /// ID of the access system user that has an issue. + /// + [DataMember(Name = "acs_user_id", IsRequired = false, EmitDefaultValue = false)] + public override string AcsUserId { get; set; } + + /// + /// Date and time at which Seam created the error. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [JsonConverter(typeof(JsonSubtypes), "warning_code")] + [JsonSubtypes.FallBackSubType(typeof(UserIdentityWarningsUnrecognized))] + [JsonSubtypes.KnownSubType( + typeof(UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity), + "acs_user_profile_does_not_match_user_identity" + )] + [JsonSubtypes.KnownSubType(typeof(UserIdentityWarningsBeingDeleted), "being_deleted")] + public abstract class UserIdentityWarnings + { + public abstract string WarningCode { get; } + + public abstract string CreatedAt { get; set; } + + public abstract string Message { get; set; } + + public abstract override string ToString(); + } + + [DataContract(Name = "seamModel_userIdentityWarningsBeingDeleted_model")] + public class UserIdentityWarningsBeingDeleted : UserIdentityWarnings + { + [JsonConstructorAttribute] + protected UserIdentityWarningsBeingDeleted() { } + + public UserIdentityWarningsBeingDeleted( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "being_deleted"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract( + Name = "seamModel_userIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity_model" + )] + public class UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity + : UserIdentityWarnings + { + [JsonConstructorAttribute] + protected UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity() { } + + public UserIdentityWarningsAcsUserProfileDoesNotMatchUserIdentity( + string createdAt = default, + string message = default, + string warningCode = default + ) + { + CreatedAt = createdAt; + Message = message; + WarningCode = warningCode; + } + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = + "acs_user_profile_does_not_match_user_identity"; + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_userIdentityWarningsUnrecognized_model")] + public class UserIdentityWarningsUnrecognized : UserIdentityWarnings + { + [JsonConstructorAttribute] + protected UserIdentityWarningsUnrecognized() { } + + public UserIdentityWarningsUnrecognized( + string warningCode = default, + string createdAt = default, + string message = default + ) + { + WarningCode = warningCode; + CreatedAt = createdAt; + Message = message; + } + + [DataMember(Name = "warning_code", IsRequired = true, EmitDefaultValue = false)] + public override string WarningCode { get; } = "unrecognized"; + + /// + /// Date and time at which Seam created the warning. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public override string CreatedAt { get; set; } + + /// + /// Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public override string Message { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + /// + /// Array of access system user IDs associated with the user identity. + /// + [DataMember(Name = "acs_user_ids", IsRequired = false, EmitDefaultValue = false)] + public List AcsUserIds { get; set; } + + /// + /// Date and time at which the user identity was created. + /// + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + /// + /// Display name for the user identity. + /// + [DataMember(Name = "display_name", IsRequired = false, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// Unique email address for the user identity. + /// + [DataMember(Name = "email_address", IsRequired = false, EmitDefaultValue = false)] + public string? EmailAddress { get; set; } + + /// + /// Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "errors", IsRequired = false, EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Full name of the user associated with the user identity. + /// + [DataMember(Name = "full_name", IsRequired = false, EmitDefaultValue = false)] + public string? FullName { get; set; } + + /// + /// IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. + /// + [DataMember( + Name = "merged_user_identity_ids", + IsRequired = false, + EmitDefaultValue = false + )] + public List MergedUserIdentityIds { get; set; } + + /// + /// Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity. + /// + [DataMember( + Name = "merged_user_identity_keys", + IsRequired = false, + EmitDefaultValue = false + )] + public List MergedUserIdentityKeys { get; set; } + + /// + /// Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). + /// + [DataMember(Name = "phone_number", IsRequired = false, EmitDefaultValue = false)] + public string? PhoneNumber { get; set; } + + /// + /// ID of the user identity. + /// + [DataMember(Name = "user_identity_id", IsRequired = false, EmitDefaultValue = false)] + public string UserIdentityId { get; set; } + + /// + /// Unique key for the user identity. + /// + [DataMember(Name = "user_identity_key", IsRequired = false, EmitDefaultValue = false)] + public string? UserIdentityKey { get; set; } + + /// + /// Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + /// + [DataMember(Name = "warnings", IsRequired = false, EmitDefaultValue = false)] + public List Warnings { get; set; } + + /// + /// ID of the workspace that contains the user identity. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/Webhook.cs b/src/Seam/Model/Webhook.cs index 878a3a1e..0590ca5b 100644 --- a/src/Seam/Model/Webhook.cs +++ b/src/Seam/Model/Webhook.cs @@ -8,65 +8,69 @@ namespace Seam.Model { -/// -/// Represents a [webhook](https://www.seam.co/docs/developer-tools/webhooks) that enables you to receive notifications of events. When you create a webhook, specify the endpoint URL at which you want to receive events and the set of event types that you want to receive. -/// -[DataContract(Name = "seamModel_webhook_model")] -public class Webhook -{ -[JsonConstructorAttribute] -protected Webhook() { } + /// + /// Represents a [webhook](https://www.seam.co/docs/developer-tools/webhooks) that enables you to receive notifications of events. When you create a webhook, specify the endpoint URL at which you want to receive events and the set of event types that you want to receive. + /// + [DataContract(Name = "seamModel_webhook_model")] + public class Webhook + { + [JsonConstructorAttribute] + protected Webhook() { } -public Webhook(List? eventTypes = default, string? secret = default, string url = default, string webhookId = default) -{ -EventTypes = eventTypes; -Secret = secret; -Url = url; -WebhookId = webhookId; -} + public Webhook( + List? eventTypes = default, + string? secret = default, + string url = default, + string webhookId = default + ) + { + EventTypes = eventTypes; + Secret = secret; + Url = url; + WebhookId = webhookId; + } -/// -/// Types of events that the [webhook](https://www.seam.co/docs/developer-tools/webhooks) should receive. -/// -[DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] -public List? EventTypes { get; set; } + /// + /// Types of events that the [webhook](https://www.seam.co/docs/developer-tools/webhooks) should receive. + /// + [DataMember(Name = "event_types", IsRequired = false, EmitDefaultValue = false)] + public List? EventTypes { get; set; } -/// -/// Secret associated with the [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -[DataMember(Name = "secret", IsRequired = false, EmitDefaultValue = false)] -public string? Secret { get; set; } + /// + /// Secret associated with the [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + [DataMember(Name = "secret", IsRequired = false, EmitDefaultValue = false)] + public string? Secret { get; set; } -/// -/// URL for the [webhook](https://www.seam.co/docs/developer-tools/webhooks). -/// -[DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] -public string Url { get; set; } + /// + /// URL for the [webhook](https://www.seam.co/docs/developer-tools/webhooks). + /// + [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] + public string Url { get; set; } -/// -/// ID of the webhook. -/// -[DataMember(Name = "webhook_id", IsRequired = false, EmitDefaultValue = false)] -public string WebhookId { get; set; } + /// + /// ID of the webhook. + /// + [DataMember(Name = "webhook_id", IsRequired = false, EmitDefaultValue = false)] + public string WebhookId { get; set; } -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + return stringWriter.ToString(); + } + } } diff --git a/src/Seam/Model/Workspace.cs b/src/Seam/Model/Workspace.cs index 17af08d8..01320b21 100644 --- a/src/Seam/Model/Workspace.cs +++ b/src/Seam/Model/Workspace.cs @@ -8,186 +8,214 @@ namespace Seam.Model { -/// -/// Represents a Seam [workspace](https://www.seam.co/docs/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://www.seam.co/docs/core-concepts/workspaces#production-workspaces). -/// -[DataContract(Name = "seamModel_workspace_model")] -public class Workspace -{ -[JsonConstructorAttribute] -protected Workspace() { } - -public Workspace(string companyName = default, string? connectPartnerName = default, WorkspaceConnectWebviewCustomization connectWebviewCustomization = default, bool isPublishableKeyAuthEnabled = default, bool isSandbox = default, bool isSuspended = default, string name = default, string? organizationId = default, string? publishableKey = default, string workspaceId = default) -{ -CompanyName = companyName; -ConnectPartnerName = connectPartnerName; -ConnectWebviewCustomization = connectWebviewCustomization; -IsPublishableKeyAuthEnabled = isPublishableKeyAuthEnabled; -IsSandbox = isSandbox; -IsSuspended = isSuspended; -Name = name; -OrganizationId = organizationId; -PublishableKey = publishableKey; -WorkspaceId = workspaceId; -} - -/// -/// Company name associated with the [workspace](https://www.seam.co/docs/core-concepts/workspaces). -/// -[Obsolete("Use `connect_partner_name` instead.")] -[DataMember(Name = "company_name", IsRequired = false, EmitDefaultValue = false)] -public string CompanyName { get; set; } - -/// -/// Seam Connect partner name associated with the [workspace](https://www.seam.co/docs/core-concepts/workspaces). -/// -[DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] -public string? ConnectPartnerName { get; set; } - -[DataMember(Name = "connect_webview_customization", IsRequired = false, EmitDefaultValue = false)] -public WorkspaceConnectWebviewCustomization ConnectWebviewCustomization { get; set; } - -/// -/// Indicates whether publishable key authentication is enabled for this workspace. -/// -[DataMember(Name = "is_publishable_key_auth_enabled", IsRequired = false, EmitDefaultValue = false)] -public bool IsPublishableKeyAuthEnabled { get; set; } - -/// -/// Indicates whether the workspace is a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). -/// -[DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] -public bool IsSandbox { get; set; } - -/// -/// Indicates whether the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is suspended. Seam suspends sandbox workspaces that have not been accessed in 14 days. -/// -[DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] -public bool IsSuspended { get; set; } - -/// -/// Name of the [workspace](https://www.seam.co/docs/core-concepts/workspaces). -/// -[DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] -public string Name { get; set; } - -/// -/// ID of the organization to which the workspace belongs, or `null` if the workspace is not assigned to an organization. -/// -[DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] -public string? OrganizationId { get; set; } - -/// -/// Publishable key for the [workspace](https://www.seam.co/docs/core-concepts/workspaces). This key is used to identify the workspace in client-side applications. -/// -[DataMember(Name = "publishable_key", IsRequired = false, EmitDefaultValue = false)] -public string? PublishableKey { get; set; } - -/// -/// ID of the workspace. -/// -[DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] -public string WorkspaceId { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - -[DataContract(Name = "seamModel_workspaceConnectWebviewCustomization_model")] -public class WorkspaceConnectWebviewCustomization -{ -[JsonConstructorAttribute] -protected WorkspaceConnectWebviewCustomization() { } - -public WorkspaceConnectWebviewCustomization(string? inviterLogoUrl = default, WorkspaceConnectWebviewCustomization.LogoShapeEnum? logoShape = default, string? primaryButtonColor = default, string? primaryButtonTextColor = default, string? successMessage = default) -{ -InviterLogoUrl = inviterLogoUrl; -LogoShape = logoShape; -PrimaryButtonColor = primaryButtonColor; -PrimaryButtonTextColor = primaryButtonTextColor; -SuccessMessage = successMessage; -} - -/// -/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[JsonConverter(typeof(SafeStringEnumConverter))] -public enum LogoShapeEnum -{ -[EnumMember(Value = "unrecognized")] -Unrecognized = 0, - -[EnumMember(Value = "circle")] -Circle = 1, - -[EnumMember(Value = "square")] -Square = 2, -} - -/// -/// URL of the inviter logo for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "inviter_logo_url", IsRequired = false, EmitDefaultValue = false)] -public string? InviterLogoUrl { get; set; } - -/// -/// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] -public WorkspaceConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } - -/// -/// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] -public string? PrimaryButtonColor { get; set; } - -/// -/// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "primary_button_text_color", IsRequired = false, EmitDefaultValue = false)] -public string? PrimaryButtonTextColor { get; set; } - -/// -/// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). -/// -[DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] -public string? SuccessMessage { get; set; } - -public override string ToString() -{ -JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); - -StringWriter stringWriter = new StringWriter( -new StringBuilder(256), -System.Globalization.CultureInfo.InvariantCulture -); -using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) -{ -jsonTextWriter.IndentChar = ' '; -jsonTextWriter.Indentation = 2; -jsonTextWriter.Formatting = Formatting.Indented; -jsonSerializer.Serialize(jsonTextWriter, this, null); -} - -return stringWriter.ToString(); -} -} - + /// + /// Represents a Seam [workspace](https://www.seam.co/docs/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://www.seam.co/docs/core-concepts/workspaces#production-workspaces). + /// + [DataContract(Name = "seamModel_workspace_model")] + public class Workspace + { + [JsonConstructorAttribute] + protected Workspace() { } + + public Workspace( + string companyName = default, + string? connectPartnerName = default, + WorkspaceConnectWebviewCustomization connectWebviewCustomization = default, + bool isPublishableKeyAuthEnabled = default, + bool isSandbox = default, + bool isSuspended = default, + string name = default, + string? organizationId = default, + string? publishableKey = default, + string workspaceId = default + ) + { + CompanyName = companyName; + ConnectPartnerName = connectPartnerName; + ConnectWebviewCustomization = connectWebviewCustomization; + IsPublishableKeyAuthEnabled = isPublishableKeyAuthEnabled; + IsSandbox = isSandbox; + IsSuspended = isSuspended; + Name = name; + OrganizationId = organizationId; + PublishableKey = publishableKey; + WorkspaceId = workspaceId; + } + + /// + /// Company name associated with the [workspace](https://www.seam.co/docs/core-concepts/workspaces). + /// + [Obsolete("Use `connect_partner_name` instead.")] + [DataMember(Name = "company_name", IsRequired = false, EmitDefaultValue = false)] + public string CompanyName { get; set; } + + /// + /// Seam Connect partner name associated with the [workspace](https://www.seam.co/docs/core-concepts/workspaces). + /// + [DataMember(Name = "connect_partner_name", IsRequired = false, EmitDefaultValue = false)] + public string? ConnectPartnerName { get; set; } + + [DataMember( + Name = "connect_webview_customization", + IsRequired = false, + EmitDefaultValue = false + )] + public WorkspaceConnectWebviewCustomization ConnectWebviewCustomization { get; set; } + + /// + /// Indicates whether publishable key authentication is enabled for this workspace. + /// + [DataMember( + Name = "is_publishable_key_auth_enabled", + IsRequired = false, + EmitDefaultValue = false + )] + public bool IsPublishableKeyAuthEnabled { get; set; } + + /// + /// Indicates whether the workspace is a [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces). + /// + [DataMember(Name = "is_sandbox", IsRequired = false, EmitDefaultValue = false)] + public bool IsSandbox { get; set; } + + /// + /// Indicates whether the [sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces#sandbox-workspaces) is suspended. Seam suspends sandbox workspaces that have not been accessed in 14 days. + /// + [DataMember(Name = "is_suspended", IsRequired = false, EmitDefaultValue = false)] + public bool IsSuspended { get; set; } + + /// + /// Name of the [workspace](https://www.seam.co/docs/core-concepts/workspaces). + /// + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// ID of the organization to which the workspace belongs, or `null` if the workspace is not assigned to an organization. + /// + [DataMember(Name = "organization_id", IsRequired = false, EmitDefaultValue = false)] + public string? OrganizationId { get; set; } + + /// + /// Publishable key for the [workspace](https://www.seam.co/docs/core-concepts/workspaces). This key is used to identify the workspace in client-side applications. + /// + [DataMember(Name = "publishable_key", IsRequired = false, EmitDefaultValue = false)] + public string? PublishableKey { get; set; } + + /// + /// ID of the workspace. + /// + [DataMember(Name = "workspace_id", IsRequired = false, EmitDefaultValue = false)] + public string WorkspaceId { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } + + [DataContract(Name = "seamModel_workspaceConnectWebviewCustomization_model")] + public class WorkspaceConnectWebviewCustomization + { + [JsonConstructorAttribute] + protected WorkspaceConnectWebviewCustomization() { } + + public WorkspaceConnectWebviewCustomization( + string? inviterLogoUrl = default, + WorkspaceConnectWebviewCustomization.LogoShapeEnum? logoShape = default, + string? primaryButtonColor = default, + string? primaryButtonTextColor = default, + string? successMessage = default + ) + { + InviterLogoUrl = inviterLogoUrl; + LogoShape = logoShape; + PrimaryButtonColor = primaryButtonColor; + PrimaryButtonTextColor = primaryButtonTextColor; + SuccessMessage = successMessage; + } + + /// + /// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [JsonConverter(typeof(SafeStringEnumConverter))] + public enum LogoShapeEnum + { + [EnumMember(Value = "unrecognized")] + Unrecognized = 0, + + [EnumMember(Value = "circle")] + Circle = 1, + + [EnumMember(Value = "square")] + Square = 2, + } + + /// + /// URL of the inviter logo for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember(Name = "inviter_logo_url", IsRequired = false, EmitDefaultValue = false)] + public string? InviterLogoUrl { get; set; } + + /// + /// Logo shape for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember(Name = "logo_shape", IsRequired = false, EmitDefaultValue = false)] + public WorkspaceConnectWebviewCustomization.LogoShapeEnum? LogoShape { get; set; } + + /// + /// Primary button color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember(Name = "primary_button_color", IsRequired = false, EmitDefaultValue = false)] + public string? PrimaryButtonColor { get; set; } + + /// + /// Primary button text color for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember( + Name = "primary_button_text_color", + IsRequired = false, + EmitDefaultValue = false + )] + public string? PrimaryButtonTextColor { get; set; } + + /// + /// Success message for [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + /// + [DataMember(Name = "success_message", IsRequired = false, EmitDefaultValue = false)] + public string? SuccessMessage { get; set; } + + public override string ToString() + { + JsonSerializer jsonSerializer = JsonSerializer.CreateDefault(null); + + StringWriter stringWriter = new StringWriter( + new StringBuilder(256), + System.Globalization.CultureInfo.InvariantCulture + ); + using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) + { + jsonTextWriter.IndentChar = ' '; + jsonTextWriter.Indentation = 2; + jsonTextWriter.Formatting = Formatting.Indented; + jsonSerializer.Serialize(jsonTextWriter, this, null); + } + + return stringWriter.ToString(); + } + } }